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 mod error;
5mod util;
6pub use near_account_id::AccountId;
7pub use near_gas::NearGas;
8pub use near_token::NearToken;
9pub use util::CryptoHash;
10
11#[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"]
12#[doc = r""]
13#[doc = r" <details><summary>JSON schema</summary>"]
14#[doc = r""]
15#[doc = r" ```json"]
16#[doc = "{"]
17#[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\","]
18#[doc = "  \"type\": \"object\","]
19#[doc = "  \"required\": ["]
20#[doc = "    \"nonce\","]
21#[doc = "    \"permission\""]
22#[doc = "  ],"]
23#[doc = "  \"properties\": {"]
24#[doc = "    \"nonce\": {"]
25#[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.\","]
26#[doc = "      \"type\": \"integer\","]
27#[doc = "      \"format\": \"uint64\","]
28#[doc = "      \"minimum\": 0.0"]
29#[doc = "    },"]
30#[doc = "    \"permission\": {"]
31#[doc = "      \"description\": \"Defines permissions for this access key.\","]
32#[doc = "      \"allOf\": ["]
33#[doc = "        {"]
34#[doc = "          \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
35#[doc = "        }"]
36#[doc = "      ]"]
37#[doc = "    }"]
38#[doc = "  }"]
39#[doc = "}"]
40#[doc = r" ```"]
41#[doc = r" </details>"]
42#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
43pub struct AccessKey {
44    #[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."]
45    pub nonce: u64,
46    #[doc = "Defines permissions for this access key."]
47    pub permission: AccessKeyPermission,
48}
49impl ::std::convert::From<&AccessKey> for AccessKey {
50    fn from(value: &AccessKey) -> Self {
51        value.clone()
52    }
53}
54#[doc = "Describes the cost of creating an access key."]
55#[doc = r""]
56#[doc = r" <details><summary>JSON schema</summary>"]
57#[doc = r""]
58#[doc = r" ```json"]
59#[doc = "{"]
60#[doc = "  \"description\": \"Describes the cost of creating an access key.\","]
61#[doc = "  \"type\": \"object\","]
62#[doc = "  \"required\": ["]
63#[doc = "    \"full_access_cost\","]
64#[doc = "    \"function_call_cost\","]
65#[doc = "    \"function_call_cost_per_byte\""]
66#[doc = "  ],"]
67#[doc = "  \"properties\": {"]
68#[doc = "    \"full_access_cost\": {"]
69#[doc = "      \"description\": \"Base cost of creating a full access access-key.\","]
70#[doc = "      \"allOf\": ["]
71#[doc = "        {"]
72#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
73#[doc = "        }"]
74#[doc = "      ]"]
75#[doc = "    },"]
76#[doc = "    \"function_call_cost\": {"]
77#[doc = "      \"description\": \"Base cost of creating an access-key restricted to specific functions.\","]
78#[doc = "      \"allOf\": ["]
79#[doc = "        {"]
80#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
81#[doc = "        }"]
82#[doc = "      ]"]
83#[doc = "    },"]
84#[doc = "    \"function_call_cost_per_byte\": {"]
85#[doc = "      \"description\": \"Cost per byte of method_names of creating a restricted access-key.\","]
86#[doc = "      \"allOf\": ["]
87#[doc = "        {"]
88#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
89#[doc = "        }"]
90#[doc = "      ]"]
91#[doc = "    }"]
92#[doc = "  }"]
93#[doc = "}"]
94#[doc = r" ```"]
95#[doc = r" </details>"]
96#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
97pub struct AccessKeyCreationConfigView {
98    #[doc = "Base cost of creating a full access access-key."]
99    pub full_access_cost: Fee,
100    #[doc = "Base cost of creating an access-key restricted to specific functions."]
101    pub function_call_cost: Fee,
102    #[doc = "Cost per byte of method_names of creating a restricted access-key."]
103    pub function_call_cost_per_byte: Fee,
104}
105impl ::std::convert::From<&AccessKeyCreationConfigView> for AccessKeyCreationConfigView {
106    fn from(value: &AccessKeyCreationConfigView) -> Self {
107        value.clone()
108    }
109}
110#[doc = "Describes information about an access key including the public key."]
111#[doc = r""]
112#[doc = r" <details><summary>JSON schema</summary>"]
113#[doc = r""]
114#[doc = r" ```json"]
115#[doc = "{"]
116#[doc = "  \"description\": \"Describes information about an access key including the public key.\","]
117#[doc = "  \"type\": \"object\","]
118#[doc = "  \"required\": ["]
119#[doc = "    \"access_key\","]
120#[doc = "    \"public_key\""]
121#[doc = "  ],"]
122#[doc = "  \"properties\": {"]
123#[doc = "    \"access_key\": {"]
124#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
125#[doc = "    },"]
126#[doc = "    \"public_key\": {"]
127#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
128#[doc = "    }"]
129#[doc = "  }"]
130#[doc = "}"]
131#[doc = r" ```"]
132#[doc = r" </details>"]
133#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
134pub struct AccessKeyInfoView {
135    pub access_key: AccessKeyView,
136    pub public_key: PublicKey,
137}
138impl ::std::convert::From<&AccessKeyInfoView> for AccessKeyInfoView {
139    fn from(value: &AccessKeyInfoView) -> Self {
140        value.clone()
141    }
142}
143#[doc = "Lists access keys"]
144#[doc = r""]
145#[doc = r" <details><summary>JSON schema</summary>"]
146#[doc = r""]
147#[doc = r" ```json"]
148#[doc = "{"]
149#[doc = "  \"description\": \"Lists access keys\","]
150#[doc = "  \"type\": \"object\","]
151#[doc = "  \"required\": ["]
152#[doc = "    \"keys\""]
153#[doc = "  ],"]
154#[doc = "  \"properties\": {"]
155#[doc = "    \"keys\": {"]
156#[doc = "      \"type\": \"array\","]
157#[doc = "      \"items\": {"]
158#[doc = "        \"$ref\": \"#/components/schemas/AccessKeyInfoView\""]
159#[doc = "      }"]
160#[doc = "    }"]
161#[doc = "  }"]
162#[doc = "}"]
163#[doc = r" ```"]
164#[doc = r" </details>"]
165#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
166pub struct AccessKeyList {
167    pub keys: ::std::vec::Vec<AccessKeyInfoView>,
168}
169impl ::std::convert::From<&AccessKeyList> for AccessKeyList {
170    fn from(value: &AccessKeyList) -> Self {
171        value.clone()
172    }
173}
174#[doc = "Defines permissions for AccessKey"]
175#[doc = r""]
176#[doc = r" <details><summary>JSON schema</summary>"]
177#[doc = r""]
178#[doc = r" ```json"]
179#[doc = "{"]
180#[doc = "  \"description\": \"Defines permissions for AccessKey\","]
181#[doc = "  \"oneOf\": ["]
182#[doc = "    {"]
183#[doc = "      \"type\": \"object\","]
184#[doc = "      \"required\": ["]
185#[doc = "        \"FunctionCall\""]
186#[doc = "      ],"]
187#[doc = "      \"properties\": {"]
188#[doc = "        \"FunctionCall\": {"]
189#[doc = "          \"$ref\": \"#/components/schemas/FunctionCallPermission\""]
190#[doc = "        }"]
191#[doc = "      },"]
192#[doc = "      \"additionalProperties\": false"]
193#[doc = "    },"]
194#[doc = "    {"]
195#[doc = "      \"description\": \"Grants full access to the account.\\nNOTE: It's used to replace account-level public keys.\","]
196#[doc = "      \"type\": \"string\","]
197#[doc = "      \"enum\": ["]
198#[doc = "        \"FullAccess\""]
199#[doc = "      ]"]
200#[doc = "    }"]
201#[doc = "  ]"]
202#[doc = "}"]
203#[doc = r" ```"]
204#[doc = r" </details>"]
205#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
206pub enum AccessKeyPermission {
207    FunctionCall(FunctionCallPermission),
208    #[doc = "Grants full access to the account.\nNOTE: It's used to replace account-level public keys."]
209    FullAccess,
210}
211impl ::std::convert::From<&Self> for AccessKeyPermission {
212    fn from(value: &AccessKeyPermission) -> Self {
213        value.clone()
214    }
215}
216impl ::std::convert::From<FunctionCallPermission> for AccessKeyPermission {
217    fn from(value: FunctionCallPermission) -> Self {
218        Self::FunctionCall(value)
219    }
220}
221#[doc = "Describes the permission scope for an access key. Whether it is a function call or a full access key."]
222#[doc = r""]
223#[doc = r" <details><summary>JSON schema</summary>"]
224#[doc = r""]
225#[doc = r" ```json"]
226#[doc = "{"]
227#[doc = "  \"description\": \"Describes the permission scope for an access key. Whether it is a function call or a full access key.\","]
228#[doc = "  \"oneOf\": ["]
229#[doc = "    {"]
230#[doc = "      \"type\": \"string\","]
231#[doc = "      \"enum\": ["]
232#[doc = "        \"FullAccess\""]
233#[doc = "      ]"]
234#[doc = "    },"]
235#[doc = "    {"]
236#[doc = "      \"type\": \"object\","]
237#[doc = "      \"required\": ["]
238#[doc = "        \"FunctionCall\""]
239#[doc = "      ],"]
240#[doc = "      \"properties\": {"]
241#[doc = "        \"FunctionCall\": {"]
242#[doc = "          \"type\": \"object\","]
243#[doc = "          \"required\": ["]
244#[doc = "            \"method_names\","]
245#[doc = "            \"receiver_id\""]
246#[doc = "          ],"]
247#[doc = "          \"properties\": {"]
248#[doc = "            \"allowance\": {"]
249#[doc = "              \"anyOf\": ["]
250#[doc = "                {"]
251#[doc = "                  \"$ref\": \"#/components/schemas/NearToken\""]
252#[doc = "                },"]
253#[doc = "                {"]
254#[doc = "                  \"type\": \"null\""]
255#[doc = "                }"]
256#[doc = "              ]"]
257#[doc = "            },"]
258#[doc = "            \"method_names\": {"]
259#[doc = "              \"type\": \"array\","]
260#[doc = "              \"items\": {"]
261#[doc = "                \"type\": \"string\""]
262#[doc = "              }"]
263#[doc = "            },"]
264#[doc = "            \"receiver_id\": {"]
265#[doc = "              \"type\": \"string\""]
266#[doc = "            }"]
267#[doc = "          }"]
268#[doc = "        }"]
269#[doc = "      },"]
270#[doc = "      \"additionalProperties\": false"]
271#[doc = "    }"]
272#[doc = "  ]"]
273#[doc = "}"]
274#[doc = r" ```"]
275#[doc = r" </details>"]
276#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
277pub enum AccessKeyPermissionView {
278    FullAccess,
279    FunctionCall {
280        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
281        allowance: ::std::option::Option<NearToken>,
282        method_names: ::std::vec::Vec<::std::string::String>,
283        receiver_id: ::std::string::String,
284    },
285}
286impl ::std::convert::From<&Self> for AccessKeyPermissionView {
287    fn from(value: &AccessKeyPermissionView) -> Self {
288        value.clone()
289    }
290}
291#[doc = "Describes access key permission scope and nonce."]
292#[doc = r""]
293#[doc = r" <details><summary>JSON schema</summary>"]
294#[doc = r""]
295#[doc = r" ```json"]
296#[doc = "{"]
297#[doc = "  \"description\": \"Describes access key permission scope and nonce.\","]
298#[doc = "  \"type\": \"object\","]
299#[doc = "  \"required\": ["]
300#[doc = "    \"nonce\","]
301#[doc = "    \"permission\""]
302#[doc = "  ],"]
303#[doc = "  \"properties\": {"]
304#[doc = "    \"nonce\": {"]
305#[doc = "      \"type\": \"integer\","]
306#[doc = "      \"format\": \"uint64\","]
307#[doc = "      \"minimum\": 0.0"]
308#[doc = "    },"]
309#[doc = "    \"permission\": {"]
310#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
311#[doc = "    }"]
312#[doc = "  }"]
313#[doc = "}"]
314#[doc = r" ```"]
315#[doc = r" </details>"]
316#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
317pub struct AccessKeyView {
318    pub nonce: u64,
319    pub permission: AccessKeyPermissionView,
320}
321impl ::std::convert::From<&AccessKeyView> for AccessKeyView {
322    fn from(value: &AccessKeyView) -> Self {
323        value.clone()
324    }
325}
326#[doc = "`AccountChangesByBlockIdChangesType`"]
327#[doc = r""]
328#[doc = r" <details><summary>JSON schema</summary>"]
329#[doc = r""]
330#[doc = r" ```json"]
331#[doc = "{"]
332#[doc = "  \"type\": \"string\","]
333#[doc = "  \"enum\": ["]
334#[doc = "    \"account_changes\""]
335#[doc = "  ]"]
336#[doc = "}"]
337#[doc = r" ```"]
338#[doc = r" </details>"]
339#[derive(
340    :: serde :: Deserialize,
341    :: serde :: Serialize,
342    Clone,
343    Copy,
344    Debug,
345    Eq,
346    Hash,
347    Ord,
348    PartialEq,
349    PartialOrd,
350)]
351pub enum AccountChangesByBlockIdChangesType {
352    #[serde(rename = "account_changes")]
353    AccountChanges,
354}
355impl ::std::convert::From<&Self> for AccountChangesByBlockIdChangesType {
356    fn from(value: &AccountChangesByBlockIdChangesType) -> Self {
357        value.clone()
358    }
359}
360impl ::std::fmt::Display for AccountChangesByBlockIdChangesType {
361    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
362        match *self {
363            Self::AccountChanges => f.write_str("account_changes"),
364        }
365    }
366}
367impl ::std::str::FromStr for AccountChangesByBlockIdChangesType {
368    type Err = self::error::ConversionError;
369    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
370        match value {
371            "account_changes" => Ok(Self::AccountChanges),
372            _ => Err("invalid value".into()),
373        }
374    }
375}
376impl ::std::convert::TryFrom<&str> for AccountChangesByBlockIdChangesType {
377    type Error = self::error::ConversionError;
378    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
379        value.parse()
380    }
381}
382impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByBlockIdChangesType {
383    type Error = self::error::ConversionError;
384    fn try_from(
385        value: &::std::string::String,
386    ) -> ::std::result::Result<Self, self::error::ConversionError> {
387        value.parse()
388    }
389}
390impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByBlockIdChangesType {
391    type Error = self::error::ConversionError;
392    fn try_from(
393        value: ::std::string::String,
394    ) -> ::std::result::Result<Self, self::error::ConversionError> {
395        value.parse()
396    }
397}
398#[doc = "`AccountChangesByFinalityChangesType`"]
399#[doc = r""]
400#[doc = r" <details><summary>JSON schema</summary>"]
401#[doc = r""]
402#[doc = r" ```json"]
403#[doc = "{"]
404#[doc = "  \"type\": \"string\","]
405#[doc = "  \"enum\": ["]
406#[doc = "    \"account_changes\""]
407#[doc = "  ]"]
408#[doc = "}"]
409#[doc = r" ```"]
410#[doc = r" </details>"]
411#[derive(
412    :: serde :: Deserialize,
413    :: serde :: Serialize,
414    Clone,
415    Copy,
416    Debug,
417    Eq,
418    Hash,
419    Ord,
420    PartialEq,
421    PartialOrd,
422)]
423pub enum AccountChangesByFinalityChangesType {
424    #[serde(rename = "account_changes")]
425    AccountChanges,
426}
427impl ::std::convert::From<&Self> for AccountChangesByFinalityChangesType {
428    fn from(value: &AccountChangesByFinalityChangesType) -> Self {
429        value.clone()
430    }
431}
432impl ::std::fmt::Display for AccountChangesByFinalityChangesType {
433    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
434        match *self {
435            Self::AccountChanges => f.write_str("account_changes"),
436        }
437    }
438}
439impl ::std::str::FromStr for AccountChangesByFinalityChangesType {
440    type Err = self::error::ConversionError;
441    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
442        match value {
443            "account_changes" => Ok(Self::AccountChanges),
444            _ => Err("invalid value".into()),
445        }
446    }
447}
448impl ::std::convert::TryFrom<&str> for AccountChangesByFinalityChangesType {
449    type Error = self::error::ConversionError;
450    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
451        value.parse()
452    }
453}
454impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByFinalityChangesType {
455    type Error = self::error::ConversionError;
456    fn try_from(
457        value: &::std::string::String,
458    ) -> ::std::result::Result<Self, self::error::ConversionError> {
459        value.parse()
460    }
461}
462impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByFinalityChangesType {
463    type Error = self::error::ConversionError;
464    fn try_from(
465        value: ::std::string::String,
466    ) -> ::std::result::Result<Self, self::error::ConversionError> {
467        value.parse()
468    }
469}
470#[doc = "`AccountChangesBySyncCheckpointChangesType`"]
471#[doc = r""]
472#[doc = r" <details><summary>JSON schema</summary>"]
473#[doc = r""]
474#[doc = r" ```json"]
475#[doc = "{"]
476#[doc = "  \"type\": \"string\","]
477#[doc = "  \"enum\": ["]
478#[doc = "    \"account_changes\""]
479#[doc = "  ]"]
480#[doc = "}"]
481#[doc = r" ```"]
482#[doc = r" </details>"]
483#[derive(
484    :: serde :: Deserialize,
485    :: serde :: Serialize,
486    Clone,
487    Copy,
488    Debug,
489    Eq,
490    Hash,
491    Ord,
492    PartialEq,
493    PartialOrd,
494)]
495pub enum AccountChangesBySyncCheckpointChangesType {
496    #[serde(rename = "account_changes")]
497    AccountChanges,
498}
499impl ::std::convert::From<&Self> for AccountChangesBySyncCheckpointChangesType {
500    fn from(value: &AccountChangesBySyncCheckpointChangesType) -> Self {
501        value.clone()
502    }
503}
504impl ::std::fmt::Display for AccountChangesBySyncCheckpointChangesType {
505    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
506        match *self {
507            Self::AccountChanges => f.write_str("account_changes"),
508        }
509    }
510}
511impl ::std::str::FromStr for AccountChangesBySyncCheckpointChangesType {
512    type Err = self::error::ConversionError;
513    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
514        match value {
515            "account_changes" => Ok(Self::AccountChanges),
516            _ => Err("invalid value".into()),
517        }
518    }
519}
520impl ::std::convert::TryFrom<&str> for AccountChangesBySyncCheckpointChangesType {
521    type Error = self::error::ConversionError;
522    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
523        value.parse()
524    }
525}
526impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesBySyncCheckpointChangesType {
527    type Error = self::error::ConversionError;
528    fn try_from(
529        value: &::std::string::String,
530    ) -> ::std::result::Result<Self, self::error::ConversionError> {
531        value.parse()
532    }
533}
534impl ::std::convert::TryFrom<::std::string::String> for AccountChangesBySyncCheckpointChangesType {
535    type Error = self::error::ConversionError;
536    fn try_from(
537        value: ::std::string::String,
538    ) -> ::std::result::Result<Self, self::error::ConversionError> {
539        value.parse()
540    }
541}
542#[doc = "The structure describes configuration for creation of new accounts."]
543#[doc = r""]
544#[doc = r" <details><summary>JSON schema</summary>"]
545#[doc = r""]
546#[doc = r" ```json"]
547#[doc = "{"]
548#[doc = "  \"description\": \"The structure describes configuration for creation of new accounts.\","]
549#[doc = "  \"type\": \"object\","]
550#[doc = "  \"properties\": {"]
551#[doc = "    \"min_allowed_top_level_account_length\": {"]
552#[doc = "      \"description\": \"The minimum length of the top-level account ID that is allowed to be created by any account.\","]
553#[doc = "      \"type\": \"integer\","]
554#[doc = "      \"format\": \"uint8\","]
555#[doc = "      \"maximum\": 255.0,"]
556#[doc = "      \"minimum\": 0.0"]
557#[doc = "    },"]
558#[doc = "    \"registrar_account_id\": {"]
559#[doc = "      \"description\": \"The account ID of the account registrar. This account ID allowed to create top-level\\naccounts of any valid length.\","]
560#[doc = "      \"allOf\": ["]
561#[doc = "        {"]
562#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
563#[doc = "        }"]
564#[doc = "      ]"]
565#[doc = "    }"]
566#[doc = "  }"]
567#[doc = "}"]
568#[doc = r" ```"]
569#[doc = r" </details>"]
570#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
571pub struct AccountCreationConfigView {
572    #[doc = "The minimum length of the top-level account ID that is allowed to be created by any account."]
573    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
574    pub min_allowed_top_level_account_length: ::std::option::Option<u8>,
575    #[doc = "The account ID of the account registrar. This account ID allowed to create top-level\naccounts of any valid length."]
576    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
577    pub registrar_account_id: ::std::option::Option<AccountId>,
578}
579impl ::std::convert::From<&AccountCreationConfigView> for AccountCreationConfigView {
580    fn from(value: &AccountCreationConfigView) -> Self {
581        value.clone()
582    }
583}
584impl ::std::default::Default for AccountCreationConfigView {
585    fn default() -> Self {
586        Self {
587            min_allowed_top_level_account_length: Default::default(),
588            registrar_account_id: Default::default(),
589        }
590    }
591}
592#[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)"]
593#[doc = r""]
594#[doc = r" <details><summary>JSON schema</summary>"]
595#[doc = r""]
596#[doc = r" ```json"]
597#[doc = "{"]
598#[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)\","]
599#[doc = "  \"type\": \"object\","]
600#[doc = "  \"required\": ["]
601#[doc = "    \"account_key\","]
602#[doc = "    \"peer_id\","]
603#[doc = "    \"proxies\","]
604#[doc = "    \"timestamp\""]
605#[doc = "  ],"]
606#[doc = "  \"properties\": {"]
607#[doc = "    \"account_key\": {"]
608#[doc = "      \"description\": \"Account key of the validator signing this AccountData.\","]
609#[doc = "      \"allOf\": ["]
610#[doc = "        {"]
611#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
612#[doc = "        }"]
613#[doc = "      ]"]
614#[doc = "    },"]
615#[doc = "    \"peer_id\": {"]
616#[doc = "      \"description\": \"ID of the node that handles the account key (aka validator key).\","]
617#[doc = "      \"allOf\": ["]
618#[doc = "        {"]
619#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
620#[doc = "        }"]
621#[doc = "      ]"]
622#[doc = "    },"]
623#[doc = "    \"proxies\": {"]
624#[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.\","]
625#[doc = "      \"type\": \"array\","]
626#[doc = "      \"items\": {"]
627#[doc = "        \"$ref\": \"#/components/schemas/Tier1ProxyView\""]
628#[doc = "      }"]
629#[doc = "    },"]
630#[doc = "    \"timestamp\": {"]
631#[doc = "      \"description\": \"UTC timestamp of when the AccountData has been signed.\","]
632#[doc = "      \"type\": \"string\""]
633#[doc = "    }"]
634#[doc = "  }"]
635#[doc = "}"]
636#[doc = r" ```"]
637#[doc = r" </details>"]
638#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
639pub struct AccountDataView {
640    #[doc = "Account key of the validator signing this AccountData."]
641    pub account_key: PublicKey,
642    #[doc = "ID of the node that handles the account key (aka validator key)."]
643    pub peer_id: PublicKey,
644    #[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."]
645    pub proxies: ::std::vec::Vec<Tier1ProxyView>,
646    #[doc = "UTC timestamp of when the AccountData has been signed."]
647    pub timestamp: ::std::string::String,
648}
649impl ::std::convert::From<&AccountDataView> for AccountDataView {
650    fn from(value: &AccountDataView) -> Self {
651        value.clone()
652    }
653}
654#[doc = "`AccountIdValidityRulesVersion`"]
655#[doc = r""]
656#[doc = r" <details><summary>JSON schema</summary>"]
657#[doc = r""]
658#[doc = r" ```json"]
659#[doc = "{"]
660#[doc = "  \"type\": \"integer\","]
661#[doc = "  \"format\": \"uint8\","]
662#[doc = "  \"maximum\": 255.0,"]
663#[doc = "  \"minimum\": 0.0"]
664#[doc = "}"]
665#[doc = r" ```"]
666#[doc = r" </details>"]
667#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
668#[serde(transparent)]
669pub struct AccountIdValidityRulesVersion(pub u8);
670impl ::std::ops::Deref for AccountIdValidityRulesVersion {
671    type Target = u8;
672    fn deref(&self) -> &u8 {
673        &self.0
674    }
675}
676impl ::std::convert::From<AccountIdValidityRulesVersion> for u8 {
677    fn from(value: AccountIdValidityRulesVersion) -> Self {
678        value.0
679    }
680}
681impl ::std::convert::From<&AccountIdValidityRulesVersion> for AccountIdValidityRulesVersion {
682    fn from(value: &AccountIdValidityRulesVersion) -> Self {
683        value.clone()
684    }
685}
686impl ::std::convert::From<u8> for AccountIdValidityRulesVersion {
687    fn from(value: u8) -> Self {
688        Self(value)
689    }
690}
691impl ::std::str::FromStr for AccountIdValidityRulesVersion {
692    type Err = <u8 as ::std::str::FromStr>::Err;
693    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
694        Ok(Self(value.parse()?))
695    }
696}
697impl ::std::convert::TryFrom<&str> for AccountIdValidityRulesVersion {
698    type Error = <u8 as ::std::str::FromStr>::Err;
699    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
700        value.parse()
701    }
702}
703impl ::std::convert::TryFrom<&String> for AccountIdValidityRulesVersion {
704    type Error = <u8 as ::std::str::FromStr>::Err;
705    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
706        value.parse()
707    }
708}
709impl ::std::convert::TryFrom<String> for AccountIdValidityRulesVersion {
710    type Error = <u8 as ::std::str::FromStr>::Err;
711    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
712        value.parse()
713    }
714}
715impl ::std::fmt::Display for AccountIdValidityRulesVersion {
716    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
717        self.0.fmt(f)
718    }
719}
720#[doc = "Account info for validators"]
721#[doc = r""]
722#[doc = r" <details><summary>JSON schema</summary>"]
723#[doc = r""]
724#[doc = r" ```json"]
725#[doc = "{"]
726#[doc = "  \"description\": \"Account info for validators\","]
727#[doc = "  \"type\": \"object\","]
728#[doc = "  \"required\": ["]
729#[doc = "    \"account_id\","]
730#[doc = "    \"amount\","]
731#[doc = "    \"public_key\""]
732#[doc = "  ],"]
733#[doc = "  \"properties\": {"]
734#[doc = "    \"account_id\": {"]
735#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
736#[doc = "    },"]
737#[doc = "    \"amount\": {"]
738#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
739#[doc = "    },"]
740#[doc = "    \"public_key\": {"]
741#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
742#[doc = "    }"]
743#[doc = "  }"]
744#[doc = "}"]
745#[doc = r" ```"]
746#[doc = r" </details>"]
747#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
748pub struct AccountInfo {
749    pub account_id: AccountId,
750    pub amount: NearToken,
751    pub public_key: PublicKey,
752}
753impl ::std::convert::From<&AccountInfo> for AccountInfo {
754    fn from(value: &AccountInfo) -> Self {
755        value.clone()
756    }
757}
758#[doc = "A view of the account"]
759#[doc = r""]
760#[doc = r" <details><summary>JSON schema</summary>"]
761#[doc = r""]
762#[doc = r" ```json"]
763#[doc = "{"]
764#[doc = "  \"description\": \"A view of the account\","]
765#[doc = "  \"type\": \"object\","]
766#[doc = "  \"required\": ["]
767#[doc = "    \"amount\","]
768#[doc = "    \"code_hash\","]
769#[doc = "    \"locked\","]
770#[doc = "    \"storage_usage\""]
771#[doc = "  ],"]
772#[doc = "  \"properties\": {"]
773#[doc = "    \"amount\": {"]
774#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
775#[doc = "    },"]
776#[doc = "    \"code_hash\": {"]
777#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
778#[doc = "    },"]
779#[doc = "    \"global_contract_account_id\": {"]
780#[doc = "      \"anyOf\": ["]
781#[doc = "        {"]
782#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
783#[doc = "        },"]
784#[doc = "        {"]
785#[doc = "          \"type\": \"null\""]
786#[doc = "        }"]
787#[doc = "      ]"]
788#[doc = "    },"]
789#[doc = "    \"global_contract_hash\": {"]
790#[doc = "      \"anyOf\": ["]
791#[doc = "        {"]
792#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
793#[doc = "        },"]
794#[doc = "        {"]
795#[doc = "          \"type\": \"null\""]
796#[doc = "        }"]
797#[doc = "      ]"]
798#[doc = "    },"]
799#[doc = "    \"locked\": {"]
800#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
801#[doc = "    },"]
802#[doc = "    \"storage_paid_at\": {"]
803#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
804#[doc = "      \"default\": 0,"]
805#[doc = "      \"type\": \"integer\","]
806#[doc = "      \"format\": \"uint64\","]
807#[doc = "      \"minimum\": 0.0"]
808#[doc = "    },"]
809#[doc = "    \"storage_usage\": {"]
810#[doc = "      \"type\": \"integer\","]
811#[doc = "      \"format\": \"uint64\","]
812#[doc = "      \"minimum\": 0.0"]
813#[doc = "    }"]
814#[doc = "  }"]
815#[doc = "}"]
816#[doc = r" ```"]
817#[doc = r" </details>"]
818#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
819pub struct AccountView {
820    pub amount: NearToken,
821    pub code_hash: CryptoHash,
822    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
823    pub global_contract_account_id: ::std::option::Option<AccountId>,
824    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
825    pub global_contract_hash: ::std::option::Option<CryptoHash>,
826    pub locked: NearToken,
827    #[doc = "TODO(2271): deprecated."]
828    #[serde(default)]
829    pub storage_paid_at: u64,
830    pub storage_usage: u64,
831}
832impl ::std::convert::From<&AccountView> for AccountView {
833    fn from(value: &AccountView) -> Self {
834        value.clone()
835    }
836}
837#[doc = "Account ID with its public key."]
838#[doc = r""]
839#[doc = r" <details><summary>JSON schema</summary>"]
840#[doc = r""]
841#[doc = r" ```json"]
842#[doc = "{"]
843#[doc = "  \"description\": \"Account ID with its public key.\","]
844#[doc = "  \"type\": \"object\","]
845#[doc = "  \"required\": ["]
846#[doc = "    \"account_id\","]
847#[doc = "    \"public_key\""]
848#[doc = "  ],"]
849#[doc = "  \"properties\": {"]
850#[doc = "    \"account_id\": {"]
851#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
852#[doc = "    },"]
853#[doc = "    \"public_key\": {"]
854#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
855#[doc = "    }"]
856#[doc = "  }"]
857#[doc = "}"]
858#[doc = r" ```"]
859#[doc = r" </details>"]
860#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
861pub struct AccountWithPublicKey {
862    pub account_id: AccountId,
863    pub public_key: PublicKey,
864}
865impl ::std::convert::From<&AccountWithPublicKey> for AccountWithPublicKey {
866    fn from(value: &AccountWithPublicKey) -> Self {
867        value.clone()
868    }
869}
870#[doc = "Describes the cost of creating a specific action, `Action`. Includes all variants."]
871#[doc = r""]
872#[doc = r" <details><summary>JSON schema</summary>"]
873#[doc = r""]
874#[doc = r" ```json"]
875#[doc = "{"]
876#[doc = "  \"description\": \"Describes the cost of creating a specific action, `Action`. Includes all variants.\","]
877#[doc = "  \"type\": \"object\","]
878#[doc = "  \"properties\": {"]
879#[doc = "    \"add_key_cost\": {"]
880#[doc = "      \"description\": \"Base cost of adding a key.\","]
881#[doc = "      \"allOf\": ["]
882#[doc = "        {"]
883#[doc = "          \"$ref\": \"#/components/schemas/AccessKeyCreationConfigView\""]
884#[doc = "        }"]
885#[doc = "      ]"]
886#[doc = "    },"]
887#[doc = "    \"create_account_cost\": {"]
888#[doc = "      \"description\": \"Base cost of creating an account.\","]
889#[doc = "      \"allOf\": ["]
890#[doc = "        {"]
891#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
892#[doc = "        }"]
893#[doc = "      ]"]
894#[doc = "    },"]
895#[doc = "    \"delegate_cost\": {"]
896#[doc = "      \"description\": \"Base cost for processing a delegate action.\\n\\nThis is on top of the costs for the actions inside the delegate action.\","]
897#[doc = "      \"allOf\": ["]
898#[doc = "        {"]
899#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
900#[doc = "        }"]
901#[doc = "      ]"]
902#[doc = "    },"]
903#[doc = "    \"delete_account_cost\": {"]
904#[doc = "      \"description\": \"Base cost of deleting an account.\","]
905#[doc = "      \"allOf\": ["]
906#[doc = "        {"]
907#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
908#[doc = "        }"]
909#[doc = "      ]"]
910#[doc = "    },"]
911#[doc = "    \"delete_key_cost\": {"]
912#[doc = "      \"description\": \"Base cost of deleting a key.\","]
913#[doc = "      \"allOf\": ["]
914#[doc = "        {"]
915#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
916#[doc = "        }"]
917#[doc = "      ]"]
918#[doc = "    },"]
919#[doc = "    \"deploy_contract_cost\": {"]
920#[doc = "      \"description\": \"Base cost of deploying a contract.\","]
921#[doc = "      \"allOf\": ["]
922#[doc = "        {"]
923#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
924#[doc = "        }"]
925#[doc = "      ]"]
926#[doc = "    },"]
927#[doc = "    \"deploy_contract_cost_per_byte\": {"]
928#[doc = "      \"description\": \"Cost per byte of deploying a contract.\","]
929#[doc = "      \"allOf\": ["]
930#[doc = "        {"]
931#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
932#[doc = "        }"]
933#[doc = "      ]"]
934#[doc = "    },"]
935#[doc = "    \"function_call_cost\": {"]
936#[doc = "      \"description\": \"Base cost of calling a function.\","]
937#[doc = "      \"allOf\": ["]
938#[doc = "        {"]
939#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
940#[doc = "        }"]
941#[doc = "      ]"]
942#[doc = "    },"]
943#[doc = "    \"function_call_cost_per_byte\": {"]
944#[doc = "      \"description\": \"Cost per byte of method name and arguments of calling a function.\","]
945#[doc = "      \"allOf\": ["]
946#[doc = "        {"]
947#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
948#[doc = "        }"]
949#[doc = "      ]"]
950#[doc = "    },"]
951#[doc = "    \"stake_cost\": {"]
952#[doc = "      \"description\": \"Base cost of staking.\","]
953#[doc = "      \"allOf\": ["]
954#[doc = "        {"]
955#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
956#[doc = "        }"]
957#[doc = "      ]"]
958#[doc = "    },"]
959#[doc = "    \"transfer_cost\": {"]
960#[doc = "      \"description\": \"Base cost of making a transfer.\","]
961#[doc = "      \"allOf\": ["]
962#[doc = "        {"]
963#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
964#[doc = "        }"]
965#[doc = "      ]"]
966#[doc = "    }"]
967#[doc = "  }"]
968#[doc = "}"]
969#[doc = r" ```"]
970#[doc = r" </details>"]
971#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
972pub struct ActionCreationConfigView {
973    #[doc = "Base cost of adding a key."]
974    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
975    pub add_key_cost: ::std::option::Option<AccessKeyCreationConfigView>,
976    #[doc = "Base cost of creating an account."]
977    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
978    pub create_account_cost: ::std::option::Option<Fee>,
979    #[doc = "Base cost for processing a delegate action.\n\nThis is on top of the costs for the actions inside the delegate action."]
980    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
981    pub delegate_cost: ::std::option::Option<Fee>,
982    #[doc = "Base cost of deleting an account."]
983    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
984    pub delete_account_cost: ::std::option::Option<Fee>,
985    #[doc = "Base cost of deleting a key."]
986    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
987    pub delete_key_cost: ::std::option::Option<Fee>,
988    #[doc = "Base cost of deploying a contract."]
989    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
990    pub deploy_contract_cost: ::std::option::Option<Fee>,
991    #[doc = "Cost per byte of deploying a contract."]
992    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
993    pub deploy_contract_cost_per_byte: ::std::option::Option<Fee>,
994    #[doc = "Base cost of calling a function."]
995    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
996    pub function_call_cost: ::std::option::Option<Fee>,
997    #[doc = "Cost per byte of method name and arguments of calling a function."]
998    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
999    pub function_call_cost_per_byte: ::std::option::Option<Fee>,
1000    #[doc = "Base cost of staking."]
1001    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1002    pub stake_cost: ::std::option::Option<Fee>,
1003    #[doc = "Base cost of making a transfer."]
1004    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1005    pub transfer_cost: ::std::option::Option<Fee>,
1006}
1007impl ::std::convert::From<&ActionCreationConfigView> for ActionCreationConfigView {
1008    fn from(value: &ActionCreationConfigView) -> Self {
1009        value.clone()
1010    }
1011}
1012impl ::std::default::Default for ActionCreationConfigView {
1013    fn default() -> Self {
1014        Self {
1015            add_key_cost: Default::default(),
1016            create_account_cost: Default::default(),
1017            delegate_cost: Default::default(),
1018            delete_account_cost: Default::default(),
1019            delete_key_cost: Default::default(),
1020            deploy_contract_cost: Default::default(),
1021            deploy_contract_cost_per_byte: Default::default(),
1022            function_call_cost: Default::default(),
1023            function_call_cost_per_byte: Default::default(),
1024            stake_cost: Default::default(),
1025            transfer_cost: Default::default(),
1026        }
1027    }
1028}
1029#[doc = "An error happened during Action execution"]
1030#[doc = r""]
1031#[doc = r" <details><summary>JSON schema</summary>"]
1032#[doc = r""]
1033#[doc = r" ```json"]
1034#[doc = "{"]
1035#[doc = "  \"description\": \"An error happened during Action execution\","]
1036#[doc = "  \"type\": \"object\","]
1037#[doc = "  \"required\": ["]
1038#[doc = "    \"kind\""]
1039#[doc = "  ],"]
1040#[doc = "  \"properties\": {"]
1041#[doc = "    \"index\": {"]
1042#[doc = "      \"description\": \"Index of the failed action in the transaction.\\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`\","]
1043#[doc = "      \"type\": ["]
1044#[doc = "        \"integer\","]
1045#[doc = "        \"null\""]
1046#[doc = "      ],"]
1047#[doc = "      \"format\": \"uint64\","]
1048#[doc = "      \"minimum\": 0.0"]
1049#[doc = "    },"]
1050#[doc = "    \"kind\": {"]
1051#[doc = "      \"description\": \"The kind of ActionError happened\","]
1052#[doc = "      \"allOf\": ["]
1053#[doc = "        {"]
1054#[doc = "          \"$ref\": \"#/components/schemas/ActionErrorKind\""]
1055#[doc = "        }"]
1056#[doc = "      ]"]
1057#[doc = "    }"]
1058#[doc = "  }"]
1059#[doc = "}"]
1060#[doc = r" ```"]
1061#[doc = r" </details>"]
1062#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1063pub struct ActionError {
1064    #[doc = "Index of the failed action in the transaction.\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`"]
1065    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1066    pub index: ::std::option::Option<u64>,
1067    #[doc = "The kind of ActionError happened"]
1068    pub kind: ActionErrorKind,
1069}
1070impl ::std::convert::From<&ActionError> for ActionError {
1071    fn from(value: &ActionError) -> Self {
1072        value.clone()
1073    }
1074}
1075#[doc = "`ActionErrorKind`"]
1076#[doc = r""]
1077#[doc = r" <details><summary>JSON schema</summary>"]
1078#[doc = r""]
1079#[doc = r" ```json"]
1080#[doc = "{"]
1081#[doc = "  \"oneOf\": ["]
1082#[doc = "    {"]
1083#[doc = "      \"description\": \"Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage\","]
1084#[doc = "      \"type\": \"object\","]
1085#[doc = "      \"required\": ["]
1086#[doc = "        \"AccountAlreadyExists\""]
1087#[doc = "      ],"]
1088#[doc = "      \"properties\": {"]
1089#[doc = "        \"AccountAlreadyExists\": {"]
1090#[doc = "          \"type\": \"object\","]
1091#[doc = "          \"required\": ["]
1092#[doc = "            \"account_id\""]
1093#[doc = "          ],"]
1094#[doc = "          \"properties\": {"]
1095#[doc = "            \"account_id\": {"]
1096#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1097#[doc = "            }"]
1098#[doc = "          }"]
1099#[doc = "        }"]
1100#[doc = "      },"]
1101#[doc = "      \"additionalProperties\": false"]
1102#[doc = "    },"]
1103#[doc = "    {"]
1104#[doc = "      \"description\": \"Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)\","]
1105#[doc = "      \"type\": \"object\","]
1106#[doc = "      \"required\": ["]
1107#[doc = "        \"AccountDoesNotExist\""]
1108#[doc = "      ],"]
1109#[doc = "      \"properties\": {"]
1110#[doc = "        \"AccountDoesNotExist\": {"]
1111#[doc = "          \"type\": \"object\","]
1112#[doc = "          \"required\": ["]
1113#[doc = "            \"account_id\""]
1114#[doc = "          ],"]
1115#[doc = "          \"properties\": {"]
1116#[doc = "            \"account_id\": {"]
1117#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1118#[doc = "            }"]
1119#[doc = "          }"]
1120#[doc = "        }"]
1121#[doc = "      },"]
1122#[doc = "      \"additionalProperties\": false"]
1123#[doc = "    },"]
1124#[doc = "    {"]
1125#[doc = "      \"description\": \"A top-level account ID can only be created by registrar.\","]
1126#[doc = "      \"type\": \"object\","]
1127#[doc = "      \"required\": ["]
1128#[doc = "        \"CreateAccountOnlyByRegistrar\""]
1129#[doc = "      ],"]
1130#[doc = "      \"properties\": {"]
1131#[doc = "        \"CreateAccountOnlyByRegistrar\": {"]
1132#[doc = "          \"type\": \"object\","]
1133#[doc = "          \"required\": ["]
1134#[doc = "            \"account_id\","]
1135#[doc = "            \"predecessor_id\","]
1136#[doc = "            \"registrar_account_id\""]
1137#[doc = "          ],"]
1138#[doc = "          \"properties\": {"]
1139#[doc = "            \"account_id\": {"]
1140#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1141#[doc = "            },"]
1142#[doc = "            \"predecessor_id\": {"]
1143#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1144#[doc = "            },"]
1145#[doc = "            \"registrar_account_id\": {"]
1146#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1147#[doc = "            }"]
1148#[doc = "          }"]
1149#[doc = "        }"]
1150#[doc = "      },"]
1151#[doc = "      \"additionalProperties\": false"]
1152#[doc = "    },"]
1153#[doc = "    {"]
1154#[doc = "      \"description\": \"A newly created account must be under a namespace of the creator account\","]
1155#[doc = "      \"type\": \"object\","]
1156#[doc = "      \"required\": ["]
1157#[doc = "        \"CreateAccountNotAllowed\""]
1158#[doc = "      ],"]
1159#[doc = "      \"properties\": {"]
1160#[doc = "        \"CreateAccountNotAllowed\": {"]
1161#[doc = "          \"type\": \"object\","]
1162#[doc = "          \"required\": ["]
1163#[doc = "            \"account_id\","]
1164#[doc = "            \"predecessor_id\""]
1165#[doc = "          ],"]
1166#[doc = "          \"properties\": {"]
1167#[doc = "            \"account_id\": {"]
1168#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1169#[doc = "            },"]
1170#[doc = "            \"predecessor_id\": {"]
1171#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1172#[doc = "            }"]
1173#[doc = "          }"]
1174#[doc = "        }"]
1175#[doc = "      },"]
1176#[doc = "      \"additionalProperties\": false"]
1177#[doc = "    },"]
1178#[doc = "    {"]
1179#[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\","]
1180#[doc = "      \"type\": \"object\","]
1181#[doc = "      \"required\": ["]
1182#[doc = "        \"ActorNoPermission\""]
1183#[doc = "      ],"]
1184#[doc = "      \"properties\": {"]
1185#[doc = "        \"ActorNoPermission\": {"]
1186#[doc = "          \"type\": \"object\","]
1187#[doc = "          \"required\": ["]
1188#[doc = "            \"account_id\","]
1189#[doc = "            \"actor_id\""]
1190#[doc = "          ],"]
1191#[doc = "          \"properties\": {"]
1192#[doc = "            \"account_id\": {"]
1193#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1194#[doc = "            },"]
1195#[doc = "            \"actor_id\": {"]
1196#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1197#[doc = "            }"]
1198#[doc = "          }"]
1199#[doc = "        }"]
1200#[doc = "      },"]
1201#[doc = "      \"additionalProperties\": false"]
1202#[doc = "    },"]
1203#[doc = "    {"]
1204#[doc = "      \"description\": \"Account tries to remove an access key that doesn't exist\","]
1205#[doc = "      \"type\": \"object\","]
1206#[doc = "      \"required\": ["]
1207#[doc = "        \"DeleteKeyDoesNotExist\""]
1208#[doc = "      ],"]
1209#[doc = "      \"properties\": {"]
1210#[doc = "        \"DeleteKeyDoesNotExist\": {"]
1211#[doc = "          \"type\": \"object\","]
1212#[doc = "          \"required\": ["]
1213#[doc = "            \"account_id\","]
1214#[doc = "            \"public_key\""]
1215#[doc = "          ],"]
1216#[doc = "          \"properties\": {"]
1217#[doc = "            \"account_id\": {"]
1218#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1219#[doc = "            },"]
1220#[doc = "            \"public_key\": {"]
1221#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1222#[doc = "            }"]
1223#[doc = "          }"]
1224#[doc = "        }"]
1225#[doc = "      },"]
1226#[doc = "      \"additionalProperties\": false"]
1227#[doc = "    },"]
1228#[doc = "    {"]
1229#[doc = "      \"description\": \"The public key is already used for an existing access key\","]
1230#[doc = "      \"type\": \"object\","]
1231#[doc = "      \"required\": ["]
1232#[doc = "        \"AddKeyAlreadyExists\""]
1233#[doc = "      ],"]
1234#[doc = "      \"properties\": {"]
1235#[doc = "        \"AddKeyAlreadyExists\": {"]
1236#[doc = "          \"type\": \"object\","]
1237#[doc = "          \"required\": ["]
1238#[doc = "            \"account_id\","]
1239#[doc = "            \"public_key\""]
1240#[doc = "          ],"]
1241#[doc = "          \"properties\": {"]
1242#[doc = "            \"account_id\": {"]
1243#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1244#[doc = "            },"]
1245#[doc = "            \"public_key\": {"]
1246#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1247#[doc = "            }"]
1248#[doc = "          }"]
1249#[doc = "        }"]
1250#[doc = "      },"]
1251#[doc = "      \"additionalProperties\": false"]
1252#[doc = "    },"]
1253#[doc = "    {"]
1254#[doc = "      \"description\": \"Account is staking and can not be deleted\","]
1255#[doc = "      \"type\": \"object\","]
1256#[doc = "      \"required\": ["]
1257#[doc = "        \"DeleteAccountStaking\""]
1258#[doc = "      ],"]
1259#[doc = "      \"properties\": {"]
1260#[doc = "        \"DeleteAccountStaking\": {"]
1261#[doc = "          \"type\": \"object\","]
1262#[doc = "          \"required\": ["]
1263#[doc = "            \"account_id\""]
1264#[doc = "          ],"]
1265#[doc = "          \"properties\": {"]
1266#[doc = "            \"account_id\": {"]
1267#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1268#[doc = "            }"]
1269#[doc = "          }"]
1270#[doc = "        }"]
1271#[doc = "      },"]
1272#[doc = "      \"additionalProperties\": false"]
1273#[doc = "    },"]
1274#[doc = "    {"]
1275#[doc = "      \"description\": \"ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage.\","]
1276#[doc = "      \"type\": \"object\","]
1277#[doc = "      \"required\": ["]
1278#[doc = "        \"LackBalanceForState\""]
1279#[doc = "      ],"]
1280#[doc = "      \"properties\": {"]
1281#[doc = "        \"LackBalanceForState\": {"]
1282#[doc = "          \"type\": \"object\","]
1283#[doc = "          \"required\": ["]
1284#[doc = "            \"account_id\","]
1285#[doc = "            \"amount\""]
1286#[doc = "          ],"]
1287#[doc = "          \"properties\": {"]
1288#[doc = "            \"account_id\": {"]
1289#[doc = "              \"description\": \"An account which needs balance\","]
1290#[doc = "              \"allOf\": ["]
1291#[doc = "                {"]
1292#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
1293#[doc = "                }"]
1294#[doc = "              ]"]
1295#[doc = "            },"]
1296#[doc = "            \"amount\": {"]
1297#[doc = "              \"description\": \"Balance required to complete an action.\","]
1298#[doc = "              \"allOf\": ["]
1299#[doc = "                {"]
1300#[doc = "                  \"$ref\": \"#/components/schemas/NearToken\""]
1301#[doc = "                }"]
1302#[doc = "              ]"]
1303#[doc = "            }"]
1304#[doc = "          }"]
1305#[doc = "        }"]
1306#[doc = "      },"]
1307#[doc = "      \"additionalProperties\": false"]
1308#[doc = "    },"]
1309#[doc = "    {"]
1310#[doc = "      \"description\": \"Account is not yet staked, but tries to unstake\","]
1311#[doc = "      \"type\": \"object\","]
1312#[doc = "      \"required\": ["]
1313#[doc = "        \"TriesToUnstake\""]
1314#[doc = "      ],"]
1315#[doc = "      \"properties\": {"]
1316#[doc = "        \"TriesToUnstake\": {"]
1317#[doc = "          \"type\": \"object\","]
1318#[doc = "          \"required\": ["]
1319#[doc = "            \"account_id\""]
1320#[doc = "          ],"]
1321#[doc = "          \"properties\": {"]
1322#[doc = "            \"account_id\": {"]
1323#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1324#[doc = "            }"]
1325#[doc = "          }"]
1326#[doc = "        }"]
1327#[doc = "      },"]
1328#[doc = "      \"additionalProperties\": false"]
1329#[doc = "    },"]
1330#[doc = "    {"]
1331#[doc = "      \"description\": \"The account doesn't have enough balance to increase the stake.\","]
1332#[doc = "      \"type\": \"object\","]
1333#[doc = "      \"required\": ["]
1334#[doc = "        \"TriesToStake\""]
1335#[doc = "      ],"]
1336#[doc = "      \"properties\": {"]
1337#[doc = "        \"TriesToStake\": {"]
1338#[doc = "          \"type\": \"object\","]
1339#[doc = "          \"required\": ["]
1340#[doc = "            \"account_id\","]
1341#[doc = "            \"balance\","]
1342#[doc = "            \"locked\","]
1343#[doc = "            \"stake\""]
1344#[doc = "          ],"]
1345#[doc = "          \"properties\": {"]
1346#[doc = "            \"account_id\": {"]
1347#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1348#[doc = "            },"]
1349#[doc = "            \"balance\": {"]
1350#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1351#[doc = "            },"]
1352#[doc = "            \"locked\": {"]
1353#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1354#[doc = "            },"]
1355#[doc = "            \"stake\": {"]
1356#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1357#[doc = "            }"]
1358#[doc = "          }"]
1359#[doc = "        }"]
1360#[doc = "      },"]
1361#[doc = "      \"additionalProperties\": false"]
1362#[doc = "    },"]
1363#[doc = "    {"]
1364#[doc = "      \"type\": \"object\","]
1365#[doc = "      \"required\": ["]
1366#[doc = "        \"InsufficientStake\""]
1367#[doc = "      ],"]
1368#[doc = "      \"properties\": {"]
1369#[doc = "        \"InsufficientStake\": {"]
1370#[doc = "          \"type\": \"object\","]
1371#[doc = "          \"required\": ["]
1372#[doc = "            \"account_id\","]
1373#[doc = "            \"minimum_stake\","]
1374#[doc = "            \"stake\""]
1375#[doc = "          ],"]
1376#[doc = "          \"properties\": {"]
1377#[doc = "            \"account_id\": {"]
1378#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1379#[doc = "            },"]
1380#[doc = "            \"minimum_stake\": {"]
1381#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1382#[doc = "            },"]
1383#[doc = "            \"stake\": {"]
1384#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1385#[doc = "            }"]
1386#[doc = "          }"]
1387#[doc = "        }"]
1388#[doc = "      },"]
1389#[doc = "      \"additionalProperties\": false"]
1390#[doc = "    },"]
1391#[doc = "    {"]
1392#[doc = "      \"description\": \"An error occurred during a `FunctionCall` Action, parameter is debug message.\","]
1393#[doc = "      \"type\": \"object\","]
1394#[doc = "      \"required\": ["]
1395#[doc = "        \"FunctionCallError\""]
1396#[doc = "      ],"]
1397#[doc = "      \"properties\": {"]
1398#[doc = "        \"FunctionCallError\": {"]
1399#[doc = "          \"$ref\": \"#/components/schemas/FunctionCallError\""]
1400#[doc = "        }"]
1401#[doc = "      },"]
1402#[doc = "      \"additionalProperties\": false"]
1403#[doc = "    },"]
1404#[doc = "    {"]
1405#[doc = "      \"description\": \"Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\\nreceipt validation.\","]
1406#[doc = "      \"type\": \"object\","]
1407#[doc = "      \"required\": ["]
1408#[doc = "        \"NewReceiptValidationError\""]
1409#[doc = "      ],"]
1410#[doc = "      \"properties\": {"]
1411#[doc = "        \"NewReceiptValidationError\": {"]
1412#[doc = "          \"$ref\": \"#/components/schemas/ReceiptValidationError\""]
1413#[doc = "        }"]
1414#[doc = "      },"]
1415#[doc = "      \"additionalProperties\": false"]
1416#[doc = "    },"]
1417#[doc = "    {"]
1418#[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`.\","]
1419#[doc = "      \"type\": \"object\","]
1420#[doc = "      \"required\": ["]
1421#[doc = "        \"OnlyImplicitAccountCreationAllowed\""]
1422#[doc = "      ],"]
1423#[doc = "      \"properties\": {"]
1424#[doc = "        \"OnlyImplicitAccountCreationAllowed\": {"]
1425#[doc = "          \"type\": \"object\","]
1426#[doc = "          \"required\": ["]
1427#[doc = "            \"account_id\""]
1428#[doc = "          ],"]
1429#[doc = "          \"properties\": {"]
1430#[doc = "            \"account_id\": {"]
1431#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1432#[doc = "            }"]
1433#[doc = "          }"]
1434#[doc = "        }"]
1435#[doc = "      },"]
1436#[doc = "      \"additionalProperties\": false"]
1437#[doc = "    },"]
1438#[doc = "    {"]
1439#[doc = "      \"description\": \"Delete account whose state is large is temporarily banned.\","]
1440#[doc = "      \"type\": \"object\","]
1441#[doc = "      \"required\": ["]
1442#[doc = "        \"DeleteAccountWithLargeState\""]
1443#[doc = "      ],"]
1444#[doc = "      \"properties\": {"]
1445#[doc = "        \"DeleteAccountWithLargeState\": {"]
1446#[doc = "          \"type\": \"object\","]
1447#[doc = "          \"required\": ["]
1448#[doc = "            \"account_id\""]
1449#[doc = "          ],"]
1450#[doc = "          \"properties\": {"]
1451#[doc = "            \"account_id\": {"]
1452#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1453#[doc = "            }"]
1454#[doc = "          }"]
1455#[doc = "        }"]
1456#[doc = "      },"]
1457#[doc = "      \"additionalProperties\": false"]
1458#[doc = "    },"]
1459#[doc = "    {"]
1460#[doc = "      \"description\": \"Signature does not match the provided actions and given signer public key.\","]
1461#[doc = "      \"type\": \"string\","]
1462#[doc = "      \"enum\": ["]
1463#[doc = "        \"DelegateActionInvalidSignature\""]
1464#[doc = "      ]"]
1465#[doc = "    },"]
1466#[doc = "    {"]
1467#[doc = "      \"description\": \"Receiver of the transaction doesn't match Sender of the delegate action\","]
1468#[doc = "      \"type\": \"object\","]
1469#[doc = "      \"required\": ["]
1470#[doc = "        \"DelegateActionSenderDoesNotMatchTxReceiver\""]
1471#[doc = "      ],"]
1472#[doc = "      \"properties\": {"]
1473#[doc = "        \"DelegateActionSenderDoesNotMatchTxReceiver\": {"]
1474#[doc = "          \"type\": \"object\","]
1475#[doc = "          \"required\": ["]
1476#[doc = "            \"receiver_id\","]
1477#[doc = "            \"sender_id\""]
1478#[doc = "          ],"]
1479#[doc = "          \"properties\": {"]
1480#[doc = "            \"receiver_id\": {"]
1481#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1482#[doc = "            },"]
1483#[doc = "            \"sender_id\": {"]
1484#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1485#[doc = "            }"]
1486#[doc = "          }"]
1487#[doc = "        }"]
1488#[doc = "      },"]
1489#[doc = "      \"additionalProperties\": false"]
1490#[doc = "    },"]
1491#[doc = "    {"]
1492#[doc = "      \"description\": \"Delegate action has expired. `max_block_height` is less than actual block height.\","]
1493#[doc = "      \"type\": \"string\","]
1494#[doc = "      \"enum\": ["]
1495#[doc = "        \"DelegateActionExpired\""]
1496#[doc = "      ]"]
1497#[doc = "    },"]
1498#[doc = "    {"]
1499#[doc = "      \"description\": \"The given public key doesn't exist for Sender account\","]
1500#[doc = "      \"type\": \"object\","]
1501#[doc = "      \"required\": ["]
1502#[doc = "        \"DelegateActionAccessKeyError\""]
1503#[doc = "      ],"]
1504#[doc = "      \"properties\": {"]
1505#[doc = "        \"DelegateActionAccessKeyError\": {"]
1506#[doc = "          \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
1507#[doc = "        }"]
1508#[doc = "      },"]
1509#[doc = "      \"additionalProperties\": false"]
1510#[doc = "    },"]
1511#[doc = "    {"]
1512#[doc = "      \"description\": \"DelegateAction nonce must be greater sender[public_key].nonce\","]
1513#[doc = "      \"type\": \"object\","]
1514#[doc = "      \"required\": ["]
1515#[doc = "        \"DelegateActionInvalidNonce\""]
1516#[doc = "      ],"]
1517#[doc = "      \"properties\": {"]
1518#[doc = "        \"DelegateActionInvalidNonce\": {"]
1519#[doc = "          \"type\": \"object\","]
1520#[doc = "          \"required\": ["]
1521#[doc = "            \"ak_nonce\","]
1522#[doc = "            \"delegate_nonce\""]
1523#[doc = "          ],"]
1524#[doc = "          \"properties\": {"]
1525#[doc = "            \"ak_nonce\": {"]
1526#[doc = "              \"type\": \"integer\","]
1527#[doc = "              \"format\": \"uint64\","]
1528#[doc = "              \"minimum\": 0.0"]
1529#[doc = "            },"]
1530#[doc = "            \"delegate_nonce\": {"]
1531#[doc = "              \"type\": \"integer\","]
1532#[doc = "              \"format\": \"uint64\","]
1533#[doc = "              \"minimum\": 0.0"]
1534#[doc = "            }"]
1535#[doc = "          }"]
1536#[doc = "        }"]
1537#[doc = "      },"]
1538#[doc = "      \"additionalProperties\": false"]
1539#[doc = "    },"]
1540#[doc = "    {"]
1541#[doc = "      \"description\": \"DelegateAction nonce is larger than the upper bound given by the block height\","]
1542#[doc = "      \"type\": \"object\","]
1543#[doc = "      \"required\": ["]
1544#[doc = "        \"DelegateActionNonceTooLarge\""]
1545#[doc = "      ],"]
1546#[doc = "      \"properties\": {"]
1547#[doc = "        \"DelegateActionNonceTooLarge\": {"]
1548#[doc = "          \"type\": \"object\","]
1549#[doc = "          \"required\": ["]
1550#[doc = "            \"delegate_nonce\","]
1551#[doc = "            \"upper_bound\""]
1552#[doc = "          ],"]
1553#[doc = "          \"properties\": {"]
1554#[doc = "            \"delegate_nonce\": {"]
1555#[doc = "              \"type\": \"integer\","]
1556#[doc = "              \"format\": \"uint64\","]
1557#[doc = "              \"minimum\": 0.0"]
1558#[doc = "            },"]
1559#[doc = "            \"upper_bound\": {"]
1560#[doc = "              \"type\": \"integer\","]
1561#[doc = "              \"format\": \"uint64\","]
1562#[doc = "              \"minimum\": 0.0"]
1563#[doc = "            }"]
1564#[doc = "          }"]
1565#[doc = "        }"]
1566#[doc = "      },"]
1567#[doc = "      \"additionalProperties\": false"]
1568#[doc = "    },"]
1569#[doc = "    {"]
1570#[doc = "      \"type\": \"object\","]
1571#[doc = "      \"required\": ["]
1572#[doc = "        \"GlobalContractDoesNotExist\""]
1573#[doc = "      ],"]
1574#[doc = "      \"properties\": {"]
1575#[doc = "        \"GlobalContractDoesNotExist\": {"]
1576#[doc = "          \"type\": \"object\","]
1577#[doc = "          \"required\": ["]
1578#[doc = "            \"identifier\""]
1579#[doc = "          ],"]
1580#[doc = "          \"properties\": {"]
1581#[doc = "            \"identifier\": {"]
1582#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
1583#[doc = "            }"]
1584#[doc = "          }"]
1585#[doc = "        }"]
1586#[doc = "      },"]
1587#[doc = "      \"additionalProperties\": false"]
1588#[doc = "    },"]
1589#[doc = "    {"]
1590#[doc = "      \"type\": \"object\","]
1591#[doc = "      \"required\": ["]
1592#[doc = "        \"GasKeyDoesNotExist\""]
1593#[doc = "      ],"]
1594#[doc = "      \"properties\": {"]
1595#[doc = "        \"GasKeyDoesNotExist\": {"]
1596#[doc = "          \"type\": \"object\","]
1597#[doc = "          \"required\": ["]
1598#[doc = "            \"account_id\","]
1599#[doc = "            \"public_key\""]
1600#[doc = "          ],"]
1601#[doc = "          \"properties\": {"]
1602#[doc = "            \"account_id\": {"]
1603#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1604#[doc = "            },"]
1605#[doc = "            \"public_key\": {"]
1606#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1607#[doc = "            }"]
1608#[doc = "          }"]
1609#[doc = "        }"]
1610#[doc = "      },"]
1611#[doc = "      \"additionalProperties\": false"]
1612#[doc = "    },"]
1613#[doc = "    {"]
1614#[doc = "      \"type\": \"object\","]
1615#[doc = "      \"required\": ["]
1616#[doc = "        \"GasKeyAlreadyExists\""]
1617#[doc = "      ],"]
1618#[doc = "      \"properties\": {"]
1619#[doc = "        \"GasKeyAlreadyExists\": {"]
1620#[doc = "          \"type\": \"object\","]
1621#[doc = "          \"required\": ["]
1622#[doc = "            \"account_id\","]
1623#[doc = "            \"public_key\""]
1624#[doc = "          ],"]
1625#[doc = "          \"properties\": {"]
1626#[doc = "            \"account_id\": {"]
1627#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1628#[doc = "            },"]
1629#[doc = "            \"public_key\": {"]
1630#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1631#[doc = "            }"]
1632#[doc = "          }"]
1633#[doc = "        }"]
1634#[doc = "      },"]
1635#[doc = "      \"additionalProperties\": false"]
1636#[doc = "    }"]
1637#[doc = "  ]"]
1638#[doc = "}"]
1639#[doc = r" ```"]
1640#[doc = r" </details>"]
1641#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1642pub enum ActionErrorKind {
1643    #[doc = "Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage"]
1644    AccountAlreadyExists { account_id: AccountId },
1645    #[doc = "Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)"]
1646    AccountDoesNotExist { account_id: AccountId },
1647    #[doc = "A top-level account ID can only be created by registrar."]
1648    CreateAccountOnlyByRegistrar {
1649        account_id: AccountId,
1650        predecessor_id: AccountId,
1651        registrar_account_id: AccountId,
1652    },
1653    #[doc = "A newly created account must be under a namespace of the creator account"]
1654    CreateAccountNotAllowed {
1655        account_id: AccountId,
1656        predecessor_id: AccountId,
1657    },
1658    #[doc = "Administrative actions like `DeployContract`, `Stake`, `AddKey`, `DeleteKey`. can be proceed only if sender=receiver\nor the first TX action is a `CreateAccount` action"]
1659    ActorNoPermission {
1660        account_id: AccountId,
1661        actor_id: AccountId,
1662    },
1663    #[doc = "Account tries to remove an access key that doesn't exist"]
1664    DeleteKeyDoesNotExist {
1665        account_id: AccountId,
1666        public_key: PublicKey,
1667    },
1668    #[doc = "The public key is already used for an existing access key"]
1669    AddKeyAlreadyExists {
1670        account_id: AccountId,
1671        public_key: PublicKey,
1672    },
1673    #[doc = "Account is staking and can not be deleted"]
1674    DeleteAccountStaking { account_id: AccountId },
1675    #[doc = "ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage."]
1676    LackBalanceForState {
1677        #[doc = "An account which needs balance"]
1678        account_id: AccountId,
1679        #[doc = "Balance required to complete an action."]
1680        amount: NearToken,
1681    },
1682    #[doc = "Account is not yet staked, but tries to unstake"]
1683    TriesToUnstake { account_id: AccountId },
1684    #[doc = "The account doesn't have enough balance to increase the stake."]
1685    TriesToStake {
1686        account_id: AccountId,
1687        balance: NearToken,
1688        locked: NearToken,
1689        stake: NearToken,
1690    },
1691    InsufficientStake {
1692        account_id: AccountId,
1693        minimum_stake: NearToken,
1694        stake: NearToken,
1695    },
1696    #[doc = "An error occurred during a `FunctionCall` Action, parameter is debug message."]
1697    FunctionCallError(FunctionCallError),
1698    #[doc = "Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\nreceipt validation."]
1699    NewReceiptValidationError(ReceiptValidationError),
1700    #[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`."]
1701    OnlyImplicitAccountCreationAllowed { account_id: AccountId },
1702    #[doc = "Delete account whose state is large is temporarily banned."]
1703    DeleteAccountWithLargeState { account_id: AccountId },
1704    #[doc = "Signature does not match the provided actions and given signer public key."]
1705    DelegateActionInvalidSignature,
1706    #[doc = "Receiver of the transaction doesn't match Sender of the delegate action"]
1707    DelegateActionSenderDoesNotMatchTxReceiver {
1708        receiver_id: AccountId,
1709        sender_id: AccountId,
1710    },
1711    #[doc = "Delegate action has expired. `max_block_height` is less than actual block height."]
1712    DelegateActionExpired,
1713    #[doc = "The given public key doesn't exist for Sender account"]
1714    DelegateActionAccessKeyError(InvalidAccessKeyError),
1715    #[doc = "DelegateAction nonce must be greater sender[public_key].nonce"]
1716    DelegateActionInvalidNonce { ak_nonce: u64, delegate_nonce: u64 },
1717    #[doc = "DelegateAction nonce is larger than the upper bound given by the block height"]
1718    DelegateActionNonceTooLarge {
1719        delegate_nonce: u64,
1720        upper_bound: u64,
1721    },
1722    GlobalContractDoesNotExist {
1723        identifier: GlobalContractIdentifier,
1724    },
1725    GasKeyDoesNotExist {
1726        account_id: AccountId,
1727        public_key: PublicKey,
1728    },
1729    GasKeyAlreadyExists {
1730        account_id: AccountId,
1731        public_key: PublicKey,
1732    },
1733}
1734impl ::std::convert::From<&Self> for ActionErrorKind {
1735    fn from(value: &ActionErrorKind) -> Self {
1736        value.clone()
1737    }
1738}
1739impl ::std::convert::From<FunctionCallError> for ActionErrorKind {
1740    fn from(value: FunctionCallError) -> Self {
1741        Self::FunctionCallError(value)
1742    }
1743}
1744impl ::std::convert::From<ReceiptValidationError> for ActionErrorKind {
1745    fn from(value: ReceiptValidationError) -> Self {
1746        Self::NewReceiptValidationError(value)
1747    }
1748}
1749impl ::std::convert::From<InvalidAccessKeyError> for ActionErrorKind {
1750    fn from(value: InvalidAccessKeyError) -> Self {
1751        Self::DelegateActionAccessKeyError(value)
1752    }
1753}
1754#[doc = "`ActionView`"]
1755#[doc = r""]
1756#[doc = r" <details><summary>JSON schema</summary>"]
1757#[doc = r""]
1758#[doc = r" ```json"]
1759#[doc = "{"]
1760#[doc = "  \"oneOf\": ["]
1761#[doc = "    {"]
1762#[doc = "      \"type\": \"string\","]
1763#[doc = "      \"enum\": ["]
1764#[doc = "        \"CreateAccount\""]
1765#[doc = "      ]"]
1766#[doc = "    },"]
1767#[doc = "    {"]
1768#[doc = "      \"type\": \"object\","]
1769#[doc = "      \"required\": ["]
1770#[doc = "        \"DeployContract\""]
1771#[doc = "      ],"]
1772#[doc = "      \"properties\": {"]
1773#[doc = "        \"DeployContract\": {"]
1774#[doc = "          \"type\": \"object\","]
1775#[doc = "          \"required\": ["]
1776#[doc = "            \"code\""]
1777#[doc = "          ],"]
1778#[doc = "          \"properties\": {"]
1779#[doc = "            \"code\": {"]
1780#[doc = "              \"type\": \"string\","]
1781#[doc = "              \"format\": \"bytes\""]
1782#[doc = "            }"]
1783#[doc = "          }"]
1784#[doc = "        }"]
1785#[doc = "      },"]
1786#[doc = "      \"additionalProperties\": false"]
1787#[doc = "    },"]
1788#[doc = "    {"]
1789#[doc = "      \"type\": \"object\","]
1790#[doc = "      \"required\": ["]
1791#[doc = "        \"FunctionCall\""]
1792#[doc = "      ],"]
1793#[doc = "      \"properties\": {"]
1794#[doc = "        \"FunctionCall\": {"]
1795#[doc = "          \"type\": \"object\","]
1796#[doc = "          \"required\": ["]
1797#[doc = "            \"args\","]
1798#[doc = "            \"deposit\","]
1799#[doc = "            \"gas\","]
1800#[doc = "            \"method_name\""]
1801#[doc = "          ],"]
1802#[doc = "          \"properties\": {"]
1803#[doc = "            \"args\": {"]
1804#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
1805#[doc = "            },"]
1806#[doc = "            \"deposit\": {"]
1807#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1808#[doc = "            },"]
1809#[doc = "            \"gas\": {"]
1810#[doc = "              \"$ref\": \"#/components/schemas/NearGas\""]
1811#[doc = "            },"]
1812#[doc = "            \"method_name\": {"]
1813#[doc = "              \"type\": \"string\""]
1814#[doc = "            }"]
1815#[doc = "          }"]
1816#[doc = "        }"]
1817#[doc = "      },"]
1818#[doc = "      \"additionalProperties\": false"]
1819#[doc = "    },"]
1820#[doc = "    {"]
1821#[doc = "      \"type\": \"object\","]
1822#[doc = "      \"required\": ["]
1823#[doc = "        \"Transfer\""]
1824#[doc = "      ],"]
1825#[doc = "      \"properties\": {"]
1826#[doc = "        \"Transfer\": {"]
1827#[doc = "          \"type\": \"object\","]
1828#[doc = "          \"required\": ["]
1829#[doc = "            \"deposit\""]
1830#[doc = "          ],"]
1831#[doc = "          \"properties\": {"]
1832#[doc = "            \"deposit\": {"]
1833#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1834#[doc = "            }"]
1835#[doc = "          }"]
1836#[doc = "        }"]
1837#[doc = "      },"]
1838#[doc = "      \"additionalProperties\": false"]
1839#[doc = "    },"]
1840#[doc = "    {"]
1841#[doc = "      \"type\": \"object\","]
1842#[doc = "      \"required\": ["]
1843#[doc = "        \"Stake\""]
1844#[doc = "      ],"]
1845#[doc = "      \"properties\": {"]
1846#[doc = "        \"Stake\": {"]
1847#[doc = "          \"type\": \"object\","]
1848#[doc = "          \"required\": ["]
1849#[doc = "            \"public_key\","]
1850#[doc = "            \"stake\""]
1851#[doc = "          ],"]
1852#[doc = "          \"properties\": {"]
1853#[doc = "            \"public_key\": {"]
1854#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1855#[doc = "            },"]
1856#[doc = "            \"stake\": {"]
1857#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
1858#[doc = "            }"]
1859#[doc = "          }"]
1860#[doc = "        }"]
1861#[doc = "      },"]
1862#[doc = "      \"additionalProperties\": false"]
1863#[doc = "    },"]
1864#[doc = "    {"]
1865#[doc = "      \"type\": \"object\","]
1866#[doc = "      \"required\": ["]
1867#[doc = "        \"AddKey\""]
1868#[doc = "      ],"]
1869#[doc = "      \"properties\": {"]
1870#[doc = "        \"AddKey\": {"]
1871#[doc = "          \"type\": \"object\","]
1872#[doc = "          \"required\": ["]
1873#[doc = "            \"access_key\","]
1874#[doc = "            \"public_key\""]
1875#[doc = "          ],"]
1876#[doc = "          \"properties\": {"]
1877#[doc = "            \"access_key\": {"]
1878#[doc = "              \"$ref\": \"#/components/schemas/AccessKeyView\""]
1879#[doc = "            },"]
1880#[doc = "            \"public_key\": {"]
1881#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1882#[doc = "            }"]
1883#[doc = "          }"]
1884#[doc = "        }"]
1885#[doc = "      },"]
1886#[doc = "      \"additionalProperties\": false"]
1887#[doc = "    },"]
1888#[doc = "    {"]
1889#[doc = "      \"type\": \"object\","]
1890#[doc = "      \"required\": ["]
1891#[doc = "        \"DeleteKey\""]
1892#[doc = "      ],"]
1893#[doc = "      \"properties\": {"]
1894#[doc = "        \"DeleteKey\": {"]
1895#[doc = "          \"type\": \"object\","]
1896#[doc = "          \"required\": ["]
1897#[doc = "            \"public_key\""]
1898#[doc = "          ],"]
1899#[doc = "          \"properties\": {"]
1900#[doc = "            \"public_key\": {"]
1901#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
1902#[doc = "            }"]
1903#[doc = "          }"]
1904#[doc = "        }"]
1905#[doc = "      },"]
1906#[doc = "      \"additionalProperties\": false"]
1907#[doc = "    },"]
1908#[doc = "    {"]
1909#[doc = "      \"type\": \"object\","]
1910#[doc = "      \"required\": ["]
1911#[doc = "        \"DeleteAccount\""]
1912#[doc = "      ],"]
1913#[doc = "      \"properties\": {"]
1914#[doc = "        \"DeleteAccount\": {"]
1915#[doc = "          \"type\": \"object\","]
1916#[doc = "          \"required\": ["]
1917#[doc = "            \"beneficiary_id\""]
1918#[doc = "          ],"]
1919#[doc = "          \"properties\": {"]
1920#[doc = "            \"beneficiary_id\": {"]
1921#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
1922#[doc = "            }"]
1923#[doc = "          }"]
1924#[doc = "        }"]
1925#[doc = "      },"]
1926#[doc = "      \"additionalProperties\": false"]
1927#[doc = "    },"]
1928#[doc = "    {"]
1929#[doc = "      \"type\": \"object\","]
1930#[doc = "      \"required\": ["]
1931#[doc = "        \"Delegate\""]
1932#[doc = "      ],"]
1933#[doc = "      \"properties\": {"]
1934#[doc = "        \"Delegate\": {"]
1935#[doc = "          \"type\": \"object\","]
1936#[doc = "          \"required\": ["]
1937#[doc = "            \"delegate_action\","]
1938#[doc = "            \"signature\""]
1939#[doc = "          ],"]
1940#[doc = "          \"properties\": {"]
1941#[doc = "            \"delegate_action\": {"]
1942#[doc = "              \"$ref\": \"#/components/schemas/DelegateAction\""]
1943#[doc = "            },"]
1944#[doc = "            \"signature\": {"]
1945#[doc = "              \"$ref\": \"#/components/schemas/Signature\""]
1946#[doc = "            }"]
1947#[doc = "          }"]
1948#[doc = "        }"]
1949#[doc = "      },"]
1950#[doc = "      \"additionalProperties\": false"]
1951#[doc = "    },"]
1952#[doc = "    {"]
1953#[doc = "      \"type\": \"object\","]
1954#[doc = "      \"required\": ["]
1955#[doc = "        \"DeployGlobalContract\""]
1956#[doc = "      ],"]
1957#[doc = "      \"properties\": {"]
1958#[doc = "        \"DeployGlobalContract\": {"]
1959#[doc = "          \"type\": \"object\","]
1960#[doc = "          \"required\": ["]
1961#[doc = "            \"code\""]
1962#[doc = "          ],"]
1963#[doc = "          \"properties\": {"]
1964#[doc = "            \"code\": {"]
1965#[doc = "              \"type\": \"string\","]
1966#[doc = "              \"format\": \"bytes\""]
1967#[doc = "            }"]
1968#[doc = "          }"]
1969#[doc = "        }"]
1970#[doc = "      },"]
1971#[doc = "      \"additionalProperties\": false"]
1972#[doc = "    },"]
1973#[doc = "    {"]
1974#[doc = "      \"type\": \"object\","]
1975#[doc = "      \"required\": ["]
1976#[doc = "        \"DeployGlobalContractByAccountId\""]
1977#[doc = "      ],"]
1978#[doc = "      \"properties\": {"]
1979#[doc = "        \"DeployGlobalContractByAccountId\": {"]
1980#[doc = "          \"type\": \"object\","]
1981#[doc = "          \"required\": ["]
1982#[doc = "            \"code\""]
1983#[doc = "          ],"]
1984#[doc = "          \"properties\": {"]
1985#[doc = "            \"code\": {"]
1986#[doc = "              \"type\": \"string\","]
1987#[doc = "              \"format\": \"bytes\""]
1988#[doc = "            }"]
1989#[doc = "          }"]
1990#[doc = "        }"]
1991#[doc = "      },"]
1992#[doc = "      \"additionalProperties\": false"]
1993#[doc = "    },"]
1994#[doc = "    {"]
1995#[doc = "      \"type\": \"object\","]
1996#[doc = "      \"required\": ["]
1997#[doc = "        \"UseGlobalContract\""]
1998#[doc = "      ],"]
1999#[doc = "      \"properties\": {"]
2000#[doc = "        \"UseGlobalContract\": {"]
2001#[doc = "          \"type\": \"object\","]
2002#[doc = "          \"required\": ["]
2003#[doc = "            \"code_hash\""]
2004#[doc = "          ],"]
2005#[doc = "          \"properties\": {"]
2006#[doc = "            \"code_hash\": {"]
2007#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
2008#[doc = "            }"]
2009#[doc = "          }"]
2010#[doc = "        }"]
2011#[doc = "      },"]
2012#[doc = "      \"additionalProperties\": false"]
2013#[doc = "    },"]
2014#[doc = "    {"]
2015#[doc = "      \"type\": \"object\","]
2016#[doc = "      \"required\": ["]
2017#[doc = "        \"UseGlobalContractByAccountId\""]
2018#[doc = "      ],"]
2019#[doc = "      \"properties\": {"]
2020#[doc = "        \"UseGlobalContractByAccountId\": {"]
2021#[doc = "          \"type\": \"object\","]
2022#[doc = "          \"required\": ["]
2023#[doc = "            \"account_id\""]
2024#[doc = "          ],"]
2025#[doc = "          \"properties\": {"]
2026#[doc = "            \"account_id\": {"]
2027#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
2028#[doc = "            }"]
2029#[doc = "          }"]
2030#[doc = "        }"]
2031#[doc = "      },"]
2032#[doc = "      \"additionalProperties\": false"]
2033#[doc = "    },"]
2034#[doc = "    {"]
2035#[doc = "      \"type\": \"object\","]
2036#[doc = "      \"required\": ["]
2037#[doc = "        \"DeterministicStateInit\""]
2038#[doc = "      ],"]
2039#[doc = "      \"properties\": {"]
2040#[doc = "        \"DeterministicStateInit\": {"]
2041#[doc = "          \"type\": \"object\","]
2042#[doc = "          \"required\": ["]
2043#[doc = "            \"code\","]
2044#[doc = "            \"data\","]
2045#[doc = "            \"deposit\""]
2046#[doc = "          ],"]
2047#[doc = "          \"properties\": {"]
2048#[doc = "            \"code\": {"]
2049#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifierView\""]
2050#[doc = "            },"]
2051#[doc = "            \"data\": {"]
2052#[doc = "              \"type\": \"object\","]
2053#[doc = "              \"additionalProperties\": {"]
2054#[doc = "                \"type\": \"string\""]
2055#[doc = "              }"]
2056#[doc = "            },"]
2057#[doc = "            \"deposit\": {"]
2058#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
2059#[doc = "            }"]
2060#[doc = "          }"]
2061#[doc = "        }"]
2062#[doc = "      },"]
2063#[doc = "      \"additionalProperties\": false"]
2064#[doc = "    },"]
2065#[doc = "    {"]
2066#[doc = "      \"type\": \"object\","]
2067#[doc = "      \"required\": ["]
2068#[doc = "        \"AddGasKey\""]
2069#[doc = "      ],"]
2070#[doc = "      \"properties\": {"]
2071#[doc = "        \"AddGasKey\": {"]
2072#[doc = "          \"type\": \"object\","]
2073#[doc = "          \"required\": ["]
2074#[doc = "            \"num_nonces\","]
2075#[doc = "            \"permission\","]
2076#[doc = "            \"public_key\""]
2077#[doc = "          ],"]
2078#[doc = "          \"properties\": {"]
2079#[doc = "            \"num_nonces\": {"]
2080#[doc = "              \"type\": \"integer\","]
2081#[doc = "              \"format\": \"uint32\","]
2082#[doc = "              \"minimum\": 0.0"]
2083#[doc = "            },"]
2084#[doc = "            \"permission\": {"]
2085#[doc = "              \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
2086#[doc = "            },"]
2087#[doc = "            \"public_key\": {"]
2088#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
2089#[doc = "            }"]
2090#[doc = "          }"]
2091#[doc = "        }"]
2092#[doc = "      },"]
2093#[doc = "      \"additionalProperties\": false"]
2094#[doc = "    },"]
2095#[doc = "    {"]
2096#[doc = "      \"type\": \"object\","]
2097#[doc = "      \"required\": ["]
2098#[doc = "        \"DeleteGasKey\""]
2099#[doc = "      ],"]
2100#[doc = "      \"properties\": {"]
2101#[doc = "        \"DeleteGasKey\": {"]
2102#[doc = "          \"type\": \"object\","]
2103#[doc = "          \"required\": ["]
2104#[doc = "            \"public_key\""]
2105#[doc = "          ],"]
2106#[doc = "          \"properties\": {"]
2107#[doc = "            \"public_key\": {"]
2108#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
2109#[doc = "            }"]
2110#[doc = "          }"]
2111#[doc = "        }"]
2112#[doc = "      },"]
2113#[doc = "      \"additionalProperties\": false"]
2114#[doc = "    },"]
2115#[doc = "    {"]
2116#[doc = "      \"type\": \"object\","]
2117#[doc = "      \"required\": ["]
2118#[doc = "        \"TransferToGasKey\""]
2119#[doc = "      ],"]
2120#[doc = "      \"properties\": {"]
2121#[doc = "        \"TransferToGasKey\": {"]
2122#[doc = "          \"type\": \"object\","]
2123#[doc = "          \"required\": ["]
2124#[doc = "            \"amount\","]
2125#[doc = "            \"public_key\""]
2126#[doc = "          ],"]
2127#[doc = "          \"properties\": {"]
2128#[doc = "            \"amount\": {"]
2129#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
2130#[doc = "            },"]
2131#[doc = "            \"public_key\": {"]
2132#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
2133#[doc = "            }"]
2134#[doc = "          }"]
2135#[doc = "        }"]
2136#[doc = "      },"]
2137#[doc = "      \"additionalProperties\": false"]
2138#[doc = "    }"]
2139#[doc = "  ]"]
2140#[doc = "}"]
2141#[doc = r" ```"]
2142#[doc = r" </details>"]
2143#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2144pub enum ActionView {
2145    CreateAccount,
2146    DeployContract {
2147        code: ::std::string::String,
2148    },
2149    FunctionCall {
2150        args: FunctionArgs,
2151        deposit: NearToken,
2152        gas: NearGas,
2153        method_name: ::std::string::String,
2154    },
2155    Transfer {
2156        deposit: NearToken,
2157    },
2158    Stake {
2159        public_key: PublicKey,
2160        stake: NearToken,
2161    },
2162    AddKey {
2163        access_key: AccessKeyView,
2164        public_key: PublicKey,
2165    },
2166    DeleteKey {
2167        public_key: PublicKey,
2168    },
2169    DeleteAccount {
2170        beneficiary_id: AccountId,
2171    },
2172    Delegate {
2173        delegate_action: DelegateAction,
2174        signature: Signature,
2175    },
2176    DeployGlobalContract {
2177        code: ::std::string::String,
2178    },
2179    DeployGlobalContractByAccountId {
2180        code: ::std::string::String,
2181    },
2182    UseGlobalContract {
2183        code_hash: CryptoHash,
2184    },
2185    UseGlobalContractByAccountId {
2186        account_id: AccountId,
2187    },
2188    DeterministicStateInit {
2189        code: GlobalContractIdentifierView,
2190        data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2191        deposit: NearToken,
2192    },
2193    AddGasKey {
2194        num_nonces: u32,
2195        permission: AccessKeyPermissionView,
2196        public_key: PublicKey,
2197    },
2198    DeleteGasKey {
2199        public_key: PublicKey,
2200    },
2201    TransferToGasKey {
2202        amount: NearToken,
2203        public_key: PublicKey,
2204    },
2205}
2206impl ::std::convert::From<&Self> for ActionView {
2207    fn from(value: &ActionView) -> Self {
2208        value.clone()
2209    }
2210}
2211#[doc = "Describes the error for validating a list of actions."]
2212#[doc = r""]
2213#[doc = r" <details><summary>JSON schema</summary>"]
2214#[doc = r""]
2215#[doc = r" ```json"]
2216#[doc = "{"]
2217#[doc = "  \"description\": \"Describes the error for validating a list of actions.\","]
2218#[doc = "  \"oneOf\": ["]
2219#[doc = "    {"]
2220#[doc = "      \"description\": \"The delete action must be a final action in transaction\","]
2221#[doc = "      \"type\": \"string\","]
2222#[doc = "      \"enum\": ["]
2223#[doc = "        \"DeleteActionMustBeFinal\""]
2224#[doc = "      ]"]
2225#[doc = "    },"]
2226#[doc = "    {"]
2227#[doc = "      \"description\": \"The total prepaid gas (for all given actions) exceeded the limit.\","]
2228#[doc = "      \"type\": \"object\","]
2229#[doc = "      \"required\": ["]
2230#[doc = "        \"TotalPrepaidGasExceeded\""]
2231#[doc = "      ],"]
2232#[doc = "      \"properties\": {"]
2233#[doc = "        \"TotalPrepaidGasExceeded\": {"]
2234#[doc = "          \"type\": \"object\","]
2235#[doc = "          \"required\": ["]
2236#[doc = "            \"limit\","]
2237#[doc = "            \"total_prepaid_gas\""]
2238#[doc = "          ],"]
2239#[doc = "          \"properties\": {"]
2240#[doc = "            \"limit\": {"]
2241#[doc = "              \"$ref\": \"#/components/schemas/NearGas\""]
2242#[doc = "            },"]
2243#[doc = "            \"total_prepaid_gas\": {"]
2244#[doc = "              \"$ref\": \"#/components/schemas/NearGas\""]
2245#[doc = "            }"]
2246#[doc = "          }"]
2247#[doc = "        }"]
2248#[doc = "      },"]
2249#[doc = "      \"additionalProperties\": false"]
2250#[doc = "    },"]
2251#[doc = "    {"]
2252#[doc = "      \"description\": \"The number of actions exceeded the given limit.\","]
2253#[doc = "      \"type\": \"object\","]
2254#[doc = "      \"required\": ["]
2255#[doc = "        \"TotalNumberOfActionsExceeded\""]
2256#[doc = "      ],"]
2257#[doc = "      \"properties\": {"]
2258#[doc = "        \"TotalNumberOfActionsExceeded\": {"]
2259#[doc = "          \"type\": \"object\","]
2260#[doc = "          \"required\": ["]
2261#[doc = "            \"limit\","]
2262#[doc = "            \"total_number_of_actions\""]
2263#[doc = "          ],"]
2264#[doc = "          \"properties\": {"]
2265#[doc = "            \"limit\": {"]
2266#[doc = "              \"type\": \"integer\","]
2267#[doc = "              \"format\": \"uint64\","]
2268#[doc = "              \"minimum\": 0.0"]
2269#[doc = "            },"]
2270#[doc = "            \"total_number_of_actions\": {"]
2271#[doc = "              \"type\": \"integer\","]
2272#[doc = "              \"format\": \"uint64\","]
2273#[doc = "              \"minimum\": 0.0"]
2274#[doc = "            }"]
2275#[doc = "          }"]
2276#[doc = "        }"]
2277#[doc = "      },"]
2278#[doc = "      \"additionalProperties\": false"]
2279#[doc = "    },"]
2280#[doc = "    {"]
2281#[doc = "      \"description\": \"The total number of bytes of the method names exceeded the limit in a Add Key action.\","]
2282#[doc = "      \"type\": \"object\","]
2283#[doc = "      \"required\": ["]
2284#[doc = "        \"AddKeyMethodNamesNumberOfBytesExceeded\""]
2285#[doc = "      ],"]
2286#[doc = "      \"properties\": {"]
2287#[doc = "        \"AddKeyMethodNamesNumberOfBytesExceeded\": {"]
2288#[doc = "          \"type\": \"object\","]
2289#[doc = "          \"required\": ["]
2290#[doc = "            \"limit\","]
2291#[doc = "            \"total_number_of_bytes\""]
2292#[doc = "          ],"]
2293#[doc = "          \"properties\": {"]
2294#[doc = "            \"limit\": {"]
2295#[doc = "              \"type\": \"integer\","]
2296#[doc = "              \"format\": \"uint64\","]
2297#[doc = "              \"minimum\": 0.0"]
2298#[doc = "            },"]
2299#[doc = "            \"total_number_of_bytes\": {"]
2300#[doc = "              \"type\": \"integer\","]
2301#[doc = "              \"format\": \"uint64\","]
2302#[doc = "              \"minimum\": 0.0"]
2303#[doc = "            }"]
2304#[doc = "          }"]
2305#[doc = "        }"]
2306#[doc = "      },"]
2307#[doc = "      \"additionalProperties\": false"]
2308#[doc = "    },"]
2309#[doc = "    {"]
2310#[doc = "      \"description\": \"The length of some method name exceeded the limit in a Add Key action.\","]
2311#[doc = "      \"type\": \"object\","]
2312#[doc = "      \"required\": ["]
2313#[doc = "        \"AddKeyMethodNameLengthExceeded\""]
2314#[doc = "      ],"]
2315#[doc = "      \"properties\": {"]
2316#[doc = "        \"AddKeyMethodNameLengthExceeded\": {"]
2317#[doc = "          \"type\": \"object\","]
2318#[doc = "          \"required\": ["]
2319#[doc = "            \"length\","]
2320#[doc = "            \"limit\""]
2321#[doc = "          ],"]
2322#[doc = "          \"properties\": {"]
2323#[doc = "            \"length\": {"]
2324#[doc = "              \"type\": \"integer\","]
2325#[doc = "              \"format\": \"uint64\","]
2326#[doc = "              \"minimum\": 0.0"]
2327#[doc = "            },"]
2328#[doc = "            \"limit\": {"]
2329#[doc = "              \"type\": \"integer\","]
2330#[doc = "              \"format\": \"uint64\","]
2331#[doc = "              \"minimum\": 0.0"]
2332#[doc = "            }"]
2333#[doc = "          }"]
2334#[doc = "        }"]
2335#[doc = "      },"]
2336#[doc = "      \"additionalProperties\": false"]
2337#[doc = "    },"]
2338#[doc = "    {"]
2339#[doc = "      \"description\": \"Integer overflow during a compute.\","]
2340#[doc = "      \"type\": \"string\","]
2341#[doc = "      \"enum\": ["]
2342#[doc = "        \"IntegerOverflow\""]
2343#[doc = "      ]"]
2344#[doc = "    },"]
2345#[doc = "    {"]
2346#[doc = "      \"description\": \"Invalid account ID.\","]
2347#[doc = "      \"type\": \"object\","]
2348#[doc = "      \"required\": ["]
2349#[doc = "        \"InvalidAccountId\""]
2350#[doc = "      ],"]
2351#[doc = "      \"properties\": {"]
2352#[doc = "        \"InvalidAccountId\": {"]
2353#[doc = "          \"type\": \"object\","]
2354#[doc = "          \"required\": ["]
2355#[doc = "            \"account_id\""]
2356#[doc = "          ],"]
2357#[doc = "          \"properties\": {"]
2358#[doc = "            \"account_id\": {"]
2359#[doc = "              \"type\": \"string\""]
2360#[doc = "            }"]
2361#[doc = "          }"]
2362#[doc = "        }"]
2363#[doc = "      },"]
2364#[doc = "      \"additionalProperties\": false"]
2365#[doc = "    },"]
2366#[doc = "    {"]
2367#[doc = "      \"description\": \"The size of the contract code exceeded the limit in a DeployContract action.\","]
2368#[doc = "      \"type\": \"object\","]
2369#[doc = "      \"required\": ["]
2370#[doc = "        \"ContractSizeExceeded\""]
2371#[doc = "      ],"]
2372#[doc = "      \"properties\": {"]
2373#[doc = "        \"ContractSizeExceeded\": {"]
2374#[doc = "          \"type\": \"object\","]
2375#[doc = "          \"required\": ["]
2376#[doc = "            \"limit\","]
2377#[doc = "            \"size\""]
2378#[doc = "          ],"]
2379#[doc = "          \"properties\": {"]
2380#[doc = "            \"limit\": {"]
2381#[doc = "              \"type\": \"integer\","]
2382#[doc = "              \"format\": \"uint64\","]
2383#[doc = "              \"minimum\": 0.0"]
2384#[doc = "            },"]
2385#[doc = "            \"size\": {"]
2386#[doc = "              \"type\": \"integer\","]
2387#[doc = "              \"format\": \"uint64\","]
2388#[doc = "              \"minimum\": 0.0"]
2389#[doc = "            }"]
2390#[doc = "          }"]
2391#[doc = "        }"]
2392#[doc = "      },"]
2393#[doc = "      \"additionalProperties\": false"]
2394#[doc = "    },"]
2395#[doc = "    {"]
2396#[doc = "      \"description\": \"The length of the method name exceeded the limit in a Function Call action.\","]
2397#[doc = "      \"type\": \"object\","]
2398#[doc = "      \"required\": ["]
2399#[doc = "        \"FunctionCallMethodNameLengthExceeded\""]
2400#[doc = "      ],"]
2401#[doc = "      \"properties\": {"]
2402#[doc = "        \"FunctionCallMethodNameLengthExceeded\": {"]
2403#[doc = "          \"type\": \"object\","]
2404#[doc = "          \"required\": ["]
2405#[doc = "            \"length\","]
2406#[doc = "            \"limit\""]
2407#[doc = "          ],"]
2408#[doc = "          \"properties\": {"]
2409#[doc = "            \"length\": {"]
2410#[doc = "              \"type\": \"integer\","]
2411#[doc = "              \"format\": \"uint64\","]
2412#[doc = "              \"minimum\": 0.0"]
2413#[doc = "            },"]
2414#[doc = "            \"limit\": {"]
2415#[doc = "              \"type\": \"integer\","]
2416#[doc = "              \"format\": \"uint64\","]
2417#[doc = "              \"minimum\": 0.0"]
2418#[doc = "            }"]
2419#[doc = "          }"]
2420#[doc = "        }"]
2421#[doc = "      },"]
2422#[doc = "      \"additionalProperties\": false"]
2423#[doc = "    },"]
2424#[doc = "    {"]
2425#[doc = "      \"description\": \"The length of the arguments exceeded the limit in a Function Call action.\","]
2426#[doc = "      \"type\": \"object\","]
2427#[doc = "      \"required\": ["]
2428#[doc = "        \"FunctionCallArgumentsLengthExceeded\""]
2429#[doc = "      ],"]
2430#[doc = "      \"properties\": {"]
2431#[doc = "        \"FunctionCallArgumentsLengthExceeded\": {"]
2432#[doc = "          \"type\": \"object\","]
2433#[doc = "          \"required\": ["]
2434#[doc = "            \"length\","]
2435#[doc = "            \"limit\""]
2436#[doc = "          ],"]
2437#[doc = "          \"properties\": {"]
2438#[doc = "            \"length\": {"]
2439#[doc = "              \"type\": \"integer\","]
2440#[doc = "              \"format\": \"uint64\","]
2441#[doc = "              \"minimum\": 0.0"]
2442#[doc = "            },"]
2443#[doc = "            \"limit\": {"]
2444#[doc = "              \"type\": \"integer\","]
2445#[doc = "              \"format\": \"uint64\","]
2446#[doc = "              \"minimum\": 0.0"]
2447#[doc = "            }"]
2448#[doc = "          }"]
2449#[doc = "        }"]
2450#[doc = "      },"]
2451#[doc = "      \"additionalProperties\": false"]
2452#[doc = "    },"]
2453#[doc = "    {"]
2454#[doc = "      \"description\": \"An attempt to stake with a public key that is not convertible to ristretto.\","]
2455#[doc = "      \"type\": \"object\","]
2456#[doc = "      \"required\": ["]
2457#[doc = "        \"UnsuitableStakingKey\""]
2458#[doc = "      ],"]
2459#[doc = "      \"properties\": {"]
2460#[doc = "        \"UnsuitableStakingKey\": {"]
2461#[doc = "          \"type\": \"object\","]
2462#[doc = "          \"required\": ["]
2463#[doc = "            \"public_key\""]
2464#[doc = "          ],"]
2465#[doc = "          \"properties\": {"]
2466#[doc = "            \"public_key\": {"]
2467#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
2468#[doc = "            }"]
2469#[doc = "          }"]
2470#[doc = "        }"]
2471#[doc = "      },"]
2472#[doc = "      \"additionalProperties\": false"]
2473#[doc = "    },"]
2474#[doc = "    {"]
2475#[doc = "      \"description\": \"The attached amount of gas in a FunctionCall action has to be a positive number.\","]
2476#[doc = "      \"type\": \"string\","]
2477#[doc = "      \"enum\": ["]
2478#[doc = "        \"FunctionCallZeroAttachedGas\""]
2479#[doc = "      ]"]
2480#[doc = "    },"]
2481#[doc = "    {"]
2482#[doc = "      \"description\": \"There should be the only one DelegateAction\","]
2483#[doc = "      \"type\": \"string\","]
2484#[doc = "      \"enum\": ["]
2485#[doc = "        \"DelegateActionMustBeOnlyOne\""]
2486#[doc = "      ]"]
2487#[doc = "    },"]
2488#[doc = "    {"]
2489#[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.\","]
2490#[doc = "      \"type\": \"object\","]
2491#[doc = "      \"required\": ["]
2492#[doc = "        \"UnsupportedProtocolFeature\""]
2493#[doc = "      ],"]
2494#[doc = "      \"properties\": {"]
2495#[doc = "        \"UnsupportedProtocolFeature\": {"]
2496#[doc = "          \"type\": \"object\","]
2497#[doc = "          \"required\": ["]
2498#[doc = "            \"protocol_feature\","]
2499#[doc = "            \"version\""]
2500#[doc = "          ],"]
2501#[doc = "          \"properties\": {"]
2502#[doc = "            \"protocol_feature\": {"]
2503#[doc = "              \"type\": \"string\""]
2504#[doc = "            },"]
2505#[doc = "            \"version\": {"]
2506#[doc = "              \"type\": \"integer\","]
2507#[doc = "              \"format\": \"uint32\","]
2508#[doc = "              \"minimum\": 0.0"]
2509#[doc = "            }"]
2510#[doc = "          }"]
2511#[doc = "        }"]
2512#[doc = "      },"]
2513#[doc = "      \"additionalProperties\": false"]
2514#[doc = "    },"]
2515#[doc = "    {"]
2516#[doc = "      \"type\": \"object\","]
2517#[doc = "      \"required\": ["]
2518#[doc = "        \"InvalidDeterministicStateInitReceiver\""]
2519#[doc = "      ],"]
2520#[doc = "      \"properties\": {"]
2521#[doc = "        \"InvalidDeterministicStateInitReceiver\": {"]
2522#[doc = "          \"type\": \"object\","]
2523#[doc = "          \"required\": ["]
2524#[doc = "            \"derived_id\","]
2525#[doc = "            \"receiver_id\""]
2526#[doc = "          ],"]
2527#[doc = "          \"properties\": {"]
2528#[doc = "            \"derived_id\": {"]
2529#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
2530#[doc = "            },"]
2531#[doc = "            \"receiver_id\": {"]
2532#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
2533#[doc = "            }"]
2534#[doc = "          }"]
2535#[doc = "        }"]
2536#[doc = "      },"]
2537#[doc = "      \"additionalProperties\": false"]
2538#[doc = "    },"]
2539#[doc = "    {"]
2540#[doc = "      \"type\": \"object\","]
2541#[doc = "      \"required\": ["]
2542#[doc = "        \"DeterministicStateInitKeyLengthExceeded\""]
2543#[doc = "      ],"]
2544#[doc = "      \"properties\": {"]
2545#[doc = "        \"DeterministicStateInitKeyLengthExceeded\": {"]
2546#[doc = "          \"type\": \"object\","]
2547#[doc = "          \"required\": ["]
2548#[doc = "            \"length\","]
2549#[doc = "            \"limit\""]
2550#[doc = "          ],"]
2551#[doc = "          \"properties\": {"]
2552#[doc = "            \"length\": {"]
2553#[doc = "              \"type\": \"integer\","]
2554#[doc = "              \"format\": \"uint64\","]
2555#[doc = "              \"minimum\": 0.0"]
2556#[doc = "            },"]
2557#[doc = "            \"limit\": {"]
2558#[doc = "              \"type\": \"integer\","]
2559#[doc = "              \"format\": \"uint64\","]
2560#[doc = "              \"minimum\": 0.0"]
2561#[doc = "            }"]
2562#[doc = "          }"]
2563#[doc = "        }"]
2564#[doc = "      },"]
2565#[doc = "      \"additionalProperties\": false"]
2566#[doc = "    },"]
2567#[doc = "    {"]
2568#[doc = "      \"type\": \"object\","]
2569#[doc = "      \"required\": ["]
2570#[doc = "        \"DeterministicStateInitValueLengthExceeded\""]
2571#[doc = "      ],"]
2572#[doc = "      \"properties\": {"]
2573#[doc = "        \"DeterministicStateInitValueLengthExceeded\": {"]
2574#[doc = "          \"type\": \"object\","]
2575#[doc = "          \"required\": ["]
2576#[doc = "            \"length\","]
2577#[doc = "            \"limit\""]
2578#[doc = "          ],"]
2579#[doc = "          \"properties\": {"]
2580#[doc = "            \"length\": {"]
2581#[doc = "              \"type\": \"integer\","]
2582#[doc = "              \"format\": \"uint64\","]
2583#[doc = "              \"minimum\": 0.0"]
2584#[doc = "            },"]
2585#[doc = "            \"limit\": {"]
2586#[doc = "              \"type\": \"integer\","]
2587#[doc = "              \"format\": \"uint64\","]
2588#[doc = "              \"minimum\": 0.0"]
2589#[doc = "            }"]
2590#[doc = "          }"]
2591#[doc = "        }"]
2592#[doc = "      },"]
2593#[doc = "      \"additionalProperties\": false"]
2594#[doc = "    },"]
2595#[doc = "    {"]
2596#[doc = "      \"type\": \"object\","]
2597#[doc = "      \"required\": ["]
2598#[doc = "        \"GasKeyPermissionInvalid\""]
2599#[doc = "      ],"]
2600#[doc = "      \"properties\": {"]
2601#[doc = "        \"GasKeyPermissionInvalid\": {"]
2602#[doc = "          \"type\": \"object\","]
2603#[doc = "          \"required\": ["]
2604#[doc = "            \"permission\""]
2605#[doc = "          ],"]
2606#[doc = "          \"properties\": {"]
2607#[doc = "            \"permission\": {"]
2608#[doc = "              \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
2609#[doc = "            }"]
2610#[doc = "          }"]
2611#[doc = "        }"]
2612#[doc = "      },"]
2613#[doc = "      \"additionalProperties\": false"]
2614#[doc = "    },"]
2615#[doc = "    {"]
2616#[doc = "      \"type\": \"object\","]
2617#[doc = "      \"required\": ["]
2618#[doc = "        \"GasKeyTooManyNoncesRequested\""]
2619#[doc = "      ],"]
2620#[doc = "      \"properties\": {"]
2621#[doc = "        \"GasKeyTooManyNoncesRequested\": {"]
2622#[doc = "          \"type\": \"object\","]
2623#[doc = "          \"required\": ["]
2624#[doc = "            \"limit\","]
2625#[doc = "            \"requested_nonces\""]
2626#[doc = "          ],"]
2627#[doc = "          \"properties\": {"]
2628#[doc = "            \"limit\": {"]
2629#[doc = "              \"type\": \"integer\","]
2630#[doc = "              \"format\": \"uint32\","]
2631#[doc = "              \"minimum\": 0.0"]
2632#[doc = "            },"]
2633#[doc = "            \"requested_nonces\": {"]
2634#[doc = "              \"type\": \"integer\","]
2635#[doc = "              \"format\": \"uint32\","]
2636#[doc = "              \"minimum\": 0.0"]
2637#[doc = "            }"]
2638#[doc = "          }"]
2639#[doc = "        }"]
2640#[doc = "      },"]
2641#[doc = "      \"additionalProperties\": false"]
2642#[doc = "    }"]
2643#[doc = "  ]"]
2644#[doc = "}"]
2645#[doc = r" ```"]
2646#[doc = r" </details>"]
2647#[derive(
2648    :: serde :: Deserialize,
2649    :: serde :: Serialize,
2650    Clone,
2651    Debug,
2652    thiserror::Error,
2653    strum_macros::Display,
2654)]
2655pub enum ActionsValidationError {
2656    #[doc = "The delete action must be a final action in transaction"]
2657    DeleteActionMustBeFinal,
2658    #[doc = "The total prepaid gas (for all given actions) exceeded the limit."]
2659    TotalPrepaidGasExceeded {
2660        limit: NearGas,
2661        total_prepaid_gas: NearGas,
2662    },
2663    #[doc = "The number of actions exceeded the given limit."]
2664    TotalNumberOfActionsExceeded {
2665        limit: u64,
2666        total_number_of_actions: u64,
2667    },
2668    #[doc = "The total number of bytes of the method names exceeded the limit in a Add Key action."]
2669    AddKeyMethodNamesNumberOfBytesExceeded {
2670        limit: u64,
2671        total_number_of_bytes: u64,
2672    },
2673    #[doc = "The length of some method name exceeded the limit in a Add Key action."]
2674    AddKeyMethodNameLengthExceeded {
2675        length: u64,
2676        limit: u64,
2677    },
2678    #[doc = "Integer overflow during a compute."]
2679    IntegerOverflow,
2680    #[doc = "Invalid account ID."]
2681    InvalidAccountId {
2682        account_id: ::std::string::String,
2683    },
2684    #[doc = "The size of the contract code exceeded the limit in a DeployContract action."]
2685    ContractSizeExceeded {
2686        limit: u64,
2687        size: u64,
2688    },
2689    #[doc = "The length of the method name exceeded the limit in a Function Call action."]
2690    FunctionCallMethodNameLengthExceeded {
2691        length: u64,
2692        limit: u64,
2693    },
2694    #[doc = "The length of the arguments exceeded the limit in a Function Call action."]
2695    FunctionCallArgumentsLengthExceeded {
2696        length: u64,
2697        limit: u64,
2698    },
2699    #[doc = "An attempt to stake with a public key that is not convertible to ristretto."]
2700    UnsuitableStakingKey {
2701        public_key: PublicKey,
2702    },
2703    #[doc = "The attached amount of gas in a FunctionCall action has to be a positive number."]
2704    FunctionCallZeroAttachedGas,
2705    #[doc = "There should be the only one DelegateAction"]
2706    DelegateActionMustBeOnlyOne,
2707    #[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."]
2708    UnsupportedProtocolFeature {
2709        protocol_feature: ::std::string::String,
2710        version: u32,
2711    },
2712    InvalidDeterministicStateInitReceiver {
2713        derived_id: AccountId,
2714        receiver_id: AccountId,
2715    },
2716    DeterministicStateInitKeyLengthExceeded {
2717        length: u64,
2718        limit: u64,
2719    },
2720    DeterministicStateInitValueLengthExceeded {
2721        length: u64,
2722        limit: u64,
2723    },
2724    GasKeyPermissionInvalid {
2725        permission: AccessKeyPermission,
2726    },
2727    GasKeyTooManyNoncesRequested {
2728        limit: u32,
2729        requested_nonces: u32,
2730    },
2731}
2732impl ::std::convert::From<&Self> for ActionsValidationError {
2733    fn from(value: &ActionsValidationError) -> Self {
2734        value.clone()
2735    }
2736}
2737#[doc = "`AddGasKeyAction`"]
2738#[doc = r""]
2739#[doc = r" <details><summary>JSON schema</summary>"]
2740#[doc = r""]
2741#[doc = r" ```json"]
2742#[doc = "{"]
2743#[doc = "  \"type\": \"object\","]
2744#[doc = "  \"required\": ["]
2745#[doc = "    \"num_nonces\","]
2746#[doc = "    \"permission\","]
2747#[doc = "    \"public_key\""]
2748#[doc = "  ],"]
2749#[doc = "  \"properties\": {"]
2750#[doc = "    \"num_nonces\": {"]
2751#[doc = "      \"type\": \"integer\","]
2752#[doc = "      \"format\": \"uint32\","]
2753#[doc = "      \"minimum\": 0.0"]
2754#[doc = "    },"]
2755#[doc = "    \"permission\": {"]
2756#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
2757#[doc = "    },"]
2758#[doc = "    \"public_key\": {"]
2759#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
2760#[doc = "    }"]
2761#[doc = "  }"]
2762#[doc = "}"]
2763#[doc = r" ```"]
2764#[doc = r" </details>"]
2765#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2766pub struct AddGasKeyAction {
2767    pub num_nonces: u32,
2768    pub permission: AccessKeyPermission,
2769    pub public_key: PublicKey,
2770}
2771impl ::std::convert::From<&AddGasKeyAction> for AddGasKeyAction {
2772    fn from(value: &AddGasKeyAction) -> Self {
2773        value.clone()
2774    }
2775}
2776#[doc = "An action that adds key with public key associated"]
2777#[doc = r""]
2778#[doc = r" <details><summary>JSON schema</summary>"]
2779#[doc = r""]
2780#[doc = r" ```json"]
2781#[doc = "{"]
2782#[doc = "  \"description\": \"An action that adds key with public key associated\","]
2783#[doc = "  \"type\": \"object\","]
2784#[doc = "  \"required\": ["]
2785#[doc = "    \"access_key\","]
2786#[doc = "    \"public_key\""]
2787#[doc = "  ],"]
2788#[doc = "  \"properties\": {"]
2789#[doc = "    \"access_key\": {"]
2790#[doc = "      \"description\": \"An access key with the permission\","]
2791#[doc = "      \"allOf\": ["]
2792#[doc = "        {"]
2793#[doc = "          \"$ref\": \"#/components/schemas/AccessKey\""]
2794#[doc = "        }"]
2795#[doc = "      ]"]
2796#[doc = "    },"]
2797#[doc = "    \"public_key\": {"]
2798#[doc = "      \"description\": \"A public key which will be associated with an access_key\","]
2799#[doc = "      \"allOf\": ["]
2800#[doc = "        {"]
2801#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
2802#[doc = "        }"]
2803#[doc = "      ]"]
2804#[doc = "    }"]
2805#[doc = "  }"]
2806#[doc = "}"]
2807#[doc = r" ```"]
2808#[doc = r" </details>"]
2809#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2810pub struct AddKeyAction {
2811    #[doc = "An access key with the permission"]
2812    pub access_key: AccessKey,
2813    #[doc = "A public key which will be associated with an access_key"]
2814    pub public_key: PublicKey,
2815}
2816impl ::std::convert::From<&AddKeyAction> for AddKeyAction {
2817    fn from(value: &AddKeyAction) -> Self {
2818        value.clone()
2819    }
2820}
2821#[doc = "`AllAccessKeyChangesByBlockIdChangesType`"]
2822#[doc = r""]
2823#[doc = r" <details><summary>JSON schema</summary>"]
2824#[doc = r""]
2825#[doc = r" ```json"]
2826#[doc = "{"]
2827#[doc = "  \"type\": \"string\","]
2828#[doc = "  \"enum\": ["]
2829#[doc = "    \"all_access_key_changes\""]
2830#[doc = "  ]"]
2831#[doc = "}"]
2832#[doc = r" ```"]
2833#[doc = r" </details>"]
2834#[derive(
2835    :: serde :: Deserialize,
2836    :: serde :: Serialize,
2837    Clone,
2838    Copy,
2839    Debug,
2840    Eq,
2841    Hash,
2842    Ord,
2843    PartialEq,
2844    PartialOrd,
2845)]
2846pub enum AllAccessKeyChangesByBlockIdChangesType {
2847    #[serde(rename = "all_access_key_changes")]
2848    AllAccessKeyChanges,
2849}
2850impl ::std::convert::From<&Self> for AllAccessKeyChangesByBlockIdChangesType {
2851    fn from(value: &AllAccessKeyChangesByBlockIdChangesType) -> Self {
2852        value.clone()
2853    }
2854}
2855impl ::std::fmt::Display for AllAccessKeyChangesByBlockIdChangesType {
2856    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2857        match *self {
2858            Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
2859        }
2860    }
2861}
2862impl ::std::str::FromStr for AllAccessKeyChangesByBlockIdChangesType {
2863    type Err = self::error::ConversionError;
2864    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2865        match value {
2866            "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2867            _ => Err("invalid value".into()),
2868        }
2869    }
2870}
2871impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByBlockIdChangesType {
2872    type Error = self::error::ConversionError;
2873    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2874        value.parse()
2875    }
2876}
2877impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2878    type Error = self::error::ConversionError;
2879    fn try_from(
2880        value: &::std::string::String,
2881    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2882        value.parse()
2883    }
2884}
2885impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2886    type Error = self::error::ConversionError;
2887    fn try_from(
2888        value: ::std::string::String,
2889    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2890        value.parse()
2891    }
2892}
2893#[doc = "`AllAccessKeyChangesByFinalityChangesType`"]
2894#[doc = r""]
2895#[doc = r" <details><summary>JSON schema</summary>"]
2896#[doc = r""]
2897#[doc = r" ```json"]
2898#[doc = "{"]
2899#[doc = "  \"type\": \"string\","]
2900#[doc = "  \"enum\": ["]
2901#[doc = "    \"all_access_key_changes\""]
2902#[doc = "  ]"]
2903#[doc = "}"]
2904#[doc = r" ```"]
2905#[doc = r" </details>"]
2906#[derive(
2907    :: serde :: Deserialize,
2908    :: serde :: Serialize,
2909    Clone,
2910    Copy,
2911    Debug,
2912    Eq,
2913    Hash,
2914    Ord,
2915    PartialEq,
2916    PartialOrd,
2917)]
2918pub enum AllAccessKeyChangesByFinalityChangesType {
2919    #[serde(rename = "all_access_key_changes")]
2920    AllAccessKeyChanges,
2921}
2922impl ::std::convert::From<&Self> for AllAccessKeyChangesByFinalityChangesType {
2923    fn from(value: &AllAccessKeyChangesByFinalityChangesType) -> Self {
2924        value.clone()
2925    }
2926}
2927impl ::std::fmt::Display for AllAccessKeyChangesByFinalityChangesType {
2928    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2929        match *self {
2930            Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
2931        }
2932    }
2933}
2934impl ::std::str::FromStr for AllAccessKeyChangesByFinalityChangesType {
2935    type Err = self::error::ConversionError;
2936    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2937        match value {
2938            "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2939            _ => Err("invalid value".into()),
2940        }
2941    }
2942}
2943impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByFinalityChangesType {
2944    type Error = self::error::ConversionError;
2945    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2946        value.parse()
2947    }
2948}
2949impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2950    type Error = self::error::ConversionError;
2951    fn try_from(
2952        value: &::std::string::String,
2953    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2954        value.parse()
2955    }
2956}
2957impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2958    type Error = self::error::ConversionError;
2959    fn try_from(
2960        value: ::std::string::String,
2961    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2962        value.parse()
2963    }
2964}
2965#[doc = "`AllAccessKeyChangesBySyncCheckpointChangesType`"]
2966#[doc = r""]
2967#[doc = r" <details><summary>JSON schema</summary>"]
2968#[doc = r""]
2969#[doc = r" ```json"]
2970#[doc = "{"]
2971#[doc = "  \"type\": \"string\","]
2972#[doc = "  \"enum\": ["]
2973#[doc = "    \"all_access_key_changes\""]
2974#[doc = "  ]"]
2975#[doc = "}"]
2976#[doc = r" ```"]
2977#[doc = r" </details>"]
2978#[derive(
2979    :: serde :: Deserialize,
2980    :: serde :: Serialize,
2981    Clone,
2982    Copy,
2983    Debug,
2984    Eq,
2985    Hash,
2986    Ord,
2987    PartialEq,
2988    PartialOrd,
2989)]
2990pub enum AllAccessKeyChangesBySyncCheckpointChangesType {
2991    #[serde(rename = "all_access_key_changes")]
2992    AllAccessKeyChanges,
2993}
2994impl ::std::convert::From<&Self> for AllAccessKeyChangesBySyncCheckpointChangesType {
2995    fn from(value: &AllAccessKeyChangesBySyncCheckpointChangesType) -> Self {
2996        value.clone()
2997    }
2998}
2999impl ::std::fmt::Display for AllAccessKeyChangesBySyncCheckpointChangesType {
3000    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3001        match *self {
3002            Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
3003        }
3004    }
3005}
3006impl ::std::str::FromStr for AllAccessKeyChangesBySyncCheckpointChangesType {
3007    type Err = self::error::ConversionError;
3008    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3009        match value {
3010            "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
3011            _ => Err("invalid value".into()),
3012        }
3013    }
3014}
3015impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesBySyncCheckpointChangesType {
3016    type Error = self::error::ConversionError;
3017    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3018        value.parse()
3019    }
3020}
3021impl ::std::convert::TryFrom<&::std::string::String>
3022    for AllAccessKeyChangesBySyncCheckpointChangesType
3023{
3024    type Error = self::error::ConversionError;
3025    fn try_from(
3026        value: &::std::string::String,
3027    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3028        value.parse()
3029    }
3030}
3031impl ::std::convert::TryFrom<::std::string::String>
3032    for AllAccessKeyChangesBySyncCheckpointChangesType
3033{
3034    type Error = self::error::ConversionError;
3035    fn try_from(
3036        value: ::std::string::String,
3037    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3038        value.parse()
3039    }
3040}
3041#[doc = "`AllGasKeyChangesByBlockIdChangesType`"]
3042#[doc = r""]
3043#[doc = r" <details><summary>JSON schema</summary>"]
3044#[doc = r""]
3045#[doc = r" ```json"]
3046#[doc = "{"]
3047#[doc = "  \"type\": \"string\","]
3048#[doc = "  \"enum\": ["]
3049#[doc = "    \"all_gas_key_changes\""]
3050#[doc = "  ]"]
3051#[doc = "}"]
3052#[doc = r" ```"]
3053#[doc = r" </details>"]
3054#[derive(
3055    :: serde :: Deserialize,
3056    :: serde :: Serialize,
3057    Clone,
3058    Copy,
3059    Debug,
3060    Eq,
3061    Hash,
3062    Ord,
3063    PartialEq,
3064    PartialOrd,
3065)]
3066pub enum AllGasKeyChangesByBlockIdChangesType {
3067    #[serde(rename = "all_gas_key_changes")]
3068    AllGasKeyChanges,
3069}
3070impl ::std::convert::From<&Self> for AllGasKeyChangesByBlockIdChangesType {
3071    fn from(value: &AllGasKeyChangesByBlockIdChangesType) -> Self {
3072        value.clone()
3073    }
3074}
3075impl ::std::fmt::Display for AllGasKeyChangesByBlockIdChangesType {
3076    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3077        match *self {
3078            Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
3079        }
3080    }
3081}
3082impl ::std::str::FromStr for AllGasKeyChangesByBlockIdChangesType {
3083    type Err = self::error::ConversionError;
3084    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3085        match value {
3086            "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
3087            _ => Err("invalid value".into()),
3088        }
3089    }
3090}
3091impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByBlockIdChangesType {
3092    type Error = self::error::ConversionError;
3093    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3094        value.parse()
3095    }
3096}
3097impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
3098    type Error = self::error::ConversionError;
3099    fn try_from(
3100        value: &::std::string::String,
3101    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3102        value.parse()
3103    }
3104}
3105impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
3106    type Error = self::error::ConversionError;
3107    fn try_from(
3108        value: ::std::string::String,
3109    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3110        value.parse()
3111    }
3112}
3113#[doc = "`AllGasKeyChangesByFinalityChangesType`"]
3114#[doc = r""]
3115#[doc = r" <details><summary>JSON schema</summary>"]
3116#[doc = r""]
3117#[doc = r" ```json"]
3118#[doc = "{"]
3119#[doc = "  \"type\": \"string\","]
3120#[doc = "  \"enum\": ["]
3121#[doc = "    \"all_gas_key_changes\""]
3122#[doc = "  ]"]
3123#[doc = "}"]
3124#[doc = r" ```"]
3125#[doc = r" </details>"]
3126#[derive(
3127    :: serde :: Deserialize,
3128    :: serde :: Serialize,
3129    Clone,
3130    Copy,
3131    Debug,
3132    Eq,
3133    Hash,
3134    Ord,
3135    PartialEq,
3136    PartialOrd,
3137)]
3138pub enum AllGasKeyChangesByFinalityChangesType {
3139    #[serde(rename = "all_gas_key_changes")]
3140    AllGasKeyChanges,
3141}
3142impl ::std::convert::From<&Self> for AllGasKeyChangesByFinalityChangesType {
3143    fn from(value: &AllGasKeyChangesByFinalityChangesType) -> Self {
3144        value.clone()
3145    }
3146}
3147impl ::std::fmt::Display for AllGasKeyChangesByFinalityChangesType {
3148    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3149        match *self {
3150            Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
3151        }
3152    }
3153}
3154impl ::std::str::FromStr for AllGasKeyChangesByFinalityChangesType {
3155    type Err = self::error::ConversionError;
3156    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3157        match value {
3158            "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
3159            _ => Err("invalid value".into()),
3160        }
3161    }
3162}
3163impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByFinalityChangesType {
3164    type Error = self::error::ConversionError;
3165    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3166        value.parse()
3167    }
3168}
3169impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByFinalityChangesType {
3170    type Error = self::error::ConversionError;
3171    fn try_from(
3172        value: &::std::string::String,
3173    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3174        value.parse()
3175    }
3176}
3177impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByFinalityChangesType {
3178    type Error = self::error::ConversionError;
3179    fn try_from(
3180        value: ::std::string::String,
3181    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3182        value.parse()
3183    }
3184}
3185#[doc = "`AllGasKeyChangesBySyncCheckpointChangesType`"]
3186#[doc = r""]
3187#[doc = r" <details><summary>JSON schema</summary>"]
3188#[doc = r""]
3189#[doc = r" ```json"]
3190#[doc = "{"]
3191#[doc = "  \"type\": \"string\","]
3192#[doc = "  \"enum\": ["]
3193#[doc = "    \"all_gas_key_changes\""]
3194#[doc = "  ]"]
3195#[doc = "}"]
3196#[doc = r" ```"]
3197#[doc = r" </details>"]
3198#[derive(
3199    :: serde :: Deserialize,
3200    :: serde :: Serialize,
3201    Clone,
3202    Copy,
3203    Debug,
3204    Eq,
3205    Hash,
3206    Ord,
3207    PartialEq,
3208    PartialOrd,
3209)]
3210pub enum AllGasKeyChangesBySyncCheckpointChangesType {
3211    #[serde(rename = "all_gas_key_changes")]
3212    AllGasKeyChanges,
3213}
3214impl ::std::convert::From<&Self> for AllGasKeyChangesBySyncCheckpointChangesType {
3215    fn from(value: &AllGasKeyChangesBySyncCheckpointChangesType) -> Self {
3216        value.clone()
3217    }
3218}
3219impl ::std::fmt::Display for AllGasKeyChangesBySyncCheckpointChangesType {
3220    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3221        match *self {
3222            Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
3223        }
3224    }
3225}
3226impl ::std::str::FromStr for AllGasKeyChangesBySyncCheckpointChangesType {
3227    type Err = self::error::ConversionError;
3228    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3229        match value {
3230            "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
3231            _ => Err("invalid value".into()),
3232        }
3233    }
3234}
3235impl ::std::convert::TryFrom<&str> for AllGasKeyChangesBySyncCheckpointChangesType {
3236    type Error = self::error::ConversionError;
3237    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3238        value.parse()
3239    }
3240}
3241impl ::std::convert::TryFrom<&::std::string::String>
3242    for AllGasKeyChangesBySyncCheckpointChangesType
3243{
3244    type Error = self::error::ConversionError;
3245    fn try_from(
3246        value: &::std::string::String,
3247    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3248        value.parse()
3249    }
3250}
3251impl ::std::convert::TryFrom<::std::string::String>
3252    for AllGasKeyChangesBySyncCheckpointChangesType
3253{
3254    type Error = self::error::ConversionError;
3255    fn try_from(
3256        value: ::std::string::String,
3257    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3258        value.parse()
3259    }
3260}
3261#[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."]
3262#[doc = r""]
3263#[doc = r" <details><summary>JSON schema</summary>"]
3264#[doc = r""]
3265#[doc = r" ```json"]
3266#[doc = "{"]
3267#[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.\","]
3268#[doc = "  \"type\": \"object\","]
3269#[doc = "  \"required\": ["]
3270#[doc = "    \"requested_values_bitmap\","]
3271#[doc = "    \"to_shard\""]
3272#[doc = "  ],"]
3273#[doc = "  \"properties\": {"]
3274#[doc = "    \"requested_values_bitmap\": {"]
3275#[doc = "      \"description\": \"Bitmap which describes what values of bandwidth are requested.\","]
3276#[doc = "      \"allOf\": ["]
3277#[doc = "        {"]
3278#[doc = "          \"$ref\": \"#/components/schemas/BandwidthRequestBitmap\""]
3279#[doc = "        }"]
3280#[doc = "      ]"]
3281#[doc = "    },"]
3282#[doc = "    \"to_shard\": {"]
3283#[doc = "      \"description\": \"Requesting bandwidth to this shard.\","]
3284#[doc = "      \"type\": \"integer\","]
3285#[doc = "      \"format\": \"uint16\","]
3286#[doc = "      \"maximum\": 65535.0,"]
3287#[doc = "      \"minimum\": 0.0"]
3288#[doc = "    }"]
3289#[doc = "  }"]
3290#[doc = "}"]
3291#[doc = r" ```"]
3292#[doc = r" </details>"]
3293#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3294pub struct BandwidthRequest {
3295    #[doc = "Bitmap which describes what values of bandwidth are requested."]
3296    pub requested_values_bitmap: BandwidthRequestBitmap,
3297    #[doc = "Requesting bandwidth to this shard."]
3298    pub to_shard: u16,
3299}
3300impl ::std::convert::From<&BandwidthRequest> for BandwidthRequest {
3301    fn from(value: &BandwidthRequest) -> Self {
3302        value.clone()
3303    }
3304}
3305#[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."]
3306#[doc = r""]
3307#[doc = r" <details><summary>JSON schema</summary>"]
3308#[doc = r""]
3309#[doc = r" ```json"]
3310#[doc = "{"]
3311#[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.\","]
3312#[doc = "  \"type\": \"object\","]
3313#[doc = "  \"required\": ["]
3314#[doc = "    \"data\""]
3315#[doc = "  ],"]
3316#[doc = "  \"properties\": {"]
3317#[doc = "    \"data\": {"]
3318#[doc = "      \"type\": \"array\","]
3319#[doc = "      \"items\": {"]
3320#[doc = "        \"type\": \"integer\","]
3321#[doc = "        \"format\": \"uint8\","]
3322#[doc = "        \"maximum\": 255.0,"]
3323#[doc = "        \"minimum\": 0.0"]
3324#[doc = "      },"]
3325#[doc = "      \"maxItems\": 5,"]
3326#[doc = "      \"minItems\": 5"]
3327#[doc = "    }"]
3328#[doc = "  }"]
3329#[doc = "}"]
3330#[doc = r" ```"]
3331#[doc = r" </details>"]
3332#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3333pub struct BandwidthRequestBitmap {
3334    pub data: [u8; 5usize],
3335}
3336impl ::std::convert::From<&BandwidthRequestBitmap> for BandwidthRequestBitmap {
3337    fn from(value: &BandwidthRequestBitmap) -> Self {
3338        value.clone()
3339    }
3340}
3341#[doc = "A list of shard's bandwidth requests.\nDescribes how much the shard would like to send to other shards."]
3342#[doc = r""]
3343#[doc = r" <details><summary>JSON schema</summary>"]
3344#[doc = r""]
3345#[doc = r" ```json"]
3346#[doc = "{"]
3347#[doc = "  \"description\": \"A list of shard's bandwidth requests.\\nDescribes how much the shard would like to send to other shards.\","]
3348#[doc = "  \"oneOf\": ["]
3349#[doc = "    {"]
3350#[doc = "      \"type\": \"object\","]
3351#[doc = "      \"required\": ["]
3352#[doc = "        \"V1\""]
3353#[doc = "      ],"]
3354#[doc = "      \"properties\": {"]
3355#[doc = "        \"V1\": {"]
3356#[doc = "          \"$ref\": \"#/components/schemas/BandwidthRequestsV1\""]
3357#[doc = "        }"]
3358#[doc = "      },"]
3359#[doc = "      \"additionalProperties\": false"]
3360#[doc = "    }"]
3361#[doc = "  ]"]
3362#[doc = "}"]
3363#[doc = r" ```"]
3364#[doc = r" </details>"]
3365#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3366pub enum BandwidthRequests {
3367    V1(BandwidthRequestsV1),
3368}
3369impl ::std::convert::From<&Self> for BandwidthRequests {
3370    fn from(value: &BandwidthRequests) -> Self {
3371        value.clone()
3372    }
3373}
3374impl ::std::convert::From<BandwidthRequestsV1> for BandwidthRequests {
3375    fn from(value: BandwidthRequestsV1) -> Self {
3376        Self::V1(value)
3377    }
3378}
3379#[doc = "Version 1 of [`BandwidthRequest`]."]
3380#[doc = r""]
3381#[doc = r" <details><summary>JSON schema</summary>"]
3382#[doc = r""]
3383#[doc = r" ```json"]
3384#[doc = "{"]
3385#[doc = "  \"description\": \"Version 1 of [`BandwidthRequest`].\","]
3386#[doc = "  \"type\": \"object\","]
3387#[doc = "  \"required\": ["]
3388#[doc = "    \"requests\""]
3389#[doc = "  ],"]
3390#[doc = "  \"properties\": {"]
3391#[doc = "    \"requests\": {"]
3392#[doc = "      \"type\": \"array\","]
3393#[doc = "      \"items\": {"]
3394#[doc = "        \"$ref\": \"#/components/schemas/BandwidthRequest\""]
3395#[doc = "      }"]
3396#[doc = "    }"]
3397#[doc = "  }"]
3398#[doc = "}"]
3399#[doc = r" ```"]
3400#[doc = r" </details>"]
3401#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3402pub struct BandwidthRequestsV1 {
3403    pub requests: ::std::vec::Vec<BandwidthRequest>,
3404}
3405impl ::std::convert::From<&BandwidthRequestsV1> for BandwidthRequestsV1 {
3406    fn from(value: &BandwidthRequestsV1) -> Self {
3407        value.clone()
3408    }
3409}
3410#[doc = "A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
3411#[doc = r""]
3412#[doc = r" <details><summary>JSON schema</summary>"]
3413#[doc = r""]
3414#[doc = r" ```json"]
3415#[doc = "{"]
3416#[doc = "  \"description\": \"A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
3417#[doc = "  \"type\": \"object\","]
3418#[doc = "  \"required\": ["]
3419#[doc = "    \"block_merkle_root\","]
3420#[doc = "    \"epoch_id\","]
3421#[doc = "    \"height\","]
3422#[doc = "    \"next_bp_hash\","]
3423#[doc = "    \"next_epoch_id\","]
3424#[doc = "    \"outcome_root\","]
3425#[doc = "    \"prev_state_root\","]
3426#[doc = "    \"timestamp\","]
3427#[doc = "    \"timestamp_nanosec\""]
3428#[doc = "  ],"]
3429#[doc = "  \"properties\": {"]
3430#[doc = "    \"block_merkle_root\": {"]
3431#[doc = "      \"description\": \"The merkle root of all the block hashes\","]
3432#[doc = "      \"allOf\": ["]
3433#[doc = "        {"]
3434#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3435#[doc = "        }"]
3436#[doc = "      ]"]
3437#[doc = "    },"]
3438#[doc = "    \"epoch_id\": {"]
3439#[doc = "      \"description\": \"The epoch to which the block that is the current known head belongs\","]
3440#[doc = "      \"allOf\": ["]
3441#[doc = "        {"]
3442#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3443#[doc = "        }"]
3444#[doc = "      ]"]
3445#[doc = "    },"]
3446#[doc = "    \"height\": {"]
3447#[doc = "      \"type\": \"integer\","]
3448#[doc = "      \"format\": \"uint64\","]
3449#[doc = "      \"minimum\": 0.0"]
3450#[doc = "    },"]
3451#[doc = "    \"next_bp_hash\": {"]
3452#[doc = "      \"description\": \"The hash of the block producers set for the next epoch\","]
3453#[doc = "      \"allOf\": ["]
3454#[doc = "        {"]
3455#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3456#[doc = "        }"]
3457#[doc = "      ]"]
3458#[doc = "    },"]
3459#[doc = "    \"next_epoch_id\": {"]
3460#[doc = "      \"description\": \"The epoch that will follow the current epoch\","]
3461#[doc = "      \"allOf\": ["]
3462#[doc = "        {"]
3463#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3464#[doc = "        }"]
3465#[doc = "      ]"]
3466#[doc = "    },"]
3467#[doc = "    \"outcome_root\": {"]
3468#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3469#[doc = "    },"]
3470#[doc = "    \"prev_state_root\": {"]
3471#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3472#[doc = "    },"]
3473#[doc = "    \"timestamp\": {"]
3474#[doc = "      \"description\": \"Legacy json number. Should not be used.\","]
3475#[doc = "      \"type\": \"integer\","]
3476#[doc = "      \"format\": \"uint64\","]
3477#[doc = "      \"minimum\": 0.0"]
3478#[doc = "    },"]
3479#[doc = "    \"timestamp_nanosec\": {"]
3480#[doc = "      \"type\": \"string\""]
3481#[doc = "    }"]
3482#[doc = "  }"]
3483#[doc = "}"]
3484#[doc = r" ```"]
3485#[doc = r" </details>"]
3486#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3487pub struct BlockHeaderInnerLiteView {
3488    #[doc = "The merkle root of all the block hashes"]
3489    pub block_merkle_root: CryptoHash,
3490    #[doc = "The epoch to which the block that is the current known head belongs"]
3491    pub epoch_id: CryptoHash,
3492    pub height: u64,
3493    #[doc = "The hash of the block producers set for the next epoch"]
3494    pub next_bp_hash: CryptoHash,
3495    #[doc = "The epoch that will follow the current epoch"]
3496    pub next_epoch_id: CryptoHash,
3497    pub outcome_root: CryptoHash,
3498    pub prev_state_root: CryptoHash,
3499    #[doc = "Legacy json number. Should not be used."]
3500    pub timestamp: u64,
3501    pub timestamp_nanosec: ::std::string::String,
3502}
3503impl ::std::convert::From<&BlockHeaderInnerLiteView> for BlockHeaderInnerLiteView {
3504    fn from(value: &BlockHeaderInnerLiteView) -> Self {
3505        value.clone()
3506    }
3507}
3508#[doc = "Contains main info about the block."]
3509#[doc = r""]
3510#[doc = r" <details><summary>JSON schema</summary>"]
3511#[doc = r""]
3512#[doc = r" ```json"]
3513#[doc = "{"]
3514#[doc = "  \"description\": \"Contains main info about the block.\","]
3515#[doc = "  \"type\": \"object\","]
3516#[doc = "  \"required\": ["]
3517#[doc = "    \"approvals\","]
3518#[doc = "    \"block_merkle_root\","]
3519#[doc = "    \"challenges_result\","]
3520#[doc = "    \"challenges_root\","]
3521#[doc = "    \"chunk_headers_root\","]
3522#[doc = "    \"chunk_mask\","]
3523#[doc = "    \"chunk_receipts_root\","]
3524#[doc = "    \"chunk_tx_root\","]
3525#[doc = "    \"chunks_included\","]
3526#[doc = "    \"epoch_id\","]
3527#[doc = "    \"gas_price\","]
3528#[doc = "    \"hash\","]
3529#[doc = "    \"height\","]
3530#[doc = "    \"last_ds_final_block\","]
3531#[doc = "    \"last_final_block\","]
3532#[doc = "    \"latest_protocol_version\","]
3533#[doc = "    \"next_bp_hash\","]
3534#[doc = "    \"next_epoch_id\","]
3535#[doc = "    \"outcome_root\","]
3536#[doc = "    \"prev_hash\","]
3537#[doc = "    \"prev_state_root\","]
3538#[doc = "    \"random_value\","]
3539#[doc = "    \"signature\","]
3540#[doc = "    \"timestamp\","]
3541#[doc = "    \"timestamp_nanosec\","]
3542#[doc = "    \"total_supply\","]
3543#[doc = "    \"validator_proposals\""]
3544#[doc = "  ],"]
3545#[doc = "  \"properties\": {"]
3546#[doc = "    \"approvals\": {"]
3547#[doc = "      \"type\": \"array\","]
3548#[doc = "      \"items\": {"]
3549#[doc = "        \"anyOf\": ["]
3550#[doc = "          {"]
3551#[doc = "            \"$ref\": \"#/components/schemas/Signature\""]
3552#[doc = "          },"]
3553#[doc = "          {"]
3554#[doc = "            \"type\": \"null\""]
3555#[doc = "          }"]
3556#[doc = "        ]"]
3557#[doc = "      }"]
3558#[doc = "    },"]
3559#[doc = "    \"block_body_hash\": {"]
3560#[doc = "      \"anyOf\": ["]
3561#[doc = "        {"]
3562#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3563#[doc = "        },"]
3564#[doc = "        {"]
3565#[doc = "          \"type\": \"null\""]
3566#[doc = "        }"]
3567#[doc = "      ]"]
3568#[doc = "    },"]
3569#[doc = "    \"block_merkle_root\": {"]
3570#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3571#[doc = "    },"]
3572#[doc = "    \"block_ordinal\": {"]
3573#[doc = "      \"type\": ["]
3574#[doc = "        \"integer\","]
3575#[doc = "        \"null\""]
3576#[doc = "      ],"]
3577#[doc = "      \"format\": \"uint64\","]
3578#[doc = "      \"minimum\": 0.0"]
3579#[doc = "    },"]
3580#[doc = "    \"challenges_result\": {"]
3581#[doc = "      \"type\": \"array\","]
3582#[doc = "      \"items\": {"]
3583#[doc = "        \"$ref\": \"#/components/schemas/SlashedValidator\""]
3584#[doc = "      }"]
3585#[doc = "    },"]
3586#[doc = "    \"challenges_root\": {"]
3587#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3588#[doc = "    },"]
3589#[doc = "    \"chunk_endorsements\": {"]
3590#[doc = "      \"type\": ["]
3591#[doc = "        \"array\","]
3592#[doc = "        \"null\""]
3593#[doc = "      ],"]
3594#[doc = "      \"items\": {"]
3595#[doc = "        \"type\": \"array\","]
3596#[doc = "        \"items\": {"]
3597#[doc = "          \"type\": \"integer\","]
3598#[doc = "          \"format\": \"uint8\","]
3599#[doc = "          \"maximum\": 255.0,"]
3600#[doc = "          \"minimum\": 0.0"]
3601#[doc = "        }"]
3602#[doc = "      }"]
3603#[doc = "    },"]
3604#[doc = "    \"chunk_headers_root\": {"]
3605#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3606#[doc = "    },"]
3607#[doc = "    \"chunk_mask\": {"]
3608#[doc = "      \"type\": \"array\","]
3609#[doc = "      \"items\": {"]
3610#[doc = "        \"type\": \"boolean\""]
3611#[doc = "      }"]
3612#[doc = "    },"]
3613#[doc = "    \"chunk_receipts_root\": {"]
3614#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3615#[doc = "    },"]
3616#[doc = "    \"chunk_tx_root\": {"]
3617#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3618#[doc = "    },"]
3619#[doc = "    \"chunks_included\": {"]
3620#[doc = "      \"type\": \"integer\","]
3621#[doc = "      \"format\": \"uint64\","]
3622#[doc = "      \"minimum\": 0.0"]
3623#[doc = "    },"]
3624#[doc = "    \"epoch_id\": {"]
3625#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3626#[doc = "    },"]
3627#[doc = "    \"epoch_sync_data_hash\": {"]
3628#[doc = "      \"anyOf\": ["]
3629#[doc = "        {"]
3630#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3631#[doc = "        },"]
3632#[doc = "        {"]
3633#[doc = "          \"type\": \"null\""]
3634#[doc = "        }"]
3635#[doc = "      ]"]
3636#[doc = "    },"]
3637#[doc = "    \"gas_price\": {"]
3638#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
3639#[doc = "    },"]
3640#[doc = "    \"hash\": {"]
3641#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3642#[doc = "    },"]
3643#[doc = "    \"height\": {"]
3644#[doc = "      \"type\": \"integer\","]
3645#[doc = "      \"format\": \"uint64\","]
3646#[doc = "      \"minimum\": 0.0"]
3647#[doc = "    },"]
3648#[doc = "    \"last_ds_final_block\": {"]
3649#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3650#[doc = "    },"]
3651#[doc = "    \"last_final_block\": {"]
3652#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3653#[doc = "    },"]
3654#[doc = "    \"latest_protocol_version\": {"]
3655#[doc = "      \"type\": \"integer\","]
3656#[doc = "      \"format\": \"uint32\","]
3657#[doc = "      \"minimum\": 0.0"]
3658#[doc = "    },"]
3659#[doc = "    \"next_bp_hash\": {"]
3660#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3661#[doc = "    },"]
3662#[doc = "    \"next_epoch_id\": {"]
3663#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3664#[doc = "    },"]
3665#[doc = "    \"outcome_root\": {"]
3666#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3667#[doc = "    },"]
3668#[doc = "    \"prev_hash\": {"]
3669#[doc = "      \"description\": \"The hash of the previous Block\","]
3670#[doc = "      \"allOf\": ["]
3671#[doc = "        {"]
3672#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
3673#[doc = "        }"]
3674#[doc = "      ]"]
3675#[doc = "    },"]
3676#[doc = "    \"prev_height\": {"]
3677#[doc = "      \"type\": ["]
3678#[doc = "        \"integer\","]
3679#[doc = "        \"null\""]
3680#[doc = "      ],"]
3681#[doc = "      \"format\": \"uint64\","]
3682#[doc = "      \"minimum\": 0.0"]
3683#[doc = "    },"]
3684#[doc = "    \"prev_state_root\": {"]
3685#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3686#[doc = "    },"]
3687#[doc = "    \"random_value\": {"]
3688#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3689#[doc = "    },"]
3690#[doc = "    \"rent_paid\": {"]
3691#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
3692#[doc = "      \"default\": \"0\","]
3693#[doc = "      \"allOf\": ["]
3694#[doc = "        {"]
3695#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
3696#[doc = "        }"]
3697#[doc = "      ]"]
3698#[doc = "    },"]
3699#[doc = "    \"signature\": {"]
3700#[doc = "      \"description\": \"Signature of the block producer.\","]
3701#[doc = "      \"allOf\": ["]
3702#[doc = "        {"]
3703#[doc = "          \"$ref\": \"#/components/schemas/Signature\""]
3704#[doc = "        }"]
3705#[doc = "      ]"]
3706#[doc = "    },"]
3707#[doc = "    \"timestamp\": {"]
3708#[doc = "      \"description\": \"Legacy json number. Should not be used.\","]
3709#[doc = "      \"type\": \"integer\","]
3710#[doc = "      \"format\": \"uint64\","]
3711#[doc = "      \"minimum\": 0.0"]
3712#[doc = "    },"]
3713#[doc = "    \"timestamp_nanosec\": {"]
3714#[doc = "      \"type\": \"string\""]
3715#[doc = "    },"]
3716#[doc = "    \"total_supply\": {"]
3717#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
3718#[doc = "    },"]
3719#[doc = "    \"validator_proposals\": {"]
3720#[doc = "      \"type\": \"array\","]
3721#[doc = "      \"items\": {"]
3722#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
3723#[doc = "      }"]
3724#[doc = "    },"]
3725#[doc = "    \"validator_reward\": {"]
3726#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
3727#[doc = "      \"default\": \"0\","]
3728#[doc = "      \"allOf\": ["]
3729#[doc = "        {"]
3730#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
3731#[doc = "        }"]
3732#[doc = "      ]"]
3733#[doc = "    }"]
3734#[doc = "  }"]
3735#[doc = "}"]
3736#[doc = r" ```"]
3737#[doc = r" </details>"]
3738#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3739pub struct BlockHeaderView {
3740    pub approvals: ::std::vec::Vec<::std::option::Option<Signature>>,
3741    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3742    pub block_body_hash: ::std::option::Option<CryptoHash>,
3743    pub block_merkle_root: CryptoHash,
3744    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3745    pub block_ordinal: ::std::option::Option<u64>,
3746    pub challenges_result: ::std::vec::Vec<SlashedValidator>,
3747    pub challenges_root: CryptoHash,
3748    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3749    pub chunk_endorsements: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<u8>>>,
3750    pub chunk_headers_root: CryptoHash,
3751    pub chunk_mask: ::std::vec::Vec<bool>,
3752    pub chunk_receipts_root: CryptoHash,
3753    pub chunk_tx_root: CryptoHash,
3754    pub chunks_included: u64,
3755    pub epoch_id: CryptoHash,
3756    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3757    pub epoch_sync_data_hash: ::std::option::Option<CryptoHash>,
3758    pub gas_price: NearToken,
3759    pub hash: CryptoHash,
3760    pub height: u64,
3761    pub last_ds_final_block: CryptoHash,
3762    pub last_final_block: CryptoHash,
3763    pub latest_protocol_version: u32,
3764    pub next_bp_hash: CryptoHash,
3765    pub next_epoch_id: CryptoHash,
3766    pub outcome_root: CryptoHash,
3767    #[doc = "The hash of the previous Block"]
3768    pub prev_hash: CryptoHash,
3769    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3770    pub prev_height: ::std::option::Option<u64>,
3771    pub prev_state_root: CryptoHash,
3772    pub random_value: CryptoHash,
3773    #[doc = "TODO(2271): deprecated."]
3774    #[serde(default = "defaults::block_header_view_rent_paid")]
3775    pub rent_paid: NearToken,
3776    #[doc = "Signature of the block producer."]
3777    pub signature: Signature,
3778    #[doc = "Legacy json number. Should not be used."]
3779    pub timestamp: u64,
3780    pub timestamp_nanosec: ::std::string::String,
3781    pub total_supply: NearToken,
3782    pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
3783    #[doc = "TODO(2271): deprecated."]
3784    #[serde(default = "defaults::block_header_view_validator_reward")]
3785    pub validator_reward: NearToken,
3786}
3787impl ::std::convert::From<&BlockHeaderView> for BlockHeaderView {
3788    fn from(value: &BlockHeaderView) -> Self {
3789        value.clone()
3790    }
3791}
3792#[doc = "`BlockId`"]
3793#[doc = r""]
3794#[doc = r" <details><summary>JSON schema</summary>"]
3795#[doc = r""]
3796#[doc = r" ```json"]
3797#[doc = "{"]
3798#[doc = "  \"anyOf\": ["]
3799#[doc = "    {"]
3800#[doc = "      \"title\": \"block_height\","]
3801#[doc = "      \"type\": \"integer\","]
3802#[doc = "      \"format\": \"uint64\","]
3803#[doc = "      \"minimum\": 0.0"]
3804#[doc = "    },"]
3805#[doc = "    {"]
3806#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3807#[doc = "    }"]
3808#[doc = "  ]"]
3809#[doc = "}"]
3810#[doc = r" ```"]
3811#[doc = r" </details>"]
3812#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3813#[serde(untagged)]
3814pub enum BlockId {
3815    BlockHeight(u64),
3816    CryptoHash(CryptoHash),
3817}
3818impl ::std::convert::From<&Self> for BlockId {
3819    fn from(value: &BlockId) -> Self {
3820        value.clone()
3821    }
3822}
3823impl ::std::fmt::Display for BlockId {
3824    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3825        match self {
3826            Self::BlockHeight(x) => x.fmt(f),
3827            Self::CryptoHash(x) => x.fmt(f),
3828        }
3829    }
3830}
3831impl ::std::convert::From<u64> for BlockId {
3832    fn from(value: u64) -> Self {
3833        Self::BlockHeight(value)
3834    }
3835}
3836impl ::std::convert::From<CryptoHash> for BlockId {
3837    fn from(value: CryptoHash) -> Self {
3838        Self::CryptoHash(value)
3839    }
3840}
3841#[doc = "`BlockReference`"]
3842#[doc = r""]
3843#[doc = r" <details><summary>JSON schema</summary>"]
3844#[doc = r""]
3845#[doc = r" ```json"]
3846#[doc = "{"]
3847#[doc = "  \"oneOf\": ["]
3848#[doc = "    {"]
3849#[doc = "      \"type\": \"object\","]
3850#[doc = "      \"required\": ["]
3851#[doc = "        \"block_id\""]
3852#[doc = "      ],"]
3853#[doc = "      \"properties\": {"]
3854#[doc = "        \"block_id\": {"]
3855#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
3856#[doc = "        }"]
3857#[doc = "      },"]
3858#[doc = "      \"additionalProperties\": false"]
3859#[doc = "    },"]
3860#[doc = "    {"]
3861#[doc = "      \"type\": \"object\","]
3862#[doc = "      \"required\": ["]
3863#[doc = "        \"finality\""]
3864#[doc = "      ],"]
3865#[doc = "      \"properties\": {"]
3866#[doc = "        \"finality\": {"]
3867#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
3868#[doc = "        }"]
3869#[doc = "      },"]
3870#[doc = "      \"additionalProperties\": false"]
3871#[doc = "    },"]
3872#[doc = "    {"]
3873#[doc = "      \"type\": \"object\","]
3874#[doc = "      \"required\": ["]
3875#[doc = "        \"sync_checkpoint\""]
3876#[doc = "      ],"]
3877#[doc = "      \"properties\": {"]
3878#[doc = "        \"sync_checkpoint\": {"]
3879#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
3880#[doc = "        }"]
3881#[doc = "      },"]
3882#[doc = "      \"additionalProperties\": false"]
3883#[doc = "    }"]
3884#[doc = "  ]"]
3885#[doc = "}"]
3886#[doc = r" ```"]
3887#[doc = r" </details>"]
3888#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3889pub enum BlockReference {
3890    #[serde(rename = "block_id")]
3891    BlockId(BlockId),
3892    #[serde(rename = "finality")]
3893    Finality(Finality),
3894    #[serde(rename = "sync_checkpoint")]
3895    SyncCheckpoint(SyncCheckpoint),
3896}
3897impl ::std::convert::From<&Self> for BlockReference {
3898    fn from(value: &BlockReference) -> Self {
3899        value.clone()
3900    }
3901}
3902impl ::std::convert::From<BlockId> for BlockReference {
3903    fn from(value: BlockId) -> Self {
3904        Self::BlockId(value)
3905    }
3906}
3907impl ::std::convert::From<Finality> for BlockReference {
3908    fn from(value: Finality) -> Self {
3909        Self::Finality(value)
3910    }
3911}
3912impl ::std::convert::From<SyncCheckpoint> for BlockReference {
3913    fn from(value: SyncCheckpoint) -> Self {
3914        Self::SyncCheckpoint(value)
3915    }
3916}
3917#[doc = "Height and hash of a block"]
3918#[doc = r""]
3919#[doc = r" <details><summary>JSON schema</summary>"]
3920#[doc = r""]
3921#[doc = r" ```json"]
3922#[doc = "{"]
3923#[doc = "  \"description\": \"Height and hash of a block\","]
3924#[doc = "  \"type\": \"object\","]
3925#[doc = "  \"required\": ["]
3926#[doc = "    \"hash\","]
3927#[doc = "    \"height\""]
3928#[doc = "  ],"]
3929#[doc = "  \"properties\": {"]
3930#[doc = "    \"hash\": {"]
3931#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
3932#[doc = "    },"]
3933#[doc = "    \"height\": {"]
3934#[doc = "      \"type\": \"integer\","]
3935#[doc = "      \"format\": \"uint64\","]
3936#[doc = "      \"minimum\": 0.0"]
3937#[doc = "    }"]
3938#[doc = "  }"]
3939#[doc = "}"]
3940#[doc = r" ```"]
3941#[doc = r" </details>"]
3942#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3943pub struct BlockStatusView {
3944    pub hash: CryptoHash,
3945    pub height: u64,
3946}
3947impl ::std::convert::From<&BlockStatusView> for BlockStatusView {
3948    fn from(value: &BlockStatusView) -> Self {
3949        value.clone()
3950    }
3951}
3952#[doc = "`CallFunctionByBlockIdRequestType`"]
3953#[doc = r""]
3954#[doc = r" <details><summary>JSON schema</summary>"]
3955#[doc = r""]
3956#[doc = r" ```json"]
3957#[doc = "{"]
3958#[doc = "  \"type\": \"string\","]
3959#[doc = "  \"enum\": ["]
3960#[doc = "    \"call_function\""]
3961#[doc = "  ]"]
3962#[doc = "}"]
3963#[doc = r" ```"]
3964#[doc = r" </details>"]
3965#[derive(
3966    :: serde :: Deserialize,
3967    :: serde :: Serialize,
3968    Clone,
3969    Copy,
3970    Debug,
3971    Eq,
3972    Hash,
3973    Ord,
3974    PartialEq,
3975    PartialOrd,
3976)]
3977pub enum CallFunctionByBlockIdRequestType {
3978    #[serde(rename = "call_function")]
3979    CallFunction,
3980}
3981impl ::std::convert::From<&Self> for CallFunctionByBlockIdRequestType {
3982    fn from(value: &CallFunctionByBlockIdRequestType) -> Self {
3983        value.clone()
3984    }
3985}
3986impl ::std::fmt::Display for CallFunctionByBlockIdRequestType {
3987    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3988        match *self {
3989            Self::CallFunction => f.write_str("call_function"),
3990        }
3991    }
3992}
3993impl ::std::str::FromStr for CallFunctionByBlockIdRequestType {
3994    type Err = self::error::ConversionError;
3995    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3996        match value {
3997            "call_function" => Ok(Self::CallFunction),
3998            _ => Err("invalid value".into()),
3999        }
4000    }
4001}
4002impl ::std::convert::TryFrom<&str> for CallFunctionByBlockIdRequestType {
4003    type Error = self::error::ConversionError;
4004    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4005        value.parse()
4006    }
4007}
4008impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByBlockIdRequestType {
4009    type Error = self::error::ConversionError;
4010    fn try_from(
4011        value: &::std::string::String,
4012    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4013        value.parse()
4014    }
4015}
4016impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByBlockIdRequestType {
4017    type Error = self::error::ConversionError;
4018    fn try_from(
4019        value: ::std::string::String,
4020    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4021        value.parse()
4022    }
4023}
4024#[doc = "`CallFunctionByFinalityRequestType`"]
4025#[doc = r""]
4026#[doc = r" <details><summary>JSON schema</summary>"]
4027#[doc = r""]
4028#[doc = r" ```json"]
4029#[doc = "{"]
4030#[doc = "  \"type\": \"string\","]
4031#[doc = "  \"enum\": ["]
4032#[doc = "    \"call_function\""]
4033#[doc = "  ]"]
4034#[doc = "}"]
4035#[doc = r" ```"]
4036#[doc = r" </details>"]
4037#[derive(
4038    :: serde :: Deserialize,
4039    :: serde :: Serialize,
4040    Clone,
4041    Copy,
4042    Debug,
4043    Eq,
4044    Hash,
4045    Ord,
4046    PartialEq,
4047    PartialOrd,
4048)]
4049pub enum CallFunctionByFinalityRequestType {
4050    #[serde(rename = "call_function")]
4051    CallFunction,
4052}
4053impl ::std::convert::From<&Self> for CallFunctionByFinalityRequestType {
4054    fn from(value: &CallFunctionByFinalityRequestType) -> Self {
4055        value.clone()
4056    }
4057}
4058impl ::std::fmt::Display for CallFunctionByFinalityRequestType {
4059    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4060        match *self {
4061            Self::CallFunction => f.write_str("call_function"),
4062        }
4063    }
4064}
4065impl ::std::str::FromStr for CallFunctionByFinalityRequestType {
4066    type Err = self::error::ConversionError;
4067    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4068        match value {
4069            "call_function" => Ok(Self::CallFunction),
4070            _ => Err("invalid value".into()),
4071        }
4072    }
4073}
4074impl ::std::convert::TryFrom<&str> for CallFunctionByFinalityRequestType {
4075    type Error = self::error::ConversionError;
4076    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4077        value.parse()
4078    }
4079}
4080impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByFinalityRequestType {
4081    type Error = self::error::ConversionError;
4082    fn try_from(
4083        value: &::std::string::String,
4084    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4085        value.parse()
4086    }
4087}
4088impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByFinalityRequestType {
4089    type Error = self::error::ConversionError;
4090    fn try_from(
4091        value: ::std::string::String,
4092    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4093        value.parse()
4094    }
4095}
4096#[doc = "`CallFunctionBySyncCheckpointRequestType`"]
4097#[doc = r""]
4098#[doc = r" <details><summary>JSON schema</summary>"]
4099#[doc = r""]
4100#[doc = r" ```json"]
4101#[doc = "{"]
4102#[doc = "  \"type\": \"string\","]
4103#[doc = "  \"enum\": ["]
4104#[doc = "    \"call_function\""]
4105#[doc = "  ]"]
4106#[doc = "}"]
4107#[doc = r" ```"]
4108#[doc = r" </details>"]
4109#[derive(
4110    :: serde :: Deserialize,
4111    :: serde :: Serialize,
4112    Clone,
4113    Copy,
4114    Debug,
4115    Eq,
4116    Hash,
4117    Ord,
4118    PartialEq,
4119    PartialOrd,
4120)]
4121pub enum CallFunctionBySyncCheckpointRequestType {
4122    #[serde(rename = "call_function")]
4123    CallFunction,
4124}
4125impl ::std::convert::From<&Self> for CallFunctionBySyncCheckpointRequestType {
4126    fn from(value: &CallFunctionBySyncCheckpointRequestType) -> Self {
4127        value.clone()
4128    }
4129}
4130impl ::std::fmt::Display for CallFunctionBySyncCheckpointRequestType {
4131    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4132        match *self {
4133            Self::CallFunction => f.write_str("call_function"),
4134        }
4135    }
4136}
4137impl ::std::str::FromStr for CallFunctionBySyncCheckpointRequestType {
4138    type Err = self::error::ConversionError;
4139    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4140        match value {
4141            "call_function" => Ok(Self::CallFunction),
4142            _ => Err("invalid value".into()),
4143        }
4144    }
4145}
4146impl ::std::convert::TryFrom<&str> for CallFunctionBySyncCheckpointRequestType {
4147    type Error = self::error::ConversionError;
4148    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4149        value.parse()
4150    }
4151}
4152impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionBySyncCheckpointRequestType {
4153    type Error = self::error::ConversionError;
4154    fn try_from(
4155        value: &::std::string::String,
4156    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4157        value.parse()
4158    }
4159}
4160impl ::std::convert::TryFrom<::std::string::String> for CallFunctionBySyncCheckpointRequestType {
4161    type Error = self::error::ConversionError;
4162    fn try_from(
4163        value: ::std::string::String,
4164    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4165        value.parse()
4166    }
4167}
4168#[doc = "A result returned by contract method"]
4169#[doc = r""]
4170#[doc = r" <details><summary>JSON schema</summary>"]
4171#[doc = r""]
4172#[doc = r" ```json"]
4173#[doc = "{"]
4174#[doc = "  \"description\": \"A result returned by contract method\","]
4175#[doc = "  \"type\": \"object\","]
4176#[doc = "  \"required\": ["]
4177#[doc = "    \"logs\","]
4178#[doc = "    \"result\""]
4179#[doc = "  ],"]
4180#[doc = "  \"properties\": {"]
4181#[doc = "    \"logs\": {"]
4182#[doc = "      \"type\": \"array\","]
4183#[doc = "      \"items\": {"]
4184#[doc = "        \"type\": \"string\""]
4185#[doc = "      }"]
4186#[doc = "    },"]
4187#[doc = "    \"result\": {"]
4188#[doc = "      \"type\": \"array\","]
4189#[doc = "      \"items\": {"]
4190#[doc = "        \"type\": \"integer\","]
4191#[doc = "        \"format\": \"uint8\","]
4192#[doc = "        \"maximum\": 255.0,"]
4193#[doc = "        \"minimum\": 0.0"]
4194#[doc = "      }"]
4195#[doc = "    }"]
4196#[doc = "  }"]
4197#[doc = "}"]
4198#[doc = r" ```"]
4199#[doc = r" </details>"]
4200#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4201pub struct CallResult {
4202    pub logs: ::std::vec::Vec<::std::string::String>,
4203    pub result: ::std::vec::Vec<u8>,
4204}
4205impl ::std::convert::From<&CallResult> for CallResult {
4206    fn from(value: &CallResult) -> Self {
4207        value.clone()
4208    }
4209}
4210#[doc = "Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process"]
4211#[doc = r""]
4212#[doc = r" <details><summary>JSON schema</summary>"]
4213#[doc = r""]
4214#[doc = r" ```json"]
4215#[doc = "{"]
4216#[doc = "  \"description\": \"Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process\","]
4217#[doc = "  \"type\": \"object\","]
4218#[doc = "  \"required\": ["]
4219#[doc = "    \"blocks_to_catchup\","]
4220#[doc = "    \"shard_sync_status\","]
4221#[doc = "    \"sync_block_hash\","]
4222#[doc = "    \"sync_block_height\""]
4223#[doc = "  ],"]
4224#[doc = "  \"properties\": {"]
4225#[doc = "    \"blocks_to_catchup\": {"]
4226#[doc = "      \"type\": \"array\","]
4227#[doc = "      \"items\": {"]
4228#[doc = "        \"$ref\": \"#/components/schemas/BlockStatusView\""]
4229#[doc = "      }"]
4230#[doc = "    },"]
4231#[doc = "    \"shard_sync_status\": {"]
4232#[doc = "      \"type\": \"object\","]
4233#[doc = "      \"additionalProperties\": false"]
4234#[doc = "    },"]
4235#[doc = "    \"sync_block_hash\": {"]
4236#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4237#[doc = "    },"]
4238#[doc = "    \"sync_block_height\": {"]
4239#[doc = "      \"type\": \"integer\","]
4240#[doc = "      \"format\": \"uint64\","]
4241#[doc = "      \"minimum\": 0.0"]
4242#[doc = "    }"]
4243#[doc = "  }"]
4244#[doc = "}"]
4245#[doc = r" ```"]
4246#[doc = r" </details>"]
4247#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4248pub struct CatchupStatusView {
4249    pub blocks_to_catchup: ::std::vec::Vec<BlockStatusView>,
4250    pub shard_sync_status: CatchupStatusViewShardSyncStatus,
4251    pub sync_block_hash: CryptoHash,
4252    pub sync_block_height: u64,
4253}
4254impl ::std::convert::From<&CatchupStatusView> for CatchupStatusView {
4255    fn from(value: &CatchupStatusView) -> Self {
4256        value.clone()
4257    }
4258}
4259#[doc = "`CatchupStatusViewShardSyncStatus`"]
4260#[doc = r""]
4261#[doc = r" <details><summary>JSON schema</summary>"]
4262#[doc = r""]
4263#[doc = r" ```json"]
4264#[doc = "{"]
4265#[doc = "  \"type\": \"object\","]
4266#[doc = "  \"additionalProperties\": false"]
4267#[doc = "}"]
4268#[doc = r" ```"]
4269#[doc = r" </details>"]
4270#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4271#[serde(deny_unknown_fields)]
4272pub struct CatchupStatusViewShardSyncStatus {}
4273impl ::std::convert::From<&CatchupStatusViewShardSyncStatus> for CatchupStatusViewShardSyncStatus {
4274    fn from(value: &CatchupStatusViewShardSyncStatus) -> Self {
4275        value.clone()
4276    }
4277}
4278impl ::std::default::Default for CatchupStatusViewShardSyncStatus {
4279    fn default() -> Self {
4280        Self {}
4281    }
4282}
4283#[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."]
4284#[doc = r""]
4285#[doc = r" <details><summary>JSON schema</summary>"]
4286#[doc = r""]
4287#[doc = r" ```json"]
4288#[doc = "{"]
4289#[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.\","]
4290#[doc = "  \"type\": \"object\","]
4291#[doc = "  \"properties\": {"]
4292#[doc = "    \"enabled\": {"]
4293#[doc = "      \"type\": \"boolean\""]
4294#[doc = "    },"]
4295#[doc = "    \"uris\": {"]
4296#[doc = "      \"$ref\": \"#/components/schemas/ChunkDistributionUris\""]
4297#[doc = "    }"]
4298#[doc = "  }"]
4299#[doc = "}"]
4300#[doc = r" ```"]
4301#[doc = r" </details>"]
4302#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4303pub struct ChunkDistributionNetworkConfig {
4304    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4305    pub enabled: ::std::option::Option<bool>,
4306    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4307    pub uris: ::std::option::Option<ChunkDistributionUris>,
4308}
4309impl ::std::convert::From<&ChunkDistributionNetworkConfig> for ChunkDistributionNetworkConfig {
4310    fn from(value: &ChunkDistributionNetworkConfig) -> Self {
4311        value.clone()
4312    }
4313}
4314impl ::std::default::Default for ChunkDistributionNetworkConfig {
4315    fn default() -> Self {
4316        Self {
4317            enabled: Default::default(),
4318            uris: Default::default(),
4319        }
4320    }
4321}
4322#[doc = "URIs for the Chunk Distribution Network feature."]
4323#[doc = r""]
4324#[doc = r" <details><summary>JSON schema</summary>"]
4325#[doc = r""]
4326#[doc = r" ```json"]
4327#[doc = "{"]
4328#[doc = "  \"description\": \"URIs for the Chunk Distribution Network feature.\","]
4329#[doc = "  \"type\": \"object\","]
4330#[doc = "  \"properties\": {"]
4331#[doc = "    \"get\": {"]
4332#[doc = "      \"description\": \"URI for pulling chunks from the stream.\","]
4333#[doc = "      \"type\": \"string\""]
4334#[doc = "    },"]
4335#[doc = "    \"set\": {"]
4336#[doc = "      \"description\": \"URI for publishing chunks to the stream.\","]
4337#[doc = "      \"type\": \"string\""]
4338#[doc = "    }"]
4339#[doc = "  }"]
4340#[doc = "}"]
4341#[doc = r" ```"]
4342#[doc = r" </details>"]
4343#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4344pub struct ChunkDistributionUris {
4345    #[doc = "URI for pulling chunks from the stream."]
4346    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4347    pub get: ::std::option::Option<::std::string::String>,
4348    #[doc = "URI for publishing chunks to the stream."]
4349    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4350    pub set: ::std::option::Option<::std::string::String>,
4351}
4352impl ::std::convert::From<&ChunkDistributionUris> for ChunkDistributionUris {
4353    fn from(value: &ChunkDistributionUris) -> Self {
4354        value.clone()
4355    }
4356}
4357impl ::std::default::Default for ChunkDistributionUris {
4358    fn default() -> Self {
4359        Self {
4360            get: Default::default(),
4361            set: Default::default(),
4362        }
4363    }
4364}
4365#[doc = "`ChunkHash`"]
4366#[doc = r""]
4367#[doc = r" <details><summary>JSON schema</summary>"]
4368#[doc = r""]
4369#[doc = r" ```json"]
4370#[doc = "{"]
4371#[doc = "  \"$ref\": \"#/components/schemas/CryptoHash\""]
4372#[doc = "}"]
4373#[doc = r" ```"]
4374#[doc = r" </details>"]
4375#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4376#[serde(transparent)]
4377pub struct ChunkHash(pub CryptoHash);
4378impl ::std::ops::Deref for ChunkHash {
4379    type Target = CryptoHash;
4380    fn deref(&self) -> &CryptoHash {
4381        &self.0
4382    }
4383}
4384impl ::std::convert::From<ChunkHash> for CryptoHash {
4385    fn from(value: ChunkHash) -> Self {
4386        value.0
4387    }
4388}
4389impl ::std::convert::From<&ChunkHash> for ChunkHash {
4390    fn from(value: &ChunkHash) -> Self {
4391        value.clone()
4392    }
4393}
4394impl ::std::convert::From<CryptoHash> for ChunkHash {
4395    fn from(value: CryptoHash) -> Self {
4396        Self(value)
4397    }
4398}
4399impl ::std::str::FromStr for ChunkHash {
4400    type Err = <CryptoHash as ::std::str::FromStr>::Err;
4401    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
4402        Ok(Self(value.parse()?))
4403    }
4404}
4405impl ::std::convert::TryFrom<&str> for ChunkHash {
4406    type Error = <CryptoHash as ::std::str::FromStr>::Err;
4407    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
4408        value.parse()
4409    }
4410}
4411impl ::std::convert::TryFrom<&String> for ChunkHash {
4412    type Error = <CryptoHash as ::std::str::FromStr>::Err;
4413    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
4414        value.parse()
4415    }
4416}
4417impl ::std::convert::TryFrom<String> for ChunkHash {
4418    type Error = <CryptoHash as ::std::str::FromStr>::Err;
4419    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
4420        value.parse()
4421    }
4422}
4423impl ::std::fmt::Display for ChunkHash {
4424    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4425        self.0.fmt(f)
4426    }
4427}
4428#[doc = "Contains main info about the chunk."]
4429#[doc = r""]
4430#[doc = r" <details><summary>JSON schema</summary>"]
4431#[doc = r""]
4432#[doc = r" ```json"]
4433#[doc = "{"]
4434#[doc = "  \"description\": \"Contains main info about the chunk.\","]
4435#[doc = "  \"type\": \"object\","]
4436#[doc = "  \"required\": ["]
4437#[doc = "    \"balance_burnt\","]
4438#[doc = "    \"chunk_hash\","]
4439#[doc = "    \"encoded_length\","]
4440#[doc = "    \"encoded_merkle_root\","]
4441#[doc = "    \"gas_limit\","]
4442#[doc = "    \"gas_used\","]
4443#[doc = "    \"height_created\","]
4444#[doc = "    \"height_included\","]
4445#[doc = "    \"outcome_root\","]
4446#[doc = "    \"outgoing_receipts_root\","]
4447#[doc = "    \"prev_block_hash\","]
4448#[doc = "    \"prev_state_root\","]
4449#[doc = "    \"shard_id\","]
4450#[doc = "    \"signature\","]
4451#[doc = "    \"tx_root\","]
4452#[doc = "    \"validator_proposals\""]
4453#[doc = "  ],"]
4454#[doc = "  \"properties\": {"]
4455#[doc = "    \"balance_burnt\": {"]
4456#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
4457#[doc = "    },"]
4458#[doc = "    \"bandwidth_requests\": {"]
4459#[doc = "      \"anyOf\": ["]
4460#[doc = "        {"]
4461#[doc = "          \"$ref\": \"#/components/schemas/BandwidthRequests\""]
4462#[doc = "        },"]
4463#[doc = "        {"]
4464#[doc = "          \"type\": \"null\""]
4465#[doc = "        }"]
4466#[doc = "      ]"]
4467#[doc = "    },"]
4468#[doc = "    \"chunk_hash\": {"]
4469#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4470#[doc = "    },"]
4471#[doc = "    \"congestion_info\": {"]
4472#[doc = "      \"anyOf\": ["]
4473#[doc = "        {"]
4474#[doc = "          \"$ref\": \"#/components/schemas/CongestionInfoView\""]
4475#[doc = "        },"]
4476#[doc = "        {"]
4477#[doc = "          \"type\": \"null\""]
4478#[doc = "        }"]
4479#[doc = "      ]"]
4480#[doc = "    },"]
4481#[doc = "    \"encoded_length\": {"]
4482#[doc = "      \"type\": \"integer\","]
4483#[doc = "      \"format\": \"uint64\","]
4484#[doc = "      \"minimum\": 0.0"]
4485#[doc = "    },"]
4486#[doc = "    \"encoded_merkle_root\": {"]
4487#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4488#[doc = "    },"]
4489#[doc = "    \"gas_limit\": {"]
4490#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
4491#[doc = "    },"]
4492#[doc = "    \"gas_used\": {"]
4493#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
4494#[doc = "    },"]
4495#[doc = "    \"height_created\": {"]
4496#[doc = "      \"type\": \"integer\","]
4497#[doc = "      \"format\": \"uint64\","]
4498#[doc = "      \"minimum\": 0.0"]
4499#[doc = "    },"]
4500#[doc = "    \"height_included\": {"]
4501#[doc = "      \"type\": \"integer\","]
4502#[doc = "      \"format\": \"uint64\","]
4503#[doc = "      \"minimum\": 0.0"]
4504#[doc = "    },"]
4505#[doc = "    \"outcome_root\": {"]
4506#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4507#[doc = "    },"]
4508#[doc = "    \"outgoing_receipts_root\": {"]
4509#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4510#[doc = "    },"]
4511#[doc = "    \"prev_block_hash\": {"]
4512#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4513#[doc = "    },"]
4514#[doc = "    \"prev_state_root\": {"]
4515#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4516#[doc = "    },"]
4517#[doc = "    \"rent_paid\": {"]
4518#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
4519#[doc = "      \"default\": \"0\","]
4520#[doc = "      \"allOf\": ["]
4521#[doc = "        {"]
4522#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
4523#[doc = "        }"]
4524#[doc = "      ]"]
4525#[doc = "    },"]
4526#[doc = "    \"shard_id\": {"]
4527#[doc = "      \"$ref\": \"#/components/schemas/ShardId\""]
4528#[doc = "    },"]
4529#[doc = "    \"signature\": {"]
4530#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
4531#[doc = "    },"]
4532#[doc = "    \"tx_root\": {"]
4533#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
4534#[doc = "    },"]
4535#[doc = "    \"validator_proposals\": {"]
4536#[doc = "      \"type\": \"array\","]
4537#[doc = "      \"items\": {"]
4538#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
4539#[doc = "      }"]
4540#[doc = "    },"]
4541#[doc = "    \"validator_reward\": {"]
4542#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
4543#[doc = "      \"default\": \"0\","]
4544#[doc = "      \"allOf\": ["]
4545#[doc = "        {"]
4546#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
4547#[doc = "        }"]
4548#[doc = "      ]"]
4549#[doc = "    }"]
4550#[doc = "  }"]
4551#[doc = "}"]
4552#[doc = r" ```"]
4553#[doc = r" </details>"]
4554#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4555pub struct ChunkHeaderView {
4556    pub balance_burnt: NearToken,
4557    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4558    pub bandwidth_requests: ::std::option::Option<BandwidthRequests>,
4559    pub chunk_hash: CryptoHash,
4560    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4561    pub congestion_info: ::std::option::Option<CongestionInfoView>,
4562    pub encoded_length: u64,
4563    pub encoded_merkle_root: CryptoHash,
4564    pub gas_limit: NearGas,
4565    pub gas_used: NearGas,
4566    pub height_created: u64,
4567    pub height_included: u64,
4568    pub outcome_root: CryptoHash,
4569    pub outgoing_receipts_root: CryptoHash,
4570    pub prev_block_hash: CryptoHash,
4571    pub prev_state_root: CryptoHash,
4572    #[doc = "TODO(2271): deprecated."]
4573    #[serde(default = "defaults::chunk_header_view_rent_paid")]
4574    pub rent_paid: NearToken,
4575    pub shard_id: ShardId,
4576    pub signature: Signature,
4577    pub tx_root: CryptoHash,
4578    pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
4579    #[doc = "TODO(2271): deprecated."]
4580    #[serde(default = "defaults::chunk_header_view_validator_reward")]
4581    pub validator_reward: NearToken,
4582}
4583impl ::std::convert::From<&ChunkHeaderView> for ChunkHeaderView {
4584    fn from(value: &ChunkHeaderView) -> Self {
4585        value.clone()
4586    }
4587}
4588#[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."]
4589#[doc = r""]
4590#[doc = r" <details><summary>JSON schema</summary>"]
4591#[doc = r""]
4592#[doc = r" ```json"]
4593#[doc = "{"]
4594#[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.\","]
4595#[doc = "  \"type\": \"object\","]
4596#[doc = "  \"properties\": {"]
4597#[doc = "    \"archive_block_data\": {"]
4598#[doc = "      \"description\": \"Determines whether block-related data should be written to cloud storage.\","]
4599#[doc = "      \"default\": false,"]
4600#[doc = "      \"type\": \"boolean\""]
4601#[doc = "    },"]
4602#[doc = "    \"polling_interval\": {"]
4603#[doc = "      \"description\": \"Interval at which the system checks for new blocks or chunks to archive.\","]
4604#[doc = "      \"default\": {"]
4605#[doc = "        \"nanos\": 0,"]
4606#[doc = "        \"secs\": 1"]
4607#[doc = "      },"]
4608#[doc = "      \"allOf\": ["]
4609#[doc = "        {"]
4610#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
4611#[doc = "        }"]
4612#[doc = "      ]"]
4613#[doc = "    }"]
4614#[doc = "  }"]
4615#[doc = "}"]
4616#[doc = r" ```"]
4617#[doc = r" </details>"]
4618#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4619pub struct CloudArchivalWriterConfig {
4620    #[doc = "Determines whether block-related data should be written to cloud storage."]
4621    #[serde(default)]
4622    pub archive_block_data: bool,
4623    #[doc = "Interval at which the system checks for new blocks or chunks to archive."]
4624    #[serde(default = "defaults::cloud_archival_writer_config_polling_interval")]
4625    pub polling_interval: DurationAsStdSchemaProvider,
4626}
4627impl ::std::convert::From<&CloudArchivalWriterConfig> for CloudArchivalWriterConfig {
4628    fn from(value: &CloudArchivalWriterConfig) -> Self {
4629        value.clone()
4630    }
4631}
4632impl ::std::default::Default for CloudArchivalWriterConfig {
4633    fn default() -> Self {
4634        Self {
4635            archive_block_data: Default::default(),
4636            polling_interval: defaults::cloud_archival_writer_config_polling_interval(),
4637        }
4638    }
4639}
4640#[doc = "`CompilationError`"]
4641#[doc = r""]
4642#[doc = r" <details><summary>JSON schema</summary>"]
4643#[doc = r""]
4644#[doc = r" ```json"]
4645#[doc = "{"]
4646#[doc = "  \"oneOf\": ["]
4647#[doc = "    {"]
4648#[doc = "      \"type\": \"object\","]
4649#[doc = "      \"required\": ["]
4650#[doc = "        \"CodeDoesNotExist\""]
4651#[doc = "      ],"]
4652#[doc = "      \"properties\": {"]
4653#[doc = "        \"CodeDoesNotExist\": {"]
4654#[doc = "          \"type\": \"object\","]
4655#[doc = "          \"required\": ["]
4656#[doc = "            \"account_id\""]
4657#[doc = "          ],"]
4658#[doc = "          \"properties\": {"]
4659#[doc = "            \"account_id\": {"]
4660#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
4661#[doc = "            }"]
4662#[doc = "          }"]
4663#[doc = "        }"]
4664#[doc = "      },"]
4665#[doc = "      \"additionalProperties\": false"]
4666#[doc = "    },"]
4667#[doc = "    {"]
4668#[doc = "      \"type\": \"object\","]
4669#[doc = "      \"required\": ["]
4670#[doc = "        \"PrepareError\""]
4671#[doc = "      ],"]
4672#[doc = "      \"properties\": {"]
4673#[doc = "        \"PrepareError\": {"]
4674#[doc = "          \"$ref\": \"#/components/schemas/PrepareError\""]
4675#[doc = "        }"]
4676#[doc = "      },"]
4677#[doc = "      \"additionalProperties\": false"]
4678#[doc = "    },"]
4679#[doc = "    {"]
4680#[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\","]
4681#[doc = "      \"type\": \"object\","]
4682#[doc = "      \"required\": ["]
4683#[doc = "        \"WasmerCompileError\""]
4684#[doc = "      ],"]
4685#[doc = "      \"properties\": {"]
4686#[doc = "        \"WasmerCompileError\": {"]
4687#[doc = "          \"type\": \"object\","]
4688#[doc = "          \"required\": ["]
4689#[doc = "            \"msg\""]
4690#[doc = "          ],"]
4691#[doc = "          \"properties\": {"]
4692#[doc = "            \"msg\": {"]
4693#[doc = "              \"type\": \"string\""]
4694#[doc = "            }"]
4695#[doc = "          }"]
4696#[doc = "        }"]
4697#[doc = "      },"]
4698#[doc = "      \"additionalProperties\": false"]
4699#[doc = "    }"]
4700#[doc = "  ]"]
4701#[doc = "}"]
4702#[doc = r" ```"]
4703#[doc = r" </details>"]
4704#[derive(
4705    :: serde :: Deserialize,
4706    :: serde :: Serialize,
4707    Clone,
4708    Debug,
4709    thiserror::Error,
4710    strum_macros::Display,
4711)]
4712pub enum CompilationError {
4713    CodeDoesNotExist {
4714        account_id: AccountId,
4715    },
4716    PrepareError(PrepareError),
4717    #[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"]
4718    WasmerCompileError {
4719        msg: ::std::string::String,
4720    },
4721}
4722impl ::std::convert::From<&Self> for CompilationError {
4723    fn from(value: &CompilationError) -> Self {
4724        value.clone()
4725    }
4726}
4727impl ::std::convert::From<PrepareError> for CompilationError {
4728    fn from(value: PrepareError) -> Self {
4729        Self::PrepareError(value)
4730    }
4731}
4732#[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)"]
4733#[doc = r""]
4734#[doc = r" <details><summary>JSON schema</summary>"]
4735#[doc = r""]
4736#[doc = r" ```json"]
4737#[doc = "{"]
4738#[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)\","]
4739#[doc = "  \"type\": \"object\","]
4740#[doc = "  \"properties\": {"]
4741#[doc = "    \"allowed_shard_outgoing_gas\": {"]
4742#[doc = "      \"description\": \"How much gas the chosen allowed shard can send to a 100% congested shard.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4743#[doc = "      \"allOf\": ["]
4744#[doc = "        {"]
4745#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4746#[doc = "        }"]
4747#[doc = "      ]"]
4748#[doc = "    },"]
4749#[doc = "    \"max_congestion_incoming_gas\": {"]
4750#[doc = "      \"description\": \"How much gas in delayed receipts of a shard is 100% incoming congestion.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4751#[doc = "      \"allOf\": ["]
4752#[doc = "        {"]
4753#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4754#[doc = "        }"]
4755#[doc = "      ]"]
4756#[doc = "    },"]
4757#[doc = "    \"max_congestion_memory_consumption\": {"]
4758#[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.\","]
4759#[doc = "      \"type\": \"integer\","]
4760#[doc = "      \"format\": \"uint64\","]
4761#[doc = "      \"minimum\": 0.0"]
4762#[doc = "    },"]
4763#[doc = "    \"max_congestion_missed_chunks\": {"]
4764#[doc = "      \"description\": \"How many missed chunks in a row in a shard is considered 100% congested.\","]
4765#[doc = "      \"type\": \"integer\","]
4766#[doc = "      \"format\": \"uint64\","]
4767#[doc = "      \"minimum\": 0.0"]
4768#[doc = "    },"]
4769#[doc = "    \"max_congestion_outgoing_gas\": {"]
4770#[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.\","]
4771#[doc = "      \"allOf\": ["]
4772#[doc = "        {"]
4773#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4774#[doc = "        }"]
4775#[doc = "      ]"]
4776#[doc = "    },"]
4777#[doc = "    \"max_outgoing_gas\": {"]
4778#[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.\","]
4779#[doc = "      \"allOf\": ["]
4780#[doc = "        {"]
4781#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4782#[doc = "        }"]
4783#[doc = "      ]"]
4784#[doc = "    },"]
4785#[doc = "    \"max_tx_gas\": {"]
4786#[doc = "      \"description\": \"The maximum amount of gas in a chunk spent on converting new transactions to\\nreceipts.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4787#[doc = "      \"allOf\": ["]
4788#[doc = "        {"]
4789#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4790#[doc = "        }"]
4791#[doc = "      ]"]
4792#[doc = "    },"]
4793#[doc = "    \"min_outgoing_gas\": {"]
4794#[doc = "      \"description\": \"The minimum gas each shard can send to a shard that is not fully congested.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4795#[doc = "      \"allOf\": ["]
4796#[doc = "        {"]
4797#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4798#[doc = "        }"]
4799#[doc = "      ]"]
4800#[doc = "    },"]
4801#[doc = "    \"min_tx_gas\": {"]
4802#[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.\","]
4803#[doc = "      \"allOf\": ["]
4804#[doc = "        {"]
4805#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
4806#[doc = "        }"]
4807#[doc = "      ]"]
4808#[doc = "    },"]
4809#[doc = "    \"outgoing_receipts_big_size_limit\": {"]
4810#[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.\","]
4811#[doc = "      \"type\": \"integer\","]
4812#[doc = "      \"format\": \"uint64\","]
4813#[doc = "      \"minimum\": 0.0"]
4814#[doc = "    },"]
4815#[doc = "    \"outgoing_receipts_usual_size_limit\": {"]
4816#[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.\","]
4817#[doc = "      \"type\": \"integer\","]
4818#[doc = "      \"format\": \"uint64\","]
4819#[doc = "      \"minimum\": 0.0"]
4820#[doc = "    },"]
4821#[doc = "    \"reject_tx_congestion_threshold\": {"]
4822#[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.\","]
4823#[doc = "      \"type\": \"number\","]
4824#[doc = "      \"format\": \"double\""]
4825#[doc = "    }"]
4826#[doc = "  }"]
4827#[doc = "}"]
4828#[doc = r" ```"]
4829#[doc = r" </details>"]
4830#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4831pub struct CongestionControlConfigView {
4832    #[doc = "How much gas the chosen allowed shard can send to a 100% congested shard.\n\nSee [`CongestionControlConfig`] for more details."]
4833    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4834    pub allowed_shard_outgoing_gas: ::std::option::Option<NearGas>,
4835    #[doc = "How much gas in delayed receipts of a shard is 100% incoming congestion.\n\nSee [`CongestionControlConfig`] for more details."]
4836    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4837    pub max_congestion_incoming_gas: ::std::option::Option<NearGas>,
4838    #[doc = "How much memory space of all delayed and buffered receipts in a shard is\nconsidered 100% congested.\n\nSee [`CongestionControlConfig`] for more details."]
4839    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4840    pub max_congestion_memory_consumption: ::std::option::Option<u64>,
4841    #[doc = "How many missed chunks in a row in a shard is considered 100% congested."]
4842    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4843    pub max_congestion_missed_chunks: ::std::option::Option<u64>,
4844    #[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."]
4845    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4846    pub max_congestion_outgoing_gas: ::std::option::Option<NearGas>,
4847    #[doc = "The maximum amount of gas attached to receipts a shard can forward to\nanother shard per chunk.\n\nSee [`CongestionControlConfig`] for more details."]
4848    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4849    pub max_outgoing_gas: ::std::option::Option<NearGas>,
4850    #[doc = "The maximum amount of gas in a chunk spent on converting new transactions to\nreceipts.\n\nSee [`CongestionControlConfig`] for more details."]
4851    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4852    pub max_tx_gas: ::std::option::Option<NearGas>,
4853    #[doc = "The minimum gas each shard can send to a shard that is not fully congested.\n\nSee [`CongestionControlConfig`] for more details."]
4854    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4855    pub min_outgoing_gas: ::std::option::Option<NearGas>,
4856    #[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."]
4857    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4858    pub min_tx_gas: ::std::option::Option<NearGas>,
4859    #[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."]
4860    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4861    pub outgoing_receipts_big_size_limit: ::std::option::Option<u64>,
4862    #[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."]
4863    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4864    pub outgoing_receipts_usual_size_limit: ::std::option::Option<u64>,
4865    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4866    pub reject_tx_congestion_threshold: ::std::option::Option<f64>,
4867}
4868impl ::std::convert::From<&CongestionControlConfigView> for CongestionControlConfigView {
4869    fn from(value: &CongestionControlConfigView) -> Self {
4870        value.clone()
4871    }
4872}
4873impl ::std::default::Default for CongestionControlConfigView {
4874    fn default() -> Self {
4875        Self {
4876            allowed_shard_outgoing_gas: Default::default(),
4877            max_congestion_incoming_gas: Default::default(),
4878            max_congestion_memory_consumption: Default::default(),
4879            max_congestion_missed_chunks: Default::default(),
4880            max_congestion_outgoing_gas: Default::default(),
4881            max_outgoing_gas: Default::default(),
4882            max_tx_gas: Default::default(),
4883            min_outgoing_gas: Default::default(),
4884            min_tx_gas: Default::default(),
4885            outgoing_receipts_big_size_limit: Default::default(),
4886            outgoing_receipts_usual_size_limit: Default::default(),
4887            reject_tx_congestion_threshold: Default::default(),
4888        }
4889    }
4890}
4891#[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)"]
4892#[doc = r""]
4893#[doc = r" <details><summary>JSON schema</summary>"]
4894#[doc = r""]
4895#[doc = r" ```json"]
4896#[doc = "{"]
4897#[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)\","]
4898#[doc = "  \"type\": \"object\","]
4899#[doc = "  \"required\": ["]
4900#[doc = "    \"allowed_shard\","]
4901#[doc = "    \"buffered_receipts_gas\","]
4902#[doc = "    \"delayed_receipts_gas\","]
4903#[doc = "    \"receipt_bytes\""]
4904#[doc = "  ],"]
4905#[doc = "  \"properties\": {"]
4906#[doc = "    \"allowed_shard\": {"]
4907#[doc = "      \"type\": \"integer\","]
4908#[doc = "      \"format\": \"uint16\","]
4909#[doc = "      \"maximum\": 65535.0,"]
4910#[doc = "      \"minimum\": 0.0"]
4911#[doc = "    },"]
4912#[doc = "    \"buffered_receipts_gas\": {"]
4913#[doc = "      \"type\": \"string\""]
4914#[doc = "    },"]
4915#[doc = "    \"delayed_receipts_gas\": {"]
4916#[doc = "      \"type\": \"string\""]
4917#[doc = "    },"]
4918#[doc = "    \"receipt_bytes\": {"]
4919#[doc = "      \"type\": \"integer\","]
4920#[doc = "      \"format\": \"uint64\","]
4921#[doc = "      \"minimum\": 0.0"]
4922#[doc = "    }"]
4923#[doc = "  }"]
4924#[doc = "}"]
4925#[doc = r" ```"]
4926#[doc = r" </details>"]
4927#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4928pub struct CongestionInfoView {
4929    pub allowed_shard: u16,
4930    pub buffered_receipts_gas: ::std::string::String,
4931    pub delayed_receipts_gas: ::std::string::String,
4932    pub receipt_bytes: u64,
4933}
4934impl ::std::convert::From<&CongestionInfoView> for CongestionInfoView {
4935    fn from(value: &CongestionInfoView) -> Self {
4936        value.clone()
4937    }
4938}
4939#[doc = "`ContractCodeChangesByBlockIdChangesType`"]
4940#[doc = r""]
4941#[doc = r" <details><summary>JSON schema</summary>"]
4942#[doc = r""]
4943#[doc = r" ```json"]
4944#[doc = "{"]
4945#[doc = "  \"type\": \"string\","]
4946#[doc = "  \"enum\": ["]
4947#[doc = "    \"contract_code_changes\""]
4948#[doc = "  ]"]
4949#[doc = "}"]
4950#[doc = r" ```"]
4951#[doc = r" </details>"]
4952#[derive(
4953    :: serde :: Deserialize,
4954    :: serde :: Serialize,
4955    Clone,
4956    Copy,
4957    Debug,
4958    Eq,
4959    Hash,
4960    Ord,
4961    PartialEq,
4962    PartialOrd,
4963)]
4964pub enum ContractCodeChangesByBlockIdChangesType {
4965    #[serde(rename = "contract_code_changes")]
4966    ContractCodeChanges,
4967}
4968impl ::std::convert::From<&Self> for ContractCodeChangesByBlockIdChangesType {
4969    fn from(value: &ContractCodeChangesByBlockIdChangesType) -> Self {
4970        value.clone()
4971    }
4972}
4973impl ::std::fmt::Display for ContractCodeChangesByBlockIdChangesType {
4974    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4975        match *self {
4976            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4977        }
4978    }
4979}
4980impl ::std::str::FromStr for ContractCodeChangesByBlockIdChangesType {
4981    type Err = self::error::ConversionError;
4982    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4983        match value {
4984            "contract_code_changes" => Ok(Self::ContractCodeChanges),
4985            _ => Err("invalid value".into()),
4986        }
4987    }
4988}
4989impl ::std::convert::TryFrom<&str> for ContractCodeChangesByBlockIdChangesType {
4990    type Error = self::error::ConversionError;
4991    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4992        value.parse()
4993    }
4994}
4995impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4996    type Error = self::error::ConversionError;
4997    fn try_from(
4998        value: &::std::string::String,
4999    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5000        value.parse()
5001    }
5002}
5003impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByBlockIdChangesType {
5004    type Error = self::error::ConversionError;
5005    fn try_from(
5006        value: ::std::string::String,
5007    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5008        value.parse()
5009    }
5010}
5011#[doc = "`ContractCodeChangesByFinalityChangesType`"]
5012#[doc = r""]
5013#[doc = r" <details><summary>JSON schema</summary>"]
5014#[doc = r""]
5015#[doc = r" ```json"]
5016#[doc = "{"]
5017#[doc = "  \"type\": \"string\","]
5018#[doc = "  \"enum\": ["]
5019#[doc = "    \"contract_code_changes\""]
5020#[doc = "  ]"]
5021#[doc = "}"]
5022#[doc = r" ```"]
5023#[doc = r" </details>"]
5024#[derive(
5025    :: serde :: Deserialize,
5026    :: serde :: Serialize,
5027    Clone,
5028    Copy,
5029    Debug,
5030    Eq,
5031    Hash,
5032    Ord,
5033    PartialEq,
5034    PartialOrd,
5035)]
5036pub enum ContractCodeChangesByFinalityChangesType {
5037    #[serde(rename = "contract_code_changes")]
5038    ContractCodeChanges,
5039}
5040impl ::std::convert::From<&Self> for ContractCodeChangesByFinalityChangesType {
5041    fn from(value: &ContractCodeChangesByFinalityChangesType) -> Self {
5042        value.clone()
5043    }
5044}
5045impl ::std::fmt::Display for ContractCodeChangesByFinalityChangesType {
5046    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5047        match *self {
5048            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
5049        }
5050    }
5051}
5052impl ::std::str::FromStr for ContractCodeChangesByFinalityChangesType {
5053    type Err = self::error::ConversionError;
5054    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5055        match value {
5056            "contract_code_changes" => Ok(Self::ContractCodeChanges),
5057            _ => Err("invalid value".into()),
5058        }
5059    }
5060}
5061impl ::std::convert::TryFrom<&str> for ContractCodeChangesByFinalityChangesType {
5062    type Error = self::error::ConversionError;
5063    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5064        value.parse()
5065    }
5066}
5067impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByFinalityChangesType {
5068    type Error = self::error::ConversionError;
5069    fn try_from(
5070        value: &::std::string::String,
5071    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5072        value.parse()
5073    }
5074}
5075impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByFinalityChangesType {
5076    type Error = self::error::ConversionError;
5077    fn try_from(
5078        value: ::std::string::String,
5079    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5080        value.parse()
5081    }
5082}
5083#[doc = "`ContractCodeChangesBySyncCheckpointChangesType`"]
5084#[doc = r""]
5085#[doc = r" <details><summary>JSON schema</summary>"]
5086#[doc = r""]
5087#[doc = r" ```json"]
5088#[doc = "{"]
5089#[doc = "  \"type\": \"string\","]
5090#[doc = "  \"enum\": ["]
5091#[doc = "    \"contract_code_changes\""]
5092#[doc = "  ]"]
5093#[doc = "}"]
5094#[doc = r" ```"]
5095#[doc = r" </details>"]
5096#[derive(
5097    :: serde :: Deserialize,
5098    :: serde :: Serialize,
5099    Clone,
5100    Copy,
5101    Debug,
5102    Eq,
5103    Hash,
5104    Ord,
5105    PartialEq,
5106    PartialOrd,
5107)]
5108pub enum ContractCodeChangesBySyncCheckpointChangesType {
5109    #[serde(rename = "contract_code_changes")]
5110    ContractCodeChanges,
5111}
5112impl ::std::convert::From<&Self> for ContractCodeChangesBySyncCheckpointChangesType {
5113    fn from(value: &ContractCodeChangesBySyncCheckpointChangesType) -> Self {
5114        value.clone()
5115    }
5116}
5117impl ::std::fmt::Display for ContractCodeChangesBySyncCheckpointChangesType {
5118    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5119        match *self {
5120            Self::ContractCodeChanges => f.write_str("contract_code_changes"),
5121        }
5122    }
5123}
5124impl ::std::str::FromStr for ContractCodeChangesBySyncCheckpointChangesType {
5125    type Err = self::error::ConversionError;
5126    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5127        match value {
5128            "contract_code_changes" => Ok(Self::ContractCodeChanges),
5129            _ => Err("invalid value".into()),
5130        }
5131    }
5132}
5133impl ::std::convert::TryFrom<&str> for ContractCodeChangesBySyncCheckpointChangesType {
5134    type Error = self::error::ConversionError;
5135    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5136        value.parse()
5137    }
5138}
5139impl ::std::convert::TryFrom<&::std::string::String>
5140    for ContractCodeChangesBySyncCheckpointChangesType
5141{
5142    type Error = self::error::ConversionError;
5143    fn try_from(
5144        value: &::std::string::String,
5145    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5146        value.parse()
5147    }
5148}
5149impl ::std::convert::TryFrom<::std::string::String>
5150    for ContractCodeChangesBySyncCheckpointChangesType
5151{
5152    type Error = self::error::ConversionError;
5153    fn try_from(
5154        value: ::std::string::String,
5155    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5156        value.parse()
5157    }
5158}
5159#[doc = "A view of the contract code."]
5160#[doc = r""]
5161#[doc = r" <details><summary>JSON schema</summary>"]
5162#[doc = r""]
5163#[doc = r" ```json"]
5164#[doc = "{"]
5165#[doc = "  \"description\": \"A view of the contract code.\","]
5166#[doc = "  \"type\": \"object\","]
5167#[doc = "  \"required\": ["]
5168#[doc = "    \"code_base64\","]
5169#[doc = "    \"hash\""]
5170#[doc = "  ],"]
5171#[doc = "  \"properties\": {"]
5172#[doc = "    \"code_base64\": {"]
5173#[doc = "      \"type\": \"string\""]
5174#[doc = "    },"]
5175#[doc = "    \"hash\": {"]
5176#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
5177#[doc = "    }"]
5178#[doc = "  }"]
5179#[doc = "}"]
5180#[doc = r" ```"]
5181#[doc = r" </details>"]
5182#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5183pub struct ContractCodeView {
5184    pub code_base64: ::std::string::String,
5185    pub hash: CryptoHash,
5186}
5187impl ::std::convert::From<&ContractCodeView> for ContractCodeView {
5188    fn from(value: &ContractCodeView) -> Self {
5189        value.clone()
5190    }
5191}
5192#[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)."]
5193#[doc = r""]
5194#[doc = r" <details><summary>JSON schema</summary>"]
5195#[doc = r""]
5196#[doc = r" ```json"]
5197#[doc = "{"]
5198#[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).\","]
5199#[doc = "  \"type\": \"object\","]
5200#[doc = "  \"required\": ["]
5201#[doc = "    \"cost\","]
5202#[doc = "    \"cost_category\","]
5203#[doc = "    \"gas_used\""]
5204#[doc = "  ],"]
5205#[doc = "  \"properties\": {"]
5206#[doc = "    \"cost\": {"]
5207#[doc = "      \"type\": \"string\""]
5208#[doc = "    },"]
5209#[doc = "    \"cost_category\": {"]
5210#[doc = "      \"description\": \"Either ACTION_COST or WASM_HOST_COST.\","]
5211#[doc = "      \"type\": \"string\""]
5212#[doc = "    },"]
5213#[doc = "    \"gas_used\": {"]
5214#[doc = "      \"type\": \"string\""]
5215#[doc = "    }"]
5216#[doc = "  }"]
5217#[doc = "}"]
5218#[doc = r" ```"]
5219#[doc = r" </details>"]
5220#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5221pub struct CostGasUsed {
5222    pub cost: ::std::string::String,
5223    #[doc = "Either ACTION_COST or WASM_HOST_COST."]
5224    pub cost_category: ::std::string::String,
5225    pub gas_used: ::std::string::String,
5226}
5227impl ::std::convert::From<&CostGasUsed> for CostGasUsed {
5228    fn from(value: &CostGasUsed) -> Self {
5229        value.clone()
5230    }
5231}
5232#[doc = "Create account action"]
5233#[doc = r""]
5234#[doc = r" <details><summary>JSON schema</summary>"]
5235#[doc = r""]
5236#[doc = r" ```json"]
5237#[doc = "{"]
5238#[doc = "  \"description\": \"Create account action\","]
5239#[doc = "  \"type\": \"object\""]
5240#[doc = "}"]
5241#[doc = r" ```"]
5242#[doc = r" </details>"]
5243#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5244#[serde(transparent)]
5245pub struct CreateAccountAction(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
5246impl ::std::ops::Deref for CreateAccountAction {
5247    type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
5248    fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
5249        &self.0
5250    }
5251}
5252impl ::std::convert::From<CreateAccountAction>
5253    for ::serde_json::Map<::std::string::String, ::serde_json::Value>
5254{
5255    fn from(value: CreateAccountAction) -> Self {
5256        value.0
5257    }
5258}
5259impl ::std::convert::From<&CreateAccountAction> for CreateAccountAction {
5260    fn from(value: &CreateAccountAction) -> Self {
5261        value.clone()
5262    }
5263}
5264impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
5265    for CreateAccountAction
5266{
5267    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
5268        Self(value)
5269    }
5270}
5271#[doc = "Describes information about the current epoch validator"]
5272#[doc = r""]
5273#[doc = r" <details><summary>JSON schema</summary>"]
5274#[doc = r""]
5275#[doc = r" ```json"]
5276#[doc = "{"]
5277#[doc = "  \"description\": \"Describes information about the current epoch validator\","]
5278#[doc = "  \"type\": \"object\","]
5279#[doc = "  \"required\": ["]
5280#[doc = "    \"account_id\","]
5281#[doc = "    \"is_slashed\","]
5282#[doc = "    \"num_expected_blocks\","]
5283#[doc = "    \"num_produced_blocks\","]
5284#[doc = "    \"public_key\","]
5285#[doc = "    \"shards\","]
5286#[doc = "    \"stake\""]
5287#[doc = "  ],"]
5288#[doc = "  \"properties\": {"]
5289#[doc = "    \"account_id\": {"]
5290#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5291#[doc = "    },"]
5292#[doc = "    \"is_slashed\": {"]
5293#[doc = "      \"type\": \"boolean\""]
5294#[doc = "    },"]
5295#[doc = "    \"num_expected_blocks\": {"]
5296#[doc = "      \"type\": \"integer\","]
5297#[doc = "      \"format\": \"uint64\","]
5298#[doc = "      \"minimum\": 0.0"]
5299#[doc = "    },"]
5300#[doc = "    \"num_expected_chunks\": {"]
5301#[doc = "      \"default\": 0,"]
5302#[doc = "      \"type\": \"integer\","]
5303#[doc = "      \"format\": \"uint64\","]
5304#[doc = "      \"minimum\": 0.0"]
5305#[doc = "    },"]
5306#[doc = "    \"num_expected_chunks_per_shard\": {"]
5307#[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.\","]
5308#[doc = "      \"default\": [],"]
5309#[doc = "      \"type\": \"array\","]
5310#[doc = "      \"items\": {"]
5311#[doc = "        \"type\": \"integer\","]
5312#[doc = "        \"format\": \"uint64\","]
5313#[doc = "        \"minimum\": 0.0"]
5314#[doc = "      }"]
5315#[doc = "    },"]
5316#[doc = "    \"num_expected_endorsements\": {"]
5317#[doc = "      \"default\": 0,"]
5318#[doc = "      \"type\": \"integer\","]
5319#[doc = "      \"format\": \"uint64\","]
5320#[doc = "      \"minimum\": 0.0"]
5321#[doc = "    },"]
5322#[doc = "    \"num_expected_endorsements_per_shard\": {"]
5323#[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.\","]
5324#[doc = "      \"default\": [],"]
5325#[doc = "      \"type\": \"array\","]
5326#[doc = "      \"items\": {"]
5327#[doc = "        \"type\": \"integer\","]
5328#[doc = "        \"format\": \"uint64\","]
5329#[doc = "        \"minimum\": 0.0"]
5330#[doc = "      }"]
5331#[doc = "    },"]
5332#[doc = "    \"num_produced_blocks\": {"]
5333#[doc = "      \"type\": \"integer\","]
5334#[doc = "      \"format\": \"uint64\","]
5335#[doc = "      \"minimum\": 0.0"]
5336#[doc = "    },"]
5337#[doc = "    \"num_produced_chunks\": {"]
5338#[doc = "      \"default\": 0,"]
5339#[doc = "      \"type\": \"integer\","]
5340#[doc = "      \"format\": \"uint64\","]
5341#[doc = "      \"minimum\": 0.0"]
5342#[doc = "    },"]
5343#[doc = "    \"num_produced_chunks_per_shard\": {"]
5344#[doc = "      \"default\": [],"]
5345#[doc = "      \"type\": \"array\","]
5346#[doc = "      \"items\": {"]
5347#[doc = "        \"type\": \"integer\","]
5348#[doc = "        \"format\": \"uint64\","]
5349#[doc = "        \"minimum\": 0.0"]
5350#[doc = "      }"]
5351#[doc = "    },"]
5352#[doc = "    \"num_produced_endorsements\": {"]
5353#[doc = "      \"default\": 0,"]
5354#[doc = "      \"type\": \"integer\","]
5355#[doc = "      \"format\": \"uint64\","]
5356#[doc = "      \"minimum\": 0.0"]
5357#[doc = "    },"]
5358#[doc = "    \"num_produced_endorsements_per_shard\": {"]
5359#[doc = "      \"default\": [],"]
5360#[doc = "      \"type\": \"array\","]
5361#[doc = "      \"items\": {"]
5362#[doc = "        \"type\": \"integer\","]
5363#[doc = "        \"format\": \"uint64\","]
5364#[doc = "        \"minimum\": 0.0"]
5365#[doc = "      }"]
5366#[doc = "    },"]
5367#[doc = "    \"public_key\": {"]
5368#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
5369#[doc = "    },"]
5370#[doc = "    \"shards\": {"]
5371#[doc = "      \"description\": \"Shards this validator is assigned to as chunk producer in the current epoch.\","]
5372#[doc = "      \"type\": \"array\","]
5373#[doc = "      \"items\": {"]
5374#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5375#[doc = "      }"]
5376#[doc = "    },"]
5377#[doc = "    \"shards_endorsed\": {"]
5378#[doc = "      \"description\": \"Shards this validator is assigned to as chunk validator in the current epoch.\","]
5379#[doc = "      \"default\": [],"]
5380#[doc = "      \"type\": \"array\","]
5381#[doc = "      \"items\": {"]
5382#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
5383#[doc = "      }"]
5384#[doc = "    },"]
5385#[doc = "    \"stake\": {"]
5386#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
5387#[doc = "    }"]
5388#[doc = "  }"]
5389#[doc = "}"]
5390#[doc = r" ```"]
5391#[doc = r" </details>"]
5392#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5393pub struct CurrentEpochValidatorInfo {
5394    pub account_id: AccountId,
5395    pub is_slashed: bool,
5396    pub num_expected_blocks: u64,
5397    #[serde(default)]
5398    pub num_expected_chunks: u64,
5399    #[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."]
5400    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5401    pub num_expected_chunks_per_shard: ::std::vec::Vec<u64>,
5402    #[serde(default)]
5403    pub num_expected_endorsements: u64,
5404    #[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."]
5405    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5406    pub num_expected_endorsements_per_shard: ::std::vec::Vec<u64>,
5407    pub num_produced_blocks: u64,
5408    #[serde(default)]
5409    pub num_produced_chunks: u64,
5410    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5411    pub num_produced_chunks_per_shard: ::std::vec::Vec<u64>,
5412    #[serde(default)]
5413    pub num_produced_endorsements: u64,
5414    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5415    pub num_produced_endorsements_per_shard: ::std::vec::Vec<u64>,
5416    pub public_key: PublicKey,
5417    #[doc = "Shards this validator is assigned to as chunk producer in the current epoch."]
5418    pub shards: ::std::vec::Vec<ShardId>,
5419    #[doc = "Shards this validator is assigned to as chunk validator in the current epoch."]
5420    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5421    pub shards_endorsed: ::std::vec::Vec<ShardId>,
5422    pub stake: NearToken,
5423}
5424impl ::std::convert::From<&CurrentEpochValidatorInfo> for CurrentEpochValidatorInfo {
5425    fn from(value: &CurrentEpochValidatorInfo) -> Self {
5426        value.clone()
5427    }
5428}
5429#[doc = "`DataChangesByBlockIdChangesType`"]
5430#[doc = r""]
5431#[doc = r" <details><summary>JSON schema</summary>"]
5432#[doc = r""]
5433#[doc = r" ```json"]
5434#[doc = "{"]
5435#[doc = "  \"type\": \"string\","]
5436#[doc = "  \"enum\": ["]
5437#[doc = "    \"data_changes\""]
5438#[doc = "  ]"]
5439#[doc = "}"]
5440#[doc = r" ```"]
5441#[doc = r" </details>"]
5442#[derive(
5443    :: serde :: Deserialize,
5444    :: serde :: Serialize,
5445    Clone,
5446    Copy,
5447    Debug,
5448    Eq,
5449    Hash,
5450    Ord,
5451    PartialEq,
5452    PartialOrd,
5453)]
5454pub enum DataChangesByBlockIdChangesType {
5455    #[serde(rename = "data_changes")]
5456    DataChanges,
5457}
5458impl ::std::convert::From<&Self> for DataChangesByBlockIdChangesType {
5459    fn from(value: &DataChangesByBlockIdChangesType) -> Self {
5460        value.clone()
5461    }
5462}
5463impl ::std::fmt::Display for DataChangesByBlockIdChangesType {
5464    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5465        match *self {
5466            Self::DataChanges => f.write_str("data_changes"),
5467        }
5468    }
5469}
5470impl ::std::str::FromStr for DataChangesByBlockIdChangesType {
5471    type Err = self::error::ConversionError;
5472    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5473        match value {
5474            "data_changes" => Ok(Self::DataChanges),
5475            _ => Err("invalid value".into()),
5476        }
5477    }
5478}
5479impl ::std::convert::TryFrom<&str> for DataChangesByBlockIdChangesType {
5480    type Error = self::error::ConversionError;
5481    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5482        value.parse()
5483    }
5484}
5485impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByBlockIdChangesType {
5486    type Error = self::error::ConversionError;
5487    fn try_from(
5488        value: &::std::string::String,
5489    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5490        value.parse()
5491    }
5492}
5493impl ::std::convert::TryFrom<::std::string::String> for DataChangesByBlockIdChangesType {
5494    type Error = self::error::ConversionError;
5495    fn try_from(
5496        value: ::std::string::String,
5497    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5498        value.parse()
5499    }
5500}
5501#[doc = "`DataChangesByFinalityChangesType`"]
5502#[doc = r""]
5503#[doc = r" <details><summary>JSON schema</summary>"]
5504#[doc = r""]
5505#[doc = r" ```json"]
5506#[doc = "{"]
5507#[doc = "  \"type\": \"string\","]
5508#[doc = "  \"enum\": ["]
5509#[doc = "    \"data_changes\""]
5510#[doc = "  ]"]
5511#[doc = "}"]
5512#[doc = r" ```"]
5513#[doc = r" </details>"]
5514#[derive(
5515    :: serde :: Deserialize,
5516    :: serde :: Serialize,
5517    Clone,
5518    Copy,
5519    Debug,
5520    Eq,
5521    Hash,
5522    Ord,
5523    PartialEq,
5524    PartialOrd,
5525)]
5526pub enum DataChangesByFinalityChangesType {
5527    #[serde(rename = "data_changes")]
5528    DataChanges,
5529}
5530impl ::std::convert::From<&Self> for DataChangesByFinalityChangesType {
5531    fn from(value: &DataChangesByFinalityChangesType) -> Self {
5532        value.clone()
5533    }
5534}
5535impl ::std::fmt::Display for DataChangesByFinalityChangesType {
5536    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5537        match *self {
5538            Self::DataChanges => f.write_str("data_changes"),
5539        }
5540    }
5541}
5542impl ::std::str::FromStr for DataChangesByFinalityChangesType {
5543    type Err = self::error::ConversionError;
5544    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5545        match value {
5546            "data_changes" => Ok(Self::DataChanges),
5547            _ => Err("invalid value".into()),
5548        }
5549    }
5550}
5551impl ::std::convert::TryFrom<&str> for DataChangesByFinalityChangesType {
5552    type Error = self::error::ConversionError;
5553    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5554        value.parse()
5555    }
5556}
5557impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByFinalityChangesType {
5558    type Error = self::error::ConversionError;
5559    fn try_from(
5560        value: &::std::string::String,
5561    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5562        value.parse()
5563    }
5564}
5565impl ::std::convert::TryFrom<::std::string::String> for DataChangesByFinalityChangesType {
5566    type Error = self::error::ConversionError;
5567    fn try_from(
5568        value: ::std::string::String,
5569    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5570        value.parse()
5571    }
5572}
5573#[doc = "`DataChangesBySyncCheckpointChangesType`"]
5574#[doc = r""]
5575#[doc = r" <details><summary>JSON schema</summary>"]
5576#[doc = r""]
5577#[doc = r" ```json"]
5578#[doc = "{"]
5579#[doc = "  \"type\": \"string\","]
5580#[doc = "  \"enum\": ["]
5581#[doc = "    \"data_changes\""]
5582#[doc = "  ]"]
5583#[doc = "}"]
5584#[doc = r" ```"]
5585#[doc = r" </details>"]
5586#[derive(
5587    :: serde :: Deserialize,
5588    :: serde :: Serialize,
5589    Clone,
5590    Copy,
5591    Debug,
5592    Eq,
5593    Hash,
5594    Ord,
5595    PartialEq,
5596    PartialOrd,
5597)]
5598pub enum DataChangesBySyncCheckpointChangesType {
5599    #[serde(rename = "data_changes")]
5600    DataChanges,
5601}
5602impl ::std::convert::From<&Self> for DataChangesBySyncCheckpointChangesType {
5603    fn from(value: &DataChangesBySyncCheckpointChangesType) -> Self {
5604        value.clone()
5605    }
5606}
5607impl ::std::fmt::Display for DataChangesBySyncCheckpointChangesType {
5608    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5609        match *self {
5610            Self::DataChanges => f.write_str("data_changes"),
5611        }
5612    }
5613}
5614impl ::std::str::FromStr for DataChangesBySyncCheckpointChangesType {
5615    type Err = self::error::ConversionError;
5616    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5617        match value {
5618            "data_changes" => Ok(Self::DataChanges),
5619            _ => Err("invalid value".into()),
5620        }
5621    }
5622}
5623impl ::std::convert::TryFrom<&str> for DataChangesBySyncCheckpointChangesType {
5624    type Error = self::error::ConversionError;
5625    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5626        value.parse()
5627    }
5628}
5629impl ::std::convert::TryFrom<&::std::string::String> for DataChangesBySyncCheckpointChangesType {
5630    type Error = self::error::ConversionError;
5631    fn try_from(
5632        value: &::std::string::String,
5633    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5634        value.parse()
5635    }
5636}
5637impl ::std::convert::TryFrom<::std::string::String> for DataChangesBySyncCheckpointChangesType {
5638    type Error = self::error::ConversionError;
5639    fn try_from(
5640        value: ::std::string::String,
5641    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5642        value.parse()
5643    }
5644}
5645#[doc = "The fees settings for a data receipt creation"]
5646#[doc = r""]
5647#[doc = r" <details><summary>JSON schema</summary>"]
5648#[doc = r""]
5649#[doc = r" ```json"]
5650#[doc = "{"]
5651#[doc = "  \"description\": \"The fees settings for a data receipt creation\","]
5652#[doc = "  \"type\": \"object\","]
5653#[doc = "  \"properties\": {"]
5654#[doc = "    \"base_cost\": {"]
5655#[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).\","]
5656#[doc = "      \"allOf\": ["]
5657#[doc = "        {"]
5658#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
5659#[doc = "        }"]
5660#[doc = "      ]"]
5661#[doc = "    },"]
5662#[doc = "    \"cost_per_byte\": {"]
5663#[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`.\","]
5664#[doc = "      \"allOf\": ["]
5665#[doc = "        {"]
5666#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
5667#[doc = "        }"]
5668#[doc = "      ]"]
5669#[doc = "    }"]
5670#[doc = "  }"]
5671#[doc = "}"]
5672#[doc = r" ```"]
5673#[doc = r" </details>"]
5674#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5675pub struct DataReceiptCreationConfigView {
5676    #[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)."]
5677    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5678    pub base_cost: ::std::option::Option<Fee>,
5679    #[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`."]
5680    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5681    pub cost_per_byte: ::std::option::Option<Fee>,
5682}
5683impl ::std::convert::From<&DataReceiptCreationConfigView> for DataReceiptCreationConfigView {
5684    fn from(value: &DataReceiptCreationConfigView) -> Self {
5685        value.clone()
5686    }
5687}
5688impl ::std::default::Default for DataReceiptCreationConfigView {
5689    fn default() -> Self {
5690        Self {
5691            base_cost: Default::default(),
5692            cost_per_byte: Default::default(),
5693        }
5694    }
5695}
5696#[doc = "`DataReceiverView`"]
5697#[doc = r""]
5698#[doc = r" <details><summary>JSON schema</summary>"]
5699#[doc = r""]
5700#[doc = r" ```json"]
5701#[doc = "{"]
5702#[doc = "  \"type\": \"object\","]
5703#[doc = "  \"required\": ["]
5704#[doc = "    \"data_id\","]
5705#[doc = "    \"receiver_id\""]
5706#[doc = "  ],"]
5707#[doc = "  \"properties\": {"]
5708#[doc = "    \"data_id\": {"]
5709#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
5710#[doc = "    },"]
5711#[doc = "    \"receiver_id\": {"]
5712#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5713#[doc = "    }"]
5714#[doc = "  }"]
5715#[doc = "}"]
5716#[doc = r" ```"]
5717#[doc = r" </details>"]
5718#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5719pub struct DataReceiverView {
5720    pub data_id: CryptoHash,
5721    pub receiver_id: AccountId,
5722}
5723impl ::std::convert::From<&DataReceiverView> for DataReceiverView {
5724    fn from(value: &DataReceiverView) -> Self {
5725        value.clone()
5726    }
5727}
5728#[doc = "This action allows to execute the inner actions behalf of the defined sender."]
5729#[doc = r""]
5730#[doc = r" <details><summary>JSON schema</summary>"]
5731#[doc = r""]
5732#[doc = r" ```json"]
5733#[doc = "{"]
5734#[doc = "  \"description\": \"This action allows to execute the inner actions behalf of the defined sender.\","]
5735#[doc = "  \"type\": \"object\","]
5736#[doc = "  \"required\": ["]
5737#[doc = "    \"actions\","]
5738#[doc = "    \"max_block_height\","]
5739#[doc = "    \"nonce\","]
5740#[doc = "    \"public_key\","]
5741#[doc = "    \"receiver_id\","]
5742#[doc = "    \"sender_id\""]
5743#[doc = "  ],"]
5744#[doc = "  \"properties\": {"]
5745#[doc = "    \"actions\": {"]
5746#[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.\","]
5747#[doc = "      \"type\": \"array\","]
5748#[doc = "      \"items\": {"]
5749#[doc = "        \"$ref\": \"#/components/schemas/NonDelegateAction\""]
5750#[doc = "      }"]
5751#[doc = "    },"]
5752#[doc = "    \"max_block_height\": {"]
5753#[doc = "      \"description\": \"The maximal height of the block in the blockchain below which the given DelegateAction is valid.\","]
5754#[doc = "      \"type\": \"integer\","]
5755#[doc = "      \"format\": \"uint64\","]
5756#[doc = "      \"minimum\": 0.0"]
5757#[doc = "    },"]
5758#[doc = "    \"nonce\": {"]
5759#[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.\","]
5760#[doc = "      \"type\": \"integer\","]
5761#[doc = "      \"format\": \"uint64\","]
5762#[doc = "      \"minimum\": 0.0"]
5763#[doc = "    },"]
5764#[doc = "    \"public_key\": {"]
5765#[doc = "      \"description\": \"Public key used to sign this delegated action.\","]
5766#[doc = "      \"allOf\": ["]
5767#[doc = "        {"]
5768#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
5769#[doc = "        }"]
5770#[doc = "      ]"]
5771#[doc = "    },"]
5772#[doc = "    \"receiver_id\": {"]
5773#[doc = "      \"description\": \"Receiver of the delegated actions.\","]
5774#[doc = "      \"allOf\": ["]
5775#[doc = "        {"]
5776#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
5777#[doc = "        }"]
5778#[doc = "      ]"]
5779#[doc = "    },"]
5780#[doc = "    \"sender_id\": {"]
5781#[doc = "      \"description\": \"Signer of the delegated actions\","]
5782#[doc = "      \"allOf\": ["]
5783#[doc = "        {"]
5784#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
5785#[doc = "        }"]
5786#[doc = "      ]"]
5787#[doc = "    }"]
5788#[doc = "  }"]
5789#[doc = "}"]
5790#[doc = r" ```"]
5791#[doc = r" </details>"]
5792#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5793pub struct DelegateAction {
5794    #[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."]
5795    pub actions: ::std::vec::Vec<NonDelegateAction>,
5796    #[doc = "The maximal height of the block in the blockchain below which the given DelegateAction is valid."]
5797    pub max_block_height: u64,
5798    #[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."]
5799    pub nonce: u64,
5800    #[doc = "Public key used to sign this delegated action."]
5801    pub public_key: PublicKey,
5802    #[doc = "Receiver of the delegated actions."]
5803    pub receiver_id: AccountId,
5804    #[doc = "Signer of the delegated actions"]
5805    pub sender_id: AccountId,
5806}
5807impl ::std::convert::From<&DelegateAction> for DelegateAction {
5808    fn from(value: &DelegateAction) -> Self {
5809        value.clone()
5810    }
5811}
5812#[doc = "`DeleteAccountAction`"]
5813#[doc = r""]
5814#[doc = r" <details><summary>JSON schema</summary>"]
5815#[doc = r""]
5816#[doc = r" ```json"]
5817#[doc = "{"]
5818#[doc = "  \"type\": \"object\","]
5819#[doc = "  \"required\": ["]
5820#[doc = "    \"beneficiary_id\""]
5821#[doc = "  ],"]
5822#[doc = "  \"properties\": {"]
5823#[doc = "    \"beneficiary_id\": {"]
5824#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
5825#[doc = "    }"]
5826#[doc = "  }"]
5827#[doc = "}"]
5828#[doc = r" ```"]
5829#[doc = r" </details>"]
5830#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5831pub struct DeleteAccountAction {
5832    pub beneficiary_id: AccountId,
5833}
5834impl ::std::convert::From<&DeleteAccountAction> for DeleteAccountAction {
5835    fn from(value: &DeleteAccountAction) -> Self {
5836        value.clone()
5837    }
5838}
5839#[doc = "`DeleteGasKeyAction`"]
5840#[doc = r""]
5841#[doc = r" <details><summary>JSON schema</summary>"]
5842#[doc = r""]
5843#[doc = r" ```json"]
5844#[doc = "{"]
5845#[doc = "  \"type\": \"object\","]
5846#[doc = "  \"required\": ["]
5847#[doc = "    \"public_key\""]
5848#[doc = "  ],"]
5849#[doc = "  \"properties\": {"]
5850#[doc = "    \"public_key\": {"]
5851#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
5852#[doc = "    }"]
5853#[doc = "  }"]
5854#[doc = "}"]
5855#[doc = r" ```"]
5856#[doc = r" </details>"]
5857#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5858pub struct DeleteGasKeyAction {
5859    pub public_key: PublicKey,
5860}
5861impl ::std::convert::From<&DeleteGasKeyAction> for DeleteGasKeyAction {
5862    fn from(value: &DeleteGasKeyAction) -> Self {
5863        value.clone()
5864    }
5865}
5866#[doc = "`DeleteKeyAction`"]
5867#[doc = r""]
5868#[doc = r" <details><summary>JSON schema</summary>"]
5869#[doc = r""]
5870#[doc = r" ```json"]
5871#[doc = "{"]
5872#[doc = "  \"type\": \"object\","]
5873#[doc = "  \"required\": ["]
5874#[doc = "    \"public_key\""]
5875#[doc = "  ],"]
5876#[doc = "  \"properties\": {"]
5877#[doc = "    \"public_key\": {"]
5878#[doc = "      \"description\": \"A public key associated with the access_key to be deleted.\","]
5879#[doc = "      \"allOf\": ["]
5880#[doc = "        {"]
5881#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
5882#[doc = "        }"]
5883#[doc = "      ]"]
5884#[doc = "    }"]
5885#[doc = "  }"]
5886#[doc = "}"]
5887#[doc = r" ```"]
5888#[doc = r" </details>"]
5889#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5890pub struct DeleteKeyAction {
5891    #[doc = "A public key associated with the access_key to be deleted."]
5892    pub public_key: PublicKey,
5893}
5894impl ::std::convert::From<&DeleteKeyAction> for DeleteKeyAction {
5895    fn from(value: &DeleteKeyAction) -> Self {
5896        value.clone()
5897    }
5898}
5899#[doc = "Deploy contract action"]
5900#[doc = r""]
5901#[doc = r" <details><summary>JSON schema</summary>"]
5902#[doc = r""]
5903#[doc = r" ```json"]
5904#[doc = "{"]
5905#[doc = "  \"description\": \"Deploy contract action\","]
5906#[doc = "  \"type\": \"object\","]
5907#[doc = "  \"required\": ["]
5908#[doc = "    \"code\""]
5909#[doc = "  ],"]
5910#[doc = "  \"properties\": {"]
5911#[doc = "    \"code\": {"]
5912#[doc = "      \"description\": \"WebAssembly binary\","]
5913#[doc = "      \"type\": \"string\""]
5914#[doc = "    }"]
5915#[doc = "  }"]
5916#[doc = "}"]
5917#[doc = r" ```"]
5918#[doc = r" </details>"]
5919#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5920pub struct DeployContractAction {
5921    #[doc = "WebAssembly binary"]
5922    pub code: ::std::string::String,
5923}
5924impl ::std::convert::From<&DeployContractAction> for DeployContractAction {
5925    fn from(value: &DeployContractAction) -> Self {
5926        value.clone()
5927    }
5928}
5929#[doc = "Deploy global contract action"]
5930#[doc = r""]
5931#[doc = r" <details><summary>JSON schema</summary>"]
5932#[doc = r""]
5933#[doc = r" ```json"]
5934#[doc = "{"]
5935#[doc = "  \"description\": \"Deploy global contract action\","]
5936#[doc = "  \"type\": \"object\","]
5937#[doc = "  \"required\": ["]
5938#[doc = "    \"code\","]
5939#[doc = "    \"deploy_mode\""]
5940#[doc = "  ],"]
5941#[doc = "  \"properties\": {"]
5942#[doc = "    \"code\": {"]
5943#[doc = "      \"description\": \"WebAssembly binary\","]
5944#[doc = "      \"type\": \"string\""]
5945#[doc = "    },"]
5946#[doc = "    \"deploy_mode\": {"]
5947#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractDeployMode\""]
5948#[doc = "    }"]
5949#[doc = "  }"]
5950#[doc = "}"]
5951#[doc = r" ```"]
5952#[doc = r" </details>"]
5953#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5954pub struct DeployGlobalContractAction {
5955    #[doc = "WebAssembly binary"]
5956    pub code: ::std::string::String,
5957    pub deploy_mode: GlobalContractDeployMode,
5958}
5959impl ::std::convert::From<&DeployGlobalContractAction> for DeployGlobalContractAction {
5960    fn from(value: &DeployGlobalContractAction) -> Self {
5961        value.clone()
5962    }
5963}
5964#[doc = "`DetailedDebugStatus`"]
5965#[doc = r""]
5966#[doc = r" <details><summary>JSON schema</summary>"]
5967#[doc = r""]
5968#[doc = r" ```json"]
5969#[doc = "{"]
5970#[doc = "  \"type\": \"object\","]
5971#[doc = "  \"required\": ["]
5972#[doc = "    \"block_production_delay_millis\","]
5973#[doc = "    \"catchup_status\","]
5974#[doc = "    \"current_head_status\","]
5975#[doc = "    \"current_header_head_status\","]
5976#[doc = "    \"network_info\","]
5977#[doc = "    \"sync_status\""]
5978#[doc = "  ],"]
5979#[doc = "  \"properties\": {"]
5980#[doc = "    \"block_production_delay_millis\": {"]
5981#[doc = "      \"type\": \"integer\","]
5982#[doc = "      \"format\": \"uint64\","]
5983#[doc = "      \"minimum\": 0.0"]
5984#[doc = "    },"]
5985#[doc = "    \"catchup_status\": {"]
5986#[doc = "      \"type\": \"array\","]
5987#[doc = "      \"items\": {"]
5988#[doc = "        \"$ref\": \"#/components/schemas/CatchupStatusView\""]
5989#[doc = "      }"]
5990#[doc = "    },"]
5991#[doc = "    \"current_head_status\": {"]
5992#[doc = "      \"$ref\": \"#/components/schemas/BlockStatusView\""]
5993#[doc = "    },"]
5994#[doc = "    \"current_header_head_status\": {"]
5995#[doc = "      \"$ref\": \"#/components/schemas/BlockStatusView\""]
5996#[doc = "    },"]
5997#[doc = "    \"network_info\": {"]
5998#[doc = "      \"$ref\": \"#/components/schemas/NetworkInfoView\""]
5999#[doc = "    },"]
6000#[doc = "    \"sync_status\": {"]
6001#[doc = "      \"type\": \"string\""]
6002#[doc = "    }"]
6003#[doc = "  }"]
6004#[doc = "}"]
6005#[doc = r" ```"]
6006#[doc = r" </details>"]
6007#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6008pub struct DetailedDebugStatus {
6009    pub block_production_delay_millis: u64,
6010    pub catchup_status: ::std::vec::Vec<CatchupStatusView>,
6011    pub current_head_status: BlockStatusView,
6012    pub current_header_head_status: BlockStatusView,
6013    pub network_info: NetworkInfoView,
6014    pub sync_status: ::std::string::String,
6015}
6016impl ::std::convert::From<&DetailedDebugStatus> for DetailedDebugStatus {
6017    fn from(value: &DetailedDebugStatus) -> Self {
6018        value.clone()
6019    }
6020}
6021#[doc = "`DeterministicAccountStateInit`"]
6022#[doc = r""]
6023#[doc = r" <details><summary>JSON schema</summary>"]
6024#[doc = r""]
6025#[doc = r" ```json"]
6026#[doc = "{"]
6027#[doc = "  \"oneOf\": ["]
6028#[doc = "    {"]
6029#[doc = "      \"type\": \"object\","]
6030#[doc = "      \"required\": ["]
6031#[doc = "        \"V1\""]
6032#[doc = "      ],"]
6033#[doc = "      \"properties\": {"]
6034#[doc = "        \"V1\": {"]
6035#[doc = "          \"$ref\": \"#/components/schemas/DeterministicAccountStateInitV1\""]
6036#[doc = "        }"]
6037#[doc = "      },"]
6038#[doc = "      \"additionalProperties\": false"]
6039#[doc = "    }"]
6040#[doc = "  ]"]
6041#[doc = "}"]
6042#[doc = r" ```"]
6043#[doc = r" </details>"]
6044#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6045pub enum DeterministicAccountStateInit {
6046    V1(DeterministicAccountStateInitV1),
6047}
6048impl ::std::convert::From<&Self> for DeterministicAccountStateInit {
6049    fn from(value: &DeterministicAccountStateInit) -> Self {
6050        value.clone()
6051    }
6052}
6053impl ::std::convert::From<DeterministicAccountStateInitV1> for DeterministicAccountStateInit {
6054    fn from(value: DeterministicAccountStateInitV1) -> Self {
6055        Self::V1(value)
6056    }
6057}
6058#[doc = "`DeterministicAccountStateInitV1`"]
6059#[doc = r""]
6060#[doc = r" <details><summary>JSON schema</summary>"]
6061#[doc = r""]
6062#[doc = r" ```json"]
6063#[doc = "{"]
6064#[doc = "  \"type\": \"object\","]
6065#[doc = "  \"required\": ["]
6066#[doc = "    \"code\","]
6067#[doc = "    \"data\""]
6068#[doc = "  ],"]
6069#[doc = "  \"properties\": {"]
6070#[doc = "    \"code\": {"]
6071#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
6072#[doc = "    },"]
6073#[doc = "    \"data\": {"]
6074#[doc = "      \"type\": \"object\","]
6075#[doc = "      \"additionalProperties\": {"]
6076#[doc = "        \"type\": \"string\""]
6077#[doc = "      }"]
6078#[doc = "    }"]
6079#[doc = "  }"]
6080#[doc = "}"]
6081#[doc = r" ```"]
6082#[doc = r" </details>"]
6083#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6084pub struct DeterministicAccountStateInitV1 {
6085    pub code: GlobalContractIdentifier,
6086    pub data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
6087}
6088impl ::std::convert::From<&DeterministicAccountStateInitV1> for DeterministicAccountStateInitV1 {
6089    fn from(value: &DeterministicAccountStateInitV1) -> Self {
6090        value.clone()
6091    }
6092}
6093#[doc = "`DeterministicStateInitAction`"]
6094#[doc = r""]
6095#[doc = r" <details><summary>JSON schema</summary>"]
6096#[doc = r""]
6097#[doc = r" ```json"]
6098#[doc = "{"]
6099#[doc = "  \"type\": \"object\","]
6100#[doc = "  \"required\": ["]
6101#[doc = "    \"deposit\","]
6102#[doc = "    \"state_init\""]
6103#[doc = "  ],"]
6104#[doc = "  \"properties\": {"]
6105#[doc = "    \"deposit\": {"]
6106#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
6107#[doc = "    },"]
6108#[doc = "    \"state_init\": {"]
6109#[doc = "      \"$ref\": \"#/components/schemas/DeterministicAccountStateInit\""]
6110#[doc = "    }"]
6111#[doc = "  }"]
6112#[doc = "}"]
6113#[doc = r" ```"]
6114#[doc = r" </details>"]
6115#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6116pub struct DeterministicStateInitAction {
6117    pub deposit: NearToken,
6118    pub state_init: DeterministicAccountStateInit,
6119}
6120impl ::std::convert::From<&DeterministicStateInitAction> for DeterministicStateInitAction {
6121    fn from(value: &DeterministicStateInitAction) -> Self {
6122        value.clone()
6123    }
6124}
6125#[doc = "`Direction`"]
6126#[doc = r""]
6127#[doc = r" <details><summary>JSON schema</summary>"]
6128#[doc = r""]
6129#[doc = r" ```json"]
6130#[doc = "{"]
6131#[doc = "  \"type\": \"string\","]
6132#[doc = "  \"enum\": ["]
6133#[doc = "    \"Left\","]
6134#[doc = "    \"Right\""]
6135#[doc = "  ]"]
6136#[doc = "}"]
6137#[doc = r" ```"]
6138#[doc = r" </details>"]
6139#[derive(
6140    :: serde :: Deserialize,
6141    :: serde :: Serialize,
6142    Clone,
6143    Copy,
6144    Debug,
6145    Eq,
6146    Hash,
6147    Ord,
6148    PartialEq,
6149    PartialOrd,
6150)]
6151pub enum Direction {
6152    Left,
6153    Right,
6154}
6155impl ::std::convert::From<&Self> for Direction {
6156    fn from(value: &Direction) -> Self {
6157        value.clone()
6158    }
6159}
6160impl ::std::fmt::Display for Direction {
6161    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6162        match *self {
6163            Self::Left => f.write_str("Left"),
6164            Self::Right => f.write_str("Right"),
6165        }
6166    }
6167}
6168impl ::std::str::FromStr for Direction {
6169    type Err = self::error::ConversionError;
6170    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6171        match value {
6172            "Left" => Ok(Self::Left),
6173            "Right" => Ok(Self::Right),
6174            _ => Err("invalid value".into()),
6175        }
6176    }
6177}
6178impl ::std::convert::TryFrom<&str> for Direction {
6179    type Error = self::error::ConversionError;
6180    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6181        value.parse()
6182    }
6183}
6184impl ::std::convert::TryFrom<&::std::string::String> for Direction {
6185    type Error = self::error::ConversionError;
6186    fn try_from(
6187        value: &::std::string::String,
6188    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6189        value.parse()
6190    }
6191}
6192impl ::std::convert::TryFrom<::std::string::String> for Direction {
6193    type Error = self::error::ConversionError;
6194    fn try_from(
6195        value: ::std::string::String,
6196    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6197        value.parse()
6198    }
6199}
6200#[doc = "Configures how to dump state to external storage."]
6201#[doc = r""]
6202#[doc = r" <details><summary>JSON schema</summary>"]
6203#[doc = r""]
6204#[doc = r" ```json"]
6205#[doc = "{"]
6206#[doc = "  \"description\": \"Configures how to dump state to external storage.\","]
6207#[doc = "  \"type\": \"object\","]
6208#[doc = "  \"properties\": {"]
6209#[doc = "    \"credentials_file\": {"]
6210#[doc = "      \"description\": \"Location of a json file with credentials allowing access to the bucket.\","]
6211#[doc = "      \"type\": ["]
6212#[doc = "        \"string\","]
6213#[doc = "        \"null\""]
6214#[doc = "      ]"]
6215#[doc = "    },"]
6216#[doc = "    \"iteration_delay\": {"]
6217#[doc = "      \"description\": \"How often to check if a new epoch has started.\\nFeel free to set to `None`, defaults are sensible.\","]
6218#[doc = "      \"anyOf\": ["]
6219#[doc = "        {"]
6220#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
6221#[doc = "        },"]
6222#[doc = "        {"]
6223#[doc = "          \"type\": \"null\""]
6224#[doc = "        }"]
6225#[doc = "      ]"]
6226#[doc = "    },"]
6227#[doc = "    \"location\": {"]
6228#[doc = "      \"description\": \"Specifies where to write the obtained state parts.\","]
6229#[doc = "      \"allOf\": ["]
6230#[doc = "        {"]
6231#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
6232#[doc = "        }"]
6233#[doc = "      ]"]
6234#[doc = "    },"]
6235#[doc = "    \"restart_dump_for_shards\": {"]
6236#[doc = "      \"description\": \"Use in case a node that dumps state to the external storage\\ngets in trouble.\","]
6237#[doc = "      \"type\": ["]
6238#[doc = "        \"array\","]
6239#[doc = "        \"null\""]
6240#[doc = "      ],"]
6241#[doc = "      \"items\": {"]
6242#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
6243#[doc = "      }"]
6244#[doc = "    }"]
6245#[doc = "  }"]
6246#[doc = "}"]
6247#[doc = r" ```"]
6248#[doc = r" </details>"]
6249#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6250pub struct DumpConfig {
6251    #[doc = "Location of a json file with credentials allowing access to the bucket."]
6252    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6253    pub credentials_file: ::std::option::Option<::std::string::String>,
6254    #[doc = "How often to check if a new epoch has started.\nFeel free to set to `None`, defaults are sensible."]
6255    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6256    pub iteration_delay: ::std::option::Option<DurationAsStdSchemaProvider>,
6257    #[doc = "Specifies where to write the obtained state parts."]
6258    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6259    pub location: ::std::option::Option<ExternalStorageLocation>,
6260    #[doc = "Use in case a node that dumps state to the external storage\ngets in trouble."]
6261    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6262    pub restart_dump_for_shards: ::std::option::Option<::std::vec::Vec<ShardId>>,
6263}
6264impl ::std::convert::From<&DumpConfig> for DumpConfig {
6265    fn from(value: &DumpConfig) -> Self {
6266        value.clone()
6267    }
6268}
6269impl ::std::default::Default for DumpConfig {
6270    fn default() -> Self {
6271        Self {
6272            credentials_file: Default::default(),
6273            iteration_delay: Default::default(),
6274            location: Default::default(),
6275            restart_dump_for_shards: Default::default(),
6276        }
6277    }
6278}
6279#[doc = "`DurationAsStdSchemaProvider`"]
6280#[doc = r""]
6281#[doc = r" <details><summary>JSON schema</summary>"]
6282#[doc = r""]
6283#[doc = r" ```json"]
6284#[doc = "{"]
6285#[doc = "  \"type\": \"object\","]
6286#[doc = "  \"required\": ["]
6287#[doc = "    \"nanos\","]
6288#[doc = "    \"secs\""]
6289#[doc = "  ],"]
6290#[doc = "  \"properties\": {"]
6291#[doc = "    \"nanos\": {"]
6292#[doc = "      \"type\": \"integer\","]
6293#[doc = "      \"format\": \"int32\""]
6294#[doc = "    },"]
6295#[doc = "    \"secs\": {"]
6296#[doc = "      \"type\": \"integer\","]
6297#[doc = "      \"format\": \"int64\""]
6298#[doc = "    }"]
6299#[doc = "  }"]
6300#[doc = "}"]
6301#[doc = r" ```"]
6302#[doc = r" </details>"]
6303#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6304pub struct DurationAsStdSchemaProvider {
6305    pub nanos: i32,
6306    pub secs: i64,
6307}
6308impl ::std::convert::From<&DurationAsStdSchemaProvider> for DurationAsStdSchemaProvider {
6309    fn from(value: &DurationAsStdSchemaProvider) -> Self {
6310        value.clone()
6311    }
6312}
6313#[doc = "Configuration for dynamic resharding feature"]
6314#[doc = r""]
6315#[doc = r" <details><summary>JSON schema</summary>"]
6316#[doc = r""]
6317#[doc = r" ```json"]
6318#[doc = "{"]
6319#[doc = "  \"description\": \"Configuration for dynamic resharding feature\","]
6320#[doc = "  \"type\": \"object\","]
6321#[doc = "  \"required\": ["]
6322#[doc = "    \"max_number_of_shards\","]
6323#[doc = "    \"memory_usage_threshold\","]
6324#[doc = "    \"min_child_memory_usage\","]
6325#[doc = "    \"min_epochs_between_resharding\""]
6326#[doc = "  ],"]
6327#[doc = "  \"properties\": {"]
6328#[doc = "    \"max_number_of_shards\": {"]
6329#[doc = "      \"description\": \"Maximum number of shards in the network.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
6330#[doc = "      \"type\": \"integer\","]
6331#[doc = "      \"format\": \"uint64\","]
6332#[doc = "      \"minimum\": 0.0"]
6333#[doc = "    },"]
6334#[doc = "    \"memory_usage_threshold\": {"]
6335#[doc = "      \"description\": \"Memory threshold over which a shard is marked for a split.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
6336#[doc = "      \"type\": \"integer\","]
6337#[doc = "      \"format\": \"uint64\","]
6338#[doc = "      \"minimum\": 0.0"]
6339#[doc = "    },"]
6340#[doc = "    \"min_child_memory_usage\": {"]
6341#[doc = "      \"description\": \"Minimum memory usage of a child shard.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
6342#[doc = "      \"type\": \"integer\","]
6343#[doc = "      \"format\": \"uint64\","]
6344#[doc = "      \"minimum\": 0.0"]
6345#[doc = "    },"]
6346#[doc = "    \"min_epochs_between_resharding\": {"]
6347#[doc = "      \"description\": \"Minimum number of epochs until next resharding can be scheduled.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
6348#[doc = "      \"type\": \"integer\","]
6349#[doc = "      \"format\": \"uint64\","]
6350#[doc = "      \"minimum\": 0.0"]
6351#[doc = "    }"]
6352#[doc = "  }"]
6353#[doc = "}"]
6354#[doc = r" ```"]
6355#[doc = r" </details>"]
6356#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6357pub struct DynamicReshardingConfigView {
6358    #[doc = "Maximum number of shards in the network.\n\nSee [`CongestionControlConfig`] for more details."]
6359    pub max_number_of_shards: u64,
6360    #[doc = "Memory threshold over which a shard is marked for a split.\n\nSee [`CongestionControlConfig`] for more details."]
6361    pub memory_usage_threshold: u64,
6362    #[doc = "Minimum memory usage of a child shard.\n\nSee [`CongestionControlConfig`] for more details."]
6363    pub min_child_memory_usage: u64,
6364    #[doc = "Minimum number of epochs until next resharding can be scheduled.\n\nSee [`CongestionControlConfig`] for more details."]
6365    pub min_epochs_between_resharding: u64,
6366}
6367impl ::std::convert::From<&DynamicReshardingConfigView> for DynamicReshardingConfigView {
6368    fn from(value: &DynamicReshardingConfigView) -> Self {
6369        value.clone()
6370    }
6371}
6372#[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"]
6373#[doc = r""]
6374#[doc = r" <details><summary>JSON schema</summary>"]
6375#[doc = r""]
6376#[doc = r" ```json"]
6377#[doc = "{"]
6378#[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\","]
6379#[doc = "  \"allOf\": ["]
6380#[doc = "    {"]
6381#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
6382#[doc = "    }"]
6383#[doc = "  ]"]
6384#[doc = "}"]
6385#[doc = r" ```"]
6386#[doc = r" </details>"]
6387#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6388#[serde(transparent)]
6389pub struct EpochId(pub CryptoHash);
6390impl ::std::ops::Deref for EpochId {
6391    type Target = CryptoHash;
6392    fn deref(&self) -> &CryptoHash {
6393        &self.0
6394    }
6395}
6396impl ::std::convert::From<EpochId> for CryptoHash {
6397    fn from(value: EpochId) -> Self {
6398        value.0
6399    }
6400}
6401impl ::std::convert::From<&EpochId> for EpochId {
6402    fn from(value: &EpochId) -> Self {
6403        value.clone()
6404    }
6405}
6406impl ::std::convert::From<CryptoHash> for EpochId {
6407    fn from(value: CryptoHash) -> Self {
6408        Self(value)
6409    }
6410}
6411impl ::std::str::FromStr for EpochId {
6412    type Err = <CryptoHash as ::std::str::FromStr>::Err;
6413    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
6414        Ok(Self(value.parse()?))
6415    }
6416}
6417impl ::std::convert::TryFrom<&str> for EpochId {
6418    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6419    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
6420        value.parse()
6421    }
6422}
6423impl ::std::convert::TryFrom<&String> for EpochId {
6424    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6425    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
6426        value.parse()
6427    }
6428}
6429impl ::std::convert::TryFrom<String> for EpochId {
6430    type Error = <CryptoHash as ::std::str::FromStr>::Err;
6431    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
6432        value.parse()
6433    }
6434}
6435impl ::std::fmt::Display for EpochId {
6436    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6437        self.0.fmt(f)
6438    }
6439}
6440#[doc = "`EpochSyncConfig`"]
6441#[doc = r""]
6442#[doc = r" <details><summary>JSON schema</summary>"]
6443#[doc = r""]
6444#[doc = r" ```json"]
6445#[doc = "{"]
6446#[doc = "  \"type\": \"object\","]
6447#[doc = "  \"properties\": {"]
6448#[doc = "    \"disable_epoch_sync_for_bootstrapping\": {"]
6449#[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.\","]
6450#[doc = "      \"default\": false,"]
6451#[doc = "      \"type\": \"boolean\""]
6452#[doc = "    },"]
6453#[doc = "    \"epoch_sync_horizon\": {"]
6454#[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.\","]
6455#[doc = "      \"type\": \"integer\","]
6456#[doc = "      \"format\": \"uint64\","]
6457#[doc = "      \"minimum\": 0.0"]
6458#[doc = "    },"]
6459#[doc = "    \"ignore_epoch_sync_network_requests\": {"]
6460#[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.\","]
6461#[doc = "      \"default\": false,"]
6462#[doc = "      \"type\": \"boolean\""]
6463#[doc = "    },"]
6464#[doc = "    \"timeout_for_epoch_sync\": {"]
6465#[doc = "      \"description\": \"Timeout for epoch sync requests. The node will continue retrying indefinitely even\\nif this timeout is exceeded.\","]
6466#[doc = "      \"allOf\": ["]
6467#[doc = "        {"]
6468#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
6469#[doc = "        }"]
6470#[doc = "      ]"]
6471#[doc = "    }"]
6472#[doc = "  }"]
6473#[doc = "}"]
6474#[doc = r" ```"]
6475#[doc = r" </details>"]
6476#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6477pub struct EpochSyncConfig {
6478    #[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."]
6479    #[serde(default)]
6480    pub disable_epoch_sync_for_bootstrapping: bool,
6481    #[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."]
6482    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6483    pub epoch_sync_horizon: ::std::option::Option<u64>,
6484    #[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."]
6485    #[serde(default)]
6486    pub ignore_epoch_sync_network_requests: bool,
6487    #[doc = "Timeout for epoch sync requests. The node will continue retrying indefinitely even\nif this timeout is exceeded."]
6488    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6489    pub timeout_for_epoch_sync: ::std::option::Option<DurationAsStdSchemaProvider>,
6490}
6491impl ::std::convert::From<&EpochSyncConfig> for EpochSyncConfig {
6492    fn from(value: &EpochSyncConfig) -> Self {
6493        value.clone()
6494    }
6495}
6496impl ::std::default::Default for EpochSyncConfig {
6497    fn default() -> Self {
6498        Self {
6499            disable_epoch_sync_for_bootstrapping: Default::default(),
6500            epoch_sync_horizon: Default::default(),
6501            ignore_epoch_sync_network_requests: Default::default(),
6502            timeout_for_epoch_sync: Default::default(),
6503        }
6504    }
6505}
6506#[doc = "`ErrorWrapperForGenesisConfigError`"]
6507#[doc = r""]
6508#[doc = r" <details><summary>JSON schema</summary>"]
6509#[doc = r""]
6510#[doc = r" ```json"]
6511#[doc = "{"]
6512#[doc = "  \"oneOf\": ["]
6513#[doc = "    {"]
6514#[doc = "      \"type\": \"object\","]
6515#[doc = "      \"required\": ["]
6516#[doc = "        \"cause\","]
6517#[doc = "        \"name\""]
6518#[doc = "      ],"]
6519#[doc = "      \"properties\": {"]
6520#[doc = "        \"cause\": {"]
6521#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6522#[doc = "        },"]
6523#[doc = "        \"name\": {"]
6524#[doc = "          \"type\": \"string\","]
6525#[doc = "          \"enum\": ["]
6526#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6527#[doc = "          ]"]
6528#[doc = "        }"]
6529#[doc = "      }"]
6530#[doc = "    },"]
6531#[doc = "    {"]
6532#[doc = "      \"type\": \"object\","]
6533#[doc = "      \"required\": ["]
6534#[doc = "        \"cause\","]
6535#[doc = "        \"name\""]
6536#[doc = "      ],"]
6537#[doc = "      \"properties\": {"]
6538#[doc = "        \"cause\": {"]
6539#[doc = "          \"$ref\": \"#/components/schemas/GenesisConfigError\""]
6540#[doc = "        },"]
6541#[doc = "        \"name\": {"]
6542#[doc = "          \"type\": \"string\","]
6543#[doc = "          \"enum\": ["]
6544#[doc = "            \"HANDLER_ERROR\""]
6545#[doc = "          ]"]
6546#[doc = "        }"]
6547#[doc = "      }"]
6548#[doc = "    },"]
6549#[doc = "    {"]
6550#[doc = "      \"type\": \"object\","]
6551#[doc = "      \"required\": ["]
6552#[doc = "        \"cause\","]
6553#[doc = "        \"name\""]
6554#[doc = "      ],"]
6555#[doc = "      \"properties\": {"]
6556#[doc = "        \"cause\": {"]
6557#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6558#[doc = "        },"]
6559#[doc = "        \"name\": {"]
6560#[doc = "          \"type\": \"string\","]
6561#[doc = "          \"enum\": ["]
6562#[doc = "            \"INTERNAL_ERROR\""]
6563#[doc = "          ]"]
6564#[doc = "        }"]
6565#[doc = "      }"]
6566#[doc = "    }"]
6567#[doc = "  ]"]
6568#[doc = "}"]
6569#[doc = r" ```"]
6570#[doc = r" </details>"]
6571#[derive(
6572    :: serde :: Deserialize,
6573    :: serde :: Serialize,
6574    Clone,
6575    Debug,
6576    thiserror::Error,
6577    strum_macros::Display,
6578)]
6579#[serde(tag = "name", content = "cause")]
6580pub enum ErrorWrapperForGenesisConfigError {
6581    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6582    RequestValidationError(RpcRequestValidationErrorKind),
6583    #[serde(rename = "HANDLER_ERROR")]
6584    HandlerError(GenesisConfigError),
6585    #[serde(rename = "INTERNAL_ERROR")]
6586    InternalError(InternalError),
6587}
6588impl ::std::convert::From<&Self> for ErrorWrapperForGenesisConfigError {
6589    fn from(value: &ErrorWrapperForGenesisConfigError) -> Self {
6590        value.clone()
6591    }
6592}
6593impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForGenesisConfigError {
6594    fn from(value: RpcRequestValidationErrorKind) -> Self {
6595        Self::RequestValidationError(value)
6596    }
6597}
6598impl ::std::convert::From<GenesisConfigError> for ErrorWrapperForGenesisConfigError {
6599    fn from(value: GenesisConfigError) -> Self {
6600        Self::HandlerError(value)
6601    }
6602}
6603impl ::std::convert::From<InternalError> for ErrorWrapperForGenesisConfigError {
6604    fn from(value: InternalError) -> Self {
6605        Self::InternalError(value)
6606    }
6607}
6608#[doc = "`ErrorWrapperForRpcBlockError`"]
6609#[doc = r""]
6610#[doc = r" <details><summary>JSON schema</summary>"]
6611#[doc = r""]
6612#[doc = r" ```json"]
6613#[doc = "{"]
6614#[doc = "  \"oneOf\": ["]
6615#[doc = "    {"]
6616#[doc = "      \"type\": \"object\","]
6617#[doc = "      \"required\": ["]
6618#[doc = "        \"cause\","]
6619#[doc = "        \"name\""]
6620#[doc = "      ],"]
6621#[doc = "      \"properties\": {"]
6622#[doc = "        \"cause\": {"]
6623#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6624#[doc = "        },"]
6625#[doc = "        \"name\": {"]
6626#[doc = "          \"type\": \"string\","]
6627#[doc = "          \"enum\": ["]
6628#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6629#[doc = "          ]"]
6630#[doc = "        }"]
6631#[doc = "      }"]
6632#[doc = "    },"]
6633#[doc = "    {"]
6634#[doc = "      \"type\": \"object\","]
6635#[doc = "      \"required\": ["]
6636#[doc = "        \"cause\","]
6637#[doc = "        \"name\""]
6638#[doc = "      ],"]
6639#[doc = "      \"properties\": {"]
6640#[doc = "        \"cause\": {"]
6641#[doc = "          \"$ref\": \"#/components/schemas/RpcBlockError\""]
6642#[doc = "        },"]
6643#[doc = "        \"name\": {"]
6644#[doc = "          \"type\": \"string\","]
6645#[doc = "          \"enum\": ["]
6646#[doc = "            \"HANDLER_ERROR\""]
6647#[doc = "          ]"]
6648#[doc = "        }"]
6649#[doc = "      }"]
6650#[doc = "    },"]
6651#[doc = "    {"]
6652#[doc = "      \"type\": \"object\","]
6653#[doc = "      \"required\": ["]
6654#[doc = "        \"cause\","]
6655#[doc = "        \"name\""]
6656#[doc = "      ],"]
6657#[doc = "      \"properties\": {"]
6658#[doc = "        \"cause\": {"]
6659#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6660#[doc = "        },"]
6661#[doc = "        \"name\": {"]
6662#[doc = "          \"type\": \"string\","]
6663#[doc = "          \"enum\": ["]
6664#[doc = "            \"INTERNAL_ERROR\""]
6665#[doc = "          ]"]
6666#[doc = "        }"]
6667#[doc = "      }"]
6668#[doc = "    }"]
6669#[doc = "  ]"]
6670#[doc = "}"]
6671#[doc = r" ```"]
6672#[doc = r" </details>"]
6673#[derive(
6674    :: serde :: Deserialize,
6675    :: serde :: Serialize,
6676    Clone,
6677    Debug,
6678    thiserror::Error,
6679    strum_macros::Display,
6680)]
6681#[serde(tag = "name", content = "cause")]
6682pub enum ErrorWrapperForRpcBlockError {
6683    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6684    RequestValidationError(RpcRequestValidationErrorKind),
6685    #[serde(rename = "HANDLER_ERROR")]
6686    HandlerError(RpcBlockError),
6687    #[serde(rename = "INTERNAL_ERROR")]
6688    InternalError(InternalError),
6689}
6690impl ::std::convert::From<&Self> for ErrorWrapperForRpcBlockError {
6691    fn from(value: &ErrorWrapperForRpcBlockError) -> Self {
6692        value.clone()
6693    }
6694}
6695impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcBlockError {
6696    fn from(value: RpcRequestValidationErrorKind) -> Self {
6697        Self::RequestValidationError(value)
6698    }
6699}
6700impl ::std::convert::From<RpcBlockError> for ErrorWrapperForRpcBlockError {
6701    fn from(value: RpcBlockError) -> Self {
6702        Self::HandlerError(value)
6703    }
6704}
6705impl ::std::convert::From<InternalError> for ErrorWrapperForRpcBlockError {
6706    fn from(value: InternalError) -> Self {
6707        Self::InternalError(value)
6708    }
6709}
6710#[doc = "`ErrorWrapperForRpcChunkError`"]
6711#[doc = r""]
6712#[doc = r" <details><summary>JSON schema</summary>"]
6713#[doc = r""]
6714#[doc = r" ```json"]
6715#[doc = "{"]
6716#[doc = "  \"oneOf\": ["]
6717#[doc = "    {"]
6718#[doc = "      \"type\": \"object\","]
6719#[doc = "      \"required\": ["]
6720#[doc = "        \"cause\","]
6721#[doc = "        \"name\""]
6722#[doc = "      ],"]
6723#[doc = "      \"properties\": {"]
6724#[doc = "        \"cause\": {"]
6725#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6726#[doc = "        },"]
6727#[doc = "        \"name\": {"]
6728#[doc = "          \"type\": \"string\","]
6729#[doc = "          \"enum\": ["]
6730#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6731#[doc = "          ]"]
6732#[doc = "        }"]
6733#[doc = "      }"]
6734#[doc = "    },"]
6735#[doc = "    {"]
6736#[doc = "      \"type\": \"object\","]
6737#[doc = "      \"required\": ["]
6738#[doc = "        \"cause\","]
6739#[doc = "        \"name\""]
6740#[doc = "      ],"]
6741#[doc = "      \"properties\": {"]
6742#[doc = "        \"cause\": {"]
6743#[doc = "          \"$ref\": \"#/components/schemas/RpcChunkError\""]
6744#[doc = "        },"]
6745#[doc = "        \"name\": {"]
6746#[doc = "          \"type\": \"string\","]
6747#[doc = "          \"enum\": ["]
6748#[doc = "            \"HANDLER_ERROR\""]
6749#[doc = "          ]"]
6750#[doc = "        }"]
6751#[doc = "      }"]
6752#[doc = "    },"]
6753#[doc = "    {"]
6754#[doc = "      \"type\": \"object\","]
6755#[doc = "      \"required\": ["]
6756#[doc = "        \"cause\","]
6757#[doc = "        \"name\""]
6758#[doc = "      ],"]
6759#[doc = "      \"properties\": {"]
6760#[doc = "        \"cause\": {"]
6761#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6762#[doc = "        },"]
6763#[doc = "        \"name\": {"]
6764#[doc = "          \"type\": \"string\","]
6765#[doc = "          \"enum\": ["]
6766#[doc = "            \"INTERNAL_ERROR\""]
6767#[doc = "          ]"]
6768#[doc = "        }"]
6769#[doc = "      }"]
6770#[doc = "    }"]
6771#[doc = "  ]"]
6772#[doc = "}"]
6773#[doc = r" ```"]
6774#[doc = r" </details>"]
6775#[derive(
6776    :: serde :: Deserialize,
6777    :: serde :: Serialize,
6778    Clone,
6779    Debug,
6780    thiserror::Error,
6781    strum_macros::Display,
6782)]
6783#[serde(tag = "name", content = "cause")]
6784pub enum ErrorWrapperForRpcChunkError {
6785    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6786    RequestValidationError(RpcRequestValidationErrorKind),
6787    #[serde(rename = "HANDLER_ERROR")]
6788    HandlerError(RpcChunkError),
6789    #[serde(rename = "INTERNAL_ERROR")]
6790    InternalError(InternalError),
6791}
6792impl ::std::convert::From<&Self> for ErrorWrapperForRpcChunkError {
6793    fn from(value: &ErrorWrapperForRpcChunkError) -> Self {
6794        value.clone()
6795    }
6796}
6797impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcChunkError {
6798    fn from(value: RpcRequestValidationErrorKind) -> Self {
6799        Self::RequestValidationError(value)
6800    }
6801}
6802impl ::std::convert::From<RpcChunkError> for ErrorWrapperForRpcChunkError {
6803    fn from(value: RpcChunkError) -> Self {
6804        Self::HandlerError(value)
6805    }
6806}
6807impl ::std::convert::From<InternalError> for ErrorWrapperForRpcChunkError {
6808    fn from(value: InternalError) -> Self {
6809        Self::InternalError(value)
6810    }
6811}
6812#[doc = "`ErrorWrapperForRpcClientConfigError`"]
6813#[doc = r""]
6814#[doc = r" <details><summary>JSON schema</summary>"]
6815#[doc = r""]
6816#[doc = r" ```json"]
6817#[doc = "{"]
6818#[doc = "  \"oneOf\": ["]
6819#[doc = "    {"]
6820#[doc = "      \"type\": \"object\","]
6821#[doc = "      \"required\": ["]
6822#[doc = "        \"cause\","]
6823#[doc = "        \"name\""]
6824#[doc = "      ],"]
6825#[doc = "      \"properties\": {"]
6826#[doc = "        \"cause\": {"]
6827#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6828#[doc = "        },"]
6829#[doc = "        \"name\": {"]
6830#[doc = "          \"type\": \"string\","]
6831#[doc = "          \"enum\": ["]
6832#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6833#[doc = "          ]"]
6834#[doc = "        }"]
6835#[doc = "      }"]
6836#[doc = "    },"]
6837#[doc = "    {"]
6838#[doc = "      \"type\": \"object\","]
6839#[doc = "      \"required\": ["]
6840#[doc = "        \"cause\","]
6841#[doc = "        \"name\""]
6842#[doc = "      ],"]
6843#[doc = "      \"properties\": {"]
6844#[doc = "        \"cause\": {"]
6845#[doc = "          \"$ref\": \"#/components/schemas/RpcClientConfigError\""]
6846#[doc = "        },"]
6847#[doc = "        \"name\": {"]
6848#[doc = "          \"type\": \"string\","]
6849#[doc = "          \"enum\": ["]
6850#[doc = "            \"HANDLER_ERROR\""]
6851#[doc = "          ]"]
6852#[doc = "        }"]
6853#[doc = "      }"]
6854#[doc = "    },"]
6855#[doc = "    {"]
6856#[doc = "      \"type\": \"object\","]
6857#[doc = "      \"required\": ["]
6858#[doc = "        \"cause\","]
6859#[doc = "        \"name\""]
6860#[doc = "      ],"]
6861#[doc = "      \"properties\": {"]
6862#[doc = "        \"cause\": {"]
6863#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6864#[doc = "        },"]
6865#[doc = "        \"name\": {"]
6866#[doc = "          \"type\": \"string\","]
6867#[doc = "          \"enum\": ["]
6868#[doc = "            \"INTERNAL_ERROR\""]
6869#[doc = "          ]"]
6870#[doc = "        }"]
6871#[doc = "      }"]
6872#[doc = "    }"]
6873#[doc = "  ]"]
6874#[doc = "}"]
6875#[doc = r" ```"]
6876#[doc = r" </details>"]
6877#[derive(
6878    :: serde :: Deserialize,
6879    :: serde :: Serialize,
6880    Clone,
6881    Debug,
6882    thiserror::Error,
6883    strum_macros::Display,
6884)]
6885#[serde(tag = "name", content = "cause")]
6886pub enum ErrorWrapperForRpcClientConfigError {
6887    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6888    RequestValidationError(RpcRequestValidationErrorKind),
6889    #[serde(rename = "HANDLER_ERROR")]
6890    HandlerError(RpcClientConfigError),
6891    #[serde(rename = "INTERNAL_ERROR")]
6892    InternalError(InternalError),
6893}
6894impl ::std::convert::From<&Self> for ErrorWrapperForRpcClientConfigError {
6895    fn from(value: &ErrorWrapperForRpcClientConfigError) -> Self {
6896        value.clone()
6897    }
6898}
6899impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcClientConfigError {
6900    fn from(value: RpcRequestValidationErrorKind) -> Self {
6901        Self::RequestValidationError(value)
6902    }
6903}
6904impl ::std::convert::From<RpcClientConfigError> for ErrorWrapperForRpcClientConfigError {
6905    fn from(value: RpcClientConfigError) -> Self {
6906        Self::HandlerError(value)
6907    }
6908}
6909impl ::std::convert::From<InternalError> for ErrorWrapperForRpcClientConfigError {
6910    fn from(value: InternalError) -> Self {
6911        Self::InternalError(value)
6912    }
6913}
6914#[doc = "`ErrorWrapperForRpcGasPriceError`"]
6915#[doc = r""]
6916#[doc = r" <details><summary>JSON schema</summary>"]
6917#[doc = r""]
6918#[doc = r" ```json"]
6919#[doc = "{"]
6920#[doc = "  \"oneOf\": ["]
6921#[doc = "    {"]
6922#[doc = "      \"type\": \"object\","]
6923#[doc = "      \"required\": ["]
6924#[doc = "        \"cause\","]
6925#[doc = "        \"name\""]
6926#[doc = "      ],"]
6927#[doc = "      \"properties\": {"]
6928#[doc = "        \"cause\": {"]
6929#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6930#[doc = "        },"]
6931#[doc = "        \"name\": {"]
6932#[doc = "          \"type\": \"string\","]
6933#[doc = "          \"enum\": ["]
6934#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
6935#[doc = "          ]"]
6936#[doc = "        }"]
6937#[doc = "      }"]
6938#[doc = "    },"]
6939#[doc = "    {"]
6940#[doc = "      \"type\": \"object\","]
6941#[doc = "      \"required\": ["]
6942#[doc = "        \"cause\","]
6943#[doc = "        \"name\""]
6944#[doc = "      ],"]
6945#[doc = "      \"properties\": {"]
6946#[doc = "        \"cause\": {"]
6947#[doc = "          \"$ref\": \"#/components/schemas/RpcGasPriceError\""]
6948#[doc = "        },"]
6949#[doc = "        \"name\": {"]
6950#[doc = "          \"type\": \"string\","]
6951#[doc = "          \"enum\": ["]
6952#[doc = "            \"HANDLER_ERROR\""]
6953#[doc = "          ]"]
6954#[doc = "        }"]
6955#[doc = "      }"]
6956#[doc = "    },"]
6957#[doc = "    {"]
6958#[doc = "      \"type\": \"object\","]
6959#[doc = "      \"required\": ["]
6960#[doc = "        \"cause\","]
6961#[doc = "        \"name\""]
6962#[doc = "      ],"]
6963#[doc = "      \"properties\": {"]
6964#[doc = "        \"cause\": {"]
6965#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
6966#[doc = "        },"]
6967#[doc = "        \"name\": {"]
6968#[doc = "          \"type\": \"string\","]
6969#[doc = "          \"enum\": ["]
6970#[doc = "            \"INTERNAL_ERROR\""]
6971#[doc = "          ]"]
6972#[doc = "        }"]
6973#[doc = "      }"]
6974#[doc = "    }"]
6975#[doc = "  ]"]
6976#[doc = "}"]
6977#[doc = r" ```"]
6978#[doc = r" </details>"]
6979#[derive(
6980    :: serde :: Deserialize,
6981    :: serde :: Serialize,
6982    Clone,
6983    Debug,
6984    thiserror::Error,
6985    strum_macros::Display,
6986)]
6987#[serde(tag = "name", content = "cause")]
6988pub enum ErrorWrapperForRpcGasPriceError {
6989    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6990    RequestValidationError(RpcRequestValidationErrorKind),
6991    #[serde(rename = "HANDLER_ERROR")]
6992    HandlerError(RpcGasPriceError),
6993    #[serde(rename = "INTERNAL_ERROR")]
6994    InternalError(InternalError),
6995}
6996impl ::std::convert::From<&Self> for ErrorWrapperForRpcGasPriceError {
6997    fn from(value: &ErrorWrapperForRpcGasPriceError) -> Self {
6998        value.clone()
6999    }
7000}
7001impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcGasPriceError {
7002    fn from(value: RpcRequestValidationErrorKind) -> Self {
7003        Self::RequestValidationError(value)
7004    }
7005}
7006impl ::std::convert::From<RpcGasPriceError> for ErrorWrapperForRpcGasPriceError {
7007    fn from(value: RpcGasPriceError) -> Self {
7008        Self::HandlerError(value)
7009    }
7010}
7011impl ::std::convert::From<InternalError> for ErrorWrapperForRpcGasPriceError {
7012    fn from(value: InternalError) -> Self {
7013        Self::InternalError(value)
7014    }
7015}
7016#[doc = "`ErrorWrapperForRpcLightClientNextBlockError`"]
7017#[doc = r""]
7018#[doc = r" <details><summary>JSON schema</summary>"]
7019#[doc = r""]
7020#[doc = r" ```json"]
7021#[doc = "{"]
7022#[doc = "  \"oneOf\": ["]
7023#[doc = "    {"]
7024#[doc = "      \"type\": \"object\","]
7025#[doc = "      \"required\": ["]
7026#[doc = "        \"cause\","]
7027#[doc = "        \"name\""]
7028#[doc = "      ],"]
7029#[doc = "      \"properties\": {"]
7030#[doc = "        \"cause\": {"]
7031#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7032#[doc = "        },"]
7033#[doc = "        \"name\": {"]
7034#[doc = "          \"type\": \"string\","]
7035#[doc = "          \"enum\": ["]
7036#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7037#[doc = "          ]"]
7038#[doc = "        }"]
7039#[doc = "      }"]
7040#[doc = "    },"]
7041#[doc = "    {"]
7042#[doc = "      \"type\": \"object\","]
7043#[doc = "      \"required\": ["]
7044#[doc = "        \"cause\","]
7045#[doc = "        \"name\""]
7046#[doc = "      ],"]
7047#[doc = "      \"properties\": {"]
7048#[doc = "        \"cause\": {"]
7049#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientNextBlockError\""]
7050#[doc = "        },"]
7051#[doc = "        \"name\": {"]
7052#[doc = "          \"type\": \"string\","]
7053#[doc = "          \"enum\": ["]
7054#[doc = "            \"HANDLER_ERROR\""]
7055#[doc = "          ]"]
7056#[doc = "        }"]
7057#[doc = "      }"]
7058#[doc = "    },"]
7059#[doc = "    {"]
7060#[doc = "      \"type\": \"object\","]
7061#[doc = "      \"required\": ["]
7062#[doc = "        \"cause\","]
7063#[doc = "        \"name\""]
7064#[doc = "      ],"]
7065#[doc = "      \"properties\": {"]
7066#[doc = "        \"cause\": {"]
7067#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7068#[doc = "        },"]
7069#[doc = "        \"name\": {"]
7070#[doc = "          \"type\": \"string\","]
7071#[doc = "          \"enum\": ["]
7072#[doc = "            \"INTERNAL_ERROR\""]
7073#[doc = "          ]"]
7074#[doc = "        }"]
7075#[doc = "      }"]
7076#[doc = "    }"]
7077#[doc = "  ]"]
7078#[doc = "}"]
7079#[doc = r" ```"]
7080#[doc = r" </details>"]
7081#[derive(
7082    :: serde :: Deserialize,
7083    :: serde :: Serialize,
7084    Clone,
7085    Debug,
7086    thiserror::Error,
7087    strum_macros::Display,
7088)]
7089#[serde(tag = "name", content = "cause")]
7090pub enum ErrorWrapperForRpcLightClientNextBlockError {
7091    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7092    RequestValidationError(RpcRequestValidationErrorKind),
7093    #[serde(rename = "HANDLER_ERROR")]
7094    HandlerError(RpcLightClientNextBlockError),
7095    #[serde(rename = "INTERNAL_ERROR")]
7096    InternalError(InternalError),
7097}
7098impl ::std::convert::From<&Self> for ErrorWrapperForRpcLightClientNextBlockError {
7099    fn from(value: &ErrorWrapperForRpcLightClientNextBlockError) -> Self {
7100        value.clone()
7101    }
7102}
7103impl ::std::convert::From<RpcRequestValidationErrorKind>
7104    for ErrorWrapperForRpcLightClientNextBlockError
7105{
7106    fn from(value: RpcRequestValidationErrorKind) -> Self {
7107        Self::RequestValidationError(value)
7108    }
7109}
7110impl ::std::convert::From<RpcLightClientNextBlockError>
7111    for ErrorWrapperForRpcLightClientNextBlockError
7112{
7113    fn from(value: RpcLightClientNextBlockError) -> Self {
7114        Self::HandlerError(value)
7115    }
7116}
7117impl ::std::convert::From<InternalError> for ErrorWrapperForRpcLightClientNextBlockError {
7118    fn from(value: InternalError) -> Self {
7119        Self::InternalError(value)
7120    }
7121}
7122#[doc = "`ErrorWrapperForRpcLightClientProofError`"]
7123#[doc = r""]
7124#[doc = r" <details><summary>JSON schema</summary>"]
7125#[doc = r""]
7126#[doc = r" ```json"]
7127#[doc = "{"]
7128#[doc = "  \"oneOf\": ["]
7129#[doc = "    {"]
7130#[doc = "      \"type\": \"object\","]
7131#[doc = "      \"required\": ["]
7132#[doc = "        \"cause\","]
7133#[doc = "        \"name\""]
7134#[doc = "      ],"]
7135#[doc = "      \"properties\": {"]
7136#[doc = "        \"cause\": {"]
7137#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7138#[doc = "        },"]
7139#[doc = "        \"name\": {"]
7140#[doc = "          \"type\": \"string\","]
7141#[doc = "          \"enum\": ["]
7142#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7143#[doc = "          ]"]
7144#[doc = "        }"]
7145#[doc = "      }"]
7146#[doc = "    },"]
7147#[doc = "    {"]
7148#[doc = "      \"type\": \"object\","]
7149#[doc = "      \"required\": ["]
7150#[doc = "        \"cause\","]
7151#[doc = "        \"name\""]
7152#[doc = "      ],"]
7153#[doc = "      \"properties\": {"]
7154#[doc = "        \"cause\": {"]
7155#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientProofError\""]
7156#[doc = "        },"]
7157#[doc = "        \"name\": {"]
7158#[doc = "          \"type\": \"string\","]
7159#[doc = "          \"enum\": ["]
7160#[doc = "            \"HANDLER_ERROR\""]
7161#[doc = "          ]"]
7162#[doc = "        }"]
7163#[doc = "      }"]
7164#[doc = "    },"]
7165#[doc = "    {"]
7166#[doc = "      \"type\": \"object\","]
7167#[doc = "      \"required\": ["]
7168#[doc = "        \"cause\","]
7169#[doc = "        \"name\""]
7170#[doc = "      ],"]
7171#[doc = "      \"properties\": {"]
7172#[doc = "        \"cause\": {"]
7173#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7174#[doc = "        },"]
7175#[doc = "        \"name\": {"]
7176#[doc = "          \"type\": \"string\","]
7177#[doc = "          \"enum\": ["]
7178#[doc = "            \"INTERNAL_ERROR\""]
7179#[doc = "          ]"]
7180#[doc = "        }"]
7181#[doc = "      }"]
7182#[doc = "    }"]
7183#[doc = "  ]"]
7184#[doc = "}"]
7185#[doc = r" ```"]
7186#[doc = r" </details>"]
7187#[derive(
7188    :: serde :: Deserialize,
7189    :: serde :: Serialize,
7190    Clone,
7191    Debug,
7192    thiserror::Error,
7193    strum_macros::Display,
7194)]
7195#[serde(tag = "name", content = "cause")]
7196pub enum ErrorWrapperForRpcLightClientProofError {
7197    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7198    RequestValidationError(RpcRequestValidationErrorKind),
7199    #[serde(rename = "HANDLER_ERROR")]
7200    HandlerError(RpcLightClientProofError),
7201    #[serde(rename = "INTERNAL_ERROR")]
7202    InternalError(InternalError),
7203}
7204impl ::std::convert::From<&Self> for ErrorWrapperForRpcLightClientProofError {
7205    fn from(value: &ErrorWrapperForRpcLightClientProofError) -> Self {
7206        value.clone()
7207    }
7208}
7209impl ::std::convert::From<RpcRequestValidationErrorKind>
7210    for ErrorWrapperForRpcLightClientProofError
7211{
7212    fn from(value: RpcRequestValidationErrorKind) -> Self {
7213        Self::RequestValidationError(value)
7214    }
7215}
7216impl ::std::convert::From<RpcLightClientProofError> for ErrorWrapperForRpcLightClientProofError {
7217    fn from(value: RpcLightClientProofError) -> Self {
7218        Self::HandlerError(value)
7219    }
7220}
7221impl ::std::convert::From<InternalError> for ErrorWrapperForRpcLightClientProofError {
7222    fn from(value: InternalError) -> Self {
7223        Self::InternalError(value)
7224    }
7225}
7226#[doc = "`ErrorWrapperForRpcMaintenanceWindowsError`"]
7227#[doc = r""]
7228#[doc = r" <details><summary>JSON schema</summary>"]
7229#[doc = r""]
7230#[doc = r" ```json"]
7231#[doc = "{"]
7232#[doc = "  \"oneOf\": ["]
7233#[doc = "    {"]
7234#[doc = "      \"type\": \"object\","]
7235#[doc = "      \"required\": ["]
7236#[doc = "        \"cause\","]
7237#[doc = "        \"name\""]
7238#[doc = "      ],"]
7239#[doc = "      \"properties\": {"]
7240#[doc = "        \"cause\": {"]
7241#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7242#[doc = "        },"]
7243#[doc = "        \"name\": {"]
7244#[doc = "          \"type\": \"string\","]
7245#[doc = "          \"enum\": ["]
7246#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7247#[doc = "          ]"]
7248#[doc = "        }"]
7249#[doc = "      }"]
7250#[doc = "    },"]
7251#[doc = "    {"]
7252#[doc = "      \"type\": \"object\","]
7253#[doc = "      \"required\": ["]
7254#[doc = "        \"cause\","]
7255#[doc = "        \"name\""]
7256#[doc = "      ],"]
7257#[doc = "      \"properties\": {"]
7258#[doc = "        \"cause\": {"]
7259#[doc = "          \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsError\""]
7260#[doc = "        },"]
7261#[doc = "        \"name\": {"]
7262#[doc = "          \"type\": \"string\","]
7263#[doc = "          \"enum\": ["]
7264#[doc = "            \"HANDLER_ERROR\""]
7265#[doc = "          ]"]
7266#[doc = "        }"]
7267#[doc = "      }"]
7268#[doc = "    },"]
7269#[doc = "    {"]
7270#[doc = "      \"type\": \"object\","]
7271#[doc = "      \"required\": ["]
7272#[doc = "        \"cause\","]
7273#[doc = "        \"name\""]
7274#[doc = "      ],"]
7275#[doc = "      \"properties\": {"]
7276#[doc = "        \"cause\": {"]
7277#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7278#[doc = "        },"]
7279#[doc = "        \"name\": {"]
7280#[doc = "          \"type\": \"string\","]
7281#[doc = "          \"enum\": ["]
7282#[doc = "            \"INTERNAL_ERROR\""]
7283#[doc = "          ]"]
7284#[doc = "        }"]
7285#[doc = "      }"]
7286#[doc = "    }"]
7287#[doc = "  ]"]
7288#[doc = "}"]
7289#[doc = r" ```"]
7290#[doc = r" </details>"]
7291#[derive(
7292    :: serde :: Deserialize,
7293    :: serde :: Serialize,
7294    Clone,
7295    Debug,
7296    thiserror::Error,
7297    strum_macros::Display,
7298)]
7299#[serde(tag = "name", content = "cause")]
7300pub enum ErrorWrapperForRpcMaintenanceWindowsError {
7301    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7302    RequestValidationError(RpcRequestValidationErrorKind),
7303    #[serde(rename = "HANDLER_ERROR")]
7304    HandlerError(RpcMaintenanceWindowsError),
7305    #[serde(rename = "INTERNAL_ERROR")]
7306    InternalError(InternalError),
7307}
7308impl ::std::convert::From<&Self> for ErrorWrapperForRpcMaintenanceWindowsError {
7309    fn from(value: &ErrorWrapperForRpcMaintenanceWindowsError) -> Self {
7310        value.clone()
7311    }
7312}
7313impl ::std::convert::From<RpcRequestValidationErrorKind>
7314    for ErrorWrapperForRpcMaintenanceWindowsError
7315{
7316    fn from(value: RpcRequestValidationErrorKind) -> Self {
7317        Self::RequestValidationError(value)
7318    }
7319}
7320impl ::std::convert::From<RpcMaintenanceWindowsError>
7321    for ErrorWrapperForRpcMaintenanceWindowsError
7322{
7323    fn from(value: RpcMaintenanceWindowsError) -> Self {
7324        Self::HandlerError(value)
7325    }
7326}
7327impl ::std::convert::From<InternalError> for ErrorWrapperForRpcMaintenanceWindowsError {
7328    fn from(value: InternalError) -> Self {
7329        Self::InternalError(value)
7330    }
7331}
7332#[doc = "`ErrorWrapperForRpcNetworkInfoError`"]
7333#[doc = r""]
7334#[doc = r" <details><summary>JSON schema</summary>"]
7335#[doc = r""]
7336#[doc = r" ```json"]
7337#[doc = "{"]
7338#[doc = "  \"oneOf\": ["]
7339#[doc = "    {"]
7340#[doc = "      \"type\": \"object\","]
7341#[doc = "      \"required\": ["]
7342#[doc = "        \"cause\","]
7343#[doc = "        \"name\""]
7344#[doc = "      ],"]
7345#[doc = "      \"properties\": {"]
7346#[doc = "        \"cause\": {"]
7347#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7348#[doc = "        },"]
7349#[doc = "        \"name\": {"]
7350#[doc = "          \"type\": \"string\","]
7351#[doc = "          \"enum\": ["]
7352#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7353#[doc = "          ]"]
7354#[doc = "        }"]
7355#[doc = "      }"]
7356#[doc = "    },"]
7357#[doc = "    {"]
7358#[doc = "      \"type\": \"object\","]
7359#[doc = "      \"required\": ["]
7360#[doc = "        \"cause\","]
7361#[doc = "        \"name\""]
7362#[doc = "      ],"]
7363#[doc = "      \"properties\": {"]
7364#[doc = "        \"cause\": {"]
7365#[doc = "          \"$ref\": \"#/components/schemas/RpcNetworkInfoError\""]
7366#[doc = "        },"]
7367#[doc = "        \"name\": {"]
7368#[doc = "          \"type\": \"string\","]
7369#[doc = "          \"enum\": ["]
7370#[doc = "            \"HANDLER_ERROR\""]
7371#[doc = "          ]"]
7372#[doc = "        }"]
7373#[doc = "      }"]
7374#[doc = "    },"]
7375#[doc = "    {"]
7376#[doc = "      \"type\": \"object\","]
7377#[doc = "      \"required\": ["]
7378#[doc = "        \"cause\","]
7379#[doc = "        \"name\""]
7380#[doc = "      ],"]
7381#[doc = "      \"properties\": {"]
7382#[doc = "        \"cause\": {"]
7383#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7384#[doc = "        },"]
7385#[doc = "        \"name\": {"]
7386#[doc = "          \"type\": \"string\","]
7387#[doc = "          \"enum\": ["]
7388#[doc = "            \"INTERNAL_ERROR\""]
7389#[doc = "          ]"]
7390#[doc = "        }"]
7391#[doc = "      }"]
7392#[doc = "    }"]
7393#[doc = "  ]"]
7394#[doc = "}"]
7395#[doc = r" ```"]
7396#[doc = r" </details>"]
7397#[derive(
7398    :: serde :: Deserialize,
7399    :: serde :: Serialize,
7400    Clone,
7401    Debug,
7402    thiserror::Error,
7403    strum_macros::Display,
7404)]
7405#[serde(tag = "name", content = "cause")]
7406pub enum ErrorWrapperForRpcNetworkInfoError {
7407    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7408    RequestValidationError(RpcRequestValidationErrorKind),
7409    #[serde(rename = "HANDLER_ERROR")]
7410    HandlerError(RpcNetworkInfoError),
7411    #[serde(rename = "INTERNAL_ERROR")]
7412    InternalError(InternalError),
7413}
7414impl ::std::convert::From<&Self> for ErrorWrapperForRpcNetworkInfoError {
7415    fn from(value: &ErrorWrapperForRpcNetworkInfoError) -> Self {
7416        value.clone()
7417    }
7418}
7419impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcNetworkInfoError {
7420    fn from(value: RpcRequestValidationErrorKind) -> Self {
7421        Self::RequestValidationError(value)
7422    }
7423}
7424impl ::std::convert::From<RpcNetworkInfoError> for ErrorWrapperForRpcNetworkInfoError {
7425    fn from(value: RpcNetworkInfoError) -> Self {
7426        Self::HandlerError(value)
7427    }
7428}
7429impl ::std::convert::From<InternalError> for ErrorWrapperForRpcNetworkInfoError {
7430    fn from(value: InternalError) -> Self {
7431        Self::InternalError(value)
7432    }
7433}
7434#[doc = "`ErrorWrapperForRpcProtocolConfigError`"]
7435#[doc = r""]
7436#[doc = r" <details><summary>JSON schema</summary>"]
7437#[doc = r""]
7438#[doc = r" ```json"]
7439#[doc = "{"]
7440#[doc = "  \"oneOf\": ["]
7441#[doc = "    {"]
7442#[doc = "      \"type\": \"object\","]
7443#[doc = "      \"required\": ["]
7444#[doc = "        \"cause\","]
7445#[doc = "        \"name\""]
7446#[doc = "      ],"]
7447#[doc = "      \"properties\": {"]
7448#[doc = "        \"cause\": {"]
7449#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7450#[doc = "        },"]
7451#[doc = "        \"name\": {"]
7452#[doc = "          \"type\": \"string\","]
7453#[doc = "          \"enum\": ["]
7454#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7455#[doc = "          ]"]
7456#[doc = "        }"]
7457#[doc = "      }"]
7458#[doc = "    },"]
7459#[doc = "    {"]
7460#[doc = "      \"type\": \"object\","]
7461#[doc = "      \"required\": ["]
7462#[doc = "        \"cause\","]
7463#[doc = "        \"name\""]
7464#[doc = "      ],"]
7465#[doc = "      \"properties\": {"]
7466#[doc = "        \"cause\": {"]
7467#[doc = "          \"$ref\": \"#/components/schemas/RpcProtocolConfigError\""]
7468#[doc = "        },"]
7469#[doc = "        \"name\": {"]
7470#[doc = "          \"type\": \"string\","]
7471#[doc = "          \"enum\": ["]
7472#[doc = "            \"HANDLER_ERROR\""]
7473#[doc = "          ]"]
7474#[doc = "        }"]
7475#[doc = "      }"]
7476#[doc = "    },"]
7477#[doc = "    {"]
7478#[doc = "      \"type\": \"object\","]
7479#[doc = "      \"required\": ["]
7480#[doc = "        \"cause\","]
7481#[doc = "        \"name\""]
7482#[doc = "      ],"]
7483#[doc = "      \"properties\": {"]
7484#[doc = "        \"cause\": {"]
7485#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7486#[doc = "        },"]
7487#[doc = "        \"name\": {"]
7488#[doc = "          \"type\": \"string\","]
7489#[doc = "          \"enum\": ["]
7490#[doc = "            \"INTERNAL_ERROR\""]
7491#[doc = "          ]"]
7492#[doc = "        }"]
7493#[doc = "      }"]
7494#[doc = "    }"]
7495#[doc = "  ]"]
7496#[doc = "}"]
7497#[doc = r" ```"]
7498#[doc = r" </details>"]
7499#[derive(
7500    :: serde :: Deserialize,
7501    :: serde :: Serialize,
7502    Clone,
7503    Debug,
7504    thiserror::Error,
7505    strum_macros::Display,
7506)]
7507#[serde(tag = "name", content = "cause")]
7508pub enum ErrorWrapperForRpcProtocolConfigError {
7509    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7510    RequestValidationError(RpcRequestValidationErrorKind),
7511    #[serde(rename = "HANDLER_ERROR")]
7512    HandlerError(RpcProtocolConfigError),
7513    #[serde(rename = "INTERNAL_ERROR")]
7514    InternalError(InternalError),
7515}
7516impl ::std::convert::From<&Self> for ErrorWrapperForRpcProtocolConfigError {
7517    fn from(value: &ErrorWrapperForRpcProtocolConfigError) -> Self {
7518        value.clone()
7519    }
7520}
7521impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcProtocolConfigError {
7522    fn from(value: RpcRequestValidationErrorKind) -> Self {
7523        Self::RequestValidationError(value)
7524    }
7525}
7526impl ::std::convert::From<RpcProtocolConfigError> for ErrorWrapperForRpcProtocolConfigError {
7527    fn from(value: RpcProtocolConfigError) -> Self {
7528        Self::HandlerError(value)
7529    }
7530}
7531impl ::std::convert::From<InternalError> for ErrorWrapperForRpcProtocolConfigError {
7532    fn from(value: InternalError) -> Self {
7533        Self::InternalError(value)
7534    }
7535}
7536#[doc = "`ErrorWrapperForRpcQueryError`"]
7537#[doc = r""]
7538#[doc = r" <details><summary>JSON schema</summary>"]
7539#[doc = r""]
7540#[doc = r" ```json"]
7541#[doc = "{"]
7542#[doc = "  \"oneOf\": ["]
7543#[doc = "    {"]
7544#[doc = "      \"type\": \"object\","]
7545#[doc = "      \"required\": ["]
7546#[doc = "        \"cause\","]
7547#[doc = "        \"name\""]
7548#[doc = "      ],"]
7549#[doc = "      \"properties\": {"]
7550#[doc = "        \"cause\": {"]
7551#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7552#[doc = "        },"]
7553#[doc = "        \"name\": {"]
7554#[doc = "          \"type\": \"string\","]
7555#[doc = "          \"enum\": ["]
7556#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7557#[doc = "          ]"]
7558#[doc = "        }"]
7559#[doc = "      }"]
7560#[doc = "    },"]
7561#[doc = "    {"]
7562#[doc = "      \"type\": \"object\","]
7563#[doc = "      \"required\": ["]
7564#[doc = "        \"cause\","]
7565#[doc = "        \"name\""]
7566#[doc = "      ],"]
7567#[doc = "      \"properties\": {"]
7568#[doc = "        \"cause\": {"]
7569#[doc = "          \"$ref\": \"#/components/schemas/RpcQueryError\""]
7570#[doc = "        },"]
7571#[doc = "        \"name\": {"]
7572#[doc = "          \"type\": \"string\","]
7573#[doc = "          \"enum\": ["]
7574#[doc = "            \"HANDLER_ERROR\""]
7575#[doc = "          ]"]
7576#[doc = "        }"]
7577#[doc = "      }"]
7578#[doc = "    },"]
7579#[doc = "    {"]
7580#[doc = "      \"type\": \"object\","]
7581#[doc = "      \"required\": ["]
7582#[doc = "        \"cause\","]
7583#[doc = "        \"name\""]
7584#[doc = "      ],"]
7585#[doc = "      \"properties\": {"]
7586#[doc = "        \"cause\": {"]
7587#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7588#[doc = "        },"]
7589#[doc = "        \"name\": {"]
7590#[doc = "          \"type\": \"string\","]
7591#[doc = "          \"enum\": ["]
7592#[doc = "            \"INTERNAL_ERROR\""]
7593#[doc = "          ]"]
7594#[doc = "        }"]
7595#[doc = "      }"]
7596#[doc = "    }"]
7597#[doc = "  ]"]
7598#[doc = "}"]
7599#[doc = r" ```"]
7600#[doc = r" </details>"]
7601#[derive(
7602    :: serde :: Deserialize,
7603    :: serde :: Serialize,
7604    Clone,
7605    Debug,
7606    thiserror::Error,
7607    strum_macros::Display,
7608)]
7609#[serde(tag = "name", content = "cause")]
7610pub enum ErrorWrapperForRpcQueryError {
7611    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7612    RequestValidationError(RpcRequestValidationErrorKind),
7613    #[serde(rename = "HANDLER_ERROR")]
7614    HandlerError(RpcQueryError),
7615    #[serde(rename = "INTERNAL_ERROR")]
7616    InternalError(InternalError),
7617}
7618impl ::std::convert::From<&Self> for ErrorWrapperForRpcQueryError {
7619    fn from(value: &ErrorWrapperForRpcQueryError) -> Self {
7620        value.clone()
7621    }
7622}
7623impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcQueryError {
7624    fn from(value: RpcRequestValidationErrorKind) -> Self {
7625        Self::RequestValidationError(value)
7626    }
7627}
7628impl ::std::convert::From<RpcQueryError> for ErrorWrapperForRpcQueryError {
7629    fn from(value: RpcQueryError) -> Self {
7630        Self::HandlerError(value)
7631    }
7632}
7633impl ::std::convert::From<InternalError> for ErrorWrapperForRpcQueryError {
7634    fn from(value: InternalError) -> Self {
7635        Self::InternalError(value)
7636    }
7637}
7638#[doc = "`ErrorWrapperForRpcReceiptError`"]
7639#[doc = r""]
7640#[doc = r" <details><summary>JSON schema</summary>"]
7641#[doc = r""]
7642#[doc = r" ```json"]
7643#[doc = "{"]
7644#[doc = "  \"oneOf\": ["]
7645#[doc = "    {"]
7646#[doc = "      \"type\": \"object\","]
7647#[doc = "      \"required\": ["]
7648#[doc = "        \"cause\","]
7649#[doc = "        \"name\""]
7650#[doc = "      ],"]
7651#[doc = "      \"properties\": {"]
7652#[doc = "        \"cause\": {"]
7653#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7654#[doc = "        },"]
7655#[doc = "        \"name\": {"]
7656#[doc = "          \"type\": \"string\","]
7657#[doc = "          \"enum\": ["]
7658#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7659#[doc = "          ]"]
7660#[doc = "        }"]
7661#[doc = "      }"]
7662#[doc = "    },"]
7663#[doc = "    {"]
7664#[doc = "      \"type\": \"object\","]
7665#[doc = "      \"required\": ["]
7666#[doc = "        \"cause\","]
7667#[doc = "        \"name\""]
7668#[doc = "      ],"]
7669#[doc = "      \"properties\": {"]
7670#[doc = "        \"cause\": {"]
7671#[doc = "          \"$ref\": \"#/components/schemas/RpcReceiptError\""]
7672#[doc = "        },"]
7673#[doc = "        \"name\": {"]
7674#[doc = "          \"type\": \"string\","]
7675#[doc = "          \"enum\": ["]
7676#[doc = "            \"HANDLER_ERROR\""]
7677#[doc = "          ]"]
7678#[doc = "        }"]
7679#[doc = "      }"]
7680#[doc = "    },"]
7681#[doc = "    {"]
7682#[doc = "      \"type\": \"object\","]
7683#[doc = "      \"required\": ["]
7684#[doc = "        \"cause\","]
7685#[doc = "        \"name\""]
7686#[doc = "      ],"]
7687#[doc = "      \"properties\": {"]
7688#[doc = "        \"cause\": {"]
7689#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7690#[doc = "        },"]
7691#[doc = "        \"name\": {"]
7692#[doc = "          \"type\": \"string\","]
7693#[doc = "          \"enum\": ["]
7694#[doc = "            \"INTERNAL_ERROR\""]
7695#[doc = "          ]"]
7696#[doc = "        }"]
7697#[doc = "      }"]
7698#[doc = "    }"]
7699#[doc = "  ]"]
7700#[doc = "}"]
7701#[doc = r" ```"]
7702#[doc = r" </details>"]
7703#[derive(
7704    :: serde :: Deserialize,
7705    :: serde :: Serialize,
7706    Clone,
7707    Debug,
7708    thiserror::Error,
7709    strum_macros::Display,
7710)]
7711#[serde(tag = "name", content = "cause")]
7712pub enum ErrorWrapperForRpcReceiptError {
7713    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7714    RequestValidationError(RpcRequestValidationErrorKind),
7715    #[serde(rename = "HANDLER_ERROR")]
7716    HandlerError(RpcReceiptError),
7717    #[serde(rename = "INTERNAL_ERROR")]
7718    InternalError(InternalError),
7719}
7720impl ::std::convert::From<&Self> for ErrorWrapperForRpcReceiptError {
7721    fn from(value: &ErrorWrapperForRpcReceiptError) -> Self {
7722        value.clone()
7723    }
7724}
7725impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcReceiptError {
7726    fn from(value: RpcRequestValidationErrorKind) -> Self {
7727        Self::RequestValidationError(value)
7728    }
7729}
7730impl ::std::convert::From<RpcReceiptError> for ErrorWrapperForRpcReceiptError {
7731    fn from(value: RpcReceiptError) -> Self {
7732        Self::HandlerError(value)
7733    }
7734}
7735impl ::std::convert::From<InternalError> for ErrorWrapperForRpcReceiptError {
7736    fn from(value: InternalError) -> Self {
7737        Self::InternalError(value)
7738    }
7739}
7740#[doc = "`ErrorWrapperForRpcSplitStorageInfoError`"]
7741#[doc = r""]
7742#[doc = r" <details><summary>JSON schema</summary>"]
7743#[doc = r""]
7744#[doc = r" ```json"]
7745#[doc = "{"]
7746#[doc = "  \"oneOf\": ["]
7747#[doc = "    {"]
7748#[doc = "      \"type\": \"object\","]
7749#[doc = "      \"required\": ["]
7750#[doc = "        \"cause\","]
7751#[doc = "        \"name\""]
7752#[doc = "      ],"]
7753#[doc = "      \"properties\": {"]
7754#[doc = "        \"cause\": {"]
7755#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7756#[doc = "        },"]
7757#[doc = "        \"name\": {"]
7758#[doc = "          \"type\": \"string\","]
7759#[doc = "          \"enum\": ["]
7760#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7761#[doc = "          ]"]
7762#[doc = "        }"]
7763#[doc = "      }"]
7764#[doc = "    },"]
7765#[doc = "    {"]
7766#[doc = "      \"type\": \"object\","]
7767#[doc = "      \"required\": ["]
7768#[doc = "        \"cause\","]
7769#[doc = "        \"name\""]
7770#[doc = "      ],"]
7771#[doc = "      \"properties\": {"]
7772#[doc = "        \"cause\": {"]
7773#[doc = "          \"$ref\": \"#/components/schemas/RpcSplitStorageInfoError\""]
7774#[doc = "        },"]
7775#[doc = "        \"name\": {"]
7776#[doc = "          \"type\": \"string\","]
7777#[doc = "          \"enum\": ["]
7778#[doc = "            \"HANDLER_ERROR\""]
7779#[doc = "          ]"]
7780#[doc = "        }"]
7781#[doc = "      }"]
7782#[doc = "    },"]
7783#[doc = "    {"]
7784#[doc = "      \"type\": \"object\","]
7785#[doc = "      \"required\": ["]
7786#[doc = "        \"cause\","]
7787#[doc = "        \"name\""]
7788#[doc = "      ],"]
7789#[doc = "      \"properties\": {"]
7790#[doc = "        \"cause\": {"]
7791#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7792#[doc = "        },"]
7793#[doc = "        \"name\": {"]
7794#[doc = "          \"type\": \"string\","]
7795#[doc = "          \"enum\": ["]
7796#[doc = "            \"INTERNAL_ERROR\""]
7797#[doc = "          ]"]
7798#[doc = "        }"]
7799#[doc = "      }"]
7800#[doc = "    }"]
7801#[doc = "  ]"]
7802#[doc = "}"]
7803#[doc = r" ```"]
7804#[doc = r" </details>"]
7805#[derive(
7806    :: serde :: Deserialize,
7807    :: serde :: Serialize,
7808    Clone,
7809    Debug,
7810    thiserror::Error,
7811    strum_macros::Display,
7812)]
7813#[serde(tag = "name", content = "cause")]
7814pub enum ErrorWrapperForRpcSplitStorageInfoError {
7815    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7816    RequestValidationError(RpcRequestValidationErrorKind),
7817    #[serde(rename = "HANDLER_ERROR")]
7818    HandlerError(RpcSplitStorageInfoError),
7819    #[serde(rename = "INTERNAL_ERROR")]
7820    InternalError(InternalError),
7821}
7822impl ::std::convert::From<&Self> for ErrorWrapperForRpcSplitStorageInfoError {
7823    fn from(value: &ErrorWrapperForRpcSplitStorageInfoError) -> Self {
7824        value.clone()
7825    }
7826}
7827impl ::std::convert::From<RpcRequestValidationErrorKind>
7828    for ErrorWrapperForRpcSplitStorageInfoError
7829{
7830    fn from(value: RpcRequestValidationErrorKind) -> Self {
7831        Self::RequestValidationError(value)
7832    }
7833}
7834impl ::std::convert::From<RpcSplitStorageInfoError> for ErrorWrapperForRpcSplitStorageInfoError {
7835    fn from(value: RpcSplitStorageInfoError) -> Self {
7836        Self::HandlerError(value)
7837    }
7838}
7839impl ::std::convert::From<InternalError> for ErrorWrapperForRpcSplitStorageInfoError {
7840    fn from(value: InternalError) -> Self {
7841        Self::InternalError(value)
7842    }
7843}
7844#[doc = "`ErrorWrapperForRpcStateChangesError`"]
7845#[doc = r""]
7846#[doc = r" <details><summary>JSON schema</summary>"]
7847#[doc = r""]
7848#[doc = r" ```json"]
7849#[doc = "{"]
7850#[doc = "  \"oneOf\": ["]
7851#[doc = "    {"]
7852#[doc = "      \"type\": \"object\","]
7853#[doc = "      \"required\": ["]
7854#[doc = "        \"cause\","]
7855#[doc = "        \"name\""]
7856#[doc = "      ],"]
7857#[doc = "      \"properties\": {"]
7858#[doc = "        \"cause\": {"]
7859#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7860#[doc = "        },"]
7861#[doc = "        \"name\": {"]
7862#[doc = "          \"type\": \"string\","]
7863#[doc = "          \"enum\": ["]
7864#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7865#[doc = "          ]"]
7866#[doc = "        }"]
7867#[doc = "      }"]
7868#[doc = "    },"]
7869#[doc = "    {"]
7870#[doc = "      \"type\": \"object\","]
7871#[doc = "      \"required\": ["]
7872#[doc = "        \"cause\","]
7873#[doc = "        \"name\""]
7874#[doc = "      ],"]
7875#[doc = "      \"properties\": {"]
7876#[doc = "        \"cause\": {"]
7877#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesError\""]
7878#[doc = "        },"]
7879#[doc = "        \"name\": {"]
7880#[doc = "          \"type\": \"string\","]
7881#[doc = "          \"enum\": ["]
7882#[doc = "            \"HANDLER_ERROR\""]
7883#[doc = "          ]"]
7884#[doc = "        }"]
7885#[doc = "      }"]
7886#[doc = "    },"]
7887#[doc = "    {"]
7888#[doc = "      \"type\": \"object\","]
7889#[doc = "      \"required\": ["]
7890#[doc = "        \"cause\","]
7891#[doc = "        \"name\""]
7892#[doc = "      ],"]
7893#[doc = "      \"properties\": {"]
7894#[doc = "        \"cause\": {"]
7895#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7896#[doc = "        },"]
7897#[doc = "        \"name\": {"]
7898#[doc = "          \"type\": \"string\","]
7899#[doc = "          \"enum\": ["]
7900#[doc = "            \"INTERNAL_ERROR\""]
7901#[doc = "          ]"]
7902#[doc = "        }"]
7903#[doc = "      }"]
7904#[doc = "    }"]
7905#[doc = "  ]"]
7906#[doc = "}"]
7907#[doc = r" ```"]
7908#[doc = r" </details>"]
7909#[derive(
7910    :: serde :: Deserialize,
7911    :: serde :: Serialize,
7912    Clone,
7913    Debug,
7914    thiserror::Error,
7915    strum_macros::Display,
7916)]
7917#[serde(tag = "name", content = "cause")]
7918pub enum ErrorWrapperForRpcStateChangesError {
7919    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7920    RequestValidationError(RpcRequestValidationErrorKind),
7921    #[serde(rename = "HANDLER_ERROR")]
7922    HandlerError(RpcStateChangesError),
7923    #[serde(rename = "INTERNAL_ERROR")]
7924    InternalError(InternalError),
7925}
7926impl ::std::convert::From<&Self> for ErrorWrapperForRpcStateChangesError {
7927    fn from(value: &ErrorWrapperForRpcStateChangesError) -> Self {
7928        value.clone()
7929    }
7930}
7931impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcStateChangesError {
7932    fn from(value: RpcRequestValidationErrorKind) -> Self {
7933        Self::RequestValidationError(value)
7934    }
7935}
7936impl ::std::convert::From<RpcStateChangesError> for ErrorWrapperForRpcStateChangesError {
7937    fn from(value: RpcStateChangesError) -> Self {
7938        Self::HandlerError(value)
7939    }
7940}
7941impl ::std::convert::From<InternalError> for ErrorWrapperForRpcStateChangesError {
7942    fn from(value: InternalError) -> Self {
7943        Self::InternalError(value)
7944    }
7945}
7946#[doc = "`ErrorWrapperForRpcStatusError`"]
7947#[doc = r""]
7948#[doc = r" <details><summary>JSON schema</summary>"]
7949#[doc = r""]
7950#[doc = r" ```json"]
7951#[doc = "{"]
7952#[doc = "  \"oneOf\": ["]
7953#[doc = "    {"]
7954#[doc = "      \"type\": \"object\","]
7955#[doc = "      \"required\": ["]
7956#[doc = "        \"cause\","]
7957#[doc = "        \"name\""]
7958#[doc = "      ],"]
7959#[doc = "      \"properties\": {"]
7960#[doc = "        \"cause\": {"]
7961#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7962#[doc = "        },"]
7963#[doc = "        \"name\": {"]
7964#[doc = "          \"type\": \"string\","]
7965#[doc = "          \"enum\": ["]
7966#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
7967#[doc = "          ]"]
7968#[doc = "        }"]
7969#[doc = "      }"]
7970#[doc = "    },"]
7971#[doc = "    {"]
7972#[doc = "      \"type\": \"object\","]
7973#[doc = "      \"required\": ["]
7974#[doc = "        \"cause\","]
7975#[doc = "        \"name\""]
7976#[doc = "      ],"]
7977#[doc = "      \"properties\": {"]
7978#[doc = "        \"cause\": {"]
7979#[doc = "          \"$ref\": \"#/components/schemas/RpcStatusError\""]
7980#[doc = "        },"]
7981#[doc = "        \"name\": {"]
7982#[doc = "          \"type\": \"string\","]
7983#[doc = "          \"enum\": ["]
7984#[doc = "            \"HANDLER_ERROR\""]
7985#[doc = "          ]"]
7986#[doc = "        }"]
7987#[doc = "      }"]
7988#[doc = "    },"]
7989#[doc = "    {"]
7990#[doc = "      \"type\": \"object\","]
7991#[doc = "      \"required\": ["]
7992#[doc = "        \"cause\","]
7993#[doc = "        \"name\""]
7994#[doc = "      ],"]
7995#[doc = "      \"properties\": {"]
7996#[doc = "        \"cause\": {"]
7997#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
7998#[doc = "        },"]
7999#[doc = "        \"name\": {"]
8000#[doc = "          \"type\": \"string\","]
8001#[doc = "          \"enum\": ["]
8002#[doc = "            \"INTERNAL_ERROR\""]
8003#[doc = "          ]"]
8004#[doc = "        }"]
8005#[doc = "      }"]
8006#[doc = "    }"]
8007#[doc = "  ]"]
8008#[doc = "}"]
8009#[doc = r" ```"]
8010#[doc = r" </details>"]
8011#[derive(
8012    :: serde :: Deserialize,
8013    :: serde :: Serialize,
8014    Clone,
8015    Debug,
8016    thiserror::Error,
8017    strum_macros::Display,
8018)]
8019#[serde(tag = "name", content = "cause")]
8020pub enum ErrorWrapperForRpcStatusError {
8021    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
8022    RequestValidationError(RpcRequestValidationErrorKind),
8023    #[serde(rename = "HANDLER_ERROR")]
8024    HandlerError(RpcStatusError),
8025    #[serde(rename = "INTERNAL_ERROR")]
8026    InternalError(InternalError),
8027}
8028impl ::std::convert::From<&Self> for ErrorWrapperForRpcStatusError {
8029    fn from(value: &ErrorWrapperForRpcStatusError) -> Self {
8030        value.clone()
8031    }
8032}
8033impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcStatusError {
8034    fn from(value: RpcRequestValidationErrorKind) -> Self {
8035        Self::RequestValidationError(value)
8036    }
8037}
8038impl ::std::convert::From<RpcStatusError> for ErrorWrapperForRpcStatusError {
8039    fn from(value: RpcStatusError) -> Self {
8040        Self::HandlerError(value)
8041    }
8042}
8043impl ::std::convert::From<InternalError> for ErrorWrapperForRpcStatusError {
8044    fn from(value: InternalError) -> Self {
8045        Self::InternalError(value)
8046    }
8047}
8048#[doc = "`ErrorWrapperForRpcTransactionError`"]
8049#[doc = r""]
8050#[doc = r" <details><summary>JSON schema</summary>"]
8051#[doc = r""]
8052#[doc = r" ```json"]
8053#[doc = "{"]
8054#[doc = "  \"oneOf\": ["]
8055#[doc = "    {"]
8056#[doc = "      \"type\": \"object\","]
8057#[doc = "      \"required\": ["]
8058#[doc = "        \"cause\","]
8059#[doc = "        \"name\""]
8060#[doc = "      ],"]
8061#[doc = "      \"properties\": {"]
8062#[doc = "        \"cause\": {"]
8063#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
8064#[doc = "        },"]
8065#[doc = "        \"name\": {"]
8066#[doc = "          \"type\": \"string\","]
8067#[doc = "          \"enum\": ["]
8068#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
8069#[doc = "          ]"]
8070#[doc = "        }"]
8071#[doc = "      }"]
8072#[doc = "    },"]
8073#[doc = "    {"]
8074#[doc = "      \"type\": \"object\","]
8075#[doc = "      \"required\": ["]
8076#[doc = "        \"cause\","]
8077#[doc = "        \"name\""]
8078#[doc = "      ],"]
8079#[doc = "      \"properties\": {"]
8080#[doc = "        \"cause\": {"]
8081#[doc = "          \"$ref\": \"#/components/schemas/RpcTransactionError\""]
8082#[doc = "        },"]
8083#[doc = "        \"name\": {"]
8084#[doc = "          \"type\": \"string\","]
8085#[doc = "          \"enum\": ["]
8086#[doc = "            \"HANDLER_ERROR\""]
8087#[doc = "          ]"]
8088#[doc = "        }"]
8089#[doc = "      }"]
8090#[doc = "    },"]
8091#[doc = "    {"]
8092#[doc = "      \"type\": \"object\","]
8093#[doc = "      \"required\": ["]
8094#[doc = "        \"cause\","]
8095#[doc = "        \"name\""]
8096#[doc = "      ],"]
8097#[doc = "      \"properties\": {"]
8098#[doc = "        \"cause\": {"]
8099#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
8100#[doc = "        },"]
8101#[doc = "        \"name\": {"]
8102#[doc = "          \"type\": \"string\","]
8103#[doc = "          \"enum\": ["]
8104#[doc = "            \"INTERNAL_ERROR\""]
8105#[doc = "          ]"]
8106#[doc = "        }"]
8107#[doc = "      }"]
8108#[doc = "    }"]
8109#[doc = "  ]"]
8110#[doc = "}"]
8111#[doc = r" ```"]
8112#[doc = r" </details>"]
8113#[derive(
8114    :: serde :: Deserialize,
8115    :: serde :: Serialize,
8116    Clone,
8117    Debug,
8118    thiserror::Error,
8119    strum_macros::Display,
8120)]
8121#[serde(tag = "name", content = "cause")]
8122pub enum ErrorWrapperForRpcTransactionError {
8123    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
8124    RequestValidationError(RpcRequestValidationErrorKind),
8125    #[serde(rename = "HANDLER_ERROR")]
8126    HandlerError(RpcTransactionError),
8127    #[serde(rename = "INTERNAL_ERROR")]
8128    InternalError(InternalError),
8129}
8130impl ::std::convert::From<&Self> for ErrorWrapperForRpcTransactionError {
8131    fn from(value: &ErrorWrapperForRpcTransactionError) -> Self {
8132        value.clone()
8133    }
8134}
8135impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcTransactionError {
8136    fn from(value: RpcRequestValidationErrorKind) -> Self {
8137        Self::RequestValidationError(value)
8138    }
8139}
8140impl ::std::convert::From<RpcTransactionError> for ErrorWrapperForRpcTransactionError {
8141    fn from(value: RpcTransactionError) -> Self {
8142        Self::HandlerError(value)
8143    }
8144}
8145impl ::std::convert::From<InternalError> for ErrorWrapperForRpcTransactionError {
8146    fn from(value: InternalError) -> Self {
8147        Self::InternalError(value)
8148    }
8149}
8150#[doc = "`ErrorWrapperForRpcValidatorError`"]
8151#[doc = r""]
8152#[doc = r" <details><summary>JSON schema</summary>"]
8153#[doc = r""]
8154#[doc = r" ```json"]
8155#[doc = "{"]
8156#[doc = "  \"oneOf\": ["]
8157#[doc = "    {"]
8158#[doc = "      \"type\": \"object\","]
8159#[doc = "      \"required\": ["]
8160#[doc = "        \"cause\","]
8161#[doc = "        \"name\""]
8162#[doc = "      ],"]
8163#[doc = "      \"properties\": {"]
8164#[doc = "        \"cause\": {"]
8165#[doc = "          \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
8166#[doc = "        },"]
8167#[doc = "        \"name\": {"]
8168#[doc = "          \"type\": \"string\","]
8169#[doc = "          \"enum\": ["]
8170#[doc = "            \"REQUEST_VALIDATION_ERROR\""]
8171#[doc = "          ]"]
8172#[doc = "        }"]
8173#[doc = "      }"]
8174#[doc = "    },"]
8175#[doc = "    {"]
8176#[doc = "      \"type\": \"object\","]
8177#[doc = "      \"required\": ["]
8178#[doc = "        \"cause\","]
8179#[doc = "        \"name\""]
8180#[doc = "      ],"]
8181#[doc = "      \"properties\": {"]
8182#[doc = "        \"cause\": {"]
8183#[doc = "          \"$ref\": \"#/components/schemas/RpcValidatorError\""]
8184#[doc = "        },"]
8185#[doc = "        \"name\": {"]
8186#[doc = "          \"type\": \"string\","]
8187#[doc = "          \"enum\": ["]
8188#[doc = "            \"HANDLER_ERROR\""]
8189#[doc = "          ]"]
8190#[doc = "        }"]
8191#[doc = "      }"]
8192#[doc = "    },"]
8193#[doc = "    {"]
8194#[doc = "      \"type\": \"object\","]
8195#[doc = "      \"required\": ["]
8196#[doc = "        \"cause\","]
8197#[doc = "        \"name\""]
8198#[doc = "      ],"]
8199#[doc = "      \"properties\": {"]
8200#[doc = "        \"cause\": {"]
8201#[doc = "          \"$ref\": \"#/components/schemas/InternalError\""]
8202#[doc = "        },"]
8203#[doc = "        \"name\": {"]
8204#[doc = "          \"type\": \"string\","]
8205#[doc = "          \"enum\": ["]
8206#[doc = "            \"INTERNAL_ERROR\""]
8207#[doc = "          ]"]
8208#[doc = "        }"]
8209#[doc = "      }"]
8210#[doc = "    }"]
8211#[doc = "  ]"]
8212#[doc = "}"]
8213#[doc = r" ```"]
8214#[doc = r" </details>"]
8215#[derive(
8216    :: serde :: Deserialize,
8217    :: serde :: Serialize,
8218    Clone,
8219    Debug,
8220    thiserror::Error,
8221    strum_macros::Display,
8222)]
8223#[serde(tag = "name", content = "cause")]
8224pub enum ErrorWrapperForRpcValidatorError {
8225    #[serde(rename = "REQUEST_VALIDATION_ERROR")]
8226    RequestValidationError(RpcRequestValidationErrorKind),
8227    #[serde(rename = "HANDLER_ERROR")]
8228    HandlerError(RpcValidatorError),
8229    #[serde(rename = "INTERNAL_ERROR")]
8230    InternalError(InternalError),
8231}
8232impl ::std::convert::From<&Self> for ErrorWrapperForRpcValidatorError {
8233    fn from(value: &ErrorWrapperForRpcValidatorError) -> Self {
8234        value.clone()
8235    }
8236}
8237impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcValidatorError {
8238    fn from(value: RpcRequestValidationErrorKind) -> Self {
8239        Self::RequestValidationError(value)
8240    }
8241}
8242impl ::std::convert::From<RpcValidatorError> for ErrorWrapperForRpcValidatorError {
8243    fn from(value: RpcValidatorError) -> Self {
8244        Self::HandlerError(value)
8245    }
8246}
8247impl ::std::convert::From<InternalError> for ErrorWrapperForRpcValidatorError {
8248    fn from(value: InternalError) -> Self {
8249        Self::InternalError(value)
8250    }
8251}
8252#[doc = "`ExecutionMetadataView`"]
8253#[doc = r""]
8254#[doc = r" <details><summary>JSON schema</summary>"]
8255#[doc = r""]
8256#[doc = r" ```json"]
8257#[doc = "{"]
8258#[doc = "  \"type\": \"object\","]
8259#[doc = "  \"required\": ["]
8260#[doc = "    \"version\""]
8261#[doc = "  ],"]
8262#[doc = "  \"properties\": {"]
8263#[doc = "    \"gas_profile\": {"]
8264#[doc = "      \"type\": ["]
8265#[doc = "        \"array\","]
8266#[doc = "        \"null\""]
8267#[doc = "      ],"]
8268#[doc = "      \"items\": {"]
8269#[doc = "        \"$ref\": \"#/components/schemas/CostGasUsed\""]
8270#[doc = "      }"]
8271#[doc = "    },"]
8272#[doc = "    \"version\": {"]
8273#[doc = "      \"type\": \"integer\","]
8274#[doc = "      \"format\": \"uint32\","]
8275#[doc = "      \"minimum\": 0.0"]
8276#[doc = "    }"]
8277#[doc = "  }"]
8278#[doc = "}"]
8279#[doc = r" ```"]
8280#[doc = r" </details>"]
8281#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8282pub struct ExecutionMetadataView {
8283    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8284    pub gas_profile: ::std::option::Option<::std::vec::Vec<CostGasUsed>>,
8285    pub version: u32,
8286}
8287impl ::std::convert::From<&ExecutionMetadataView> for ExecutionMetadataView {
8288    fn from(value: &ExecutionMetadataView) -> Self {
8289        value.clone()
8290    }
8291}
8292#[doc = "`ExecutionOutcomeView`"]
8293#[doc = r""]
8294#[doc = r" <details><summary>JSON schema</summary>"]
8295#[doc = r""]
8296#[doc = r" ```json"]
8297#[doc = "{"]
8298#[doc = "  \"type\": \"object\","]
8299#[doc = "  \"required\": ["]
8300#[doc = "    \"executor_id\","]
8301#[doc = "    \"gas_burnt\","]
8302#[doc = "    \"logs\","]
8303#[doc = "    \"receipt_ids\","]
8304#[doc = "    \"status\","]
8305#[doc = "    \"tokens_burnt\""]
8306#[doc = "  ],"]
8307#[doc = "  \"properties\": {"]
8308#[doc = "    \"executor_id\": {"]
8309#[doc = "      \"description\": \"The id of the account on which the execution happens. For transaction this is signer_id,\\nfor receipt this is receiver_id.\","]
8310#[doc = "      \"allOf\": ["]
8311#[doc = "        {"]
8312#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
8313#[doc = "        }"]
8314#[doc = "      ]"]
8315#[doc = "    },"]
8316#[doc = "    \"gas_burnt\": {"]
8317#[doc = "      \"description\": \"The amount of the gas burnt by the given transaction or receipt.\","]
8318#[doc = "      \"allOf\": ["]
8319#[doc = "        {"]
8320#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8321#[doc = "        }"]
8322#[doc = "      ]"]
8323#[doc = "    },"]
8324#[doc = "    \"logs\": {"]
8325#[doc = "      \"description\": \"Logs from this transaction or receipt.\","]
8326#[doc = "      \"type\": \"array\","]
8327#[doc = "      \"items\": {"]
8328#[doc = "        \"type\": \"string\""]
8329#[doc = "      }"]
8330#[doc = "    },"]
8331#[doc = "    \"metadata\": {"]
8332#[doc = "      \"description\": \"Execution metadata, versioned\","]
8333#[doc = "      \"default\": {"]
8334#[doc = "        \"version\": 1"]
8335#[doc = "      },"]
8336#[doc = "      \"allOf\": ["]
8337#[doc = "        {"]
8338#[doc = "          \"$ref\": \"#/components/schemas/ExecutionMetadataView\""]
8339#[doc = "        }"]
8340#[doc = "      ]"]
8341#[doc = "    },"]
8342#[doc = "    \"receipt_ids\": {"]
8343#[doc = "      \"description\": \"Receipt IDs generated by this transaction or receipt.\","]
8344#[doc = "      \"type\": \"array\","]
8345#[doc = "      \"items\": {"]
8346#[doc = "        \"$ref\": \"#/components/schemas/CryptoHash\""]
8347#[doc = "      }"]
8348#[doc = "    },"]
8349#[doc = "    \"status\": {"]
8350#[doc = "      \"description\": \"Execution status. Contains the result in case of successful execution.\","]
8351#[doc = "      \"allOf\": ["]
8352#[doc = "        {"]
8353#[doc = "          \"$ref\": \"#/components/schemas/ExecutionStatusView\""]
8354#[doc = "        }"]
8355#[doc = "      ]"]
8356#[doc = "    },"]
8357#[doc = "    \"tokens_burnt\": {"]
8358#[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.\","]
8359#[doc = "      \"allOf\": ["]
8360#[doc = "        {"]
8361#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
8362#[doc = "        }"]
8363#[doc = "      ]"]
8364#[doc = "    }"]
8365#[doc = "  }"]
8366#[doc = "}"]
8367#[doc = r" ```"]
8368#[doc = r" </details>"]
8369#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8370pub struct ExecutionOutcomeView {
8371    #[doc = "The id of the account on which the execution happens. For transaction this is signer_id,\nfor receipt this is receiver_id."]
8372    pub executor_id: AccountId,
8373    #[doc = "The amount of the gas burnt by the given transaction or receipt."]
8374    pub gas_burnt: NearGas,
8375    #[doc = "Logs from this transaction or receipt."]
8376    pub logs: ::std::vec::Vec<::std::string::String>,
8377    #[doc = "Execution metadata, versioned"]
8378    #[serde(default = "defaults::execution_outcome_view_metadata")]
8379    pub metadata: ExecutionMetadataView,
8380    #[doc = "Receipt IDs generated by this transaction or receipt."]
8381    pub receipt_ids: ::std::vec::Vec<CryptoHash>,
8382    #[doc = "Execution status. Contains the result in case of successful execution."]
8383    pub status: ExecutionStatusView,
8384    #[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."]
8385    pub tokens_burnt: NearToken,
8386}
8387impl ::std::convert::From<&ExecutionOutcomeView> for ExecutionOutcomeView {
8388    fn from(value: &ExecutionOutcomeView) -> Self {
8389        value.clone()
8390    }
8391}
8392#[doc = "`ExecutionOutcomeWithIdView`"]
8393#[doc = r""]
8394#[doc = r" <details><summary>JSON schema</summary>"]
8395#[doc = r""]
8396#[doc = r" ```json"]
8397#[doc = "{"]
8398#[doc = "  \"type\": \"object\","]
8399#[doc = "  \"required\": ["]
8400#[doc = "    \"block_hash\","]
8401#[doc = "    \"id\","]
8402#[doc = "    \"outcome\","]
8403#[doc = "    \"proof\""]
8404#[doc = "  ],"]
8405#[doc = "  \"properties\": {"]
8406#[doc = "    \"block_hash\": {"]
8407#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
8408#[doc = "    },"]
8409#[doc = "    \"id\": {"]
8410#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
8411#[doc = "    },"]
8412#[doc = "    \"outcome\": {"]
8413#[doc = "      \"$ref\": \"#/components/schemas/ExecutionOutcomeView\""]
8414#[doc = "    },"]
8415#[doc = "    \"proof\": {"]
8416#[doc = "      \"type\": \"array\","]
8417#[doc = "      \"items\": {"]
8418#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
8419#[doc = "      }"]
8420#[doc = "    }"]
8421#[doc = "  }"]
8422#[doc = "}"]
8423#[doc = r" ```"]
8424#[doc = r" </details>"]
8425#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8426pub struct ExecutionOutcomeWithIdView {
8427    pub block_hash: CryptoHash,
8428    pub id: CryptoHash,
8429    pub outcome: ExecutionOutcomeView,
8430    pub proof: ::std::vec::Vec<MerklePathItem>,
8431}
8432impl ::std::convert::From<&ExecutionOutcomeWithIdView> for ExecutionOutcomeWithIdView {
8433    fn from(value: &ExecutionOutcomeWithIdView) -> Self {
8434        value.clone()
8435    }
8436}
8437#[doc = "`ExecutionStatusView`"]
8438#[doc = r""]
8439#[doc = r" <details><summary>JSON schema</summary>"]
8440#[doc = r""]
8441#[doc = r" ```json"]
8442#[doc = "{"]
8443#[doc = "  \"oneOf\": ["]
8444#[doc = "    {"]
8445#[doc = "      \"description\": \"The execution is pending or unknown.\","]
8446#[doc = "      \"type\": \"string\","]
8447#[doc = "      \"enum\": ["]
8448#[doc = "        \"Unknown\""]
8449#[doc = "      ]"]
8450#[doc = "    },"]
8451#[doc = "    {"]
8452#[doc = "      \"description\": \"The execution has failed.\","]
8453#[doc = "      \"type\": \"object\","]
8454#[doc = "      \"required\": ["]
8455#[doc = "        \"Failure\""]
8456#[doc = "      ],"]
8457#[doc = "      \"properties\": {"]
8458#[doc = "        \"Failure\": {"]
8459#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionError\""]
8460#[doc = "        }"]
8461#[doc = "      },"]
8462#[doc = "      \"additionalProperties\": false"]
8463#[doc = "    },"]
8464#[doc = "    {"]
8465#[doc = "      \"description\": \"The final action succeeded and returned some value or an empty vec encoded in base64.\","]
8466#[doc = "      \"type\": \"object\","]
8467#[doc = "      \"required\": ["]
8468#[doc = "        \"SuccessValue\""]
8469#[doc = "      ],"]
8470#[doc = "      \"properties\": {"]
8471#[doc = "        \"SuccessValue\": {"]
8472#[doc = "          \"type\": \"string\""]
8473#[doc = "        }"]
8474#[doc = "      },"]
8475#[doc = "      \"additionalProperties\": false"]
8476#[doc = "    },"]
8477#[doc = "    {"]
8478#[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.\","]
8479#[doc = "      \"type\": \"object\","]
8480#[doc = "      \"required\": ["]
8481#[doc = "        \"SuccessReceiptId\""]
8482#[doc = "      ],"]
8483#[doc = "      \"properties\": {"]
8484#[doc = "        \"SuccessReceiptId\": {"]
8485#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
8486#[doc = "        }"]
8487#[doc = "      },"]
8488#[doc = "      \"additionalProperties\": false"]
8489#[doc = "    }"]
8490#[doc = "  ]"]
8491#[doc = "}"]
8492#[doc = r" ```"]
8493#[doc = r" </details>"]
8494#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8495pub enum ExecutionStatusView {
8496    #[doc = "The execution is pending or unknown."]
8497    Unknown,
8498    #[doc = "The execution has failed."]
8499    Failure(TxExecutionError),
8500    #[doc = "The final action succeeded and returned some value or an empty vec encoded in base64."]
8501    SuccessValue(::std::string::String),
8502    #[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."]
8503    SuccessReceiptId(CryptoHash),
8504}
8505impl ::std::convert::From<&Self> for ExecutionStatusView {
8506    fn from(value: &ExecutionStatusView) -> Self {
8507        value.clone()
8508    }
8509}
8510impl ::std::convert::From<TxExecutionError> for ExecutionStatusView {
8511    fn from(value: TxExecutionError) -> Self {
8512        Self::Failure(value)
8513    }
8514}
8515impl ::std::convert::From<CryptoHash> for ExecutionStatusView {
8516    fn from(value: CryptoHash) -> Self {
8517        Self::SuccessReceiptId(value)
8518    }
8519}
8520#[doc = "Typed view of ExtCostsConfig to preserve JSON output field names in protocol\nconfig RPC output."]
8521#[doc = r""]
8522#[doc = r" <details><summary>JSON schema</summary>"]
8523#[doc = r""]
8524#[doc = r" ```json"]
8525#[doc = "{"]
8526#[doc = "  \"description\": \"Typed view of ExtCostsConfig to preserve JSON output field names in protocol\\nconfig RPC output.\","]
8527#[doc = "  \"type\": \"object\","]
8528#[doc = "  \"properties\": {"]
8529#[doc = "    \"alt_bn128_g1_multiexp_base\": {"]
8530#[doc = "      \"description\": \"Base cost for multiexp\","]
8531#[doc = "      \"allOf\": ["]
8532#[doc = "        {"]
8533#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8534#[doc = "        }"]
8535#[doc = "      ]"]
8536#[doc = "    },"]
8537#[doc = "    \"alt_bn128_g1_multiexp_element\": {"]
8538#[doc = "      \"description\": \"Per element cost for multiexp\","]
8539#[doc = "      \"allOf\": ["]
8540#[doc = "        {"]
8541#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8542#[doc = "        }"]
8543#[doc = "      ]"]
8544#[doc = "    },"]
8545#[doc = "    \"alt_bn128_g1_sum_base\": {"]
8546#[doc = "      \"description\": \"Base cost for sum\","]
8547#[doc = "      \"allOf\": ["]
8548#[doc = "        {"]
8549#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8550#[doc = "        }"]
8551#[doc = "      ]"]
8552#[doc = "    },"]
8553#[doc = "    \"alt_bn128_g1_sum_element\": {"]
8554#[doc = "      \"description\": \"Per element cost for sum\","]
8555#[doc = "      \"allOf\": ["]
8556#[doc = "        {"]
8557#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8558#[doc = "        }"]
8559#[doc = "      ]"]
8560#[doc = "    },"]
8561#[doc = "    \"alt_bn128_pairing_check_base\": {"]
8562#[doc = "      \"description\": \"Base cost for pairing check\","]
8563#[doc = "      \"allOf\": ["]
8564#[doc = "        {"]
8565#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8566#[doc = "        }"]
8567#[doc = "      ]"]
8568#[doc = "    },"]
8569#[doc = "    \"alt_bn128_pairing_check_element\": {"]
8570#[doc = "      \"description\": \"Per element cost for pairing check\","]
8571#[doc = "      \"allOf\": ["]
8572#[doc = "        {"]
8573#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8574#[doc = "        }"]
8575#[doc = "      ]"]
8576#[doc = "    },"]
8577#[doc = "    \"base\": {"]
8578#[doc = "      \"description\": \"Base cost for calling a host function.\","]
8579#[doc = "      \"allOf\": ["]
8580#[doc = "        {"]
8581#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8582#[doc = "        }"]
8583#[doc = "      ]"]
8584#[doc = "    },"]
8585#[doc = "    \"bls12381_g1_multiexp_base\": {"]
8586#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8587#[doc = "    },"]
8588#[doc = "    \"bls12381_g1_multiexp_element\": {"]
8589#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8590#[doc = "    },"]
8591#[doc = "    \"bls12381_g2_multiexp_base\": {"]
8592#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8593#[doc = "    },"]
8594#[doc = "    \"bls12381_g2_multiexp_element\": {"]
8595#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8596#[doc = "    },"]
8597#[doc = "    \"bls12381_map_fp2_to_g2_base\": {"]
8598#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8599#[doc = "    },"]
8600#[doc = "    \"bls12381_map_fp2_to_g2_element\": {"]
8601#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8602#[doc = "    },"]
8603#[doc = "    \"bls12381_map_fp_to_g1_base\": {"]
8604#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8605#[doc = "    },"]
8606#[doc = "    \"bls12381_map_fp_to_g1_element\": {"]
8607#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8608#[doc = "    },"]
8609#[doc = "    \"bls12381_p1_decompress_base\": {"]
8610#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8611#[doc = "    },"]
8612#[doc = "    \"bls12381_p1_decompress_element\": {"]
8613#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8614#[doc = "    },"]
8615#[doc = "    \"bls12381_p1_sum_base\": {"]
8616#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8617#[doc = "    },"]
8618#[doc = "    \"bls12381_p1_sum_element\": {"]
8619#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8620#[doc = "    },"]
8621#[doc = "    \"bls12381_p2_decompress_base\": {"]
8622#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8623#[doc = "    },"]
8624#[doc = "    \"bls12381_p2_decompress_element\": {"]
8625#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8626#[doc = "    },"]
8627#[doc = "    \"bls12381_p2_sum_base\": {"]
8628#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8629#[doc = "    },"]
8630#[doc = "    \"bls12381_p2_sum_element\": {"]
8631#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8632#[doc = "    },"]
8633#[doc = "    \"bls12381_pairing_base\": {"]
8634#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8635#[doc = "    },"]
8636#[doc = "    \"bls12381_pairing_element\": {"]
8637#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8638#[doc = "    },"]
8639#[doc = "    \"contract_compile_base\": {"]
8640#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8641#[doc = "    },"]
8642#[doc = "    \"contract_compile_bytes\": {"]
8643#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
8644#[doc = "    },"]
8645#[doc = "    \"contract_loading_base\": {"]
8646#[doc = "      \"description\": \"Base cost of loading a pre-compiled contract\","]
8647#[doc = "      \"allOf\": ["]
8648#[doc = "        {"]
8649#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8650#[doc = "        }"]
8651#[doc = "      ]"]
8652#[doc = "    },"]
8653#[doc = "    \"contract_loading_bytes\": {"]
8654#[doc = "      \"description\": \"Cost per byte of loading a pre-compiled contract\","]
8655#[doc = "      \"allOf\": ["]
8656#[doc = "        {"]
8657#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8658#[doc = "        }"]
8659#[doc = "      ]"]
8660#[doc = "    },"]
8661#[doc = "    \"ecrecover_base\": {"]
8662#[doc = "      \"description\": \"Cost of calling ecrecover\","]
8663#[doc = "      \"allOf\": ["]
8664#[doc = "        {"]
8665#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8666#[doc = "        }"]
8667#[doc = "      ]"]
8668#[doc = "    },"]
8669#[doc = "    \"ed25519_verify_base\": {"]
8670#[doc = "      \"description\": \"Cost of getting ed25519 base\","]
8671#[doc = "      \"allOf\": ["]
8672#[doc = "        {"]
8673#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8674#[doc = "        }"]
8675#[doc = "      ]"]
8676#[doc = "    },"]
8677#[doc = "    \"ed25519_verify_byte\": {"]
8678#[doc = "      \"description\": \"Cost of getting ed25519 per byte\","]
8679#[doc = "      \"allOf\": ["]
8680#[doc = "        {"]
8681#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8682#[doc = "        }"]
8683#[doc = "      ]"]
8684#[doc = "    },"]
8685#[doc = "    \"keccak256_base\": {"]
8686#[doc = "      \"description\": \"Cost of getting sha256 base\","]
8687#[doc = "      \"allOf\": ["]
8688#[doc = "        {"]
8689#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8690#[doc = "        }"]
8691#[doc = "      ]"]
8692#[doc = "    },"]
8693#[doc = "    \"keccak256_byte\": {"]
8694#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
8695#[doc = "      \"allOf\": ["]
8696#[doc = "        {"]
8697#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8698#[doc = "        }"]
8699#[doc = "      ]"]
8700#[doc = "    },"]
8701#[doc = "    \"keccak512_base\": {"]
8702#[doc = "      \"description\": \"Cost of getting sha256 base\","]
8703#[doc = "      \"allOf\": ["]
8704#[doc = "        {"]
8705#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8706#[doc = "        }"]
8707#[doc = "      ]"]
8708#[doc = "    },"]
8709#[doc = "    \"keccak512_byte\": {"]
8710#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
8711#[doc = "      \"allOf\": ["]
8712#[doc = "        {"]
8713#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8714#[doc = "        }"]
8715#[doc = "      ]"]
8716#[doc = "    },"]
8717#[doc = "    \"log_base\": {"]
8718#[doc = "      \"description\": \"Cost for calling logging.\","]
8719#[doc = "      \"allOf\": ["]
8720#[doc = "        {"]
8721#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8722#[doc = "        }"]
8723#[doc = "      ]"]
8724#[doc = "    },"]
8725#[doc = "    \"log_byte\": {"]
8726#[doc = "      \"description\": \"Cost for logging per byte\","]
8727#[doc = "      \"allOf\": ["]
8728#[doc = "        {"]
8729#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8730#[doc = "        }"]
8731#[doc = "      ]"]
8732#[doc = "    },"]
8733#[doc = "    \"promise_and_base\": {"]
8734#[doc = "      \"description\": \"Cost for calling `promise_and`\","]
8735#[doc = "      \"allOf\": ["]
8736#[doc = "        {"]
8737#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8738#[doc = "        }"]
8739#[doc = "      ]"]
8740#[doc = "    },"]
8741#[doc = "    \"promise_and_per_promise\": {"]
8742#[doc = "      \"description\": \"Cost for calling `promise_and` for each promise\","]
8743#[doc = "      \"allOf\": ["]
8744#[doc = "        {"]
8745#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8746#[doc = "        }"]
8747#[doc = "      ]"]
8748#[doc = "    },"]
8749#[doc = "    \"promise_return\": {"]
8750#[doc = "      \"description\": \"Cost for calling `promise_return`\","]
8751#[doc = "      \"allOf\": ["]
8752#[doc = "        {"]
8753#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8754#[doc = "        }"]
8755#[doc = "      ]"]
8756#[doc = "    },"]
8757#[doc = "    \"read_cached_trie_node\": {"]
8758#[doc = "      \"description\": \"Cost for reading trie node from memory\","]
8759#[doc = "      \"allOf\": ["]
8760#[doc = "        {"]
8761#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8762#[doc = "        }"]
8763#[doc = "      ]"]
8764#[doc = "    },"]
8765#[doc = "    \"read_memory_base\": {"]
8766#[doc = "      \"description\": \"Base cost for guest memory read\","]
8767#[doc = "      \"allOf\": ["]
8768#[doc = "        {"]
8769#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8770#[doc = "        }"]
8771#[doc = "      ]"]
8772#[doc = "    },"]
8773#[doc = "    \"read_memory_byte\": {"]
8774#[doc = "      \"description\": \"Cost for guest memory read\","]
8775#[doc = "      \"allOf\": ["]
8776#[doc = "        {"]
8777#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8778#[doc = "        }"]
8779#[doc = "      ]"]
8780#[doc = "    },"]
8781#[doc = "    \"read_register_base\": {"]
8782#[doc = "      \"description\": \"Base cost for reading from register\","]
8783#[doc = "      \"allOf\": ["]
8784#[doc = "        {"]
8785#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8786#[doc = "        }"]
8787#[doc = "      ]"]
8788#[doc = "    },"]
8789#[doc = "    \"read_register_byte\": {"]
8790#[doc = "      \"description\": \"Cost for reading byte from register\","]
8791#[doc = "      \"allOf\": ["]
8792#[doc = "        {"]
8793#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8794#[doc = "        }"]
8795#[doc = "      ]"]
8796#[doc = "    },"]
8797#[doc = "    \"ripemd160_base\": {"]
8798#[doc = "      \"description\": \"Cost of getting ripemd160 base\","]
8799#[doc = "      \"allOf\": ["]
8800#[doc = "        {"]
8801#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8802#[doc = "        }"]
8803#[doc = "      ]"]
8804#[doc = "    },"]
8805#[doc = "    \"ripemd160_block\": {"]
8806#[doc = "      \"description\": \"Cost of getting ripemd160 per message block\","]
8807#[doc = "      \"allOf\": ["]
8808#[doc = "        {"]
8809#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8810#[doc = "        }"]
8811#[doc = "      ]"]
8812#[doc = "    },"]
8813#[doc = "    \"sha256_base\": {"]
8814#[doc = "      \"description\": \"Cost of getting sha256 base\","]
8815#[doc = "      \"allOf\": ["]
8816#[doc = "        {"]
8817#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8818#[doc = "        }"]
8819#[doc = "      ]"]
8820#[doc = "    },"]
8821#[doc = "    \"sha256_byte\": {"]
8822#[doc = "      \"description\": \"Cost of getting sha256 per byte\","]
8823#[doc = "      \"allOf\": ["]
8824#[doc = "        {"]
8825#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8826#[doc = "        }"]
8827#[doc = "      ]"]
8828#[doc = "    },"]
8829#[doc = "    \"storage_has_key_base\": {"]
8830#[doc = "      \"description\": \"Storage trie check for key existence cost base\","]
8831#[doc = "      \"allOf\": ["]
8832#[doc = "        {"]
8833#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8834#[doc = "        }"]
8835#[doc = "      ]"]
8836#[doc = "    },"]
8837#[doc = "    \"storage_has_key_byte\": {"]
8838#[doc = "      \"description\": \"Storage trie check for key existence per key byte\","]
8839#[doc = "      \"allOf\": ["]
8840#[doc = "        {"]
8841#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8842#[doc = "        }"]
8843#[doc = "      ]"]
8844#[doc = "    },"]
8845#[doc = "    \"storage_iter_create_from_byte\": {"]
8846#[doc = "      \"description\": \"Create trie range iterator cost per byte of from key.\","]
8847#[doc = "      \"allOf\": ["]
8848#[doc = "        {"]
8849#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8850#[doc = "        }"]
8851#[doc = "      ]"]
8852#[doc = "    },"]
8853#[doc = "    \"storage_iter_create_prefix_base\": {"]
8854#[doc = "      \"description\": \"Create trie prefix iterator cost base\","]
8855#[doc = "      \"allOf\": ["]
8856#[doc = "        {"]
8857#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8858#[doc = "        }"]
8859#[doc = "      ]"]
8860#[doc = "    },"]
8861#[doc = "    \"storage_iter_create_prefix_byte\": {"]
8862#[doc = "      \"description\": \"Create trie prefix iterator cost per byte.\","]
8863#[doc = "      \"allOf\": ["]
8864#[doc = "        {"]
8865#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8866#[doc = "        }"]
8867#[doc = "      ]"]
8868#[doc = "    },"]
8869#[doc = "    \"storage_iter_create_range_base\": {"]
8870#[doc = "      \"description\": \"Create trie range iterator cost base\","]
8871#[doc = "      \"allOf\": ["]
8872#[doc = "        {"]
8873#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8874#[doc = "        }"]
8875#[doc = "      ]"]
8876#[doc = "    },"]
8877#[doc = "    \"storage_iter_create_to_byte\": {"]
8878#[doc = "      \"description\": \"Create trie range iterator cost per byte of to key.\","]
8879#[doc = "      \"allOf\": ["]
8880#[doc = "        {"]
8881#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8882#[doc = "        }"]
8883#[doc = "      ]"]
8884#[doc = "    },"]
8885#[doc = "    \"storage_iter_next_base\": {"]
8886#[doc = "      \"description\": \"Trie iterator per key base cost\","]
8887#[doc = "      \"allOf\": ["]
8888#[doc = "        {"]
8889#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8890#[doc = "        }"]
8891#[doc = "      ]"]
8892#[doc = "    },"]
8893#[doc = "    \"storage_iter_next_key_byte\": {"]
8894#[doc = "      \"description\": \"Trie iterator next key byte cost\","]
8895#[doc = "      \"allOf\": ["]
8896#[doc = "        {"]
8897#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8898#[doc = "        }"]
8899#[doc = "      ]"]
8900#[doc = "    },"]
8901#[doc = "    \"storage_iter_next_value_byte\": {"]
8902#[doc = "      \"description\": \"Trie iterator next key byte cost\","]
8903#[doc = "      \"allOf\": ["]
8904#[doc = "        {"]
8905#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8906#[doc = "        }"]
8907#[doc = "      ]"]
8908#[doc = "    },"]
8909#[doc = "    \"storage_large_read_overhead_base\": {"]
8910#[doc = "      \"description\": \"Storage trie read key overhead base cost, when doing large reads\","]
8911#[doc = "      \"allOf\": ["]
8912#[doc = "        {"]
8913#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8914#[doc = "        }"]
8915#[doc = "      ]"]
8916#[doc = "    },"]
8917#[doc = "    \"storage_large_read_overhead_byte\": {"]
8918#[doc = "      \"description\": \"Storage trie read key overhead  per-byte cost, when doing large reads\","]
8919#[doc = "      \"allOf\": ["]
8920#[doc = "        {"]
8921#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8922#[doc = "        }"]
8923#[doc = "      ]"]
8924#[doc = "    },"]
8925#[doc = "    \"storage_read_base\": {"]
8926#[doc = "      \"description\": \"Storage trie read key base cost\","]
8927#[doc = "      \"allOf\": ["]
8928#[doc = "        {"]
8929#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8930#[doc = "        }"]
8931#[doc = "      ]"]
8932#[doc = "    },"]
8933#[doc = "    \"storage_read_key_byte\": {"]
8934#[doc = "      \"description\": \"Storage trie read key per byte cost\","]
8935#[doc = "      \"allOf\": ["]
8936#[doc = "        {"]
8937#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8938#[doc = "        }"]
8939#[doc = "      ]"]
8940#[doc = "    },"]
8941#[doc = "    \"storage_read_value_byte\": {"]
8942#[doc = "      \"description\": \"Storage trie read value cost per byte cost\","]
8943#[doc = "      \"allOf\": ["]
8944#[doc = "        {"]
8945#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8946#[doc = "        }"]
8947#[doc = "      ]"]
8948#[doc = "    },"]
8949#[doc = "    \"storage_remove_base\": {"]
8950#[doc = "      \"description\": \"Remove key from trie base cost\","]
8951#[doc = "      \"allOf\": ["]
8952#[doc = "        {"]
8953#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8954#[doc = "        }"]
8955#[doc = "      ]"]
8956#[doc = "    },"]
8957#[doc = "    \"storage_remove_key_byte\": {"]
8958#[doc = "      \"description\": \"Remove key from trie per byte cost\","]
8959#[doc = "      \"allOf\": ["]
8960#[doc = "        {"]
8961#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8962#[doc = "        }"]
8963#[doc = "      ]"]
8964#[doc = "    },"]
8965#[doc = "    \"storage_remove_ret_value_byte\": {"]
8966#[doc = "      \"description\": \"Remove key from trie ret value byte cost\","]
8967#[doc = "      \"allOf\": ["]
8968#[doc = "        {"]
8969#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8970#[doc = "        }"]
8971#[doc = "      ]"]
8972#[doc = "    },"]
8973#[doc = "    \"storage_write_base\": {"]
8974#[doc = "      \"description\": \"Storage trie write key base cost\","]
8975#[doc = "      \"allOf\": ["]
8976#[doc = "        {"]
8977#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8978#[doc = "        }"]
8979#[doc = "      ]"]
8980#[doc = "    },"]
8981#[doc = "    \"storage_write_evicted_byte\": {"]
8982#[doc = "      \"description\": \"Storage trie write cost per byte of evicted value.\","]
8983#[doc = "      \"allOf\": ["]
8984#[doc = "        {"]
8985#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8986#[doc = "        }"]
8987#[doc = "      ]"]
8988#[doc = "    },"]
8989#[doc = "    \"storage_write_key_byte\": {"]
8990#[doc = "      \"description\": \"Storage trie write key per byte cost\","]
8991#[doc = "      \"allOf\": ["]
8992#[doc = "        {"]
8993#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
8994#[doc = "        }"]
8995#[doc = "      ]"]
8996#[doc = "    },"]
8997#[doc = "    \"storage_write_value_byte\": {"]
8998#[doc = "      \"description\": \"Storage trie write value per byte cost\","]
8999#[doc = "      \"allOf\": ["]
9000#[doc = "        {"]
9001#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9002#[doc = "        }"]
9003#[doc = "      ]"]
9004#[doc = "    },"]
9005#[doc = "    \"touching_trie_node\": {"]
9006#[doc = "      \"description\": \"Cost per reading trie node from DB\","]
9007#[doc = "      \"allOf\": ["]
9008#[doc = "        {"]
9009#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9010#[doc = "        }"]
9011#[doc = "      ]"]
9012#[doc = "    },"]
9013#[doc = "    \"utf16_decoding_base\": {"]
9014#[doc = "      \"description\": \"Base cost of decoding utf16. It's used for `log_utf16`.\","]
9015#[doc = "      \"allOf\": ["]
9016#[doc = "        {"]
9017#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9018#[doc = "        }"]
9019#[doc = "      ]"]
9020#[doc = "    },"]
9021#[doc = "    \"utf16_decoding_byte\": {"]
9022#[doc = "      \"description\": \"Cost per byte of decoding utf16. It's used for `log_utf16`.\","]
9023#[doc = "      \"allOf\": ["]
9024#[doc = "        {"]
9025#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9026#[doc = "        }"]
9027#[doc = "      ]"]
9028#[doc = "    },"]
9029#[doc = "    \"utf8_decoding_base\": {"]
9030#[doc = "      \"description\": \"Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
9031#[doc = "      \"allOf\": ["]
9032#[doc = "        {"]
9033#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9034#[doc = "        }"]
9035#[doc = "      ]"]
9036#[doc = "    },"]
9037#[doc = "    \"utf8_decoding_byte\": {"]
9038#[doc = "      \"description\": \"Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
9039#[doc = "      \"allOf\": ["]
9040#[doc = "        {"]
9041#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9042#[doc = "        }"]
9043#[doc = "      ]"]
9044#[doc = "    },"]
9045#[doc = "    \"validator_stake_base\": {"]
9046#[doc = "      \"description\": \"Cost of calling `validator_stake`.\","]
9047#[doc = "      \"allOf\": ["]
9048#[doc = "        {"]
9049#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9050#[doc = "        }"]
9051#[doc = "      ]"]
9052#[doc = "    },"]
9053#[doc = "    \"validator_total_stake_base\": {"]
9054#[doc = "      \"description\": \"Cost of calling `validator_total_stake`.\","]
9055#[doc = "      \"allOf\": ["]
9056#[doc = "        {"]
9057#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9058#[doc = "        }"]
9059#[doc = "      ]"]
9060#[doc = "    },"]
9061#[doc = "    \"write_memory_base\": {"]
9062#[doc = "      \"description\": \"Base cost for guest memory write\","]
9063#[doc = "      \"allOf\": ["]
9064#[doc = "        {"]
9065#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9066#[doc = "        }"]
9067#[doc = "      ]"]
9068#[doc = "    },"]
9069#[doc = "    \"write_memory_byte\": {"]
9070#[doc = "      \"description\": \"Cost for guest memory write per byte\","]
9071#[doc = "      \"allOf\": ["]
9072#[doc = "        {"]
9073#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9074#[doc = "        }"]
9075#[doc = "      ]"]
9076#[doc = "    },"]
9077#[doc = "    \"write_register_base\": {"]
9078#[doc = "      \"description\": \"Base cost for writing into register\","]
9079#[doc = "      \"allOf\": ["]
9080#[doc = "        {"]
9081#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9082#[doc = "        }"]
9083#[doc = "      ]"]
9084#[doc = "    },"]
9085#[doc = "    \"write_register_byte\": {"]
9086#[doc = "      \"description\": \"Cost for writing byte into register\","]
9087#[doc = "      \"allOf\": ["]
9088#[doc = "        {"]
9089#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9090#[doc = "        }"]
9091#[doc = "      ]"]
9092#[doc = "    },"]
9093#[doc = "    \"yield_create_base\": {"]
9094#[doc = "      \"description\": \"Base cost for creating a yield promise.\","]
9095#[doc = "      \"allOf\": ["]
9096#[doc = "        {"]
9097#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9098#[doc = "        }"]
9099#[doc = "      ]"]
9100#[doc = "    },"]
9101#[doc = "    \"yield_create_byte\": {"]
9102#[doc = "      \"description\": \"Per byte cost of arguments and method name.\","]
9103#[doc = "      \"allOf\": ["]
9104#[doc = "        {"]
9105#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9106#[doc = "        }"]
9107#[doc = "      ]"]
9108#[doc = "    },"]
9109#[doc = "    \"yield_resume_base\": {"]
9110#[doc = "      \"description\": \"Base cost for resuming a yield receipt.\","]
9111#[doc = "      \"allOf\": ["]
9112#[doc = "        {"]
9113#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9114#[doc = "        }"]
9115#[doc = "      ]"]
9116#[doc = "    },"]
9117#[doc = "    \"yield_resume_byte\": {"]
9118#[doc = "      \"description\": \"Per byte cost of resume payload.\","]
9119#[doc = "      \"allOf\": ["]
9120#[doc = "        {"]
9121#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9122#[doc = "        }"]
9123#[doc = "      ]"]
9124#[doc = "    }"]
9125#[doc = "  }"]
9126#[doc = "}"]
9127#[doc = r" ```"]
9128#[doc = r" </details>"]
9129#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9130pub struct ExtCostsConfigView {
9131    #[doc = "Base cost for multiexp"]
9132    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9133    pub alt_bn128_g1_multiexp_base: ::std::option::Option<NearGas>,
9134    #[doc = "Per element cost for multiexp"]
9135    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9136    pub alt_bn128_g1_multiexp_element: ::std::option::Option<NearGas>,
9137    #[doc = "Base cost for sum"]
9138    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9139    pub alt_bn128_g1_sum_base: ::std::option::Option<NearGas>,
9140    #[doc = "Per element cost for sum"]
9141    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9142    pub alt_bn128_g1_sum_element: ::std::option::Option<NearGas>,
9143    #[doc = "Base cost for pairing check"]
9144    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9145    pub alt_bn128_pairing_check_base: ::std::option::Option<NearGas>,
9146    #[doc = "Per element cost for pairing check"]
9147    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9148    pub alt_bn128_pairing_check_element: ::std::option::Option<NearGas>,
9149    #[doc = "Base cost for calling a host function."]
9150    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9151    pub base: ::std::option::Option<NearGas>,
9152    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9153    pub bls12381_g1_multiexp_base: ::std::option::Option<NearGas>,
9154    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9155    pub bls12381_g1_multiexp_element: ::std::option::Option<NearGas>,
9156    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9157    pub bls12381_g2_multiexp_base: ::std::option::Option<NearGas>,
9158    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9159    pub bls12381_g2_multiexp_element: ::std::option::Option<NearGas>,
9160    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9161    pub bls12381_map_fp2_to_g2_base: ::std::option::Option<NearGas>,
9162    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9163    pub bls12381_map_fp2_to_g2_element: ::std::option::Option<NearGas>,
9164    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9165    pub bls12381_map_fp_to_g1_base: ::std::option::Option<NearGas>,
9166    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9167    pub bls12381_map_fp_to_g1_element: ::std::option::Option<NearGas>,
9168    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9169    pub bls12381_p1_decompress_base: ::std::option::Option<NearGas>,
9170    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9171    pub bls12381_p1_decompress_element: ::std::option::Option<NearGas>,
9172    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9173    pub bls12381_p1_sum_base: ::std::option::Option<NearGas>,
9174    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9175    pub bls12381_p1_sum_element: ::std::option::Option<NearGas>,
9176    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9177    pub bls12381_p2_decompress_base: ::std::option::Option<NearGas>,
9178    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9179    pub bls12381_p2_decompress_element: ::std::option::Option<NearGas>,
9180    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9181    pub bls12381_p2_sum_base: ::std::option::Option<NearGas>,
9182    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9183    pub bls12381_p2_sum_element: ::std::option::Option<NearGas>,
9184    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9185    pub bls12381_pairing_base: ::std::option::Option<NearGas>,
9186    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9187    pub bls12381_pairing_element: ::std::option::Option<NearGas>,
9188    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9189    pub contract_compile_base: ::std::option::Option<NearGas>,
9190    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9191    pub contract_compile_bytes: ::std::option::Option<NearGas>,
9192    #[doc = "Base cost of loading a pre-compiled contract"]
9193    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9194    pub contract_loading_base: ::std::option::Option<NearGas>,
9195    #[doc = "Cost per byte of loading a pre-compiled contract"]
9196    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9197    pub contract_loading_bytes: ::std::option::Option<NearGas>,
9198    #[doc = "Cost of calling ecrecover"]
9199    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9200    pub ecrecover_base: ::std::option::Option<NearGas>,
9201    #[doc = "Cost of getting ed25519 base"]
9202    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9203    pub ed25519_verify_base: ::std::option::Option<NearGas>,
9204    #[doc = "Cost of getting ed25519 per byte"]
9205    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9206    pub ed25519_verify_byte: ::std::option::Option<NearGas>,
9207    #[doc = "Cost of getting sha256 base"]
9208    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9209    pub keccak256_base: ::std::option::Option<NearGas>,
9210    #[doc = "Cost of getting sha256 per byte"]
9211    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9212    pub keccak256_byte: ::std::option::Option<NearGas>,
9213    #[doc = "Cost of getting sha256 base"]
9214    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9215    pub keccak512_base: ::std::option::Option<NearGas>,
9216    #[doc = "Cost of getting sha256 per byte"]
9217    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9218    pub keccak512_byte: ::std::option::Option<NearGas>,
9219    #[doc = "Cost for calling logging."]
9220    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9221    pub log_base: ::std::option::Option<NearGas>,
9222    #[doc = "Cost for logging per byte"]
9223    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9224    pub log_byte: ::std::option::Option<NearGas>,
9225    #[doc = "Cost for calling `promise_and`"]
9226    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9227    pub promise_and_base: ::std::option::Option<NearGas>,
9228    #[doc = "Cost for calling `promise_and` for each promise"]
9229    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9230    pub promise_and_per_promise: ::std::option::Option<NearGas>,
9231    #[doc = "Cost for calling `promise_return`"]
9232    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9233    pub promise_return: ::std::option::Option<NearGas>,
9234    #[doc = "Cost for reading trie node from memory"]
9235    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9236    pub read_cached_trie_node: ::std::option::Option<NearGas>,
9237    #[doc = "Base cost for guest memory read"]
9238    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9239    pub read_memory_base: ::std::option::Option<NearGas>,
9240    #[doc = "Cost for guest memory read"]
9241    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9242    pub read_memory_byte: ::std::option::Option<NearGas>,
9243    #[doc = "Base cost for reading from register"]
9244    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9245    pub read_register_base: ::std::option::Option<NearGas>,
9246    #[doc = "Cost for reading byte from register"]
9247    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9248    pub read_register_byte: ::std::option::Option<NearGas>,
9249    #[doc = "Cost of getting ripemd160 base"]
9250    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9251    pub ripemd160_base: ::std::option::Option<NearGas>,
9252    #[doc = "Cost of getting ripemd160 per message block"]
9253    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9254    pub ripemd160_block: ::std::option::Option<NearGas>,
9255    #[doc = "Cost of getting sha256 base"]
9256    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9257    pub sha256_base: ::std::option::Option<NearGas>,
9258    #[doc = "Cost of getting sha256 per byte"]
9259    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9260    pub sha256_byte: ::std::option::Option<NearGas>,
9261    #[doc = "Storage trie check for key existence cost base"]
9262    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9263    pub storage_has_key_base: ::std::option::Option<NearGas>,
9264    #[doc = "Storage trie check for key existence per key byte"]
9265    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9266    pub storage_has_key_byte: ::std::option::Option<NearGas>,
9267    #[doc = "Create trie range iterator cost per byte of from key."]
9268    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9269    pub storage_iter_create_from_byte: ::std::option::Option<NearGas>,
9270    #[doc = "Create trie prefix iterator cost base"]
9271    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9272    pub storage_iter_create_prefix_base: ::std::option::Option<NearGas>,
9273    #[doc = "Create trie prefix iterator cost per byte."]
9274    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9275    pub storage_iter_create_prefix_byte: ::std::option::Option<NearGas>,
9276    #[doc = "Create trie range iterator cost base"]
9277    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9278    pub storage_iter_create_range_base: ::std::option::Option<NearGas>,
9279    #[doc = "Create trie range iterator cost per byte of to key."]
9280    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9281    pub storage_iter_create_to_byte: ::std::option::Option<NearGas>,
9282    #[doc = "Trie iterator per key base cost"]
9283    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9284    pub storage_iter_next_base: ::std::option::Option<NearGas>,
9285    #[doc = "Trie iterator next key byte cost"]
9286    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9287    pub storage_iter_next_key_byte: ::std::option::Option<NearGas>,
9288    #[doc = "Trie iterator next key byte cost"]
9289    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9290    pub storage_iter_next_value_byte: ::std::option::Option<NearGas>,
9291    #[doc = "Storage trie read key overhead base cost, when doing large reads"]
9292    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9293    pub storage_large_read_overhead_base: ::std::option::Option<NearGas>,
9294    #[doc = "Storage trie read key overhead  per-byte cost, when doing large reads"]
9295    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9296    pub storage_large_read_overhead_byte: ::std::option::Option<NearGas>,
9297    #[doc = "Storage trie read key base cost"]
9298    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9299    pub storage_read_base: ::std::option::Option<NearGas>,
9300    #[doc = "Storage trie read key per byte cost"]
9301    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9302    pub storage_read_key_byte: ::std::option::Option<NearGas>,
9303    #[doc = "Storage trie read value cost per byte cost"]
9304    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9305    pub storage_read_value_byte: ::std::option::Option<NearGas>,
9306    #[doc = "Remove key from trie base cost"]
9307    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9308    pub storage_remove_base: ::std::option::Option<NearGas>,
9309    #[doc = "Remove key from trie per byte cost"]
9310    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9311    pub storage_remove_key_byte: ::std::option::Option<NearGas>,
9312    #[doc = "Remove key from trie ret value byte cost"]
9313    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9314    pub storage_remove_ret_value_byte: ::std::option::Option<NearGas>,
9315    #[doc = "Storage trie write key base cost"]
9316    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9317    pub storage_write_base: ::std::option::Option<NearGas>,
9318    #[doc = "Storage trie write cost per byte of evicted value."]
9319    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9320    pub storage_write_evicted_byte: ::std::option::Option<NearGas>,
9321    #[doc = "Storage trie write key per byte cost"]
9322    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9323    pub storage_write_key_byte: ::std::option::Option<NearGas>,
9324    #[doc = "Storage trie write value per byte cost"]
9325    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9326    pub storage_write_value_byte: ::std::option::Option<NearGas>,
9327    #[doc = "Cost per reading trie node from DB"]
9328    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9329    pub touching_trie_node: ::std::option::Option<NearGas>,
9330    #[doc = "Base cost of decoding utf16. It's used for `log_utf16`."]
9331    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9332    pub utf16_decoding_base: ::std::option::Option<NearGas>,
9333    #[doc = "Cost per byte of decoding utf16. It's used for `log_utf16`."]
9334    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9335    pub utf16_decoding_byte: ::std::option::Option<NearGas>,
9336    #[doc = "Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
9337    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9338    pub utf8_decoding_base: ::std::option::Option<NearGas>,
9339    #[doc = "Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
9340    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9341    pub utf8_decoding_byte: ::std::option::Option<NearGas>,
9342    #[doc = "Cost of calling `validator_stake`."]
9343    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9344    pub validator_stake_base: ::std::option::Option<NearGas>,
9345    #[doc = "Cost of calling `validator_total_stake`."]
9346    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9347    pub validator_total_stake_base: ::std::option::Option<NearGas>,
9348    #[doc = "Base cost for guest memory write"]
9349    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9350    pub write_memory_base: ::std::option::Option<NearGas>,
9351    #[doc = "Cost for guest memory write per byte"]
9352    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9353    pub write_memory_byte: ::std::option::Option<NearGas>,
9354    #[doc = "Base cost for writing into register"]
9355    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9356    pub write_register_base: ::std::option::Option<NearGas>,
9357    #[doc = "Cost for writing byte into register"]
9358    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9359    pub write_register_byte: ::std::option::Option<NearGas>,
9360    #[doc = "Base cost for creating a yield promise."]
9361    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9362    pub yield_create_base: ::std::option::Option<NearGas>,
9363    #[doc = "Per byte cost of arguments and method name."]
9364    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9365    pub yield_create_byte: ::std::option::Option<NearGas>,
9366    #[doc = "Base cost for resuming a yield receipt."]
9367    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9368    pub yield_resume_base: ::std::option::Option<NearGas>,
9369    #[doc = "Per byte cost of resume payload."]
9370    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9371    pub yield_resume_byte: ::std::option::Option<NearGas>,
9372}
9373impl ::std::convert::From<&ExtCostsConfigView> for ExtCostsConfigView {
9374    fn from(value: &ExtCostsConfigView) -> Self {
9375        value.clone()
9376    }
9377}
9378impl ::std::default::Default for ExtCostsConfigView {
9379    fn default() -> Self {
9380        Self {
9381            alt_bn128_g1_multiexp_base: Default::default(),
9382            alt_bn128_g1_multiexp_element: Default::default(),
9383            alt_bn128_g1_sum_base: Default::default(),
9384            alt_bn128_g1_sum_element: Default::default(),
9385            alt_bn128_pairing_check_base: Default::default(),
9386            alt_bn128_pairing_check_element: Default::default(),
9387            base: Default::default(),
9388            bls12381_g1_multiexp_base: Default::default(),
9389            bls12381_g1_multiexp_element: Default::default(),
9390            bls12381_g2_multiexp_base: Default::default(),
9391            bls12381_g2_multiexp_element: Default::default(),
9392            bls12381_map_fp2_to_g2_base: Default::default(),
9393            bls12381_map_fp2_to_g2_element: Default::default(),
9394            bls12381_map_fp_to_g1_base: Default::default(),
9395            bls12381_map_fp_to_g1_element: Default::default(),
9396            bls12381_p1_decompress_base: Default::default(),
9397            bls12381_p1_decompress_element: Default::default(),
9398            bls12381_p1_sum_base: Default::default(),
9399            bls12381_p1_sum_element: Default::default(),
9400            bls12381_p2_decompress_base: Default::default(),
9401            bls12381_p2_decompress_element: Default::default(),
9402            bls12381_p2_sum_base: Default::default(),
9403            bls12381_p2_sum_element: Default::default(),
9404            bls12381_pairing_base: Default::default(),
9405            bls12381_pairing_element: Default::default(),
9406            contract_compile_base: Default::default(),
9407            contract_compile_bytes: Default::default(),
9408            contract_loading_base: Default::default(),
9409            contract_loading_bytes: Default::default(),
9410            ecrecover_base: Default::default(),
9411            ed25519_verify_base: Default::default(),
9412            ed25519_verify_byte: Default::default(),
9413            keccak256_base: Default::default(),
9414            keccak256_byte: Default::default(),
9415            keccak512_base: Default::default(),
9416            keccak512_byte: Default::default(),
9417            log_base: Default::default(),
9418            log_byte: Default::default(),
9419            promise_and_base: Default::default(),
9420            promise_and_per_promise: Default::default(),
9421            promise_return: Default::default(),
9422            read_cached_trie_node: Default::default(),
9423            read_memory_base: Default::default(),
9424            read_memory_byte: Default::default(),
9425            read_register_base: Default::default(),
9426            read_register_byte: Default::default(),
9427            ripemd160_base: Default::default(),
9428            ripemd160_block: Default::default(),
9429            sha256_base: Default::default(),
9430            sha256_byte: Default::default(),
9431            storage_has_key_base: Default::default(),
9432            storage_has_key_byte: Default::default(),
9433            storage_iter_create_from_byte: Default::default(),
9434            storage_iter_create_prefix_base: Default::default(),
9435            storage_iter_create_prefix_byte: Default::default(),
9436            storage_iter_create_range_base: Default::default(),
9437            storage_iter_create_to_byte: Default::default(),
9438            storage_iter_next_base: Default::default(),
9439            storage_iter_next_key_byte: Default::default(),
9440            storage_iter_next_value_byte: Default::default(),
9441            storage_large_read_overhead_base: Default::default(),
9442            storage_large_read_overhead_byte: Default::default(),
9443            storage_read_base: Default::default(),
9444            storage_read_key_byte: Default::default(),
9445            storage_read_value_byte: Default::default(),
9446            storage_remove_base: Default::default(),
9447            storage_remove_key_byte: Default::default(),
9448            storage_remove_ret_value_byte: Default::default(),
9449            storage_write_base: Default::default(),
9450            storage_write_evicted_byte: Default::default(),
9451            storage_write_key_byte: Default::default(),
9452            storage_write_value_byte: Default::default(),
9453            touching_trie_node: Default::default(),
9454            utf16_decoding_base: Default::default(),
9455            utf16_decoding_byte: Default::default(),
9456            utf8_decoding_base: Default::default(),
9457            utf8_decoding_byte: Default::default(),
9458            validator_stake_base: Default::default(),
9459            validator_total_stake_base: Default::default(),
9460            write_memory_base: Default::default(),
9461            write_memory_byte: Default::default(),
9462            write_register_base: Default::default(),
9463            write_register_byte: Default::default(),
9464            yield_create_base: Default::default(),
9465            yield_create_byte: Default::default(),
9466            yield_resume_base: Default::default(),
9467            yield_resume_byte: Default::default(),
9468        }
9469    }
9470}
9471#[doc = "`ExternalStorageConfig`"]
9472#[doc = r""]
9473#[doc = r" <details><summary>JSON schema</summary>"]
9474#[doc = r""]
9475#[doc = r" ```json"]
9476#[doc = "{"]
9477#[doc = "  \"type\": \"object\","]
9478#[doc = "  \"properties\": {"]
9479#[doc = "    \"external_storage_fallback_threshold\": {"]
9480#[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.\","]
9481#[doc = "      \"default\": 3,"]
9482#[doc = "      \"type\": \"integer\","]
9483#[doc = "      \"format\": \"uint64\","]
9484#[doc = "      \"minimum\": 0.0"]
9485#[doc = "    },"]
9486#[doc = "    \"location\": {"]
9487#[doc = "      \"description\": \"Location of state parts.\","]
9488#[doc = "      \"allOf\": ["]
9489#[doc = "        {"]
9490#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
9491#[doc = "        }"]
9492#[doc = "      ]"]
9493#[doc = "    },"]
9494#[doc = "    \"num_concurrent_requests\": {"]
9495#[doc = "      \"description\": \"When fetching state parts from external storage, throttle fetch requests\\nto this many concurrent requests.\","]
9496#[doc = "      \"default\": 25,"]
9497#[doc = "      \"type\": \"integer\","]
9498#[doc = "      \"format\": \"uint8\","]
9499#[doc = "      \"maximum\": 255.0,"]
9500#[doc = "      \"minimum\": 0.0"]
9501#[doc = "    },"]
9502#[doc = "    \"num_concurrent_requests_during_catchup\": {"]
9503#[doc = "      \"description\": \"During catchup, the node will use a different number of concurrent requests\\nto reduce the performance impact of state sync.\","]
9504#[doc = "      \"default\": 5,"]
9505#[doc = "      \"type\": \"integer\","]
9506#[doc = "      \"format\": \"uint8\","]
9507#[doc = "      \"maximum\": 255.0,"]
9508#[doc = "      \"minimum\": 0.0"]
9509#[doc = "    }"]
9510#[doc = "  }"]
9511#[doc = "}"]
9512#[doc = r" ```"]
9513#[doc = r" </details>"]
9514#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9515pub struct ExternalStorageConfig {
9516    #[doc = "The number of attempts the node will make to obtain a part from peers in\nthe network before it fetches from external storage."]
9517    #[serde(default = "defaults::default_u64::<u64, 3>")]
9518    pub external_storage_fallback_threshold: u64,
9519    #[doc = "Location of state parts."]
9520    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9521    pub location: ::std::option::Option<ExternalStorageLocation>,
9522    #[doc = "When fetching state parts from external storage, throttle fetch requests\nto this many concurrent requests."]
9523    #[serde(default = "defaults::default_u64::<u8, 25>")]
9524    pub num_concurrent_requests: u8,
9525    #[doc = "During catchup, the node will use a different number of concurrent requests\nto reduce the performance impact of state sync."]
9526    #[serde(default = "defaults::default_u64::<u8, 5>")]
9527    pub num_concurrent_requests_during_catchup: u8,
9528}
9529impl ::std::convert::From<&ExternalStorageConfig> for ExternalStorageConfig {
9530    fn from(value: &ExternalStorageConfig) -> Self {
9531        value.clone()
9532    }
9533}
9534impl ::std::default::Default for ExternalStorageConfig {
9535    fn default() -> Self {
9536        Self {
9537            external_storage_fallback_threshold: defaults::default_u64::<u64, 3>(),
9538            location: Default::default(),
9539            num_concurrent_requests: defaults::default_u64::<u8, 25>(),
9540            num_concurrent_requests_during_catchup: defaults::default_u64::<u8, 5>(),
9541        }
9542    }
9543}
9544#[doc = "Supported external storage backends and their minimal config."]
9545#[doc = r""]
9546#[doc = r" <details><summary>JSON schema</summary>"]
9547#[doc = r""]
9548#[doc = r" ```json"]
9549#[doc = "{"]
9550#[doc = "  \"description\": \"Supported external storage backends and their minimal config.\","]
9551#[doc = "  \"oneOf\": ["]
9552#[doc = "    {"]
9553#[doc = "      \"type\": \"object\","]
9554#[doc = "      \"required\": ["]
9555#[doc = "        \"S3\""]
9556#[doc = "      ],"]
9557#[doc = "      \"properties\": {"]
9558#[doc = "        \"S3\": {"]
9559#[doc = "          \"type\": \"object\","]
9560#[doc = "          \"required\": ["]
9561#[doc = "            \"bucket\","]
9562#[doc = "            \"region\""]
9563#[doc = "          ],"]
9564#[doc = "          \"properties\": {"]
9565#[doc = "            \"bucket\": {"]
9566#[doc = "              \"description\": \"Location on S3.\","]
9567#[doc = "              \"type\": \"string\""]
9568#[doc = "            },"]
9569#[doc = "            \"region\": {"]
9570#[doc = "              \"description\": \"Data may only be available in certain locations.\","]
9571#[doc = "              \"type\": \"string\""]
9572#[doc = "            }"]
9573#[doc = "          }"]
9574#[doc = "        }"]
9575#[doc = "      },"]
9576#[doc = "      \"additionalProperties\": false"]
9577#[doc = "    },"]
9578#[doc = "    {"]
9579#[doc = "      \"description\": \"Local filesystem root for storing data.\","]
9580#[doc = "      \"type\": \"object\","]
9581#[doc = "      \"required\": ["]
9582#[doc = "        \"Filesystem\""]
9583#[doc = "      ],"]
9584#[doc = "      \"properties\": {"]
9585#[doc = "        \"Filesystem\": {"]
9586#[doc = "          \"type\": \"object\","]
9587#[doc = "          \"required\": ["]
9588#[doc = "            \"root_dir\""]
9589#[doc = "          ],"]
9590#[doc = "          \"properties\": {"]
9591#[doc = "            \"root_dir\": {"]
9592#[doc = "              \"type\": \"string\""]
9593#[doc = "            }"]
9594#[doc = "          }"]
9595#[doc = "        }"]
9596#[doc = "      },"]
9597#[doc = "      \"additionalProperties\": false"]
9598#[doc = "    },"]
9599#[doc = "    {"]
9600#[doc = "      \"description\": \"Google Cloud Storage bucket name.\","]
9601#[doc = "      \"type\": \"object\","]
9602#[doc = "      \"required\": ["]
9603#[doc = "        \"GCS\""]
9604#[doc = "      ],"]
9605#[doc = "      \"properties\": {"]
9606#[doc = "        \"GCS\": {"]
9607#[doc = "          \"type\": \"object\","]
9608#[doc = "          \"required\": ["]
9609#[doc = "            \"bucket\""]
9610#[doc = "          ],"]
9611#[doc = "          \"properties\": {"]
9612#[doc = "            \"bucket\": {"]
9613#[doc = "              \"type\": \"string\""]
9614#[doc = "            }"]
9615#[doc = "          }"]
9616#[doc = "        }"]
9617#[doc = "      },"]
9618#[doc = "      \"additionalProperties\": false"]
9619#[doc = "    }"]
9620#[doc = "  ]"]
9621#[doc = "}"]
9622#[doc = r" ```"]
9623#[doc = r" </details>"]
9624#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9625pub enum ExternalStorageLocation {
9626    S3 {
9627        #[doc = "Location on S3."]
9628        bucket: ::std::string::String,
9629        #[doc = "Data may only be available in certain locations."]
9630        region: ::std::string::String,
9631    },
9632    #[doc = "Local filesystem root for storing data."]
9633    Filesystem { root_dir: ::std::string::String },
9634    #[doc = "Google Cloud Storage bucket name."]
9635    #[serde(rename = "GCS")]
9636    Gcs { bucket: ::std::string::String },
9637}
9638impl ::std::convert::From<&Self> for ExternalStorageLocation {
9639    fn from(value: &ExternalStorageLocation) -> Self {
9640        value.clone()
9641    }
9642}
9643#[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."]
9644#[doc = r""]
9645#[doc = r" <details><summary>JSON schema</summary>"]
9646#[doc = r""]
9647#[doc = r" ```json"]
9648#[doc = "{"]
9649#[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.\","]
9650#[doc = "  \"type\": \"object\","]
9651#[doc = "  \"required\": ["]
9652#[doc = "    \"execution\","]
9653#[doc = "    \"send_not_sir\","]
9654#[doc = "    \"send_sir\""]
9655#[doc = "  ],"]
9656#[doc = "  \"properties\": {"]
9657#[doc = "    \"execution\": {"]
9658#[doc = "      \"description\": \"Fee for executing the object.\","]
9659#[doc = "      \"allOf\": ["]
9660#[doc = "        {"]
9661#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9662#[doc = "        }"]
9663#[doc = "      ]"]
9664#[doc = "    },"]
9665#[doc = "    \"send_not_sir\": {"]
9666#[doc = "      \"description\": \"Fee for sending an object potentially across the shards.\","]
9667#[doc = "      \"allOf\": ["]
9668#[doc = "        {"]
9669#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9670#[doc = "        }"]
9671#[doc = "      ]"]
9672#[doc = "    },"]
9673#[doc = "    \"send_sir\": {"]
9674#[doc = "      \"description\": \"Fee for sending an object from the sender to itself, guaranteeing that it does not leave\\nthe shard.\","]
9675#[doc = "      \"allOf\": ["]
9676#[doc = "        {"]
9677#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
9678#[doc = "        }"]
9679#[doc = "      ]"]
9680#[doc = "    }"]
9681#[doc = "  }"]
9682#[doc = "}"]
9683#[doc = r" ```"]
9684#[doc = r" </details>"]
9685#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9686pub struct Fee {
9687    #[doc = "Fee for executing the object."]
9688    pub execution: NearGas,
9689    #[doc = "Fee for sending an object potentially across the shards."]
9690    pub send_not_sir: NearGas,
9691    #[doc = "Fee for sending an object from the sender to itself, guaranteeing that it does not leave\nthe shard."]
9692    pub send_sir: NearGas,
9693}
9694impl ::std::convert::From<&Fee> for Fee {
9695    fn from(value: &Fee) -> Self {
9696        value.clone()
9697    }
9698}
9699#[doc = "Execution outcome of the transaction and all the subsequent receipts.\nCould be not finalized yet"]
9700#[doc = r""]
9701#[doc = r" <details><summary>JSON schema</summary>"]
9702#[doc = r""]
9703#[doc = r" ```json"]
9704#[doc = "{"]
9705#[doc = "  \"description\": \"Execution outcome of the transaction and all the subsequent receipts.\\nCould be not finalized yet\","]
9706#[doc = "  \"type\": \"object\","]
9707#[doc = "  \"required\": ["]
9708#[doc = "    \"receipts_outcome\","]
9709#[doc = "    \"status\","]
9710#[doc = "    \"transaction\","]
9711#[doc = "    \"transaction_outcome\""]
9712#[doc = "  ],"]
9713#[doc = "  \"properties\": {"]
9714#[doc = "    \"receipts_outcome\": {"]
9715#[doc = "      \"description\": \"The execution outcome of receipts.\","]
9716#[doc = "      \"type\": \"array\","]
9717#[doc = "      \"items\": {"]
9718#[doc = "        \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9719#[doc = "      }"]
9720#[doc = "    },"]
9721#[doc = "    \"status\": {"]
9722#[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\","]
9723#[doc = "      \"allOf\": ["]
9724#[doc = "        {"]
9725#[doc = "          \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
9726#[doc = "        }"]
9727#[doc = "      ]"]
9728#[doc = "    },"]
9729#[doc = "    \"transaction\": {"]
9730#[doc = "      \"description\": \"Signed Transaction\","]
9731#[doc = "      \"allOf\": ["]
9732#[doc = "        {"]
9733#[doc = "          \"$ref\": \"#/components/schemas/SignedTransactionView\""]
9734#[doc = "        }"]
9735#[doc = "      ]"]
9736#[doc = "    },"]
9737#[doc = "    \"transaction_outcome\": {"]
9738#[doc = "      \"description\": \"The execution outcome of the signed transaction.\","]
9739#[doc = "      \"allOf\": ["]
9740#[doc = "        {"]
9741#[doc = "          \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9742#[doc = "        }"]
9743#[doc = "      ]"]
9744#[doc = "    }"]
9745#[doc = "  }"]
9746#[doc = "}"]
9747#[doc = r" ```"]
9748#[doc = r" </details>"]
9749#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9750pub struct FinalExecutionOutcomeView {
9751    #[doc = "The execution outcome of receipts."]
9752    pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
9753    #[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"]
9754    pub status: FinalExecutionStatus,
9755    #[doc = "Signed Transaction"]
9756    pub transaction: SignedTransactionView,
9757    #[doc = "The execution outcome of the signed transaction."]
9758    pub transaction_outcome: ExecutionOutcomeWithIdView,
9759}
9760impl ::std::convert::From<&FinalExecutionOutcomeView> for FinalExecutionOutcomeView {
9761    fn from(value: &FinalExecutionOutcomeView) -> Self {
9762        value.clone()
9763    }
9764}
9765#[doc = "Final execution outcome of the transaction and all of subsequent the receipts. Also includes\nthe generated receipt."]
9766#[doc = r""]
9767#[doc = r" <details><summary>JSON schema</summary>"]
9768#[doc = r""]
9769#[doc = r" ```json"]
9770#[doc = "{"]
9771#[doc = "  \"description\": \"Final execution outcome of the transaction and all of subsequent the receipts. Also includes\\nthe generated receipt.\","]
9772#[doc = "  \"type\": \"object\","]
9773#[doc = "  \"required\": ["]
9774#[doc = "    \"receipts\","]
9775#[doc = "    \"receipts_outcome\","]
9776#[doc = "    \"status\","]
9777#[doc = "    \"transaction\","]
9778#[doc = "    \"transaction_outcome\""]
9779#[doc = "  ],"]
9780#[doc = "  \"properties\": {"]
9781#[doc = "    \"receipts\": {"]
9782#[doc = "      \"description\": \"Receipts generated from the transaction\","]
9783#[doc = "      \"type\": \"array\","]
9784#[doc = "      \"items\": {"]
9785#[doc = "        \"$ref\": \"#/components/schemas/ReceiptView\""]
9786#[doc = "      }"]
9787#[doc = "    },"]
9788#[doc = "    \"receipts_outcome\": {"]
9789#[doc = "      \"description\": \"The execution outcome of receipts.\","]
9790#[doc = "      \"type\": \"array\","]
9791#[doc = "      \"items\": {"]
9792#[doc = "        \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9793#[doc = "      }"]
9794#[doc = "    },"]
9795#[doc = "    \"status\": {"]
9796#[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\","]
9797#[doc = "      \"allOf\": ["]
9798#[doc = "        {"]
9799#[doc = "          \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
9800#[doc = "        }"]
9801#[doc = "      ]"]
9802#[doc = "    },"]
9803#[doc = "    \"transaction\": {"]
9804#[doc = "      \"description\": \"Signed Transaction\","]
9805#[doc = "      \"allOf\": ["]
9806#[doc = "        {"]
9807#[doc = "          \"$ref\": \"#/components/schemas/SignedTransactionView\""]
9808#[doc = "        }"]
9809#[doc = "      ]"]
9810#[doc = "    },"]
9811#[doc = "    \"transaction_outcome\": {"]
9812#[doc = "      \"description\": \"The execution outcome of the signed transaction.\","]
9813#[doc = "      \"allOf\": ["]
9814#[doc = "        {"]
9815#[doc = "          \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9816#[doc = "        }"]
9817#[doc = "      ]"]
9818#[doc = "    }"]
9819#[doc = "  }"]
9820#[doc = "}"]
9821#[doc = r" ```"]
9822#[doc = r" </details>"]
9823#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9824pub struct FinalExecutionOutcomeWithReceiptView {
9825    #[doc = "Receipts generated from the transaction"]
9826    pub receipts: ::std::vec::Vec<ReceiptView>,
9827    #[doc = "The execution outcome of receipts."]
9828    pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
9829    #[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"]
9830    pub status: FinalExecutionStatus,
9831    #[doc = "Signed Transaction"]
9832    pub transaction: SignedTransactionView,
9833    #[doc = "The execution outcome of the signed transaction."]
9834    pub transaction_outcome: ExecutionOutcomeWithIdView,
9835}
9836impl ::std::convert::From<&FinalExecutionOutcomeWithReceiptView>
9837    for FinalExecutionOutcomeWithReceiptView
9838{
9839    fn from(value: &FinalExecutionOutcomeWithReceiptView) -> Self {
9840        value.clone()
9841    }
9842}
9843#[doc = "`FinalExecutionStatus`"]
9844#[doc = r""]
9845#[doc = r" <details><summary>JSON schema</summary>"]
9846#[doc = r""]
9847#[doc = r" ```json"]
9848#[doc = "{"]
9849#[doc = "  \"oneOf\": ["]
9850#[doc = "    {"]
9851#[doc = "      \"description\": \"The execution has not yet started.\","]
9852#[doc = "      \"type\": \"string\","]
9853#[doc = "      \"enum\": ["]
9854#[doc = "        \"NotStarted\""]
9855#[doc = "      ]"]
9856#[doc = "    },"]
9857#[doc = "    {"]
9858#[doc = "      \"description\": \"The execution has started and still going.\","]
9859#[doc = "      \"type\": \"string\","]
9860#[doc = "      \"enum\": ["]
9861#[doc = "        \"Started\""]
9862#[doc = "      ]"]
9863#[doc = "    },"]
9864#[doc = "    {"]
9865#[doc = "      \"description\": \"The execution has failed with the given error.\","]
9866#[doc = "      \"type\": \"object\","]
9867#[doc = "      \"required\": ["]
9868#[doc = "        \"Failure\""]
9869#[doc = "      ],"]
9870#[doc = "      \"properties\": {"]
9871#[doc = "        \"Failure\": {"]
9872#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionError\""]
9873#[doc = "        }"]
9874#[doc = "      },"]
9875#[doc = "      \"additionalProperties\": false"]
9876#[doc = "    },"]
9877#[doc = "    {"]
9878#[doc = "      \"description\": \"The execution has succeeded and returned some value or an empty vec encoded in base64.\","]
9879#[doc = "      \"type\": \"object\","]
9880#[doc = "      \"required\": ["]
9881#[doc = "        \"SuccessValue\""]
9882#[doc = "      ],"]
9883#[doc = "      \"properties\": {"]
9884#[doc = "        \"SuccessValue\": {"]
9885#[doc = "          \"type\": \"string\""]
9886#[doc = "        }"]
9887#[doc = "      },"]
9888#[doc = "      \"additionalProperties\": false"]
9889#[doc = "    }"]
9890#[doc = "  ]"]
9891#[doc = "}"]
9892#[doc = r" ```"]
9893#[doc = r" </details>"]
9894#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9895pub enum FinalExecutionStatus {
9896    #[doc = "The execution has not yet started."]
9897    NotStarted,
9898    #[doc = "The execution has started and still going."]
9899    Started,
9900    #[doc = "The execution has failed with the given error."]
9901    Failure(TxExecutionError),
9902    #[doc = "The execution has succeeded and returned some value or an empty vec encoded in base64."]
9903    SuccessValue(::std::string::String),
9904}
9905impl ::std::convert::From<&Self> for FinalExecutionStatus {
9906    fn from(value: &FinalExecutionStatus) -> Self {
9907        value.clone()
9908    }
9909}
9910impl ::std::convert::From<TxExecutionError> for FinalExecutionStatus {
9911    fn from(value: TxExecutionError) -> Self {
9912        Self::Failure(value)
9913    }
9914}
9915#[doc = "Different types of finality."]
9916#[doc = r""]
9917#[doc = r" <details><summary>JSON schema</summary>"]
9918#[doc = r""]
9919#[doc = r" ```json"]
9920#[doc = "{"]
9921#[doc = "  \"description\": \"Different types of finality.\","]
9922#[doc = "  \"type\": \"string\","]
9923#[doc = "  \"enum\": ["]
9924#[doc = "    \"optimistic\","]
9925#[doc = "    \"near-final\","]
9926#[doc = "    \"final\""]
9927#[doc = "  ]"]
9928#[doc = "}"]
9929#[doc = r" ```"]
9930#[doc = r" </details>"]
9931#[derive(
9932    :: serde :: Deserialize,
9933    :: serde :: Serialize,
9934    Clone,
9935    Copy,
9936    Debug,
9937    Eq,
9938    Hash,
9939    Ord,
9940    PartialEq,
9941    PartialOrd,
9942)]
9943pub enum Finality {
9944    #[serde(rename = "optimistic")]
9945    Optimistic,
9946    #[serde(rename = "near-final")]
9947    NearFinal,
9948    #[serde(rename = "final")]
9949    Final,
9950}
9951impl ::std::convert::From<&Self> for Finality {
9952    fn from(value: &Finality) -> Self {
9953        value.clone()
9954    }
9955}
9956impl ::std::fmt::Display for Finality {
9957    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9958        match *self {
9959            Self::Optimistic => f.write_str("optimistic"),
9960            Self::NearFinal => f.write_str("near-final"),
9961            Self::Final => f.write_str("final"),
9962        }
9963    }
9964}
9965impl ::std::str::FromStr for Finality {
9966    type Err = self::error::ConversionError;
9967    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9968        match value {
9969            "optimistic" => Ok(Self::Optimistic),
9970            "near-final" => Ok(Self::NearFinal),
9971            "final" => Ok(Self::Final),
9972            _ => Err("invalid value".into()),
9973        }
9974    }
9975}
9976impl ::std::convert::TryFrom<&str> for Finality {
9977    type Error = self::error::ConversionError;
9978    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9979        value.parse()
9980    }
9981}
9982impl ::std::convert::TryFrom<&::std::string::String> for Finality {
9983    type Error = self::error::ConversionError;
9984    fn try_from(
9985        value: &::std::string::String,
9986    ) -> ::std::result::Result<Self, self::error::ConversionError> {
9987        value.parse()
9988    }
9989}
9990impl ::std::convert::TryFrom<::std::string::String> for Finality {
9991    type Error = self::error::ConversionError;
9992    fn try_from(
9993        value: ::std::string::String,
9994    ) -> ::std::result::Result<Self, self::error::ConversionError> {
9995        value.parse()
9996    }
9997}
9998#[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)."]
9999#[doc = r""]
10000#[doc = r" <details><summary>JSON schema</summary>"]
10001#[doc = r""]
10002#[doc = r" ```json"]
10003#[doc = "{"]
10004#[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).\","]
10005#[doc = "  \"type\": \"string\","]
10006#[doc = "  \"format\": \"bytes\""]
10007#[doc = "}"]
10008#[doc = r" ```"]
10009#[doc = r" </details>"]
10010#[derive(
10011    :: serde :: Deserialize,
10012    :: serde :: Serialize,
10013    Clone,
10014    Debug,
10015    Eq,
10016    Hash,
10017    Ord,
10018    PartialEq,
10019    PartialOrd,
10020)]
10021#[serde(transparent)]
10022pub struct FunctionArgs(pub ::std::string::String);
10023impl ::std::ops::Deref for FunctionArgs {
10024    type Target = ::std::string::String;
10025    fn deref(&self) -> &::std::string::String {
10026        &self.0
10027    }
10028}
10029impl ::std::convert::From<FunctionArgs> for ::std::string::String {
10030    fn from(value: FunctionArgs) -> Self {
10031        value.0
10032    }
10033}
10034impl ::std::convert::From<&FunctionArgs> for FunctionArgs {
10035    fn from(value: &FunctionArgs) -> Self {
10036        value.clone()
10037    }
10038}
10039impl ::std::convert::From<::std::string::String> for FunctionArgs {
10040    fn from(value: ::std::string::String) -> Self {
10041        Self(value)
10042    }
10043}
10044impl ::std::str::FromStr for FunctionArgs {
10045    type Err = ::std::convert::Infallible;
10046    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
10047        Ok(Self(value.to_string()))
10048    }
10049}
10050impl ::std::fmt::Display for FunctionArgs {
10051    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10052        self.0.fmt(f)
10053    }
10054}
10055#[doc = "`FunctionCallAction`"]
10056#[doc = r""]
10057#[doc = r" <details><summary>JSON schema</summary>"]
10058#[doc = r""]
10059#[doc = r" ```json"]
10060#[doc = "{"]
10061#[doc = "  \"type\": \"object\","]
10062#[doc = "  \"required\": ["]
10063#[doc = "    \"args\","]
10064#[doc = "    \"deposit\","]
10065#[doc = "    \"gas\","]
10066#[doc = "    \"method_name\""]
10067#[doc = "  ],"]
10068#[doc = "  \"properties\": {"]
10069#[doc = "    \"args\": {"]
10070#[doc = "      \"type\": \"string\""]
10071#[doc = "    },"]
10072#[doc = "    \"deposit\": {"]
10073#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
10074#[doc = "    },"]
10075#[doc = "    \"gas\": {"]
10076#[doc = "      \"$ref\": \"#/components/schemas/NearGas\""]
10077#[doc = "    },"]
10078#[doc = "    \"method_name\": {"]
10079#[doc = "      \"type\": \"string\""]
10080#[doc = "    }"]
10081#[doc = "  }"]
10082#[doc = "}"]
10083#[doc = r" ```"]
10084#[doc = r" </details>"]
10085#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10086pub struct FunctionCallAction {
10087    pub args: ::std::string::String,
10088    pub deposit: NearToken,
10089    pub gas: NearGas,
10090    pub method_name: ::std::string::String,
10091}
10092impl ::std::convert::From<&FunctionCallAction> for FunctionCallAction {
10093    fn from(value: &FunctionCallAction) -> Self {
10094        value.clone()
10095    }
10096}
10097#[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."]
10098#[doc = r""]
10099#[doc = r" <details><summary>JSON schema</summary>"]
10100#[doc = r""]
10101#[doc = r" ```json"]
10102#[doc = "{"]
10103#[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.\","]
10104#[doc = "  \"oneOf\": ["]
10105#[doc = "    {"]
10106#[doc = "      \"type\": \"string\","]
10107#[doc = "      \"enum\": ["]
10108#[doc = "        \"WasmUnknownError\","]
10109#[doc = "        \"_EVMError\""]
10110#[doc = "      ]"]
10111#[doc = "    },"]
10112#[doc = "    {"]
10113#[doc = "      \"description\": \"Wasm compilation error\","]
10114#[doc = "      \"type\": \"object\","]
10115#[doc = "      \"required\": ["]
10116#[doc = "        \"CompilationError\""]
10117#[doc = "      ],"]
10118#[doc = "      \"properties\": {"]
10119#[doc = "        \"CompilationError\": {"]
10120#[doc = "          \"$ref\": \"#/components/schemas/CompilationError\""]
10121#[doc = "        }"]
10122#[doc = "      },"]
10123#[doc = "      \"additionalProperties\": false"]
10124#[doc = "    },"]
10125#[doc = "    {"]
10126#[doc = "      \"description\": \"Wasm binary env link error\\n\\nNote: this is only to deserialize old data, use execution error for new data\","]
10127#[doc = "      \"type\": \"object\","]
10128#[doc = "      \"required\": ["]
10129#[doc = "        \"LinkError\""]
10130#[doc = "      ],"]
10131#[doc = "      \"properties\": {"]
10132#[doc = "        \"LinkError\": {"]
10133#[doc = "          \"type\": \"object\","]
10134#[doc = "          \"required\": ["]
10135#[doc = "            \"msg\""]
10136#[doc = "          ],"]
10137#[doc = "          \"properties\": {"]
10138#[doc = "            \"msg\": {"]
10139#[doc = "              \"type\": \"string\""]
10140#[doc = "            }"]
10141#[doc = "          }"]
10142#[doc = "        }"]
10143#[doc = "      },"]
10144#[doc = "      \"additionalProperties\": false"]
10145#[doc = "    },"]
10146#[doc = "    {"]
10147#[doc = "      \"description\": \"Import/export resolve error\","]
10148#[doc = "      \"type\": \"object\","]
10149#[doc = "      \"required\": ["]
10150#[doc = "        \"MethodResolveError\""]
10151#[doc = "      ],"]
10152#[doc = "      \"properties\": {"]
10153#[doc = "        \"MethodResolveError\": {"]
10154#[doc = "          \"$ref\": \"#/components/schemas/MethodResolveError\""]
10155#[doc = "        }"]
10156#[doc = "      },"]
10157#[doc = "      \"additionalProperties\": false"]
10158#[doc = "    },"]
10159#[doc = "    {"]
10160#[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\","]
10161#[doc = "      \"type\": \"object\","]
10162#[doc = "      \"required\": ["]
10163#[doc = "        \"WasmTrap\""]
10164#[doc = "      ],"]
10165#[doc = "      \"properties\": {"]
10166#[doc = "        \"WasmTrap\": {"]
10167#[doc = "          \"$ref\": \"#/components/schemas/WasmTrap\""]
10168#[doc = "        }"]
10169#[doc = "      },"]
10170#[doc = "      \"additionalProperties\": false"]
10171#[doc = "    },"]
10172#[doc = "    {"]
10173#[doc = "      \"description\": \"Note: this is only to deserialize old data, use execution error for new data\","]
10174#[doc = "      \"type\": \"object\","]
10175#[doc = "      \"required\": ["]
10176#[doc = "        \"HostError\""]
10177#[doc = "      ],"]
10178#[doc = "      \"properties\": {"]
10179#[doc = "        \"HostError\": {"]
10180#[doc = "          \"$ref\": \"#/components/schemas/HostError\""]
10181#[doc = "        }"]
10182#[doc = "      },"]
10183#[doc = "      \"additionalProperties\": false"]
10184#[doc = "    },"]
10185#[doc = "    {"]
10186#[doc = "      \"type\": \"object\","]
10187#[doc = "      \"required\": ["]
10188#[doc = "        \"ExecutionError\""]
10189#[doc = "      ],"]
10190#[doc = "      \"properties\": {"]
10191#[doc = "        \"ExecutionError\": {"]
10192#[doc = "          \"type\": \"string\""]
10193#[doc = "        }"]
10194#[doc = "      },"]
10195#[doc = "      \"additionalProperties\": false"]
10196#[doc = "    }"]
10197#[doc = "  ]"]
10198#[doc = "}"]
10199#[doc = r" ```"]
10200#[doc = r" </details>"]
10201#[derive(
10202    :: serde :: Deserialize,
10203    :: serde :: Serialize,
10204    Clone,
10205    Debug,
10206    thiserror::Error,
10207    strum_macros::Display,
10208)]
10209pub enum FunctionCallError {
10210    WasmUnknownError,
10211    #[serde(rename = "_EVMError")]
10212    EvmError,
10213    #[doc = "Wasm compilation error"]
10214    CompilationError(CompilationError),
10215    #[doc = "Wasm binary env link error\n\nNote: this is only to deserialize old data, use execution error for new data"]
10216    LinkError {
10217        msg: ::std::string::String,
10218    },
10219    #[doc = "Import/export resolve error"]
10220    MethodResolveError(MethodResolveError),
10221    #[doc = "A trap happened during execution of a binary\n\nNote: this is only to deserialize old data, use execution error for new data"]
10222    WasmTrap(WasmTrap),
10223    #[doc = "Note: this is only to deserialize old data, use execution error for new data"]
10224    HostError(HostError),
10225    ExecutionError(::std::string::String),
10226}
10227impl ::std::convert::From<&Self> for FunctionCallError {
10228    fn from(value: &FunctionCallError) -> Self {
10229        value.clone()
10230    }
10231}
10232impl ::std::convert::From<CompilationError> for FunctionCallError {
10233    fn from(value: CompilationError) -> Self {
10234        Self::CompilationError(value)
10235    }
10236}
10237impl ::std::convert::From<MethodResolveError> for FunctionCallError {
10238    fn from(value: MethodResolveError) -> Self {
10239        Self::MethodResolveError(value)
10240    }
10241}
10242impl ::std::convert::From<WasmTrap> for FunctionCallError {
10243    fn from(value: WasmTrap) -> Self {
10244        Self::WasmTrap(value)
10245    }
10246}
10247impl ::std::convert::From<HostError> for FunctionCallError {
10248    fn from(value: HostError) -> Self {
10249        Self::HostError(value)
10250    }
10251}
10252#[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."]
10253#[doc = r""]
10254#[doc = r" <details><summary>JSON schema</summary>"]
10255#[doc = r""]
10256#[doc = r" ```json"]
10257#[doc = "{"]
10258#[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.\","]
10259#[doc = "  \"type\": \"object\","]
10260#[doc = "  \"required\": ["]
10261#[doc = "    \"method_names\","]
10262#[doc = "    \"receiver_id\""]
10263#[doc = "  ],"]
10264#[doc = "  \"properties\": {"]
10265#[doc = "    \"allowance\": {"]
10266#[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.\","]
10267#[doc = "      \"anyOf\": ["]
10268#[doc = "        {"]
10269#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
10270#[doc = "        },"]
10271#[doc = "        {"]
10272#[doc = "          \"type\": \"null\""]
10273#[doc = "        }"]
10274#[doc = "      ]"]
10275#[doc = "    },"]
10276#[doc = "    \"method_names\": {"]
10277#[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.\","]
10278#[doc = "      \"type\": \"array\","]
10279#[doc = "      \"items\": {"]
10280#[doc = "        \"type\": \"string\""]
10281#[doc = "      }"]
10282#[doc = "    },"]
10283#[doc = "    \"receiver_id\": {"]
10284#[doc = "      \"description\": \"The access key only allows transactions with the given receiver's account id.\","]
10285#[doc = "      \"type\": \"string\""]
10286#[doc = "    }"]
10287#[doc = "  }"]
10288#[doc = "}"]
10289#[doc = r" ```"]
10290#[doc = r" </details>"]
10291#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10292pub struct FunctionCallPermission {
10293    #[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."]
10294    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10295    pub allowance: ::std::option::Option<NearToken>,
10296    #[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."]
10297    pub method_names: ::std::vec::Vec<::std::string::String>,
10298    #[doc = "The access key only allows transactions with the given receiver's account id."]
10299    pub receiver_id: ::std::string::String,
10300}
10301impl ::std::convert::From<&FunctionCallPermission> for FunctionCallPermission {
10302    fn from(value: &FunctionCallPermission) -> Self {
10303        value.clone()
10304    }
10305}
10306#[doc = "Gas key is like an access key, except it stores a balance separately, and transactions signed\nwith it deduct their cost from the gas key balance instead of the account balance."]
10307#[doc = r""]
10308#[doc = r" <details><summary>JSON schema</summary>"]
10309#[doc = r""]
10310#[doc = r" ```json"]
10311#[doc = "{"]
10312#[doc = "  \"description\": \"Gas key is like an access key, except it stores a balance separately, and transactions signed\\nwith it deduct their cost from the gas key balance instead of the account balance.\","]
10313#[doc = "  \"type\": \"object\","]
10314#[doc = "  \"required\": ["]
10315#[doc = "    \"balance\","]
10316#[doc = "    \"num_nonces\","]
10317#[doc = "    \"permission\""]
10318#[doc = "  ],"]
10319#[doc = "  \"properties\": {"]
10320#[doc = "    \"balance\": {"]
10321#[doc = "      \"description\": \"The balance of the gas key.\","]
10322#[doc = "      \"allOf\": ["]
10323#[doc = "        {"]
10324#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
10325#[doc = "        }"]
10326#[doc = "      ]"]
10327#[doc = "    },"]
10328#[doc = "    \"num_nonces\": {"]
10329#[doc = "      \"description\": \"The number of nonces this gas key has.\","]
10330#[doc = "      \"type\": \"integer\","]
10331#[doc = "      \"format\": \"uint32\","]
10332#[doc = "      \"minimum\": 0.0"]
10333#[doc = "    },"]
10334#[doc = "    \"permission\": {"]
10335#[doc = "      \"description\": \"Defines the permissions for this gas key.\\nIf this is a `FunctionCallPermission`, the allowance must be None (unlimited).\","]
10336#[doc = "      \"allOf\": ["]
10337#[doc = "        {"]
10338#[doc = "          \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
10339#[doc = "        }"]
10340#[doc = "      ]"]
10341#[doc = "    }"]
10342#[doc = "  }"]
10343#[doc = "}"]
10344#[doc = r" ```"]
10345#[doc = r" </details>"]
10346#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10347pub struct GasKey {
10348    #[doc = "The balance of the gas key."]
10349    pub balance: NearToken,
10350    #[doc = "The number of nonces this gas key has."]
10351    pub num_nonces: u32,
10352    #[doc = "Defines the permissions for this gas key.\nIf this is a `FunctionCallPermission`, the allowance must be None (unlimited)."]
10353    pub permission: AccessKeyPermission,
10354}
10355impl ::std::convert::From<&GasKey> for GasKey {
10356    fn from(value: &GasKey) -> Self {
10357        value.clone()
10358    }
10359}
10360#[doc = "`GasKeyInfoView`"]
10361#[doc = r""]
10362#[doc = r" <details><summary>JSON schema</summary>"]
10363#[doc = r""]
10364#[doc = r" ```json"]
10365#[doc = "{"]
10366#[doc = "  \"type\": \"object\","]
10367#[doc = "  \"required\": ["]
10368#[doc = "    \"gas_key\","]
10369#[doc = "    \"public_key\""]
10370#[doc = "  ],"]
10371#[doc = "  \"properties\": {"]
10372#[doc = "    \"gas_key\": {"]
10373#[doc = "      \"$ref\": \"#/components/schemas/GasKeyView\""]
10374#[doc = "    },"]
10375#[doc = "    \"public_key\": {"]
10376#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
10377#[doc = "    }"]
10378#[doc = "  }"]
10379#[doc = "}"]
10380#[doc = r" ```"]
10381#[doc = r" </details>"]
10382#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10383pub struct GasKeyInfoView {
10384    pub gas_key: GasKeyView,
10385    pub public_key: PublicKey,
10386}
10387impl ::std::convert::From<&GasKeyInfoView> for GasKeyInfoView {
10388    fn from(value: &GasKeyInfoView) -> Self {
10389        value.clone()
10390    }
10391}
10392#[doc = "`GasKeyList`"]
10393#[doc = r""]
10394#[doc = r" <details><summary>JSON schema</summary>"]
10395#[doc = r""]
10396#[doc = r" ```json"]
10397#[doc = "{"]
10398#[doc = "  \"type\": \"object\","]
10399#[doc = "  \"required\": ["]
10400#[doc = "    \"keys\""]
10401#[doc = "  ],"]
10402#[doc = "  \"properties\": {"]
10403#[doc = "    \"keys\": {"]
10404#[doc = "      \"type\": \"array\","]
10405#[doc = "      \"items\": {"]
10406#[doc = "        \"$ref\": \"#/components/schemas/GasKeyInfoView\""]
10407#[doc = "      }"]
10408#[doc = "    }"]
10409#[doc = "  }"]
10410#[doc = "}"]
10411#[doc = r" ```"]
10412#[doc = r" </details>"]
10413#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10414pub struct GasKeyList {
10415    pub keys: ::std::vec::Vec<GasKeyInfoView>,
10416}
10417impl ::std::convert::From<&GasKeyList> for GasKeyList {
10418    fn from(value: &GasKeyList) -> Self {
10419        value.clone()
10420    }
10421}
10422#[doc = "`GasKeyView`"]
10423#[doc = r""]
10424#[doc = r" <details><summary>JSON schema</summary>"]
10425#[doc = r""]
10426#[doc = r" ```json"]
10427#[doc = "{"]
10428#[doc = "  \"type\": \"object\","]
10429#[doc = "  \"required\": ["]
10430#[doc = "    \"balance\","]
10431#[doc = "    \"nonces\","]
10432#[doc = "    \"num_nonces\","]
10433#[doc = "    \"permission\""]
10434#[doc = "  ],"]
10435#[doc = "  \"properties\": {"]
10436#[doc = "    \"balance\": {"]
10437#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
10438#[doc = "    },"]
10439#[doc = "    \"nonces\": {"]
10440#[doc = "      \"type\": \"array\","]
10441#[doc = "      \"items\": {"]
10442#[doc = "        \"type\": \"integer\","]
10443#[doc = "        \"format\": \"uint64\","]
10444#[doc = "        \"minimum\": 0.0"]
10445#[doc = "      }"]
10446#[doc = "    },"]
10447#[doc = "    \"num_nonces\": {"]
10448#[doc = "      \"type\": \"integer\","]
10449#[doc = "      \"format\": \"uint32\","]
10450#[doc = "      \"minimum\": 0.0"]
10451#[doc = "    },"]
10452#[doc = "    \"permission\": {"]
10453#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
10454#[doc = "    }"]
10455#[doc = "  }"]
10456#[doc = "}"]
10457#[doc = r" ```"]
10458#[doc = r" </details>"]
10459#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10460pub struct GasKeyView {
10461    pub balance: NearToken,
10462    pub nonces: ::std::vec::Vec<u64>,
10463    pub num_nonces: u32,
10464    pub permission: AccessKeyPermissionView,
10465}
10466impl ::std::convert::From<&GasKeyView> for GasKeyView {
10467    fn from(value: &GasKeyView) -> Self {
10468        value.clone()
10469    }
10470}
10471#[doc = "Configuration for garbage collection."]
10472#[doc = r""]
10473#[doc = r" <details><summary>JSON schema</summary>"]
10474#[doc = r""]
10475#[doc = r" ```json"]
10476#[doc = "{"]
10477#[doc = "  \"description\": \"Configuration for garbage collection.\","]
10478#[doc = "  \"type\": \"object\","]
10479#[doc = "  \"properties\": {"]
10480#[doc = "    \"gc_blocks_limit\": {"]
10481#[doc = "      \"description\": \"Maximum number of blocks to garbage collect at every garbage collection\\ncall.\","]
10482#[doc = "      \"default\": 2,"]
10483#[doc = "      \"type\": \"integer\","]
10484#[doc = "      \"format\": \"uint64\","]
10485#[doc = "      \"minimum\": 0.0"]
10486#[doc = "    },"]
10487#[doc = "    \"gc_fork_clean_step\": {"]
10488#[doc = "      \"description\": \"Maximum number of height to go through at each garbage collection step\\nwhen cleaning forks during garbage collection.\","]
10489#[doc = "      \"default\": 100,"]
10490#[doc = "      \"type\": \"integer\","]
10491#[doc = "      \"format\": \"uint64\","]
10492#[doc = "      \"minimum\": 0.0"]
10493#[doc = "    },"]
10494#[doc = "    \"gc_num_epochs_to_keep\": {"]
10495#[doc = "      \"description\": \"Number of epochs for which we keep store data.\","]
10496#[doc = "      \"default\": 5,"]
10497#[doc = "      \"type\": \"integer\","]
10498#[doc = "      \"format\": \"uint64\","]
10499#[doc = "      \"minimum\": 0.0"]
10500#[doc = "    },"]
10501#[doc = "    \"gc_step_period\": {"]
10502#[doc = "      \"description\": \"How often gc should be run\","]
10503#[doc = "      \"default\": {"]
10504#[doc = "        \"nanos\": 500000000,"]
10505#[doc = "        \"secs\": 0"]
10506#[doc = "      },"]
10507#[doc = "      \"allOf\": ["]
10508#[doc = "        {"]
10509#[doc = "          \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
10510#[doc = "        }"]
10511#[doc = "      ]"]
10512#[doc = "    }"]
10513#[doc = "  }"]
10514#[doc = "}"]
10515#[doc = r" ```"]
10516#[doc = r" </details>"]
10517#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10518pub struct GcConfig {
10519    #[doc = "Maximum number of blocks to garbage collect at every garbage collection\ncall."]
10520    #[serde(default = "defaults::default_u64::<u64, 2>")]
10521    pub gc_blocks_limit: u64,
10522    #[doc = "Maximum number of height to go through at each garbage collection step\nwhen cleaning forks during garbage collection."]
10523    #[serde(default = "defaults::default_u64::<u64, 100>")]
10524    pub gc_fork_clean_step: u64,
10525    #[doc = "Number of epochs for which we keep store data."]
10526    #[serde(default = "defaults::default_u64::<u64, 5>")]
10527    pub gc_num_epochs_to_keep: u64,
10528    #[doc = "How often gc should be run"]
10529    #[serde(default = "defaults::gc_config_gc_step_period")]
10530    pub gc_step_period: DurationAsStdSchemaProvider,
10531}
10532impl ::std::convert::From<&GcConfig> for GcConfig {
10533    fn from(value: &GcConfig) -> Self {
10534        value.clone()
10535    }
10536}
10537impl ::std::default::Default for GcConfig {
10538    fn default() -> Self {
10539        Self {
10540            gc_blocks_limit: defaults::default_u64::<u64, 2>(),
10541            gc_fork_clean_step: defaults::default_u64::<u64, 100>(),
10542            gc_num_epochs_to_keep: defaults::default_u64::<u64, 5>(),
10543            gc_step_period: defaults::gc_config_gc_step_period(),
10544        }
10545    }
10546}
10547#[doc = "`GenesisConfig`"]
10548#[doc = r""]
10549#[doc = r" <details><summary>JSON schema</summary>"]
10550#[doc = r""]
10551#[doc = r" ```json"]
10552#[doc = "{"]
10553#[doc = "  \"type\": \"object\","]
10554#[doc = "  \"required\": ["]
10555#[doc = "    \"avg_hidden_validator_seats_per_shard\","]
10556#[doc = "    \"block_producer_kickout_threshold\","]
10557#[doc = "    \"chain_id\","]
10558#[doc = "    \"chunk_producer_kickout_threshold\","]
10559#[doc = "    \"dynamic_resharding\","]
10560#[doc = "    \"epoch_length\","]
10561#[doc = "    \"fishermen_threshold\","]
10562#[doc = "    \"gas_limit\","]
10563#[doc = "    \"gas_price_adjustment_rate\","]
10564#[doc = "    \"genesis_height\","]
10565#[doc = "    \"genesis_time\","]
10566#[doc = "    \"max_gas_price\","]
10567#[doc = "    \"max_inflation_rate\","]
10568#[doc = "    \"min_gas_price\","]
10569#[doc = "    \"num_block_producer_seats\","]
10570#[doc = "    \"num_block_producer_seats_per_shard\","]
10571#[doc = "    \"num_blocks_per_year\","]
10572#[doc = "    \"protocol_reward_rate\","]
10573#[doc = "    \"protocol_treasury_account\","]
10574#[doc = "    \"protocol_version\","]
10575#[doc = "    \"total_supply\","]
10576#[doc = "    \"transaction_validity_period\","]
10577#[doc = "    \"validators\""]
10578#[doc = "  ],"]
10579#[doc = "  \"properties\": {"]
10580#[doc = "    \"avg_hidden_validator_seats_per_shard\": {"]
10581#[doc = "      \"description\": \"Expected number of hidden validators per shard.\","]
10582#[doc = "      \"type\": \"array\","]
10583#[doc = "      \"items\": {"]
10584#[doc = "        \"type\": \"integer\","]
10585#[doc = "        \"format\": \"uint64\","]
10586#[doc = "        \"minimum\": 0.0"]
10587#[doc = "      }"]
10588#[doc = "    },"]
10589#[doc = "    \"block_producer_kickout_threshold\": {"]
10590#[doc = "      \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
10591#[doc = "      \"type\": \"integer\","]
10592#[doc = "      \"format\": \"uint8\","]
10593#[doc = "      \"maximum\": 255.0,"]
10594#[doc = "      \"minimum\": 0.0"]
10595#[doc = "    },"]
10596#[doc = "    \"chain_id\": {"]
10597#[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.\","]
10598#[doc = "      \"type\": \"string\""]
10599#[doc = "    },"]
10600#[doc = "    \"chunk_producer_assignment_changes_limit\": {"]
10601#[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.\","]
10602#[doc = "      \"default\": 5,"]
10603#[doc = "      \"type\": \"integer\","]
10604#[doc = "      \"format\": \"uint64\","]
10605#[doc = "      \"minimum\": 0.0"]
10606#[doc = "    },"]
10607#[doc = "    \"chunk_producer_kickout_threshold\": {"]
10608#[doc = "      \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
10609#[doc = "      \"type\": \"integer\","]
10610#[doc = "      \"format\": \"uint8\","]
10611#[doc = "      \"maximum\": 255.0,"]
10612#[doc = "      \"minimum\": 0.0"]
10613#[doc = "    },"]
10614#[doc = "    \"chunk_validator_only_kickout_threshold\": {"]
10615#[doc = "      \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
10616#[doc = "      \"default\": 80,"]
10617#[doc = "      \"type\": \"integer\","]
10618#[doc = "      \"format\": \"uint8\","]
10619#[doc = "      \"maximum\": 255.0,"]
10620#[doc = "      \"minimum\": 0.0"]
10621#[doc = "    },"]
10622#[doc = "    \"dynamic_resharding\": {"]
10623#[doc = "      \"description\": \"Enable dynamic re-sharding.\","]
10624#[doc = "      \"type\": \"boolean\""]
10625#[doc = "    },"]
10626#[doc = "    \"epoch_length\": {"]
10627#[doc = "      \"description\": \"Epoch length counted in block heights.\","]
10628#[doc = "      \"type\": \"integer\","]
10629#[doc = "      \"format\": \"uint64\","]
10630#[doc = "      \"minimum\": 0.0"]
10631#[doc = "    },"]
10632#[doc = "    \"fishermen_threshold\": {"]
10633#[doc = "      \"description\": \"Fishermen stake threshold.\","]
10634#[doc = "      \"allOf\": ["]
10635#[doc = "        {"]
10636#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
10637#[doc = "        }"]
10638#[doc = "      ]"]
10639#[doc = "    },"]
10640#[doc = "    \"gas_limit\": {"]
10641#[doc = "      \"description\": \"Initial gas limit.\","]
10642#[doc = "      \"allOf\": ["]
10643#[doc = "        {"]
10644#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
10645#[doc = "        }"]
10646#[doc = "      ]"]
10647#[doc = "    },"]
10648#[doc = "    \"gas_price_adjustment_rate\": {"]
10649#[doc = "      \"description\": \"Gas price adjustment rate\","]
10650#[doc = "      \"type\": \"array\","]
10651#[doc = "      \"items\": {"]
10652#[doc = "        \"type\": \"integer\","]
10653#[doc = "        \"format\": \"int32\""]
10654#[doc = "      },"]
10655#[doc = "      \"maxItems\": 2,"]
10656#[doc = "      \"minItems\": 2"]
10657#[doc = "    },"]
10658#[doc = "    \"genesis_height\": {"]
10659#[doc = "      \"description\": \"Height of genesis block.\","]
10660#[doc = "      \"type\": \"integer\","]
10661#[doc = "      \"format\": \"uint64\","]
10662#[doc = "      \"minimum\": 0.0"]
10663#[doc = "    },"]
10664#[doc = "    \"genesis_time\": {"]
10665#[doc = "      \"description\": \"Official time of blockchain start.\","]
10666#[doc = "      \"type\": \"string\","]
10667#[doc = "      \"format\": \"date-time\""]
10668#[doc = "    },"]
10669#[doc = "    \"max_gas_price\": {"]
10670#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
10671#[doc = "    },"]
10672#[doc = "    \"max_inflation_rate\": {"]
10673#[doc = "      \"description\": \"Maximum inflation on the total supply every epoch.\","]
10674#[doc = "      \"type\": \"array\","]
10675#[doc = "      \"items\": {"]
10676#[doc = "        \"type\": \"integer\","]
10677#[doc = "        \"format\": \"int32\""]
10678#[doc = "      },"]
10679#[doc = "      \"maxItems\": 2,"]
10680#[doc = "      \"minItems\": 2"]
10681#[doc = "    },"]
10682#[doc = "    \"max_kickout_stake_perc\": {"]
10683#[doc = "      \"description\": \"Max stake percentage of the validators we will kick out.\","]
10684#[doc = "      \"default\": 100,"]
10685#[doc = "      \"type\": \"integer\","]
10686#[doc = "      \"format\": \"uint8\","]
10687#[doc = "      \"maximum\": 255.0,"]
10688#[doc = "      \"minimum\": 0.0"]
10689#[doc = "    },"]
10690#[doc = "    \"min_gas_price\": {"]
10691#[doc = "      \"description\": \"Minimum gas price. It is also the initial gas price.\","]
10692#[doc = "      \"allOf\": ["]
10693#[doc = "        {"]
10694#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
10695#[doc = "        }"]
10696#[doc = "      ]"]
10697#[doc = "    },"]
10698#[doc = "    \"minimum_stake_divisor\": {"]
10699#[doc = "      \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
10700#[doc = "      \"default\": 10,"]
10701#[doc = "      \"type\": \"integer\","]
10702#[doc = "      \"format\": \"uint64\","]
10703#[doc = "      \"minimum\": 0.0"]
10704#[doc = "    },"]
10705#[doc = "    \"minimum_stake_ratio\": {"]
10706#[doc = "      \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
10707#[doc = "      \"default\": ["]
10708#[doc = "        1,"]
10709#[doc = "        6250"]
10710#[doc = "      ],"]
10711#[doc = "      \"type\": \"array\","]
10712#[doc = "      \"items\": {"]
10713#[doc = "        \"type\": \"integer\","]
10714#[doc = "        \"format\": \"int32\""]
10715#[doc = "      },"]
10716#[doc = "      \"maxItems\": 2,"]
10717#[doc = "      \"minItems\": 2"]
10718#[doc = "    },"]
10719#[doc = "    \"minimum_validators_per_shard\": {"]
10720#[doc = "      \"description\": \"The minimum number of validators each shard must have\","]
10721#[doc = "      \"default\": 1,"]
10722#[doc = "      \"type\": \"integer\","]
10723#[doc = "      \"format\": \"uint64\","]
10724#[doc = "      \"minimum\": 0.0"]
10725#[doc = "    },"]
10726#[doc = "    \"num_block_producer_seats\": {"]
10727#[doc = "      \"description\": \"Number of block producer seats at genesis.\","]
10728#[doc = "      \"type\": \"integer\","]
10729#[doc = "      \"format\": \"uint64\","]
10730#[doc = "      \"minimum\": 0.0"]
10731#[doc = "    },"]
10732#[doc = "    \"num_block_producer_seats_per_shard\": {"]
10733#[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\","]
10734#[doc = "      \"type\": \"array\","]
10735#[doc = "      \"items\": {"]
10736#[doc = "        \"type\": \"integer\","]
10737#[doc = "        \"format\": \"uint64\","]
10738#[doc = "        \"minimum\": 0.0"]
10739#[doc = "      }"]
10740#[doc = "    },"]
10741#[doc = "    \"num_blocks_per_year\": {"]
10742#[doc = "      \"description\": \"Expected number of blocks per year\","]
10743#[doc = "      \"type\": \"integer\","]
10744#[doc = "      \"format\": \"uint64\","]
10745#[doc = "      \"minimum\": 0.0"]
10746#[doc = "    },"]
10747#[doc = "    \"num_chunk_only_producer_seats\": {"]
10748#[doc = "      \"description\": \"Deprecated.\","]
10749#[doc = "      \"default\": 300,"]
10750#[doc = "      \"type\": \"integer\","]
10751#[doc = "      \"format\": \"uint64\","]
10752#[doc = "      \"minimum\": 0.0"]
10753#[doc = "    },"]
10754#[doc = "    \"num_chunk_producer_seats\": {"]
10755#[doc = "      \"description\": \"Number of chunk producers.\\nDon't mess it up with chunk-only producers feature which is deprecated.\","]
10756#[doc = "      \"default\": 100,"]
10757#[doc = "      \"type\": \"integer\","]
10758#[doc = "      \"format\": \"uint64\","]
10759#[doc = "      \"minimum\": 0.0"]
10760#[doc = "    },"]
10761#[doc = "    \"num_chunk_validator_seats\": {"]
10762#[doc = "      \"default\": 300,"]
10763#[doc = "      \"type\": \"integer\","]
10764#[doc = "      \"format\": \"uint64\","]
10765#[doc = "      \"minimum\": 0.0"]
10766#[doc = "    },"]
10767#[doc = "    \"online_max_threshold\": {"]
10768#[doc = "      \"description\": \"Online maximum threshold above which validator gets full reward.\","]
10769#[doc = "      \"default\": ["]
10770#[doc = "        99,"]
10771#[doc = "        100"]
10772#[doc = "      ],"]
10773#[doc = "      \"type\": \"array\","]
10774#[doc = "      \"items\": {"]
10775#[doc = "        \"type\": \"integer\","]
10776#[doc = "        \"format\": \"int32\""]
10777#[doc = "      },"]
10778#[doc = "      \"maxItems\": 2,"]
10779#[doc = "      \"minItems\": 2"]
10780#[doc = "    },"]
10781#[doc = "    \"online_min_threshold\": {"]
10782#[doc = "      \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
10783#[doc = "      \"default\": ["]
10784#[doc = "        9,"]
10785#[doc = "        10"]
10786#[doc = "      ],"]
10787#[doc = "      \"type\": \"array\","]
10788#[doc = "      \"items\": {"]
10789#[doc = "        \"type\": \"integer\","]
10790#[doc = "        \"format\": \"int32\""]
10791#[doc = "      },"]
10792#[doc = "      \"maxItems\": 2,"]
10793#[doc = "      \"minItems\": 2"]
10794#[doc = "    },"]
10795#[doc = "    \"protocol_reward_rate\": {"]
10796#[doc = "      \"description\": \"Protocol treasury rate\","]
10797#[doc = "      \"type\": \"array\","]
10798#[doc = "      \"items\": {"]
10799#[doc = "        \"type\": \"integer\","]
10800#[doc = "        \"format\": \"int32\""]
10801#[doc = "      },"]
10802#[doc = "      \"maxItems\": 2,"]
10803#[doc = "      \"minItems\": 2"]
10804#[doc = "    },"]
10805#[doc = "    \"protocol_treasury_account\": {"]
10806#[doc = "      \"description\": \"Protocol treasury account\","]
10807#[doc = "      \"allOf\": ["]
10808#[doc = "        {"]
10809#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
10810#[doc = "        }"]
10811#[doc = "      ]"]
10812#[doc = "    },"]
10813#[doc = "    \"protocol_upgrade_stake_threshold\": {"]
10814#[doc = "      \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
10815#[doc = "      \"default\": ["]
10816#[doc = "        4,"]
10817#[doc = "        5"]
10818#[doc = "      ],"]
10819#[doc = "      \"type\": \"array\","]
10820#[doc = "      \"items\": {"]
10821#[doc = "        \"type\": \"integer\","]
10822#[doc = "        \"format\": \"int32\""]
10823#[doc = "      },"]
10824#[doc = "      \"maxItems\": 2,"]
10825#[doc = "      \"minItems\": 2"]
10826#[doc = "    },"]
10827#[doc = "    \"protocol_version\": {"]
10828#[doc = "      \"description\": \"Protocol version that this genesis works with.\","]
10829#[doc = "      \"type\": \"integer\","]
10830#[doc = "      \"format\": \"uint32\","]
10831#[doc = "      \"minimum\": 0.0"]
10832#[doc = "    },"]
10833#[doc = "    \"shard_layout\": {"]
10834#[doc = "      \"description\": \"Layout information regarding how to split accounts to shards\","]
10835#[doc = "      \"default\": {"]
10836#[doc = "        \"V2\": {"]
10837#[doc = "          \"boundary_accounts\": [],"]
10838#[doc = "          \"id_to_index_map\": {"]
10839#[doc = "            \"0\": 0"]
10840#[doc = "          },"]
10841#[doc = "          \"index_to_id_map\": {"]
10842#[doc = "            \"0\": 0"]
10843#[doc = "          },"]
10844#[doc = "          \"shard_ids\": ["]
10845#[doc = "            0"]
10846#[doc = "          ],"]
10847#[doc = "          \"version\": 0"]
10848#[doc = "        }"]
10849#[doc = "      },"]
10850#[doc = "      \"allOf\": ["]
10851#[doc = "        {"]
10852#[doc = "          \"$ref\": \"#/components/schemas/ShardLayout\""]
10853#[doc = "        }"]
10854#[doc = "      ]"]
10855#[doc = "    },"]
10856#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\": {"]
10857#[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]`.\","]
10858#[doc = "      \"default\": false,"]
10859#[doc = "      \"type\": \"boolean\""]
10860#[doc = "    },"]
10861#[doc = "    \"target_validator_mandates_per_shard\": {"]
10862#[doc = "      \"description\": \"Number of target chunk validator mandates for each shard.\","]
10863#[doc = "      \"default\": 68,"]
10864#[doc = "      \"type\": \"integer\","]
10865#[doc = "      \"format\": \"uint64\","]
10866#[doc = "      \"minimum\": 0.0"]
10867#[doc = "    },"]
10868#[doc = "    \"total_supply\": {"]
10869#[doc = "      \"description\": \"Total supply of tokens at genesis.\","]
10870#[doc = "      \"allOf\": ["]
10871#[doc = "        {"]
10872#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
10873#[doc = "        }"]
10874#[doc = "      ]"]
10875#[doc = "    },"]
10876#[doc = "    \"transaction_validity_period\": {"]
10877#[doc = "      \"description\": \"Number of blocks for which a given transaction is valid\","]
10878#[doc = "      \"type\": \"integer\","]
10879#[doc = "      \"format\": \"uint64\","]
10880#[doc = "      \"minimum\": 0.0"]
10881#[doc = "    },"]
10882#[doc = "    \"use_production_config\": {"]
10883#[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.\","]
10884#[doc = "      \"default\": false,"]
10885#[doc = "      \"type\": \"boolean\""]
10886#[doc = "    },"]
10887#[doc = "    \"validators\": {"]
10888#[doc = "      \"description\": \"List of initial validators.\","]
10889#[doc = "      \"type\": \"array\","]
10890#[doc = "      \"items\": {"]
10891#[doc = "        \"$ref\": \"#/components/schemas/AccountInfo\""]
10892#[doc = "      }"]
10893#[doc = "    }"]
10894#[doc = "  }"]
10895#[doc = "}"]
10896#[doc = r" ```"]
10897#[doc = r" </details>"]
10898#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10899pub struct GenesisConfig {
10900    #[doc = "Expected number of hidden validators per shard."]
10901    pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
10902    #[doc = "Threshold for kicking out block producers, between 0 and 100."]
10903    pub block_producer_kickout_threshold: u8,
10904    #[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."]
10905    pub chain_id: ::std::string::String,
10906    #[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."]
10907    #[serde(default = "defaults::default_u64::<u64, 5>")]
10908    pub chunk_producer_assignment_changes_limit: u64,
10909    #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
10910    pub chunk_producer_kickout_threshold: u8,
10911    #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
10912    #[serde(default = "defaults::default_u64::<u8, 80>")]
10913    pub chunk_validator_only_kickout_threshold: u8,
10914    #[doc = "Enable dynamic re-sharding."]
10915    pub dynamic_resharding: bool,
10916    #[doc = "Epoch length counted in block heights."]
10917    pub epoch_length: u64,
10918    #[doc = "Fishermen stake threshold."]
10919    pub fishermen_threshold: NearToken,
10920    #[doc = "Initial gas limit."]
10921    pub gas_limit: NearGas,
10922    #[doc = "Gas price adjustment rate"]
10923    pub gas_price_adjustment_rate: [i32; 2usize],
10924    #[doc = "Height of genesis block."]
10925    pub genesis_height: u64,
10926    #[doc = "Official time of blockchain start."]
10927    pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
10928    pub max_gas_price: NearToken,
10929    #[doc = "Maximum inflation on the total supply every epoch."]
10930    pub max_inflation_rate: [i32; 2usize],
10931    #[doc = "Max stake percentage of the validators we will kick out."]
10932    #[serde(default = "defaults::default_u64::<u8, 100>")]
10933    pub max_kickout_stake_perc: u8,
10934    #[doc = "Minimum gas price. It is also the initial gas price."]
10935    pub min_gas_price: NearToken,
10936    #[doc = "The minimum stake required for staking is last seat price divided by this number."]
10937    #[serde(default = "defaults::default_u64::<u64, 10>")]
10938    pub minimum_stake_divisor: u64,
10939    #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
10940    #[serde(default = "defaults::genesis_config_minimum_stake_ratio")]
10941    pub minimum_stake_ratio: [i32; 2usize],
10942    #[doc = "The minimum number of validators each shard must have"]
10943    #[serde(default = "defaults::default_u64::<u64, 1>")]
10944    pub minimum_validators_per_shard: u64,
10945    #[doc = "Number of block producer seats at genesis."]
10946    pub num_block_producer_seats: u64,
10947    #[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"]
10948    pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
10949    #[doc = "Expected number of blocks per year"]
10950    pub num_blocks_per_year: u64,
10951    #[doc = "Deprecated."]
10952    #[serde(default = "defaults::default_u64::<u64, 300>")]
10953    pub num_chunk_only_producer_seats: u64,
10954    #[doc = "Number of chunk producers.\nDon't mess it up with chunk-only producers feature which is deprecated."]
10955    #[serde(default = "defaults::default_u64::<u64, 100>")]
10956    pub num_chunk_producer_seats: u64,
10957    #[serde(default = "defaults::default_u64::<u64, 300>")]
10958    pub num_chunk_validator_seats: u64,
10959    #[doc = "Online maximum threshold above which validator gets full reward."]
10960    #[serde(default = "defaults::genesis_config_online_max_threshold")]
10961    pub online_max_threshold: [i32; 2usize],
10962    #[doc = "Online minimum threshold below which validator doesn't receive reward."]
10963    #[serde(default = "defaults::genesis_config_online_min_threshold")]
10964    pub online_min_threshold: [i32; 2usize],
10965    #[doc = "Protocol treasury rate"]
10966    pub protocol_reward_rate: [i32; 2usize],
10967    #[doc = "Protocol treasury account"]
10968    pub protocol_treasury_account: AccountId,
10969    #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
10970    #[serde(default = "defaults::genesis_config_protocol_upgrade_stake_threshold")]
10971    pub protocol_upgrade_stake_threshold: [i32; 2usize],
10972    #[doc = "Protocol version that this genesis works with."]
10973    pub protocol_version: u32,
10974    #[doc = "Layout information regarding how to split accounts to shards"]
10975    #[serde(default = "defaults::genesis_config_shard_layout")]
10976    pub shard_layout: ShardLayout,
10977    #[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]`."]
10978    #[serde(default)]
10979    pub shuffle_shard_assignment_for_chunk_producers: bool,
10980    #[doc = "Number of target chunk validator mandates for each shard."]
10981    #[serde(default = "defaults::default_u64::<u64, 68>")]
10982    pub target_validator_mandates_per_shard: u64,
10983    #[doc = "Total supply of tokens at genesis."]
10984    pub total_supply: NearToken,
10985    #[doc = "Number of blocks for which a given transaction is valid"]
10986    pub transaction_validity_period: u64,
10987    #[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."]
10988    #[serde(default)]
10989    pub use_production_config: bool,
10990    #[doc = "List of initial validators."]
10991    pub validators: ::std::vec::Vec<AccountInfo>,
10992}
10993impl ::std::convert::From<&GenesisConfig> for GenesisConfig {
10994    fn from(value: &GenesisConfig) -> Self {
10995        value.clone()
10996    }
10997}
10998#[doc = "`GenesisConfigError`"]
10999#[doc = r""]
11000#[doc = r" <details><summary>JSON schema</summary>"]
11001#[doc = r""]
11002#[doc = r" ```json"]
11003#[doc = "{"]
11004#[doc = "  \"type\": \"null\""]
11005#[doc = "}"]
11006#[doc = r" ```"]
11007#[doc = r" </details>"]
11008#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11009#[serde(transparent)]
11010pub struct GenesisConfigError(pub ());
11011impl ::std::ops::Deref for GenesisConfigError {
11012    type Target = ();
11013    fn deref(&self) -> &() {
11014        &self.0
11015    }
11016}
11017impl ::std::convert::From<GenesisConfigError> for () {
11018    fn from(value: GenesisConfigError) -> Self {
11019        value.0
11020    }
11021}
11022impl ::std::convert::From<&GenesisConfigError> for GenesisConfigError {
11023    fn from(value: &GenesisConfigError) -> Self {
11024        value.clone()
11025    }
11026}
11027impl ::std::convert::From<()> for GenesisConfigError {
11028    fn from(value: ()) -> Self {
11029        Self(value)
11030    }
11031}
11032#[doc = "`GenesisConfigRequest`"]
11033#[doc = r""]
11034#[doc = r" <details><summary>JSON schema</summary>"]
11035#[doc = r""]
11036#[doc = r" ```json"]
11037#[doc = "{"]
11038#[doc = "  \"title\": \"GenesisConfigRequest\","]
11039#[doc = "  \"type\": \"null\""]
11040#[doc = "}"]
11041#[doc = r" ```"]
11042#[doc = r" </details>"]
11043#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11044#[serde(transparent)]
11045pub struct GenesisConfigRequest(pub ());
11046impl ::std::ops::Deref for GenesisConfigRequest {
11047    type Target = ();
11048    fn deref(&self) -> &() {
11049        &self.0
11050    }
11051}
11052impl ::std::convert::From<GenesisConfigRequest> for () {
11053    fn from(value: GenesisConfigRequest) -> Self {
11054        value.0
11055    }
11056}
11057impl ::std::convert::From<&GenesisConfigRequest> for GenesisConfigRequest {
11058    fn from(value: &GenesisConfigRequest) -> Self {
11059        value.clone()
11060    }
11061}
11062impl ::std::convert::From<()> for GenesisConfigRequest {
11063    fn from(value: ()) -> Self {
11064        Self(value)
11065    }
11066}
11067#[doc = "`GlobalContractDeployMode`"]
11068#[doc = r""]
11069#[doc = r" <details><summary>JSON schema</summary>"]
11070#[doc = r""]
11071#[doc = r" ```json"]
11072#[doc = "{"]
11073#[doc = "  \"oneOf\": ["]
11074#[doc = "    {"]
11075#[doc = "      \"description\": \"Contract is deployed under its code hash.\\nUsers will be able reference it by that hash.\\nThis effectively makes the contract immutable.\","]
11076#[doc = "      \"type\": \"string\","]
11077#[doc = "      \"enum\": ["]
11078#[doc = "        \"CodeHash\""]
11079#[doc = "      ]"]
11080#[doc = "    },"]
11081#[doc = "    {"]
11082#[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.\","]
11083#[doc = "      \"type\": \"string\","]
11084#[doc = "      \"enum\": ["]
11085#[doc = "        \"AccountId\""]
11086#[doc = "      ]"]
11087#[doc = "    }"]
11088#[doc = "  ]"]
11089#[doc = "}"]
11090#[doc = r" ```"]
11091#[doc = r" </details>"]
11092#[derive(
11093    :: serde :: Deserialize,
11094    :: serde :: Serialize,
11095    Clone,
11096    Copy,
11097    Debug,
11098    Eq,
11099    Hash,
11100    Ord,
11101    PartialEq,
11102    PartialOrd,
11103)]
11104pub enum GlobalContractDeployMode {
11105    #[doc = "Contract is deployed under its code hash.\nUsers will be able reference it by that hash.\nThis effectively makes the contract immutable."]
11106    CodeHash,
11107    #[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."]
11108    AccountId,
11109}
11110impl ::std::convert::From<&Self> for GlobalContractDeployMode {
11111    fn from(value: &GlobalContractDeployMode) -> Self {
11112        value.clone()
11113    }
11114}
11115impl ::std::fmt::Display for GlobalContractDeployMode {
11116    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11117        match *self {
11118            Self::CodeHash => f.write_str("CodeHash"),
11119            Self::AccountId => f.write_str("AccountId"),
11120        }
11121    }
11122}
11123impl ::std::str::FromStr for GlobalContractDeployMode {
11124    type Err = self::error::ConversionError;
11125    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11126        match value {
11127            "CodeHash" => Ok(Self::CodeHash),
11128            "AccountId" => Ok(Self::AccountId),
11129            _ => Err("invalid value".into()),
11130        }
11131    }
11132}
11133impl ::std::convert::TryFrom<&str> for GlobalContractDeployMode {
11134    type Error = self::error::ConversionError;
11135    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11136        value.parse()
11137    }
11138}
11139impl ::std::convert::TryFrom<&::std::string::String> for GlobalContractDeployMode {
11140    type Error = self::error::ConversionError;
11141    fn try_from(
11142        value: &::std::string::String,
11143    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11144        value.parse()
11145    }
11146}
11147impl ::std::convert::TryFrom<::std::string::String> for GlobalContractDeployMode {
11148    type Error = self::error::ConversionError;
11149    fn try_from(
11150        value: ::std::string::String,
11151    ) -> ::std::result::Result<Self, self::error::ConversionError> {
11152        value.parse()
11153    }
11154}
11155#[doc = "`GlobalContractIdentifier`"]
11156#[doc = r""]
11157#[doc = r" <details><summary>JSON schema</summary>"]
11158#[doc = r""]
11159#[doc = r" ```json"]
11160#[doc = "{"]
11161#[doc = "  \"oneOf\": ["]
11162#[doc = "    {"]
11163#[doc = "      \"type\": \"object\","]
11164#[doc = "      \"required\": ["]
11165#[doc = "        \"CodeHash\""]
11166#[doc = "      ],"]
11167#[doc = "      \"properties\": {"]
11168#[doc = "        \"CodeHash\": {"]
11169#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
11170#[doc = "        }"]
11171#[doc = "      },"]
11172#[doc = "      \"additionalProperties\": false"]
11173#[doc = "    },"]
11174#[doc = "    {"]
11175#[doc = "      \"type\": \"object\","]
11176#[doc = "      \"required\": ["]
11177#[doc = "        \"AccountId\""]
11178#[doc = "      ],"]
11179#[doc = "      \"properties\": {"]
11180#[doc = "        \"AccountId\": {"]
11181#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
11182#[doc = "        }"]
11183#[doc = "      },"]
11184#[doc = "      \"additionalProperties\": false"]
11185#[doc = "    }"]
11186#[doc = "  ]"]
11187#[doc = "}"]
11188#[doc = r" ```"]
11189#[doc = r" </details>"]
11190#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11191pub enum GlobalContractIdentifier {
11192    CodeHash(CryptoHash),
11193    AccountId(AccountId),
11194}
11195impl ::std::convert::From<&Self> for GlobalContractIdentifier {
11196    fn from(value: &GlobalContractIdentifier) -> Self {
11197        value.clone()
11198    }
11199}
11200impl ::std::convert::From<CryptoHash> for GlobalContractIdentifier {
11201    fn from(value: CryptoHash) -> Self {
11202        Self::CodeHash(value)
11203    }
11204}
11205impl ::std::convert::From<AccountId> for GlobalContractIdentifier {
11206    fn from(value: AccountId) -> Self {
11207        Self::AccountId(value)
11208    }
11209}
11210#[doc = "`GlobalContractIdentifierView`"]
11211#[doc = r""]
11212#[doc = r" <details><summary>JSON schema</summary>"]
11213#[doc = r""]
11214#[doc = r" ```json"]
11215#[doc = "{"]
11216#[doc = "  \"oneOf\": ["]
11217#[doc = "    {"]
11218#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
11219#[doc = "    },"]
11220#[doc = "    {"]
11221#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
11222#[doc = "    }"]
11223#[doc = "  ]"]
11224#[doc = "}"]
11225#[doc = r" ```"]
11226#[doc = r" </details>"]
11227#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11228#[serde(untagged)]
11229pub enum GlobalContractIdentifierView {
11230    CryptoHash(CryptoHash),
11231    AccountId(AccountId),
11232}
11233impl ::std::convert::From<&Self> for GlobalContractIdentifierView {
11234    fn from(value: &GlobalContractIdentifierView) -> Self {
11235        value.clone()
11236    }
11237}
11238impl ::std::fmt::Display for GlobalContractIdentifierView {
11239    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11240        match self {
11241            Self::CryptoHash(x) => x.fmt(f),
11242            Self::AccountId(x) => x.fmt(f),
11243        }
11244    }
11245}
11246impl ::std::convert::From<CryptoHash> for GlobalContractIdentifierView {
11247    fn from(value: CryptoHash) -> Self {
11248        Self::CryptoHash(value)
11249    }
11250}
11251impl ::std::convert::From<AccountId> for GlobalContractIdentifierView {
11252    fn from(value: AccountId) -> Self {
11253        Self::AccountId(value)
11254    }
11255}
11256#[doc = "`HostError`"]
11257#[doc = r""]
11258#[doc = r" <details><summary>JSON schema</summary>"]
11259#[doc = r""]
11260#[doc = r" ```json"]
11261#[doc = "{"]
11262#[doc = "  \"oneOf\": ["]
11263#[doc = "    {"]
11264#[doc = "      \"description\": \"String encoding is bad UTF-16 sequence\","]
11265#[doc = "      \"type\": \"string\","]
11266#[doc = "      \"enum\": ["]
11267#[doc = "        \"BadUTF16\""]
11268#[doc = "      ]"]
11269#[doc = "    },"]
11270#[doc = "    {"]
11271#[doc = "      \"description\": \"String encoding is bad UTF-8 sequence\","]
11272#[doc = "      \"type\": \"string\","]
11273#[doc = "      \"enum\": ["]
11274#[doc = "        \"BadUTF8\""]
11275#[doc = "      ]"]
11276#[doc = "    },"]
11277#[doc = "    {"]
11278#[doc = "      \"description\": \"Exceeded the prepaid gas\","]
11279#[doc = "      \"type\": \"string\","]
11280#[doc = "      \"enum\": ["]
11281#[doc = "        \"GasExceeded\""]
11282#[doc = "      ]"]
11283#[doc = "    },"]
11284#[doc = "    {"]
11285#[doc = "      \"description\": \"Exceeded the maximum amount of gas allowed to burn per contract\","]
11286#[doc = "      \"type\": \"string\","]
11287#[doc = "      \"enum\": ["]
11288#[doc = "        \"GasLimitExceeded\""]
11289#[doc = "      ]"]
11290#[doc = "    },"]
11291#[doc = "    {"]
11292#[doc = "      \"description\": \"Exceeded the account balance\","]
11293#[doc = "      \"type\": \"string\","]
11294#[doc = "      \"enum\": ["]
11295#[doc = "        \"BalanceExceeded\""]
11296#[doc = "      ]"]
11297#[doc = "    },"]
11298#[doc = "    {"]
11299#[doc = "      \"description\": \"Tried to call an empty method name\","]
11300#[doc = "      \"type\": \"string\","]
11301#[doc = "      \"enum\": ["]
11302#[doc = "        \"EmptyMethodName\""]
11303#[doc = "      ]"]
11304#[doc = "    },"]
11305#[doc = "    {"]
11306#[doc = "      \"description\": \"Smart contract panicked\","]
11307#[doc = "      \"type\": \"object\","]
11308#[doc = "      \"required\": ["]
11309#[doc = "        \"GuestPanic\""]
11310#[doc = "      ],"]
11311#[doc = "      \"properties\": {"]
11312#[doc = "        \"GuestPanic\": {"]
11313#[doc = "          \"type\": \"object\","]
11314#[doc = "          \"required\": ["]
11315#[doc = "            \"panic_msg\""]
11316#[doc = "          ],"]
11317#[doc = "          \"properties\": {"]
11318#[doc = "            \"panic_msg\": {"]
11319#[doc = "              \"type\": \"string\""]
11320#[doc = "            }"]
11321#[doc = "          }"]
11322#[doc = "        }"]
11323#[doc = "      },"]
11324#[doc = "      \"additionalProperties\": false"]
11325#[doc = "    },"]
11326#[doc = "    {"]
11327#[doc = "      \"description\": \"IntegerOverflow happened during a contract execution\","]
11328#[doc = "      \"type\": \"string\","]
11329#[doc = "      \"enum\": ["]
11330#[doc = "        \"IntegerOverflow\""]
11331#[doc = "      ]"]
11332#[doc = "    },"]
11333#[doc = "    {"]
11334#[doc = "      \"description\": \"`promise_idx` does not correspond to existing promises\","]
11335#[doc = "      \"type\": \"object\","]
11336#[doc = "      \"required\": ["]
11337#[doc = "        \"InvalidPromiseIndex\""]
11338#[doc = "      ],"]
11339#[doc = "      \"properties\": {"]
11340#[doc = "        \"InvalidPromiseIndex\": {"]
11341#[doc = "          \"type\": \"object\","]
11342#[doc = "          \"required\": ["]
11343#[doc = "            \"promise_idx\""]
11344#[doc = "          ],"]
11345#[doc = "          \"properties\": {"]
11346#[doc = "            \"promise_idx\": {"]
11347#[doc = "              \"type\": \"integer\","]
11348#[doc = "              \"format\": \"uint64\","]
11349#[doc = "              \"minimum\": 0.0"]
11350#[doc = "            }"]
11351#[doc = "          }"]
11352#[doc = "        }"]
11353#[doc = "      },"]
11354#[doc = "      \"additionalProperties\": false"]
11355#[doc = "    },"]
11356#[doc = "    {"]
11357#[doc = "      \"description\": \"Actions can only be appended to non-joint promise.\","]
11358#[doc = "      \"type\": \"string\","]
11359#[doc = "      \"enum\": ["]
11360#[doc = "        \"CannotAppendActionToJointPromise\""]
11361#[doc = "      ]"]
11362#[doc = "    },"]
11363#[doc = "    {"]
11364#[doc = "      \"description\": \"Returning joint promise is currently prohibited\","]
11365#[doc = "      \"type\": \"string\","]
11366#[doc = "      \"enum\": ["]
11367#[doc = "        \"CannotReturnJointPromise\""]
11368#[doc = "      ]"]
11369#[doc = "    },"]
11370#[doc = "    {"]
11371#[doc = "      \"description\": \"Accessed invalid promise result index\","]
11372#[doc = "      \"type\": \"object\","]
11373#[doc = "      \"required\": ["]
11374#[doc = "        \"InvalidPromiseResultIndex\""]
11375#[doc = "      ],"]
11376#[doc = "      \"properties\": {"]
11377#[doc = "        \"InvalidPromiseResultIndex\": {"]
11378#[doc = "          \"type\": \"object\","]
11379#[doc = "          \"required\": ["]
11380#[doc = "            \"result_idx\""]
11381#[doc = "          ],"]
11382#[doc = "          \"properties\": {"]
11383#[doc = "            \"result_idx\": {"]
11384#[doc = "              \"type\": \"integer\","]
11385#[doc = "              \"format\": \"uint64\","]
11386#[doc = "              \"minimum\": 0.0"]
11387#[doc = "            }"]
11388#[doc = "          }"]
11389#[doc = "        }"]
11390#[doc = "      },"]
11391#[doc = "      \"additionalProperties\": false"]
11392#[doc = "    },"]
11393#[doc = "    {"]
11394#[doc = "      \"description\": \"Accessed invalid register id\","]
11395#[doc = "      \"type\": \"object\","]
11396#[doc = "      \"required\": ["]
11397#[doc = "        \"InvalidRegisterId\""]
11398#[doc = "      ],"]
11399#[doc = "      \"properties\": {"]
11400#[doc = "        \"InvalidRegisterId\": {"]
11401#[doc = "          \"type\": \"object\","]
11402#[doc = "          \"required\": ["]
11403#[doc = "            \"register_id\""]
11404#[doc = "          ],"]
11405#[doc = "          \"properties\": {"]
11406#[doc = "            \"register_id\": {"]
11407#[doc = "              \"type\": \"integer\","]
11408#[doc = "              \"format\": \"uint64\","]
11409#[doc = "              \"minimum\": 0.0"]
11410#[doc = "            }"]
11411#[doc = "          }"]
11412#[doc = "        }"]
11413#[doc = "      },"]
11414#[doc = "      \"additionalProperties\": false"]
11415#[doc = "    },"]
11416#[doc = "    {"]
11417#[doc = "      \"description\": \"Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie\","]
11418#[doc = "      \"type\": \"object\","]
11419#[doc = "      \"required\": ["]
11420#[doc = "        \"IteratorWasInvalidated\""]
11421#[doc = "      ],"]
11422#[doc = "      \"properties\": {"]
11423#[doc = "        \"IteratorWasInvalidated\": {"]
11424#[doc = "          \"type\": \"object\","]
11425#[doc = "          \"required\": ["]
11426#[doc = "            \"iterator_index\""]
11427#[doc = "          ],"]
11428#[doc = "          \"properties\": {"]
11429#[doc = "            \"iterator_index\": {"]
11430#[doc = "              \"type\": \"integer\","]
11431#[doc = "              \"format\": \"uint64\","]
11432#[doc = "              \"minimum\": 0.0"]
11433#[doc = "            }"]
11434#[doc = "          }"]
11435#[doc = "        }"]
11436#[doc = "      },"]
11437#[doc = "      \"additionalProperties\": false"]
11438#[doc = "    },"]
11439#[doc = "    {"]
11440#[doc = "      \"description\": \"Accessed memory outside the bounds\","]
11441#[doc = "      \"type\": \"string\","]
11442#[doc = "      \"enum\": ["]
11443#[doc = "        \"MemoryAccessViolation\""]
11444#[doc = "      ]"]
11445#[doc = "    },"]
11446#[doc = "    {"]
11447#[doc = "      \"description\": \"VM Logic returned an invalid receipt index\","]
11448#[doc = "      \"type\": \"object\","]
11449#[doc = "      \"required\": ["]
11450#[doc = "        \"InvalidReceiptIndex\""]
11451#[doc = "      ],"]
11452#[doc = "      \"properties\": {"]
11453#[doc = "        \"InvalidReceiptIndex\": {"]
11454#[doc = "          \"type\": \"object\","]
11455#[doc = "          \"required\": ["]
11456#[doc = "            \"receipt_index\""]
11457#[doc = "          ],"]
11458#[doc = "          \"properties\": {"]
11459#[doc = "            \"receipt_index\": {"]
11460#[doc = "              \"type\": \"integer\","]
11461#[doc = "              \"format\": \"uint64\","]
11462#[doc = "              \"minimum\": 0.0"]
11463#[doc = "            }"]
11464#[doc = "          }"]
11465#[doc = "        }"]
11466#[doc = "      },"]
11467#[doc = "      \"additionalProperties\": false"]
11468#[doc = "    },"]
11469#[doc = "    {"]
11470#[doc = "      \"description\": \"Iterator index `iterator_index` does not exist\","]
11471#[doc = "      \"type\": \"object\","]
11472#[doc = "      \"required\": ["]
11473#[doc = "        \"InvalidIteratorIndex\""]
11474#[doc = "      ],"]
11475#[doc = "      \"properties\": {"]
11476#[doc = "        \"InvalidIteratorIndex\": {"]
11477#[doc = "          \"type\": \"object\","]
11478#[doc = "          \"required\": ["]
11479#[doc = "            \"iterator_index\""]
11480#[doc = "          ],"]
11481#[doc = "          \"properties\": {"]
11482#[doc = "            \"iterator_index\": {"]
11483#[doc = "              \"type\": \"integer\","]
11484#[doc = "              \"format\": \"uint64\","]
11485#[doc = "              \"minimum\": 0.0"]
11486#[doc = "            }"]
11487#[doc = "          }"]
11488#[doc = "        }"]
11489#[doc = "      },"]
11490#[doc = "      \"additionalProperties\": false"]
11491#[doc = "    },"]
11492#[doc = "    {"]
11493#[doc = "      \"description\": \"VM Logic returned an invalid account id\","]
11494#[doc = "      \"type\": \"string\","]
11495#[doc = "      \"enum\": ["]
11496#[doc = "        \"InvalidAccountId\""]
11497#[doc = "      ]"]
11498#[doc = "    },"]
11499#[doc = "    {"]
11500#[doc = "      \"description\": \"VM Logic returned an invalid method name\","]
11501#[doc = "      \"type\": \"string\","]
11502#[doc = "      \"enum\": ["]
11503#[doc = "        \"InvalidMethodName\""]
11504#[doc = "      ]"]
11505#[doc = "    },"]
11506#[doc = "    {"]
11507#[doc = "      \"description\": \"VM Logic provided an invalid public key\","]
11508#[doc = "      \"type\": \"string\","]
11509#[doc = "      \"enum\": ["]
11510#[doc = "        \"InvalidPublicKey\""]
11511#[doc = "      ]"]
11512#[doc = "    },"]
11513#[doc = "    {"]
11514#[doc = "      \"description\": \"`method_name` is not allowed in view calls\","]
11515#[doc = "      \"type\": \"object\","]
11516#[doc = "      \"required\": ["]
11517#[doc = "        \"ProhibitedInView\""]
11518#[doc = "      ],"]
11519#[doc = "      \"properties\": {"]
11520#[doc = "        \"ProhibitedInView\": {"]
11521#[doc = "          \"type\": \"object\","]
11522#[doc = "          \"required\": ["]
11523#[doc = "            \"method_name\""]
11524#[doc = "          ],"]
11525#[doc = "          \"properties\": {"]
11526#[doc = "            \"method_name\": {"]
11527#[doc = "              \"type\": \"string\""]
11528#[doc = "            }"]
11529#[doc = "          }"]
11530#[doc = "        }"]
11531#[doc = "      },"]
11532#[doc = "      \"additionalProperties\": false"]
11533#[doc = "    },"]
11534#[doc = "    {"]
11535#[doc = "      \"description\": \"The total number of logs will exceed the limit.\","]
11536#[doc = "      \"type\": \"object\","]
11537#[doc = "      \"required\": ["]
11538#[doc = "        \"NumberOfLogsExceeded\""]
11539#[doc = "      ],"]
11540#[doc = "      \"properties\": {"]
11541#[doc = "        \"NumberOfLogsExceeded\": {"]
11542#[doc = "          \"type\": \"object\","]
11543#[doc = "          \"required\": ["]
11544#[doc = "            \"limit\""]
11545#[doc = "          ],"]
11546#[doc = "          \"properties\": {"]
11547#[doc = "            \"limit\": {"]
11548#[doc = "              \"type\": \"integer\","]
11549#[doc = "              \"format\": \"uint64\","]
11550#[doc = "              \"minimum\": 0.0"]
11551#[doc = "            }"]
11552#[doc = "          }"]
11553#[doc = "        }"]
11554#[doc = "      },"]
11555#[doc = "      \"additionalProperties\": false"]
11556#[doc = "    },"]
11557#[doc = "    {"]
11558#[doc = "      \"description\": \"The storage key length exceeded the limit.\","]
11559#[doc = "      \"type\": \"object\","]
11560#[doc = "      \"required\": ["]
11561#[doc = "        \"KeyLengthExceeded\""]
11562#[doc = "      ],"]
11563#[doc = "      \"properties\": {"]
11564#[doc = "        \"KeyLengthExceeded\": {"]
11565#[doc = "          \"type\": \"object\","]
11566#[doc = "          \"required\": ["]
11567#[doc = "            \"length\","]
11568#[doc = "            \"limit\""]
11569#[doc = "          ],"]
11570#[doc = "          \"properties\": {"]
11571#[doc = "            \"length\": {"]
11572#[doc = "              \"type\": \"integer\","]
11573#[doc = "              \"format\": \"uint64\","]
11574#[doc = "              \"minimum\": 0.0"]
11575#[doc = "            },"]
11576#[doc = "            \"limit\": {"]
11577#[doc = "              \"type\": \"integer\","]
11578#[doc = "              \"format\": \"uint64\","]
11579#[doc = "              \"minimum\": 0.0"]
11580#[doc = "            }"]
11581#[doc = "          }"]
11582#[doc = "        }"]
11583#[doc = "      },"]
11584#[doc = "      \"additionalProperties\": false"]
11585#[doc = "    },"]
11586#[doc = "    {"]
11587#[doc = "      \"description\": \"The storage value length exceeded the limit.\","]
11588#[doc = "      \"type\": \"object\","]
11589#[doc = "      \"required\": ["]
11590#[doc = "        \"ValueLengthExceeded\""]
11591#[doc = "      ],"]
11592#[doc = "      \"properties\": {"]
11593#[doc = "        \"ValueLengthExceeded\": {"]
11594#[doc = "          \"type\": \"object\","]
11595#[doc = "          \"required\": ["]
11596#[doc = "            \"length\","]
11597#[doc = "            \"limit\""]
11598#[doc = "          ],"]
11599#[doc = "          \"properties\": {"]
11600#[doc = "            \"length\": {"]
11601#[doc = "              \"type\": \"integer\","]
11602#[doc = "              \"format\": \"uint64\","]
11603#[doc = "              \"minimum\": 0.0"]
11604#[doc = "            },"]
11605#[doc = "            \"limit\": {"]
11606#[doc = "              \"type\": \"integer\","]
11607#[doc = "              \"format\": \"uint64\","]
11608#[doc = "              \"minimum\": 0.0"]
11609#[doc = "            }"]
11610#[doc = "          }"]
11611#[doc = "        }"]
11612#[doc = "      },"]
11613#[doc = "      \"additionalProperties\": false"]
11614#[doc = "    },"]
11615#[doc = "    {"]
11616#[doc = "      \"description\": \"The total log length exceeded the limit.\","]
11617#[doc = "      \"type\": \"object\","]
11618#[doc = "      \"required\": ["]
11619#[doc = "        \"TotalLogLengthExceeded\""]
11620#[doc = "      ],"]
11621#[doc = "      \"properties\": {"]
11622#[doc = "        \"TotalLogLengthExceeded\": {"]
11623#[doc = "          \"type\": \"object\","]
11624#[doc = "          \"required\": ["]
11625#[doc = "            \"length\","]
11626#[doc = "            \"limit\""]
11627#[doc = "          ],"]
11628#[doc = "          \"properties\": {"]
11629#[doc = "            \"length\": {"]
11630#[doc = "              \"type\": \"integer\","]
11631#[doc = "              \"format\": \"uint64\","]
11632#[doc = "              \"minimum\": 0.0"]
11633#[doc = "            },"]
11634#[doc = "            \"limit\": {"]
11635#[doc = "              \"type\": \"integer\","]
11636#[doc = "              \"format\": \"uint64\","]
11637#[doc = "              \"minimum\": 0.0"]
11638#[doc = "            }"]
11639#[doc = "          }"]
11640#[doc = "        }"]
11641#[doc = "      },"]
11642#[doc = "      \"additionalProperties\": false"]
11643#[doc = "    },"]
11644#[doc = "    {"]
11645#[doc = "      \"description\": \"The maximum number of promises within a FunctionCall exceeded the limit.\","]
11646#[doc = "      \"type\": \"object\","]
11647#[doc = "      \"required\": ["]
11648#[doc = "        \"NumberPromisesExceeded\""]
11649#[doc = "      ],"]
11650#[doc = "      \"properties\": {"]
11651#[doc = "        \"NumberPromisesExceeded\": {"]
11652#[doc = "          \"type\": \"object\","]
11653#[doc = "          \"required\": ["]
11654#[doc = "            \"limit\","]
11655#[doc = "            \"number_of_promises\""]
11656#[doc = "          ],"]
11657#[doc = "          \"properties\": {"]
11658#[doc = "            \"limit\": {"]
11659#[doc = "              \"type\": \"integer\","]
11660#[doc = "              \"format\": \"uint64\","]
11661#[doc = "              \"minimum\": 0.0"]
11662#[doc = "            },"]
11663#[doc = "            \"number_of_promises\": {"]
11664#[doc = "              \"type\": \"integer\","]
11665#[doc = "              \"format\": \"uint64\","]
11666#[doc = "              \"minimum\": 0.0"]
11667#[doc = "            }"]
11668#[doc = "          }"]
11669#[doc = "        }"]
11670#[doc = "      },"]
11671#[doc = "      \"additionalProperties\": false"]
11672#[doc = "    },"]
11673#[doc = "    {"]
11674#[doc = "      \"description\": \"The maximum number of input data dependencies exceeded the limit.\","]
11675#[doc = "      \"type\": \"object\","]
11676#[doc = "      \"required\": ["]
11677#[doc = "        \"NumberInputDataDependenciesExceeded\""]
11678#[doc = "      ],"]
11679#[doc = "      \"properties\": {"]
11680#[doc = "        \"NumberInputDataDependenciesExceeded\": {"]
11681#[doc = "          \"type\": \"object\","]
11682#[doc = "          \"required\": ["]
11683#[doc = "            \"limit\","]
11684#[doc = "            \"number_of_input_data_dependencies\""]
11685#[doc = "          ],"]
11686#[doc = "          \"properties\": {"]
11687#[doc = "            \"limit\": {"]
11688#[doc = "              \"type\": \"integer\","]
11689#[doc = "              \"format\": \"uint64\","]
11690#[doc = "              \"minimum\": 0.0"]
11691#[doc = "            },"]
11692#[doc = "            \"number_of_input_data_dependencies\": {"]
11693#[doc = "              \"type\": \"integer\","]
11694#[doc = "              \"format\": \"uint64\","]
11695#[doc = "              \"minimum\": 0.0"]
11696#[doc = "            }"]
11697#[doc = "          }"]
11698#[doc = "        }"]
11699#[doc = "      },"]
11700#[doc = "      \"additionalProperties\": false"]
11701#[doc = "    },"]
11702#[doc = "    {"]
11703#[doc = "      \"description\": \"The returned value length exceeded the limit.\","]
11704#[doc = "      \"type\": \"object\","]
11705#[doc = "      \"required\": ["]
11706#[doc = "        \"ReturnedValueLengthExceeded\""]
11707#[doc = "      ],"]
11708#[doc = "      \"properties\": {"]
11709#[doc = "        \"ReturnedValueLengthExceeded\": {"]
11710#[doc = "          \"type\": \"object\","]
11711#[doc = "          \"required\": ["]
11712#[doc = "            \"length\","]
11713#[doc = "            \"limit\""]
11714#[doc = "          ],"]
11715#[doc = "          \"properties\": {"]
11716#[doc = "            \"length\": {"]
11717#[doc = "              \"type\": \"integer\","]
11718#[doc = "              \"format\": \"uint64\","]
11719#[doc = "              \"minimum\": 0.0"]
11720#[doc = "            },"]
11721#[doc = "            \"limit\": {"]
11722#[doc = "              \"type\": \"integer\","]
11723#[doc = "              \"format\": \"uint64\","]
11724#[doc = "              \"minimum\": 0.0"]
11725#[doc = "            }"]
11726#[doc = "          }"]
11727#[doc = "        }"]
11728#[doc = "      },"]
11729#[doc = "      \"additionalProperties\": false"]
11730#[doc = "    },"]
11731#[doc = "    {"]
11732#[doc = "      \"description\": \"The contract size for DeployContract action exceeded the limit.\","]
11733#[doc = "      \"type\": \"object\","]
11734#[doc = "      \"required\": ["]
11735#[doc = "        \"ContractSizeExceeded\""]
11736#[doc = "      ],"]
11737#[doc = "      \"properties\": {"]
11738#[doc = "        \"ContractSizeExceeded\": {"]
11739#[doc = "          \"type\": \"object\","]
11740#[doc = "          \"required\": ["]
11741#[doc = "            \"limit\","]
11742#[doc = "            \"size\""]
11743#[doc = "          ],"]
11744#[doc = "          \"properties\": {"]
11745#[doc = "            \"limit\": {"]
11746#[doc = "              \"type\": \"integer\","]
11747#[doc = "              \"format\": \"uint64\","]
11748#[doc = "              \"minimum\": 0.0"]
11749#[doc = "            },"]
11750#[doc = "            \"size\": {"]
11751#[doc = "              \"type\": \"integer\","]
11752#[doc = "              \"format\": \"uint64\","]
11753#[doc = "              \"minimum\": 0.0"]
11754#[doc = "            }"]
11755#[doc = "          }"]
11756#[doc = "        }"]
11757#[doc = "      },"]
11758#[doc = "      \"additionalProperties\": false"]
11759#[doc = "    },"]
11760#[doc = "    {"]
11761#[doc = "      \"description\": \"The host function was deprecated.\","]
11762#[doc = "      \"type\": \"object\","]
11763#[doc = "      \"required\": ["]
11764#[doc = "        \"Deprecated\""]
11765#[doc = "      ],"]
11766#[doc = "      \"properties\": {"]
11767#[doc = "        \"Deprecated\": {"]
11768#[doc = "          \"type\": \"object\","]
11769#[doc = "          \"required\": ["]
11770#[doc = "            \"method_name\""]
11771#[doc = "          ],"]
11772#[doc = "          \"properties\": {"]
11773#[doc = "            \"method_name\": {"]
11774#[doc = "              \"type\": \"string\""]
11775#[doc = "            }"]
11776#[doc = "          }"]
11777#[doc = "        }"]
11778#[doc = "      },"]
11779#[doc = "      \"additionalProperties\": false"]
11780#[doc = "    },"]
11781#[doc = "    {"]
11782#[doc = "      \"description\": \"General errors for ECDSA recover.\","]
11783#[doc = "      \"type\": \"object\","]
11784#[doc = "      \"required\": ["]
11785#[doc = "        \"ECRecoverError\""]
11786#[doc = "      ],"]
11787#[doc = "      \"properties\": {"]
11788#[doc = "        \"ECRecoverError\": {"]
11789#[doc = "          \"type\": \"object\","]
11790#[doc = "          \"required\": ["]
11791#[doc = "            \"msg\""]
11792#[doc = "          ],"]
11793#[doc = "          \"properties\": {"]
11794#[doc = "            \"msg\": {"]
11795#[doc = "              \"type\": \"string\""]
11796#[doc = "            }"]
11797#[doc = "          }"]
11798#[doc = "        }"]
11799#[doc = "      },"]
11800#[doc = "      \"additionalProperties\": false"]
11801#[doc = "    },"]
11802#[doc = "    {"]
11803#[doc = "      \"description\": \"Invalid input to alt_bn128 family of functions (e.g., point which isn't\\non the curve).\","]
11804#[doc = "      \"type\": \"object\","]
11805#[doc = "      \"required\": ["]
11806#[doc = "        \"AltBn128InvalidInput\""]
11807#[doc = "      ],"]
11808#[doc = "      \"properties\": {"]
11809#[doc = "        \"AltBn128InvalidInput\": {"]
11810#[doc = "          \"type\": \"object\","]
11811#[doc = "          \"required\": ["]
11812#[doc = "            \"msg\""]
11813#[doc = "          ],"]
11814#[doc = "          \"properties\": {"]
11815#[doc = "            \"msg\": {"]
11816#[doc = "              \"type\": \"string\""]
11817#[doc = "            }"]
11818#[doc = "          }"]
11819#[doc = "        }"]
11820#[doc = "      },"]
11821#[doc = "      \"additionalProperties\": false"]
11822#[doc = "    },"]
11823#[doc = "    {"]
11824#[doc = "      \"description\": \"Invalid input to ed25519 signature verification function (e.g. signature cannot be\\nderived from bytes).\","]
11825#[doc = "      \"type\": \"object\","]
11826#[doc = "      \"required\": ["]
11827#[doc = "        \"Ed25519VerifyInvalidInput\""]
11828#[doc = "      ],"]
11829#[doc = "      \"properties\": {"]
11830#[doc = "        \"Ed25519VerifyInvalidInput\": {"]
11831#[doc = "          \"type\": \"object\","]
11832#[doc = "          \"required\": ["]
11833#[doc = "            \"msg\""]
11834#[doc = "          ],"]
11835#[doc = "          \"properties\": {"]
11836#[doc = "            \"msg\": {"]
11837#[doc = "              \"type\": \"string\""]
11838#[doc = "            }"]
11839#[doc = "          }"]
11840#[doc = "        }"]
11841#[doc = "      },"]
11842#[doc = "      \"additionalProperties\": false"]
11843#[doc = "    }"]
11844#[doc = "  ]"]
11845#[doc = "}"]
11846#[doc = r" ```"]
11847#[doc = r" </details>"]
11848#[derive(
11849    :: serde :: Deserialize,
11850    :: serde :: Serialize,
11851    Clone,
11852    Debug,
11853    thiserror::Error,
11854    strum_macros::Display,
11855)]
11856pub enum HostError {
11857    #[doc = "String encoding is bad UTF-16 sequence"]
11858    #[serde(rename = "BadUTF16")]
11859    BadUtf16,
11860    #[doc = "String encoding is bad UTF-8 sequence"]
11861    #[serde(rename = "BadUTF8")]
11862    BadUtf8,
11863    #[doc = "Exceeded the prepaid gas"]
11864    GasExceeded,
11865    #[doc = "Exceeded the maximum amount of gas allowed to burn per contract"]
11866    GasLimitExceeded,
11867    #[doc = "Exceeded the account balance"]
11868    BalanceExceeded,
11869    #[doc = "Tried to call an empty method name"]
11870    EmptyMethodName,
11871    #[doc = "Smart contract panicked"]
11872    GuestPanic { panic_msg: ::std::string::String },
11873    #[doc = "IntegerOverflow happened during a contract execution"]
11874    IntegerOverflow,
11875    #[doc = "`promise_idx` does not correspond to existing promises"]
11876    InvalidPromiseIndex { promise_idx: u64 },
11877    #[doc = "Actions can only be appended to non-joint promise."]
11878    CannotAppendActionToJointPromise,
11879    #[doc = "Returning joint promise is currently prohibited"]
11880    CannotReturnJointPromise,
11881    #[doc = "Accessed invalid promise result index"]
11882    InvalidPromiseResultIndex { result_idx: u64 },
11883    #[doc = "Accessed invalid register id"]
11884    InvalidRegisterId { register_id: u64 },
11885    #[doc = "Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie"]
11886    IteratorWasInvalidated { iterator_index: u64 },
11887    #[doc = "Accessed memory outside the bounds"]
11888    MemoryAccessViolation,
11889    #[doc = "VM Logic returned an invalid receipt index"]
11890    InvalidReceiptIndex { receipt_index: u64 },
11891    #[doc = "Iterator index `iterator_index` does not exist"]
11892    InvalidIteratorIndex { iterator_index: u64 },
11893    #[doc = "VM Logic returned an invalid account id"]
11894    InvalidAccountId,
11895    #[doc = "VM Logic returned an invalid method name"]
11896    InvalidMethodName,
11897    #[doc = "VM Logic provided an invalid public key"]
11898    InvalidPublicKey,
11899    #[doc = "`method_name` is not allowed in view calls"]
11900    ProhibitedInView { method_name: ::std::string::String },
11901    #[doc = "The total number of logs will exceed the limit."]
11902    NumberOfLogsExceeded { limit: u64 },
11903    #[doc = "The storage key length exceeded the limit."]
11904    KeyLengthExceeded { length: u64, limit: u64 },
11905    #[doc = "The storage value length exceeded the limit."]
11906    ValueLengthExceeded { length: u64, limit: u64 },
11907    #[doc = "The total log length exceeded the limit."]
11908    TotalLogLengthExceeded { length: u64, limit: u64 },
11909    #[doc = "The maximum number of promises within a FunctionCall exceeded the limit."]
11910    NumberPromisesExceeded { limit: u64, number_of_promises: u64 },
11911    #[doc = "The maximum number of input data dependencies exceeded the limit."]
11912    NumberInputDataDependenciesExceeded {
11913        limit: u64,
11914        number_of_input_data_dependencies: u64,
11915    },
11916    #[doc = "The returned value length exceeded the limit."]
11917    ReturnedValueLengthExceeded { length: u64, limit: u64 },
11918    #[doc = "The contract size for DeployContract action exceeded the limit."]
11919    ContractSizeExceeded { limit: u64, size: u64 },
11920    #[doc = "The host function was deprecated."]
11921    Deprecated { method_name: ::std::string::String },
11922    #[doc = "General errors for ECDSA recover."]
11923    #[serde(rename = "ECRecoverError")]
11924    EcRecoverError { msg: ::std::string::String },
11925    #[doc = "Invalid input to alt_bn128 family of functions (e.g., point which isn't\non the curve)."]
11926    AltBn128InvalidInput { msg: ::std::string::String },
11927    #[doc = "Invalid input to ed25519 signature verification function (e.g. signature cannot be\nderived from bytes)."]
11928    Ed25519VerifyInvalidInput { msg: ::std::string::String },
11929}
11930impl ::std::convert::From<&Self> for HostError {
11931    fn from(value: &HostError) -> Self {
11932        value.clone()
11933    }
11934}
11935#[doc = "`InternalError`"]
11936#[doc = r""]
11937#[doc = r" <details><summary>JSON schema</summary>"]
11938#[doc = r""]
11939#[doc = r" ```json"]
11940#[doc = "{"]
11941#[doc = "  \"oneOf\": ["]
11942#[doc = "    {"]
11943#[doc = "      \"type\": \"object\","]
11944#[doc = "      \"required\": ["]
11945#[doc = "        \"info\","]
11946#[doc = "        \"name\""]
11947#[doc = "      ],"]
11948#[doc = "      \"properties\": {"]
11949#[doc = "        \"info\": {"]
11950#[doc = "          \"type\": \"object\","]
11951#[doc = "          \"required\": ["]
11952#[doc = "            \"error_message\""]
11953#[doc = "          ],"]
11954#[doc = "          \"properties\": {"]
11955#[doc = "            \"error_message\": {"]
11956#[doc = "              \"type\": \"string\""]
11957#[doc = "            }"]
11958#[doc = "          }"]
11959#[doc = "        },"]
11960#[doc = "        \"name\": {"]
11961#[doc = "          \"type\": \"string\","]
11962#[doc = "          \"enum\": ["]
11963#[doc = "            \"INTERNAL_ERROR\""]
11964#[doc = "          ]"]
11965#[doc = "        }"]
11966#[doc = "      }"]
11967#[doc = "    }"]
11968#[doc = "  ]"]
11969#[doc = "}"]
11970#[doc = r" ```"]
11971#[doc = r" </details>"]
11972#[derive(
11973    :: serde :: Deserialize,
11974    :: serde :: Serialize,
11975    Clone,
11976    Debug,
11977    thiserror::Error,
11978    strum_macros::Display,
11979)]
11980#[serde(tag = "name", content = "info")]
11981pub enum InternalError {
11982    #[serde(rename = "INTERNAL_ERROR")]
11983    InternalError {
11984        error_message: ::std::string::String,
11985    },
11986}
11987impl ::std::convert::From<&Self> for InternalError {
11988    fn from(value: &InternalError) -> Self {
11989        value.clone()
11990    }
11991}
11992#[doc = "`InvalidAccessKeyError`"]
11993#[doc = r""]
11994#[doc = r" <details><summary>JSON schema</summary>"]
11995#[doc = r""]
11996#[doc = r" ```json"]
11997#[doc = "{"]
11998#[doc = "  \"oneOf\": ["]
11999#[doc = "    {"]
12000#[doc = "      \"description\": \"The access key identified by the `public_key` doesn't exist for the account\","]
12001#[doc = "      \"type\": \"object\","]
12002#[doc = "      \"required\": ["]
12003#[doc = "        \"AccessKeyNotFound\""]
12004#[doc = "      ],"]
12005#[doc = "      \"properties\": {"]
12006#[doc = "        \"AccessKeyNotFound\": {"]
12007#[doc = "          \"type\": \"object\","]
12008#[doc = "          \"required\": ["]
12009#[doc = "            \"account_id\","]
12010#[doc = "            \"public_key\""]
12011#[doc = "          ],"]
12012#[doc = "          \"properties\": {"]
12013#[doc = "            \"account_id\": {"]
12014#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
12015#[doc = "            },"]
12016#[doc = "            \"public_key\": {"]
12017#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
12018#[doc = "            }"]
12019#[doc = "          }"]
12020#[doc = "        }"]
12021#[doc = "      },"]
12022#[doc = "      \"additionalProperties\": false"]
12023#[doc = "    },"]
12024#[doc = "    {"]
12025#[doc = "      \"description\": \"Transaction `receiver_id` doesn't match the access key receiver_id\","]
12026#[doc = "      \"type\": \"object\","]
12027#[doc = "      \"required\": ["]
12028#[doc = "        \"ReceiverMismatch\""]
12029#[doc = "      ],"]
12030#[doc = "      \"properties\": {"]
12031#[doc = "        \"ReceiverMismatch\": {"]
12032#[doc = "          \"type\": \"object\","]
12033#[doc = "          \"required\": ["]
12034#[doc = "            \"ak_receiver\","]
12035#[doc = "            \"tx_receiver\""]
12036#[doc = "          ],"]
12037#[doc = "          \"properties\": {"]
12038#[doc = "            \"ak_receiver\": {"]
12039#[doc = "              \"type\": \"string\""]
12040#[doc = "            },"]
12041#[doc = "            \"tx_receiver\": {"]
12042#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
12043#[doc = "            }"]
12044#[doc = "          }"]
12045#[doc = "        }"]
12046#[doc = "      },"]
12047#[doc = "      \"additionalProperties\": false"]
12048#[doc = "    },"]
12049#[doc = "    {"]
12050#[doc = "      \"description\": \"Transaction method name isn't allowed by the access key\","]
12051#[doc = "      \"type\": \"object\","]
12052#[doc = "      \"required\": ["]
12053#[doc = "        \"MethodNameMismatch\""]
12054#[doc = "      ],"]
12055#[doc = "      \"properties\": {"]
12056#[doc = "        \"MethodNameMismatch\": {"]
12057#[doc = "          \"type\": \"object\","]
12058#[doc = "          \"required\": ["]
12059#[doc = "            \"method_name\""]
12060#[doc = "          ],"]
12061#[doc = "          \"properties\": {"]
12062#[doc = "            \"method_name\": {"]
12063#[doc = "              \"type\": \"string\""]
12064#[doc = "            }"]
12065#[doc = "          }"]
12066#[doc = "        }"]
12067#[doc = "      },"]
12068#[doc = "      \"additionalProperties\": false"]
12069#[doc = "    },"]
12070#[doc = "    {"]
12071#[doc = "      \"description\": \"Transaction requires a full permission access key.\","]
12072#[doc = "      \"type\": \"string\","]
12073#[doc = "      \"enum\": ["]
12074#[doc = "        \"RequiresFullAccess\""]
12075#[doc = "      ]"]
12076#[doc = "    },"]
12077#[doc = "    {"]
12078#[doc = "      \"description\": \"Access Key does not have enough allowance to cover transaction cost\","]
12079#[doc = "      \"type\": \"object\","]
12080#[doc = "      \"required\": ["]
12081#[doc = "        \"NotEnoughAllowance\""]
12082#[doc = "      ],"]
12083#[doc = "      \"properties\": {"]
12084#[doc = "        \"NotEnoughAllowance\": {"]
12085#[doc = "          \"type\": \"object\","]
12086#[doc = "          \"required\": ["]
12087#[doc = "            \"account_id\","]
12088#[doc = "            \"allowance\","]
12089#[doc = "            \"cost\","]
12090#[doc = "            \"public_key\""]
12091#[doc = "          ],"]
12092#[doc = "          \"properties\": {"]
12093#[doc = "            \"account_id\": {"]
12094#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
12095#[doc = "            },"]
12096#[doc = "            \"allowance\": {"]
12097#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
12098#[doc = "            },"]
12099#[doc = "            \"cost\": {"]
12100#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
12101#[doc = "            },"]
12102#[doc = "            \"public_key\": {"]
12103#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
12104#[doc = "            }"]
12105#[doc = "          }"]
12106#[doc = "        }"]
12107#[doc = "      },"]
12108#[doc = "      \"additionalProperties\": false"]
12109#[doc = "    },"]
12110#[doc = "    {"]
12111#[doc = "      \"description\": \"Having a deposit with a function call action is not allowed with a function call access key.\","]
12112#[doc = "      \"type\": \"string\","]
12113#[doc = "      \"enum\": ["]
12114#[doc = "        \"DepositWithFunctionCall\""]
12115#[doc = "      ]"]
12116#[doc = "    }"]
12117#[doc = "  ]"]
12118#[doc = "}"]
12119#[doc = r" ```"]
12120#[doc = r" </details>"]
12121#[derive(
12122    :: serde :: Deserialize,
12123    :: serde :: Serialize,
12124    Clone,
12125    Debug,
12126    thiserror::Error,
12127    strum_macros::Display,
12128)]
12129pub enum InvalidAccessKeyError {
12130    #[doc = "The access key identified by the `public_key` doesn't exist for the account"]
12131    AccessKeyNotFound {
12132        account_id: AccountId,
12133        public_key: PublicKey,
12134    },
12135    #[doc = "Transaction `receiver_id` doesn't match the access key receiver_id"]
12136    ReceiverMismatch {
12137        ak_receiver: ::std::string::String,
12138        tx_receiver: AccountId,
12139    },
12140    #[doc = "Transaction method name isn't allowed by the access key"]
12141    MethodNameMismatch { method_name: ::std::string::String },
12142    #[doc = "Transaction requires a full permission access key."]
12143    RequiresFullAccess,
12144    #[doc = "Access Key does not have enough allowance to cover transaction cost"]
12145    NotEnoughAllowance {
12146        account_id: AccountId,
12147        allowance: NearToken,
12148        cost: NearToken,
12149        public_key: PublicKey,
12150    },
12151    #[doc = "Having a deposit with a function call action is not allowed with a function call access key."]
12152    DepositWithFunctionCall,
12153}
12154impl ::std::convert::From<&Self> for InvalidAccessKeyError {
12155    fn from(value: &InvalidAccessKeyError) -> Self {
12156        value.clone()
12157    }
12158}
12159#[doc = "An error happened during TX execution"]
12160#[doc = r""]
12161#[doc = r" <details><summary>JSON schema</summary>"]
12162#[doc = r""]
12163#[doc = r" ```json"]
12164#[doc = "{"]
12165#[doc = "  \"description\": \"An error happened during TX execution\","]
12166#[doc = "  \"oneOf\": ["]
12167#[doc = "    {"]
12168#[doc = "      \"description\": \"Happens if a wrong AccessKey used or AccessKey has not enough permissions\","]
12169#[doc = "      \"type\": \"object\","]
12170#[doc = "      \"required\": ["]
12171#[doc = "        \"InvalidAccessKeyError\""]
12172#[doc = "      ],"]
12173#[doc = "      \"properties\": {"]
12174#[doc = "        \"InvalidAccessKeyError\": {"]
12175#[doc = "          \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
12176#[doc = "        }"]
12177#[doc = "      },"]
12178#[doc = "      \"additionalProperties\": false"]
12179#[doc = "    },"]
12180#[doc = "    {"]
12181#[doc = "      \"description\": \"TX signer_id is not a valid [`AccountId`]\","]
12182#[doc = "      \"type\": \"object\","]
12183#[doc = "      \"required\": ["]
12184#[doc = "        \"InvalidSignerId\""]
12185#[doc = "      ],"]
12186#[doc = "      \"properties\": {"]
12187#[doc = "        \"InvalidSignerId\": {"]
12188#[doc = "          \"type\": \"object\","]
12189#[doc = "          \"required\": ["]
12190#[doc = "            \"signer_id\""]
12191#[doc = "          ],"]
12192#[doc = "          \"properties\": {"]
12193#[doc = "            \"signer_id\": {"]
12194#[doc = "              \"type\": \"string\""]
12195#[doc = "            }"]
12196#[doc = "          }"]
12197#[doc = "        }"]
12198#[doc = "      },"]
12199#[doc = "      \"additionalProperties\": false"]
12200#[doc = "    },"]
12201#[doc = "    {"]
12202#[doc = "      \"description\": \"TX signer_id is not found in a storage\","]
12203#[doc = "      \"type\": \"object\","]
12204#[doc = "      \"required\": ["]
12205#[doc = "        \"SignerDoesNotExist\""]
12206#[doc = "      ],"]
12207#[doc = "      \"properties\": {"]
12208#[doc = "        \"SignerDoesNotExist\": {"]
12209#[doc = "          \"type\": \"object\","]
12210#[doc = "          \"required\": ["]
12211#[doc = "            \"signer_id\""]
12212#[doc = "          ],"]
12213#[doc = "          \"properties\": {"]
12214#[doc = "            \"signer_id\": {"]
12215#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
12216#[doc = "            }"]
12217#[doc = "          }"]
12218#[doc = "        }"]
12219#[doc = "      },"]
12220#[doc = "      \"additionalProperties\": false"]
12221#[doc = "    },"]
12222#[doc = "    {"]
12223#[doc = "      \"description\": \"Transaction nonce must be strictly greater than `account[access_key].nonce`.\","]
12224#[doc = "      \"type\": \"object\","]
12225#[doc = "      \"required\": ["]
12226#[doc = "        \"InvalidNonce\""]
12227#[doc = "      ],"]
12228#[doc = "      \"properties\": {"]
12229#[doc = "        \"InvalidNonce\": {"]
12230#[doc = "          \"type\": \"object\","]
12231#[doc = "          \"required\": ["]
12232#[doc = "            \"ak_nonce\","]
12233#[doc = "            \"tx_nonce\""]
12234#[doc = "          ],"]
12235#[doc = "          \"properties\": {"]
12236#[doc = "            \"ak_nonce\": {"]
12237#[doc = "              \"type\": \"integer\","]
12238#[doc = "              \"format\": \"uint64\","]
12239#[doc = "              \"minimum\": 0.0"]
12240#[doc = "            },"]
12241#[doc = "            \"tx_nonce\": {"]
12242#[doc = "              \"type\": \"integer\","]
12243#[doc = "              \"format\": \"uint64\","]
12244#[doc = "              \"minimum\": 0.0"]
12245#[doc = "            }"]
12246#[doc = "          }"]
12247#[doc = "        }"]
12248#[doc = "      },"]
12249#[doc = "      \"additionalProperties\": false"]
12250#[doc = "    },"]
12251#[doc = "    {"]
12252#[doc = "      \"description\": \"Transaction nonce is larger than the upper bound given by the block height\","]
12253#[doc = "      \"type\": \"object\","]
12254#[doc = "      \"required\": ["]
12255#[doc = "        \"NonceTooLarge\""]
12256#[doc = "      ],"]
12257#[doc = "      \"properties\": {"]
12258#[doc = "        \"NonceTooLarge\": {"]
12259#[doc = "          \"type\": \"object\","]
12260#[doc = "          \"required\": ["]
12261#[doc = "            \"tx_nonce\","]
12262#[doc = "            \"upper_bound\""]
12263#[doc = "          ],"]
12264#[doc = "          \"properties\": {"]
12265#[doc = "            \"tx_nonce\": {"]
12266#[doc = "              \"type\": \"integer\","]
12267#[doc = "              \"format\": \"uint64\","]
12268#[doc = "              \"minimum\": 0.0"]
12269#[doc = "            },"]
12270#[doc = "            \"upper_bound\": {"]
12271#[doc = "              \"type\": \"integer\","]
12272#[doc = "              \"format\": \"uint64\","]
12273#[doc = "              \"minimum\": 0.0"]
12274#[doc = "            }"]
12275#[doc = "          }"]
12276#[doc = "        }"]
12277#[doc = "      },"]
12278#[doc = "      \"additionalProperties\": false"]
12279#[doc = "    },"]
12280#[doc = "    {"]
12281#[doc = "      \"description\": \"TX receiver_id is not a valid AccountId\","]
12282#[doc = "      \"type\": \"object\","]
12283#[doc = "      \"required\": ["]
12284#[doc = "        \"InvalidReceiverId\""]
12285#[doc = "      ],"]
12286#[doc = "      \"properties\": {"]
12287#[doc = "        \"InvalidReceiverId\": {"]
12288#[doc = "          \"type\": \"object\","]
12289#[doc = "          \"required\": ["]
12290#[doc = "            \"receiver_id\""]
12291#[doc = "          ],"]
12292#[doc = "          \"properties\": {"]
12293#[doc = "            \"receiver_id\": {"]
12294#[doc = "              \"type\": \"string\""]
12295#[doc = "            }"]
12296#[doc = "          }"]
12297#[doc = "        }"]
12298#[doc = "      },"]
12299#[doc = "      \"additionalProperties\": false"]
12300#[doc = "    },"]
12301#[doc = "    {"]
12302#[doc = "      \"description\": \"TX signature is not valid\","]
12303#[doc = "      \"type\": \"string\","]
12304#[doc = "      \"enum\": ["]
12305#[doc = "        \"InvalidSignature\""]
12306#[doc = "      ]"]
12307#[doc = "    },"]
12308#[doc = "    {"]
12309#[doc = "      \"description\": \"Account does not have enough balance to cover TX cost\","]
12310#[doc = "      \"type\": \"object\","]
12311#[doc = "      \"required\": ["]
12312#[doc = "        \"NotEnoughBalance\""]
12313#[doc = "      ],"]
12314#[doc = "      \"properties\": {"]
12315#[doc = "        \"NotEnoughBalance\": {"]
12316#[doc = "          \"type\": \"object\","]
12317#[doc = "          \"required\": ["]
12318#[doc = "            \"balance\","]
12319#[doc = "            \"cost\","]
12320#[doc = "            \"signer_id\""]
12321#[doc = "          ],"]
12322#[doc = "          \"properties\": {"]
12323#[doc = "            \"balance\": {"]
12324#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
12325#[doc = "            },"]
12326#[doc = "            \"cost\": {"]
12327#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
12328#[doc = "            },"]
12329#[doc = "            \"signer_id\": {"]
12330#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
12331#[doc = "            }"]
12332#[doc = "          }"]
12333#[doc = "        }"]
12334#[doc = "      },"]
12335#[doc = "      \"additionalProperties\": false"]
12336#[doc = "    },"]
12337#[doc = "    {"]
12338#[doc = "      \"description\": \"Signer account doesn't have enough balance after transaction.\","]
12339#[doc = "      \"type\": \"object\","]
12340#[doc = "      \"required\": ["]
12341#[doc = "        \"LackBalanceForState\""]
12342#[doc = "      ],"]
12343#[doc = "      \"properties\": {"]
12344#[doc = "        \"LackBalanceForState\": {"]
12345#[doc = "          \"type\": \"object\","]
12346#[doc = "          \"required\": ["]
12347#[doc = "            \"amount\","]
12348#[doc = "            \"signer_id\""]
12349#[doc = "          ],"]
12350#[doc = "          \"properties\": {"]
12351#[doc = "            \"amount\": {"]
12352#[doc = "              \"description\": \"Required balance to cover the state.\","]
12353#[doc = "              \"allOf\": ["]
12354#[doc = "                {"]
12355#[doc = "                  \"$ref\": \"#/components/schemas/NearToken\""]
12356#[doc = "                }"]
12357#[doc = "              ]"]
12358#[doc = "            },"]
12359#[doc = "            \"signer_id\": {"]
12360#[doc = "              \"description\": \"An account which doesn't have enough balance to cover storage.\","]
12361#[doc = "              \"allOf\": ["]
12362#[doc = "                {"]
12363#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
12364#[doc = "                }"]
12365#[doc = "              ]"]
12366#[doc = "            }"]
12367#[doc = "          }"]
12368#[doc = "        }"]
12369#[doc = "      },"]
12370#[doc = "      \"additionalProperties\": false"]
12371#[doc = "    },"]
12372#[doc = "    {"]
12373#[doc = "      \"description\": \"An integer overflow occurred during transaction cost estimation.\","]
12374#[doc = "      \"type\": \"string\","]
12375#[doc = "      \"enum\": ["]
12376#[doc = "        \"CostOverflow\""]
12377#[doc = "      ]"]
12378#[doc = "    },"]
12379#[doc = "    {"]
12380#[doc = "      \"description\": \"Transaction parent block hash doesn't belong to the current chain\","]
12381#[doc = "      \"type\": \"string\","]
12382#[doc = "      \"enum\": ["]
12383#[doc = "        \"InvalidChain\""]
12384#[doc = "      ]"]
12385#[doc = "    },"]
12386#[doc = "    {"]
12387#[doc = "      \"description\": \"Transaction has expired\","]
12388#[doc = "      \"type\": \"string\","]
12389#[doc = "      \"enum\": ["]
12390#[doc = "        \"Expired\""]
12391#[doc = "      ]"]
12392#[doc = "    },"]
12393#[doc = "    {"]
12394#[doc = "      \"description\": \"An error occurred while validating actions of a Transaction.\","]
12395#[doc = "      \"type\": \"object\","]
12396#[doc = "      \"required\": ["]
12397#[doc = "        \"ActionsValidation\""]
12398#[doc = "      ],"]
12399#[doc = "      \"properties\": {"]
12400#[doc = "        \"ActionsValidation\": {"]
12401#[doc = "          \"$ref\": \"#/components/schemas/ActionsValidationError\""]
12402#[doc = "        }"]
12403#[doc = "      },"]
12404#[doc = "      \"additionalProperties\": false"]
12405#[doc = "    },"]
12406#[doc = "    {"]
12407#[doc = "      \"description\": \"The size of serialized transaction exceeded the limit.\","]
12408#[doc = "      \"type\": \"object\","]
12409#[doc = "      \"required\": ["]
12410#[doc = "        \"TransactionSizeExceeded\""]
12411#[doc = "      ],"]
12412#[doc = "      \"properties\": {"]
12413#[doc = "        \"TransactionSizeExceeded\": {"]
12414#[doc = "          \"type\": \"object\","]
12415#[doc = "          \"required\": ["]
12416#[doc = "            \"limit\","]
12417#[doc = "            \"size\""]
12418#[doc = "          ],"]
12419#[doc = "          \"properties\": {"]
12420#[doc = "            \"limit\": {"]
12421#[doc = "              \"type\": \"integer\","]
12422#[doc = "              \"format\": \"uint64\","]
12423#[doc = "              \"minimum\": 0.0"]
12424#[doc = "            },"]
12425#[doc = "            \"size\": {"]
12426#[doc = "              \"type\": \"integer\","]
12427#[doc = "              \"format\": \"uint64\","]
12428#[doc = "              \"minimum\": 0.0"]
12429#[doc = "            }"]
12430#[doc = "          }"]
12431#[doc = "        }"]
12432#[doc = "      },"]
12433#[doc = "      \"additionalProperties\": false"]
12434#[doc = "    },"]
12435#[doc = "    {"]
12436#[doc = "      \"description\": \"Transaction version is invalid.\","]
12437#[doc = "      \"type\": \"string\","]
12438#[doc = "      \"enum\": ["]
12439#[doc = "        \"InvalidTransactionVersion\""]
12440#[doc = "      ]"]
12441#[doc = "    },"]
12442#[doc = "    {"]
12443#[doc = "      \"type\": \"object\","]
12444#[doc = "      \"required\": ["]
12445#[doc = "        \"StorageError\""]
12446#[doc = "      ],"]
12447#[doc = "      \"properties\": {"]
12448#[doc = "        \"StorageError\": {"]
12449#[doc = "          \"$ref\": \"#/components/schemas/StorageError\""]
12450#[doc = "        }"]
12451#[doc = "      },"]
12452#[doc = "      \"additionalProperties\": false"]
12453#[doc = "    },"]
12454#[doc = "    {"]
12455#[doc = "      \"description\": \"The receiver shard of the transaction is too congested to accept new\\ntransactions at the moment.\","]
12456#[doc = "      \"type\": \"object\","]
12457#[doc = "      \"required\": ["]
12458#[doc = "        \"ShardCongested\""]
12459#[doc = "      ],"]
12460#[doc = "      \"properties\": {"]
12461#[doc = "        \"ShardCongested\": {"]
12462#[doc = "          \"type\": \"object\","]
12463#[doc = "          \"required\": ["]
12464#[doc = "            \"congestion_level\","]
12465#[doc = "            \"shard_id\""]
12466#[doc = "          ],"]
12467#[doc = "          \"properties\": {"]
12468#[doc = "            \"congestion_level\": {"]
12469#[doc = "              \"description\": \"A value between 0 (no congestion) and 1 (max congestion).\","]
12470#[doc = "              \"type\": \"number\","]
12471#[doc = "              \"format\": \"double\""]
12472#[doc = "            },"]
12473#[doc = "            \"shard_id\": {"]
12474#[doc = "              \"description\": \"The congested shard.\","]
12475#[doc = "              \"type\": \"integer\","]
12476#[doc = "              \"format\": \"uint32\","]
12477#[doc = "              \"minimum\": 0.0"]
12478#[doc = "            }"]
12479#[doc = "          }"]
12480#[doc = "        }"]
12481#[doc = "      },"]
12482#[doc = "      \"additionalProperties\": false"]
12483#[doc = "    },"]
12484#[doc = "    {"]
12485#[doc = "      \"description\": \"The receiver shard of the transaction missed several chunks and rejects\\nnew transaction until it can make progress again.\","]
12486#[doc = "      \"type\": \"object\","]
12487#[doc = "      \"required\": ["]
12488#[doc = "        \"ShardStuck\""]
12489#[doc = "      ],"]
12490#[doc = "      \"properties\": {"]
12491#[doc = "        \"ShardStuck\": {"]
12492#[doc = "          \"type\": \"object\","]
12493#[doc = "          \"required\": ["]
12494#[doc = "            \"missed_chunks\","]
12495#[doc = "            \"shard_id\""]
12496#[doc = "          ],"]
12497#[doc = "          \"properties\": {"]
12498#[doc = "            \"missed_chunks\": {"]
12499#[doc = "              \"description\": \"The number of blocks since the last included chunk of the shard.\","]
12500#[doc = "              \"type\": \"integer\","]
12501#[doc = "              \"format\": \"uint64\","]
12502#[doc = "              \"minimum\": 0.0"]
12503#[doc = "            },"]
12504#[doc = "            \"shard_id\": {"]
12505#[doc = "              \"description\": \"The shard that fails making progress.\","]
12506#[doc = "              \"type\": \"integer\","]
12507#[doc = "              \"format\": \"uint32\","]
12508#[doc = "              \"minimum\": 0.0"]
12509#[doc = "            }"]
12510#[doc = "          }"]
12511#[doc = "        }"]
12512#[doc = "      },"]
12513#[doc = "      \"additionalProperties\": false"]
12514#[doc = "    }"]
12515#[doc = "  ]"]
12516#[doc = "}"]
12517#[doc = r" ```"]
12518#[doc = r" </details>"]
12519#[derive(
12520    :: serde :: Deserialize,
12521    :: serde :: Serialize,
12522    Clone,
12523    Debug,
12524    thiserror::Error,
12525    strum_macros::Display,
12526)]
12527pub enum InvalidTxError {
12528    #[doc = "Happens if a wrong AccessKey used or AccessKey has not enough permissions"]
12529    InvalidAccessKeyError(InvalidAccessKeyError),
12530    #[doc = "TX signer_id is not a valid [`AccountId`]"]
12531    InvalidSignerId {
12532        signer_id: ::std::string::String,
12533    },
12534    #[doc = "TX signer_id is not found in a storage"]
12535    SignerDoesNotExist {
12536        signer_id: AccountId,
12537    },
12538    #[doc = "Transaction nonce must be strictly greater than `account[access_key].nonce`."]
12539    InvalidNonce {
12540        ak_nonce: u64,
12541        tx_nonce: u64,
12542    },
12543    #[doc = "Transaction nonce is larger than the upper bound given by the block height"]
12544    NonceTooLarge {
12545        tx_nonce: u64,
12546        upper_bound: u64,
12547    },
12548    #[doc = "TX receiver_id is not a valid AccountId"]
12549    InvalidReceiverId {
12550        receiver_id: ::std::string::String,
12551    },
12552    #[doc = "TX signature is not valid"]
12553    InvalidSignature,
12554    #[doc = "Account does not have enough balance to cover TX cost"]
12555    NotEnoughBalance {
12556        balance: NearToken,
12557        cost: NearToken,
12558        signer_id: AccountId,
12559    },
12560    #[doc = "Signer account doesn't have enough balance after transaction."]
12561    LackBalanceForState {
12562        #[doc = "Required balance to cover the state."]
12563        amount: NearToken,
12564        #[doc = "An account which doesn't have enough balance to cover storage."]
12565        signer_id: AccountId,
12566    },
12567    #[doc = "An integer overflow occurred during transaction cost estimation."]
12568    CostOverflow,
12569    #[doc = "Transaction parent block hash doesn't belong to the current chain"]
12570    InvalidChain,
12571    #[doc = "Transaction has expired"]
12572    Expired,
12573    #[doc = "An error occurred while validating actions of a Transaction."]
12574    ActionsValidation(ActionsValidationError),
12575    #[doc = "The size of serialized transaction exceeded the limit."]
12576    TransactionSizeExceeded {
12577        limit: u64,
12578        size: u64,
12579    },
12580    #[doc = "Transaction version is invalid."]
12581    InvalidTransactionVersion,
12582    StorageError(StorageError),
12583    #[doc = "The receiver shard of the transaction is too congested to accept new\ntransactions at the moment."]
12584    ShardCongested {
12585        congestion_level: f64,
12586        #[doc = "The congested shard."]
12587        shard_id: u32,
12588    },
12589    #[doc = "The receiver shard of the transaction missed several chunks and rejects\nnew transaction until it can make progress again."]
12590    ShardStuck {
12591        #[doc = "The number of blocks since the last included chunk of the shard."]
12592        missed_chunks: u64,
12593        #[doc = "The shard that fails making progress."]
12594        shard_id: u32,
12595    },
12596}
12597impl ::std::convert::From<&Self> for InvalidTxError {
12598    fn from(value: &InvalidTxError) -> Self {
12599        value.clone()
12600    }
12601}
12602impl ::std::convert::From<InvalidAccessKeyError> for InvalidTxError {
12603    fn from(value: InvalidAccessKeyError) -> Self {
12604        Self::InvalidAccessKeyError(value)
12605    }
12606}
12607impl ::std::convert::From<ActionsValidationError> for InvalidTxError {
12608    fn from(value: ActionsValidationError) -> Self {
12609        Self::ActionsValidation(value)
12610    }
12611}
12612impl ::std::convert::From<StorageError> for InvalidTxError {
12613    fn from(value: StorageError) -> Self {
12614        Self::StorageError(value)
12615    }
12616}
12617#[doc = "`JsonRpcRequestForBlock`"]
12618#[doc = r""]
12619#[doc = r" <details><summary>JSON schema</summary>"]
12620#[doc = r""]
12621#[doc = r" ```json"]
12622#[doc = "{"]
12623#[doc = "  \"title\": \"JsonRpcRequest_for_block\","]
12624#[doc = "  \"type\": \"object\","]
12625#[doc = "  \"required\": ["]
12626#[doc = "    \"id\","]
12627#[doc = "    \"jsonrpc\","]
12628#[doc = "    \"method\","]
12629#[doc = "    \"params\""]
12630#[doc = "  ],"]
12631#[doc = "  \"properties\": {"]
12632#[doc = "    \"id\": {"]
12633#[doc = "      \"type\": \"string\""]
12634#[doc = "    },"]
12635#[doc = "    \"jsonrpc\": {"]
12636#[doc = "      \"type\": \"string\""]
12637#[doc = "    },"]
12638#[doc = "    \"method\": {"]
12639#[doc = "      \"type\": \"string\","]
12640#[doc = "      \"enum\": ["]
12641#[doc = "        \"block\""]
12642#[doc = "      ]"]
12643#[doc = "    },"]
12644#[doc = "    \"params\": {"]
12645#[doc = "      \"$ref\": \"#/components/schemas/RpcBlockRequest\""]
12646#[doc = "    }"]
12647#[doc = "  }"]
12648#[doc = "}"]
12649#[doc = r" ```"]
12650#[doc = r" </details>"]
12651#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12652pub struct JsonRpcRequestForBlock {
12653    pub id: ::std::string::String,
12654    pub jsonrpc: ::std::string::String,
12655    pub method: JsonRpcRequestForBlockMethod,
12656    pub params: RpcBlockRequest,
12657}
12658impl ::std::convert::From<&JsonRpcRequestForBlock> for JsonRpcRequestForBlock {
12659    fn from(value: &JsonRpcRequestForBlock) -> Self {
12660        value.clone()
12661    }
12662}
12663#[doc = "`JsonRpcRequestForBlockEffects`"]
12664#[doc = r""]
12665#[doc = r" <details><summary>JSON schema</summary>"]
12666#[doc = r""]
12667#[doc = r" ```json"]
12668#[doc = "{"]
12669#[doc = "  \"title\": \"JsonRpcRequest_for_block_effects\","]
12670#[doc = "  \"type\": \"object\","]
12671#[doc = "  \"required\": ["]
12672#[doc = "    \"id\","]
12673#[doc = "    \"jsonrpc\","]
12674#[doc = "    \"method\","]
12675#[doc = "    \"params\""]
12676#[doc = "  ],"]
12677#[doc = "  \"properties\": {"]
12678#[doc = "    \"id\": {"]
12679#[doc = "      \"type\": \"string\""]
12680#[doc = "    },"]
12681#[doc = "    \"jsonrpc\": {"]
12682#[doc = "      \"type\": \"string\""]
12683#[doc = "    },"]
12684#[doc = "    \"method\": {"]
12685#[doc = "      \"type\": \"string\","]
12686#[doc = "      \"enum\": ["]
12687#[doc = "        \"block_effects\""]
12688#[doc = "      ]"]
12689#[doc = "    },"]
12690#[doc = "    \"params\": {"]
12691#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
12692#[doc = "    }"]
12693#[doc = "  }"]
12694#[doc = "}"]
12695#[doc = r" ```"]
12696#[doc = r" </details>"]
12697#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12698pub struct JsonRpcRequestForBlockEffects {
12699    pub id: ::std::string::String,
12700    pub jsonrpc: ::std::string::String,
12701    pub method: JsonRpcRequestForBlockEffectsMethod,
12702    pub params: RpcStateChangesInBlockRequest,
12703}
12704impl ::std::convert::From<&JsonRpcRequestForBlockEffects> for JsonRpcRequestForBlockEffects {
12705    fn from(value: &JsonRpcRequestForBlockEffects) -> Self {
12706        value.clone()
12707    }
12708}
12709#[doc = "`JsonRpcRequestForBlockEffectsMethod`"]
12710#[doc = r""]
12711#[doc = r" <details><summary>JSON schema</summary>"]
12712#[doc = r""]
12713#[doc = r" ```json"]
12714#[doc = "{"]
12715#[doc = "  \"type\": \"string\","]
12716#[doc = "  \"enum\": ["]
12717#[doc = "    \"block_effects\""]
12718#[doc = "  ]"]
12719#[doc = "}"]
12720#[doc = r" ```"]
12721#[doc = r" </details>"]
12722#[derive(
12723    :: serde :: Deserialize,
12724    :: serde :: Serialize,
12725    Clone,
12726    Copy,
12727    Debug,
12728    Eq,
12729    Hash,
12730    Ord,
12731    PartialEq,
12732    PartialOrd,
12733)]
12734pub enum JsonRpcRequestForBlockEffectsMethod {
12735    #[serde(rename = "block_effects")]
12736    BlockEffects,
12737}
12738impl ::std::convert::From<&Self> for JsonRpcRequestForBlockEffectsMethod {
12739    fn from(value: &JsonRpcRequestForBlockEffectsMethod) -> Self {
12740        value.clone()
12741    }
12742}
12743impl ::std::fmt::Display for JsonRpcRequestForBlockEffectsMethod {
12744    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12745        match *self {
12746            Self::BlockEffects => f.write_str("block_effects"),
12747        }
12748    }
12749}
12750impl ::std::str::FromStr for JsonRpcRequestForBlockEffectsMethod {
12751    type Err = self::error::ConversionError;
12752    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12753        match value {
12754            "block_effects" => Ok(Self::BlockEffects),
12755            _ => Err("invalid value".into()),
12756        }
12757    }
12758}
12759impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockEffectsMethod {
12760    type Error = self::error::ConversionError;
12761    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12762        value.parse()
12763    }
12764}
12765impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
12766    type Error = self::error::ConversionError;
12767    fn try_from(
12768        value: &::std::string::String,
12769    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12770        value.parse()
12771    }
12772}
12773impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
12774    type Error = self::error::ConversionError;
12775    fn try_from(
12776        value: ::std::string::String,
12777    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12778        value.parse()
12779    }
12780}
12781#[doc = "`JsonRpcRequestForBlockMethod`"]
12782#[doc = r""]
12783#[doc = r" <details><summary>JSON schema</summary>"]
12784#[doc = r""]
12785#[doc = r" ```json"]
12786#[doc = "{"]
12787#[doc = "  \"type\": \"string\","]
12788#[doc = "  \"enum\": ["]
12789#[doc = "    \"block\""]
12790#[doc = "  ]"]
12791#[doc = "}"]
12792#[doc = r" ```"]
12793#[doc = r" </details>"]
12794#[derive(
12795    :: serde :: Deserialize,
12796    :: serde :: Serialize,
12797    Clone,
12798    Copy,
12799    Debug,
12800    Eq,
12801    Hash,
12802    Ord,
12803    PartialEq,
12804    PartialOrd,
12805)]
12806pub enum JsonRpcRequestForBlockMethod {
12807    #[serde(rename = "block")]
12808    Block,
12809}
12810impl ::std::convert::From<&Self> for JsonRpcRequestForBlockMethod {
12811    fn from(value: &JsonRpcRequestForBlockMethod) -> Self {
12812        value.clone()
12813    }
12814}
12815impl ::std::fmt::Display for JsonRpcRequestForBlockMethod {
12816    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12817        match *self {
12818            Self::Block => f.write_str("block"),
12819        }
12820    }
12821}
12822impl ::std::str::FromStr for JsonRpcRequestForBlockMethod {
12823    type Err = self::error::ConversionError;
12824    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12825        match value {
12826            "block" => Ok(Self::Block),
12827            _ => Err("invalid value".into()),
12828        }
12829    }
12830}
12831impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockMethod {
12832    type Error = self::error::ConversionError;
12833    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12834        value.parse()
12835    }
12836}
12837impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockMethod {
12838    type Error = self::error::ConversionError;
12839    fn try_from(
12840        value: &::std::string::String,
12841    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12842        value.parse()
12843    }
12844}
12845impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockMethod {
12846    type Error = self::error::ConversionError;
12847    fn try_from(
12848        value: ::std::string::String,
12849    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12850        value.parse()
12851    }
12852}
12853#[doc = "`JsonRpcRequestForBroadcastTxAsync`"]
12854#[doc = r""]
12855#[doc = r" <details><summary>JSON schema</summary>"]
12856#[doc = r""]
12857#[doc = r" ```json"]
12858#[doc = "{"]
12859#[doc = "  \"title\": \"JsonRpcRequest_for_broadcast_tx_async\","]
12860#[doc = "  \"type\": \"object\","]
12861#[doc = "  \"required\": ["]
12862#[doc = "    \"id\","]
12863#[doc = "    \"jsonrpc\","]
12864#[doc = "    \"method\","]
12865#[doc = "    \"params\""]
12866#[doc = "  ],"]
12867#[doc = "  \"properties\": {"]
12868#[doc = "    \"id\": {"]
12869#[doc = "      \"type\": \"string\""]
12870#[doc = "    },"]
12871#[doc = "    \"jsonrpc\": {"]
12872#[doc = "      \"type\": \"string\""]
12873#[doc = "    },"]
12874#[doc = "    \"method\": {"]
12875#[doc = "      \"type\": \"string\","]
12876#[doc = "      \"enum\": ["]
12877#[doc = "        \"broadcast_tx_async\""]
12878#[doc = "      ]"]
12879#[doc = "    },"]
12880#[doc = "    \"params\": {"]
12881#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
12882#[doc = "    }"]
12883#[doc = "  }"]
12884#[doc = "}"]
12885#[doc = r" ```"]
12886#[doc = r" </details>"]
12887#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12888pub struct JsonRpcRequestForBroadcastTxAsync {
12889    pub id: ::std::string::String,
12890    pub jsonrpc: ::std::string::String,
12891    pub method: JsonRpcRequestForBroadcastTxAsyncMethod,
12892    pub params: RpcSendTransactionRequest,
12893}
12894impl ::std::convert::From<&JsonRpcRequestForBroadcastTxAsync>
12895    for JsonRpcRequestForBroadcastTxAsync
12896{
12897    fn from(value: &JsonRpcRequestForBroadcastTxAsync) -> Self {
12898        value.clone()
12899    }
12900}
12901#[doc = "`JsonRpcRequestForBroadcastTxAsyncMethod`"]
12902#[doc = r""]
12903#[doc = r" <details><summary>JSON schema</summary>"]
12904#[doc = r""]
12905#[doc = r" ```json"]
12906#[doc = "{"]
12907#[doc = "  \"type\": \"string\","]
12908#[doc = "  \"enum\": ["]
12909#[doc = "    \"broadcast_tx_async\""]
12910#[doc = "  ]"]
12911#[doc = "}"]
12912#[doc = r" ```"]
12913#[doc = r" </details>"]
12914#[derive(
12915    :: serde :: Deserialize,
12916    :: serde :: Serialize,
12917    Clone,
12918    Copy,
12919    Debug,
12920    Eq,
12921    Hash,
12922    Ord,
12923    PartialEq,
12924    PartialOrd,
12925)]
12926pub enum JsonRpcRequestForBroadcastTxAsyncMethod {
12927    #[serde(rename = "broadcast_tx_async")]
12928    BroadcastTxAsync,
12929}
12930impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxAsyncMethod {
12931    fn from(value: &JsonRpcRequestForBroadcastTxAsyncMethod) -> Self {
12932        value.clone()
12933    }
12934}
12935impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxAsyncMethod {
12936    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12937        match *self {
12938            Self::BroadcastTxAsync => f.write_str("broadcast_tx_async"),
12939        }
12940    }
12941}
12942impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxAsyncMethod {
12943    type Err = self::error::ConversionError;
12944    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12945        match value {
12946            "broadcast_tx_async" => Ok(Self::BroadcastTxAsync),
12947            _ => Err("invalid value".into()),
12948        }
12949    }
12950}
12951impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxAsyncMethod {
12952    type Error = self::error::ConversionError;
12953    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12954        value.parse()
12955    }
12956}
12957impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
12958    type Error = self::error::ConversionError;
12959    fn try_from(
12960        value: &::std::string::String,
12961    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12962        value.parse()
12963    }
12964}
12965impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
12966    type Error = self::error::ConversionError;
12967    fn try_from(
12968        value: ::std::string::String,
12969    ) -> ::std::result::Result<Self, self::error::ConversionError> {
12970        value.parse()
12971    }
12972}
12973#[doc = "`JsonRpcRequestForBroadcastTxCommit`"]
12974#[doc = r""]
12975#[doc = r" <details><summary>JSON schema</summary>"]
12976#[doc = r""]
12977#[doc = r" ```json"]
12978#[doc = "{"]
12979#[doc = "  \"title\": \"JsonRpcRequest_for_broadcast_tx_commit\","]
12980#[doc = "  \"type\": \"object\","]
12981#[doc = "  \"required\": ["]
12982#[doc = "    \"id\","]
12983#[doc = "    \"jsonrpc\","]
12984#[doc = "    \"method\","]
12985#[doc = "    \"params\""]
12986#[doc = "  ],"]
12987#[doc = "  \"properties\": {"]
12988#[doc = "    \"id\": {"]
12989#[doc = "      \"type\": \"string\""]
12990#[doc = "    },"]
12991#[doc = "    \"jsonrpc\": {"]
12992#[doc = "      \"type\": \"string\""]
12993#[doc = "    },"]
12994#[doc = "    \"method\": {"]
12995#[doc = "      \"type\": \"string\","]
12996#[doc = "      \"enum\": ["]
12997#[doc = "        \"broadcast_tx_commit\""]
12998#[doc = "      ]"]
12999#[doc = "    },"]
13000#[doc = "    \"params\": {"]
13001#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
13002#[doc = "    }"]
13003#[doc = "  }"]
13004#[doc = "}"]
13005#[doc = r" ```"]
13006#[doc = r" </details>"]
13007#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13008pub struct JsonRpcRequestForBroadcastTxCommit {
13009    pub id: ::std::string::String,
13010    pub jsonrpc: ::std::string::String,
13011    pub method: JsonRpcRequestForBroadcastTxCommitMethod,
13012    pub params: RpcSendTransactionRequest,
13013}
13014impl ::std::convert::From<&JsonRpcRequestForBroadcastTxCommit>
13015    for JsonRpcRequestForBroadcastTxCommit
13016{
13017    fn from(value: &JsonRpcRequestForBroadcastTxCommit) -> Self {
13018        value.clone()
13019    }
13020}
13021#[doc = "`JsonRpcRequestForBroadcastTxCommitMethod`"]
13022#[doc = r""]
13023#[doc = r" <details><summary>JSON schema</summary>"]
13024#[doc = r""]
13025#[doc = r" ```json"]
13026#[doc = "{"]
13027#[doc = "  \"type\": \"string\","]
13028#[doc = "  \"enum\": ["]
13029#[doc = "    \"broadcast_tx_commit\""]
13030#[doc = "  ]"]
13031#[doc = "}"]
13032#[doc = r" ```"]
13033#[doc = r" </details>"]
13034#[derive(
13035    :: serde :: Deserialize,
13036    :: serde :: Serialize,
13037    Clone,
13038    Copy,
13039    Debug,
13040    Eq,
13041    Hash,
13042    Ord,
13043    PartialEq,
13044    PartialOrd,
13045)]
13046pub enum JsonRpcRequestForBroadcastTxCommitMethod {
13047    #[serde(rename = "broadcast_tx_commit")]
13048    BroadcastTxCommit,
13049}
13050impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxCommitMethod {
13051    fn from(value: &JsonRpcRequestForBroadcastTxCommitMethod) -> Self {
13052        value.clone()
13053    }
13054}
13055impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxCommitMethod {
13056    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13057        match *self {
13058            Self::BroadcastTxCommit => f.write_str("broadcast_tx_commit"),
13059        }
13060    }
13061}
13062impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxCommitMethod {
13063    type Err = self::error::ConversionError;
13064    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13065        match value {
13066            "broadcast_tx_commit" => Ok(Self::BroadcastTxCommit),
13067            _ => Err("invalid value".into()),
13068        }
13069    }
13070}
13071impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxCommitMethod {
13072    type Error = self::error::ConversionError;
13073    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13074        value.parse()
13075    }
13076}
13077impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
13078    type Error = self::error::ConversionError;
13079    fn try_from(
13080        value: &::std::string::String,
13081    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13082        value.parse()
13083    }
13084}
13085impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
13086    type Error = self::error::ConversionError;
13087    fn try_from(
13088        value: ::std::string::String,
13089    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13090        value.parse()
13091    }
13092}
13093#[doc = "`JsonRpcRequestForChanges`"]
13094#[doc = r""]
13095#[doc = r" <details><summary>JSON schema</summary>"]
13096#[doc = r""]
13097#[doc = r" ```json"]
13098#[doc = "{"]
13099#[doc = "  \"title\": \"JsonRpcRequest_for_changes\","]
13100#[doc = "  \"type\": \"object\","]
13101#[doc = "  \"required\": ["]
13102#[doc = "    \"id\","]
13103#[doc = "    \"jsonrpc\","]
13104#[doc = "    \"method\","]
13105#[doc = "    \"params\""]
13106#[doc = "  ],"]
13107#[doc = "  \"properties\": {"]
13108#[doc = "    \"id\": {"]
13109#[doc = "      \"type\": \"string\""]
13110#[doc = "    },"]
13111#[doc = "    \"jsonrpc\": {"]
13112#[doc = "      \"type\": \"string\""]
13113#[doc = "    },"]
13114#[doc = "    \"method\": {"]
13115#[doc = "      \"type\": \"string\","]
13116#[doc = "      \"enum\": ["]
13117#[doc = "        \"changes\""]
13118#[doc = "      ]"]
13119#[doc = "    },"]
13120#[doc = "    \"params\": {"]
13121#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
13122#[doc = "    }"]
13123#[doc = "  }"]
13124#[doc = "}"]
13125#[doc = r" ```"]
13126#[doc = r" </details>"]
13127#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13128pub struct JsonRpcRequestForChanges {
13129    pub id: ::std::string::String,
13130    pub jsonrpc: ::std::string::String,
13131    pub method: JsonRpcRequestForChangesMethod,
13132    pub params: RpcStateChangesInBlockByTypeRequest,
13133}
13134impl ::std::convert::From<&JsonRpcRequestForChanges> for JsonRpcRequestForChanges {
13135    fn from(value: &JsonRpcRequestForChanges) -> Self {
13136        value.clone()
13137    }
13138}
13139#[doc = "`JsonRpcRequestForChangesMethod`"]
13140#[doc = r""]
13141#[doc = r" <details><summary>JSON schema</summary>"]
13142#[doc = r""]
13143#[doc = r" ```json"]
13144#[doc = "{"]
13145#[doc = "  \"type\": \"string\","]
13146#[doc = "  \"enum\": ["]
13147#[doc = "    \"changes\""]
13148#[doc = "  ]"]
13149#[doc = "}"]
13150#[doc = r" ```"]
13151#[doc = r" </details>"]
13152#[derive(
13153    :: serde :: Deserialize,
13154    :: serde :: Serialize,
13155    Clone,
13156    Copy,
13157    Debug,
13158    Eq,
13159    Hash,
13160    Ord,
13161    PartialEq,
13162    PartialOrd,
13163)]
13164pub enum JsonRpcRequestForChangesMethod {
13165    #[serde(rename = "changes")]
13166    Changes,
13167}
13168impl ::std::convert::From<&Self> for JsonRpcRequestForChangesMethod {
13169    fn from(value: &JsonRpcRequestForChangesMethod) -> Self {
13170        value.clone()
13171    }
13172}
13173impl ::std::fmt::Display for JsonRpcRequestForChangesMethod {
13174    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13175        match *self {
13176            Self::Changes => f.write_str("changes"),
13177        }
13178    }
13179}
13180impl ::std::str::FromStr for JsonRpcRequestForChangesMethod {
13181    type Err = self::error::ConversionError;
13182    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13183        match value {
13184            "changes" => Ok(Self::Changes),
13185            _ => Err("invalid value".into()),
13186        }
13187    }
13188}
13189impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChangesMethod {
13190    type Error = self::error::ConversionError;
13191    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13192        value.parse()
13193    }
13194}
13195impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChangesMethod {
13196    type Error = self::error::ConversionError;
13197    fn try_from(
13198        value: &::std::string::String,
13199    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13200        value.parse()
13201    }
13202}
13203impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChangesMethod {
13204    type Error = self::error::ConversionError;
13205    fn try_from(
13206        value: ::std::string::String,
13207    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13208        value.parse()
13209    }
13210}
13211#[doc = "`JsonRpcRequestForChunk`"]
13212#[doc = r""]
13213#[doc = r" <details><summary>JSON schema</summary>"]
13214#[doc = r""]
13215#[doc = r" ```json"]
13216#[doc = "{"]
13217#[doc = "  \"title\": \"JsonRpcRequest_for_chunk\","]
13218#[doc = "  \"type\": \"object\","]
13219#[doc = "  \"required\": ["]
13220#[doc = "    \"id\","]
13221#[doc = "    \"jsonrpc\","]
13222#[doc = "    \"method\","]
13223#[doc = "    \"params\""]
13224#[doc = "  ],"]
13225#[doc = "  \"properties\": {"]
13226#[doc = "    \"id\": {"]
13227#[doc = "      \"type\": \"string\""]
13228#[doc = "    },"]
13229#[doc = "    \"jsonrpc\": {"]
13230#[doc = "      \"type\": \"string\""]
13231#[doc = "    },"]
13232#[doc = "    \"method\": {"]
13233#[doc = "      \"type\": \"string\","]
13234#[doc = "      \"enum\": ["]
13235#[doc = "        \"chunk\""]
13236#[doc = "      ]"]
13237#[doc = "    },"]
13238#[doc = "    \"params\": {"]
13239#[doc = "      \"$ref\": \"#/components/schemas/RpcChunkRequest\""]
13240#[doc = "    }"]
13241#[doc = "  }"]
13242#[doc = "}"]
13243#[doc = r" ```"]
13244#[doc = r" </details>"]
13245#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13246pub struct JsonRpcRequestForChunk {
13247    pub id: ::std::string::String,
13248    pub jsonrpc: ::std::string::String,
13249    pub method: JsonRpcRequestForChunkMethod,
13250    pub params: RpcChunkRequest,
13251}
13252impl ::std::convert::From<&JsonRpcRequestForChunk> for JsonRpcRequestForChunk {
13253    fn from(value: &JsonRpcRequestForChunk) -> Self {
13254        value.clone()
13255    }
13256}
13257#[doc = "`JsonRpcRequestForChunkMethod`"]
13258#[doc = r""]
13259#[doc = r" <details><summary>JSON schema</summary>"]
13260#[doc = r""]
13261#[doc = r" ```json"]
13262#[doc = "{"]
13263#[doc = "  \"type\": \"string\","]
13264#[doc = "  \"enum\": ["]
13265#[doc = "    \"chunk\""]
13266#[doc = "  ]"]
13267#[doc = "}"]
13268#[doc = r" ```"]
13269#[doc = r" </details>"]
13270#[derive(
13271    :: serde :: Deserialize,
13272    :: serde :: Serialize,
13273    Clone,
13274    Copy,
13275    Debug,
13276    Eq,
13277    Hash,
13278    Ord,
13279    PartialEq,
13280    PartialOrd,
13281)]
13282pub enum JsonRpcRequestForChunkMethod {
13283    #[serde(rename = "chunk")]
13284    Chunk,
13285}
13286impl ::std::convert::From<&Self> for JsonRpcRequestForChunkMethod {
13287    fn from(value: &JsonRpcRequestForChunkMethod) -> Self {
13288        value.clone()
13289    }
13290}
13291impl ::std::fmt::Display for JsonRpcRequestForChunkMethod {
13292    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13293        match *self {
13294            Self::Chunk => f.write_str("chunk"),
13295        }
13296    }
13297}
13298impl ::std::str::FromStr for JsonRpcRequestForChunkMethod {
13299    type Err = self::error::ConversionError;
13300    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13301        match value {
13302            "chunk" => Ok(Self::Chunk),
13303            _ => Err("invalid value".into()),
13304        }
13305    }
13306}
13307impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChunkMethod {
13308    type Error = self::error::ConversionError;
13309    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13310        value.parse()
13311    }
13312}
13313impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChunkMethod {
13314    type Error = self::error::ConversionError;
13315    fn try_from(
13316        value: &::std::string::String,
13317    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13318        value.parse()
13319    }
13320}
13321impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChunkMethod {
13322    type Error = self::error::ConversionError;
13323    fn try_from(
13324        value: ::std::string::String,
13325    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13326        value.parse()
13327    }
13328}
13329#[doc = "`JsonRpcRequestForClientConfig`"]
13330#[doc = r""]
13331#[doc = r" <details><summary>JSON schema</summary>"]
13332#[doc = r""]
13333#[doc = r" ```json"]
13334#[doc = "{"]
13335#[doc = "  \"title\": \"JsonRpcRequest_for_client_config\","]
13336#[doc = "  \"type\": \"object\","]
13337#[doc = "  \"required\": ["]
13338#[doc = "    \"id\","]
13339#[doc = "    \"jsonrpc\","]
13340#[doc = "    \"method\","]
13341#[doc = "    \"params\""]
13342#[doc = "  ],"]
13343#[doc = "  \"properties\": {"]
13344#[doc = "    \"id\": {"]
13345#[doc = "      \"type\": \"string\""]
13346#[doc = "    },"]
13347#[doc = "    \"jsonrpc\": {"]
13348#[doc = "      \"type\": \"string\""]
13349#[doc = "    },"]
13350#[doc = "    \"method\": {"]
13351#[doc = "      \"type\": \"string\","]
13352#[doc = "      \"enum\": ["]
13353#[doc = "        \"client_config\""]
13354#[doc = "      ]"]
13355#[doc = "    },"]
13356#[doc = "    \"params\": {"]
13357#[doc = "      \"$ref\": \"#/components/schemas/RpcClientConfigRequest\""]
13358#[doc = "    }"]
13359#[doc = "  }"]
13360#[doc = "}"]
13361#[doc = r" ```"]
13362#[doc = r" </details>"]
13363#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13364pub struct JsonRpcRequestForClientConfig {
13365    pub id: ::std::string::String,
13366    pub jsonrpc: ::std::string::String,
13367    pub method: JsonRpcRequestForClientConfigMethod,
13368    pub params: RpcClientConfigRequest,
13369}
13370impl ::std::convert::From<&JsonRpcRequestForClientConfig> for JsonRpcRequestForClientConfig {
13371    fn from(value: &JsonRpcRequestForClientConfig) -> Self {
13372        value.clone()
13373    }
13374}
13375#[doc = "`JsonRpcRequestForClientConfigMethod`"]
13376#[doc = r""]
13377#[doc = r" <details><summary>JSON schema</summary>"]
13378#[doc = r""]
13379#[doc = r" ```json"]
13380#[doc = "{"]
13381#[doc = "  \"type\": \"string\","]
13382#[doc = "  \"enum\": ["]
13383#[doc = "    \"client_config\""]
13384#[doc = "  ]"]
13385#[doc = "}"]
13386#[doc = r" ```"]
13387#[doc = r" </details>"]
13388#[derive(
13389    :: serde :: Deserialize,
13390    :: serde :: Serialize,
13391    Clone,
13392    Copy,
13393    Debug,
13394    Eq,
13395    Hash,
13396    Ord,
13397    PartialEq,
13398    PartialOrd,
13399)]
13400pub enum JsonRpcRequestForClientConfigMethod {
13401    #[serde(rename = "client_config")]
13402    ClientConfig,
13403}
13404impl ::std::convert::From<&Self> for JsonRpcRequestForClientConfigMethod {
13405    fn from(value: &JsonRpcRequestForClientConfigMethod) -> Self {
13406        value.clone()
13407    }
13408}
13409impl ::std::fmt::Display for JsonRpcRequestForClientConfigMethod {
13410    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13411        match *self {
13412            Self::ClientConfig => f.write_str("client_config"),
13413        }
13414    }
13415}
13416impl ::std::str::FromStr for JsonRpcRequestForClientConfigMethod {
13417    type Err = self::error::ConversionError;
13418    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13419        match value {
13420            "client_config" => Ok(Self::ClientConfig),
13421            _ => Err("invalid value".into()),
13422        }
13423    }
13424}
13425impl ::std::convert::TryFrom<&str> for JsonRpcRequestForClientConfigMethod {
13426    type Error = self::error::ConversionError;
13427    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13428        value.parse()
13429    }
13430}
13431impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForClientConfigMethod {
13432    type Error = self::error::ConversionError;
13433    fn try_from(
13434        value: &::std::string::String,
13435    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13436        value.parse()
13437    }
13438}
13439impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForClientConfigMethod {
13440    type Error = self::error::ConversionError;
13441    fn try_from(
13442        value: ::std::string::String,
13443    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13444        value.parse()
13445    }
13446}
13447#[doc = "`JsonRpcRequestForExperimentalChanges`"]
13448#[doc = r""]
13449#[doc = r" <details><summary>JSON schema</summary>"]
13450#[doc = r""]
13451#[doc = r" ```json"]
13452#[doc = "{"]
13453#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes\","]
13454#[doc = "  \"type\": \"object\","]
13455#[doc = "  \"required\": ["]
13456#[doc = "    \"id\","]
13457#[doc = "    \"jsonrpc\","]
13458#[doc = "    \"method\","]
13459#[doc = "    \"params\""]
13460#[doc = "  ],"]
13461#[doc = "  \"properties\": {"]
13462#[doc = "    \"id\": {"]
13463#[doc = "      \"type\": \"string\""]
13464#[doc = "    },"]
13465#[doc = "    \"jsonrpc\": {"]
13466#[doc = "      \"type\": \"string\""]
13467#[doc = "    },"]
13468#[doc = "    \"method\": {"]
13469#[doc = "      \"type\": \"string\","]
13470#[doc = "      \"enum\": ["]
13471#[doc = "        \"EXPERIMENTAL_changes\""]
13472#[doc = "      ]"]
13473#[doc = "    },"]
13474#[doc = "    \"params\": {"]
13475#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
13476#[doc = "    }"]
13477#[doc = "  }"]
13478#[doc = "}"]
13479#[doc = r" ```"]
13480#[doc = r" </details>"]
13481#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13482pub struct JsonRpcRequestForExperimentalChanges {
13483    pub id: ::std::string::String,
13484    pub jsonrpc: ::std::string::String,
13485    pub method: JsonRpcRequestForExperimentalChangesMethod,
13486    pub params: RpcStateChangesInBlockByTypeRequest,
13487}
13488impl ::std::convert::From<&JsonRpcRequestForExperimentalChanges>
13489    for JsonRpcRequestForExperimentalChanges
13490{
13491    fn from(value: &JsonRpcRequestForExperimentalChanges) -> Self {
13492        value.clone()
13493    }
13494}
13495#[doc = "`JsonRpcRequestForExperimentalChangesInBlock`"]
13496#[doc = r""]
13497#[doc = r" <details><summary>JSON schema</summary>"]
13498#[doc = r""]
13499#[doc = r" ```json"]
13500#[doc = "{"]
13501#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes_in_block\","]
13502#[doc = "  \"type\": \"object\","]
13503#[doc = "  \"required\": ["]
13504#[doc = "    \"id\","]
13505#[doc = "    \"jsonrpc\","]
13506#[doc = "    \"method\","]
13507#[doc = "    \"params\""]
13508#[doc = "  ],"]
13509#[doc = "  \"properties\": {"]
13510#[doc = "    \"id\": {"]
13511#[doc = "      \"type\": \"string\""]
13512#[doc = "    },"]
13513#[doc = "    \"jsonrpc\": {"]
13514#[doc = "      \"type\": \"string\""]
13515#[doc = "    },"]
13516#[doc = "    \"method\": {"]
13517#[doc = "      \"type\": \"string\","]
13518#[doc = "      \"enum\": ["]
13519#[doc = "        \"EXPERIMENTAL_changes_in_block\""]
13520#[doc = "      ]"]
13521#[doc = "    },"]
13522#[doc = "    \"params\": {"]
13523#[doc = "      \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
13524#[doc = "    }"]
13525#[doc = "  }"]
13526#[doc = "}"]
13527#[doc = r" ```"]
13528#[doc = r" </details>"]
13529#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13530pub struct JsonRpcRequestForExperimentalChangesInBlock {
13531    pub id: ::std::string::String,
13532    pub jsonrpc: ::std::string::String,
13533    pub method: JsonRpcRequestForExperimentalChangesInBlockMethod,
13534    pub params: RpcStateChangesInBlockRequest,
13535}
13536impl ::std::convert::From<&JsonRpcRequestForExperimentalChangesInBlock>
13537    for JsonRpcRequestForExperimentalChangesInBlock
13538{
13539    fn from(value: &JsonRpcRequestForExperimentalChangesInBlock) -> Self {
13540        value.clone()
13541    }
13542}
13543#[doc = "`JsonRpcRequestForExperimentalChangesInBlockMethod`"]
13544#[doc = r""]
13545#[doc = r" <details><summary>JSON schema</summary>"]
13546#[doc = r""]
13547#[doc = r" ```json"]
13548#[doc = "{"]
13549#[doc = "  \"type\": \"string\","]
13550#[doc = "  \"enum\": ["]
13551#[doc = "    \"EXPERIMENTAL_changes_in_block\""]
13552#[doc = "  ]"]
13553#[doc = "}"]
13554#[doc = r" ```"]
13555#[doc = r" </details>"]
13556#[derive(
13557    :: serde :: Deserialize,
13558    :: serde :: Serialize,
13559    Clone,
13560    Copy,
13561    Debug,
13562    Eq,
13563    Hash,
13564    Ord,
13565    PartialEq,
13566    PartialOrd,
13567)]
13568pub enum JsonRpcRequestForExperimentalChangesInBlockMethod {
13569    #[serde(rename = "EXPERIMENTAL_changes_in_block")]
13570    ExperimentalChangesInBlock,
13571}
13572impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesInBlockMethod {
13573    fn from(value: &JsonRpcRequestForExperimentalChangesInBlockMethod) -> Self {
13574        value.clone()
13575    }
13576}
13577impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesInBlockMethod {
13578    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13579        match *self {
13580            Self::ExperimentalChangesInBlock => f.write_str("EXPERIMENTAL_changes_in_block"),
13581        }
13582    }
13583}
13584impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesInBlockMethod {
13585    type Err = self::error::ConversionError;
13586    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13587        match value {
13588            "EXPERIMENTAL_changes_in_block" => Ok(Self::ExperimentalChangesInBlock),
13589            _ => Err("invalid value".into()),
13590        }
13591    }
13592}
13593impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesInBlockMethod {
13594    type Error = self::error::ConversionError;
13595    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13596        value.parse()
13597    }
13598}
13599impl ::std::convert::TryFrom<&::std::string::String>
13600    for JsonRpcRequestForExperimentalChangesInBlockMethod
13601{
13602    type Error = self::error::ConversionError;
13603    fn try_from(
13604        value: &::std::string::String,
13605    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13606        value.parse()
13607    }
13608}
13609impl ::std::convert::TryFrom<::std::string::String>
13610    for JsonRpcRequestForExperimentalChangesInBlockMethod
13611{
13612    type Error = self::error::ConversionError;
13613    fn try_from(
13614        value: ::std::string::String,
13615    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13616        value.parse()
13617    }
13618}
13619#[doc = "`JsonRpcRequestForExperimentalChangesMethod`"]
13620#[doc = r""]
13621#[doc = r" <details><summary>JSON schema</summary>"]
13622#[doc = r""]
13623#[doc = r" ```json"]
13624#[doc = "{"]
13625#[doc = "  \"type\": \"string\","]
13626#[doc = "  \"enum\": ["]
13627#[doc = "    \"EXPERIMENTAL_changes\""]
13628#[doc = "  ]"]
13629#[doc = "}"]
13630#[doc = r" ```"]
13631#[doc = r" </details>"]
13632#[derive(
13633    :: serde :: Deserialize,
13634    :: serde :: Serialize,
13635    Clone,
13636    Copy,
13637    Debug,
13638    Eq,
13639    Hash,
13640    Ord,
13641    PartialEq,
13642    PartialOrd,
13643)]
13644pub enum JsonRpcRequestForExperimentalChangesMethod {
13645    #[serde(rename = "EXPERIMENTAL_changes")]
13646    ExperimentalChanges,
13647}
13648impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesMethod {
13649    fn from(value: &JsonRpcRequestForExperimentalChangesMethod) -> Self {
13650        value.clone()
13651    }
13652}
13653impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesMethod {
13654    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13655        match *self {
13656            Self::ExperimentalChanges => f.write_str("EXPERIMENTAL_changes"),
13657        }
13658    }
13659}
13660impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesMethod {
13661    type Err = self::error::ConversionError;
13662    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13663        match value {
13664            "EXPERIMENTAL_changes" => Ok(Self::ExperimentalChanges),
13665            _ => Err("invalid value".into()),
13666        }
13667    }
13668}
13669impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesMethod {
13670    type Error = self::error::ConversionError;
13671    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13672        value.parse()
13673    }
13674}
13675impl ::std::convert::TryFrom<&::std::string::String>
13676    for JsonRpcRequestForExperimentalChangesMethod
13677{
13678    type Error = self::error::ConversionError;
13679    fn try_from(
13680        value: &::std::string::String,
13681    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13682        value.parse()
13683    }
13684}
13685impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalChangesMethod {
13686    type Error = self::error::ConversionError;
13687    fn try_from(
13688        value: ::std::string::String,
13689    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13690        value.parse()
13691    }
13692}
13693#[doc = "`JsonRpcRequestForExperimentalCongestionLevel`"]
13694#[doc = r""]
13695#[doc = r" <details><summary>JSON schema</summary>"]
13696#[doc = r""]
13697#[doc = r" ```json"]
13698#[doc = "{"]
13699#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_congestion_level\","]
13700#[doc = "  \"type\": \"object\","]
13701#[doc = "  \"required\": ["]
13702#[doc = "    \"id\","]
13703#[doc = "    \"jsonrpc\","]
13704#[doc = "    \"method\","]
13705#[doc = "    \"params\""]
13706#[doc = "  ],"]
13707#[doc = "  \"properties\": {"]
13708#[doc = "    \"id\": {"]
13709#[doc = "      \"type\": \"string\""]
13710#[doc = "    },"]
13711#[doc = "    \"jsonrpc\": {"]
13712#[doc = "      \"type\": \"string\""]
13713#[doc = "    },"]
13714#[doc = "    \"method\": {"]
13715#[doc = "      \"type\": \"string\","]
13716#[doc = "      \"enum\": ["]
13717#[doc = "        \"EXPERIMENTAL_congestion_level\""]
13718#[doc = "      ]"]
13719#[doc = "    },"]
13720#[doc = "    \"params\": {"]
13721#[doc = "      \"$ref\": \"#/components/schemas/RpcCongestionLevelRequest\""]
13722#[doc = "    }"]
13723#[doc = "  }"]
13724#[doc = "}"]
13725#[doc = r" ```"]
13726#[doc = r" </details>"]
13727#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13728pub struct JsonRpcRequestForExperimentalCongestionLevel {
13729    pub id: ::std::string::String,
13730    pub jsonrpc: ::std::string::String,
13731    pub method: JsonRpcRequestForExperimentalCongestionLevelMethod,
13732    pub params: RpcCongestionLevelRequest,
13733}
13734impl ::std::convert::From<&JsonRpcRequestForExperimentalCongestionLevel>
13735    for JsonRpcRequestForExperimentalCongestionLevel
13736{
13737    fn from(value: &JsonRpcRequestForExperimentalCongestionLevel) -> Self {
13738        value.clone()
13739    }
13740}
13741#[doc = "`JsonRpcRequestForExperimentalCongestionLevelMethod`"]
13742#[doc = r""]
13743#[doc = r" <details><summary>JSON schema</summary>"]
13744#[doc = r""]
13745#[doc = r" ```json"]
13746#[doc = "{"]
13747#[doc = "  \"type\": \"string\","]
13748#[doc = "  \"enum\": ["]
13749#[doc = "    \"EXPERIMENTAL_congestion_level\""]
13750#[doc = "  ]"]
13751#[doc = "}"]
13752#[doc = r" ```"]
13753#[doc = r" </details>"]
13754#[derive(
13755    :: serde :: Deserialize,
13756    :: serde :: Serialize,
13757    Clone,
13758    Copy,
13759    Debug,
13760    Eq,
13761    Hash,
13762    Ord,
13763    PartialEq,
13764    PartialOrd,
13765)]
13766pub enum JsonRpcRequestForExperimentalCongestionLevelMethod {
13767    #[serde(rename = "EXPERIMENTAL_congestion_level")]
13768    ExperimentalCongestionLevel,
13769}
13770impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalCongestionLevelMethod {
13771    fn from(value: &JsonRpcRequestForExperimentalCongestionLevelMethod) -> Self {
13772        value.clone()
13773    }
13774}
13775impl ::std::fmt::Display for JsonRpcRequestForExperimentalCongestionLevelMethod {
13776    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13777        match *self {
13778            Self::ExperimentalCongestionLevel => f.write_str("EXPERIMENTAL_congestion_level"),
13779        }
13780    }
13781}
13782impl ::std::str::FromStr for JsonRpcRequestForExperimentalCongestionLevelMethod {
13783    type Err = self::error::ConversionError;
13784    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13785        match value {
13786            "EXPERIMENTAL_congestion_level" => Ok(Self::ExperimentalCongestionLevel),
13787            _ => Err("invalid value".into()),
13788        }
13789    }
13790}
13791impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalCongestionLevelMethod {
13792    type Error = self::error::ConversionError;
13793    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13794        value.parse()
13795    }
13796}
13797impl ::std::convert::TryFrom<&::std::string::String>
13798    for JsonRpcRequestForExperimentalCongestionLevelMethod
13799{
13800    type Error = self::error::ConversionError;
13801    fn try_from(
13802        value: &::std::string::String,
13803    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13804        value.parse()
13805    }
13806}
13807impl ::std::convert::TryFrom<::std::string::String>
13808    for JsonRpcRequestForExperimentalCongestionLevelMethod
13809{
13810    type Error = self::error::ConversionError;
13811    fn try_from(
13812        value: ::std::string::String,
13813    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13814        value.parse()
13815    }
13816}
13817#[doc = "`JsonRpcRequestForExperimentalGenesisConfig`"]
13818#[doc = r""]
13819#[doc = r" <details><summary>JSON schema</summary>"]
13820#[doc = r""]
13821#[doc = r" ```json"]
13822#[doc = "{"]
13823#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_genesis_config\","]
13824#[doc = "  \"type\": \"object\","]
13825#[doc = "  \"required\": ["]
13826#[doc = "    \"id\","]
13827#[doc = "    \"jsonrpc\","]
13828#[doc = "    \"method\","]
13829#[doc = "    \"params\""]
13830#[doc = "  ],"]
13831#[doc = "  \"properties\": {"]
13832#[doc = "    \"id\": {"]
13833#[doc = "      \"type\": \"string\""]
13834#[doc = "    },"]
13835#[doc = "    \"jsonrpc\": {"]
13836#[doc = "      \"type\": \"string\""]
13837#[doc = "    },"]
13838#[doc = "    \"method\": {"]
13839#[doc = "      \"type\": \"string\","]
13840#[doc = "      \"enum\": ["]
13841#[doc = "        \"EXPERIMENTAL_genesis_config\""]
13842#[doc = "      ]"]
13843#[doc = "    },"]
13844#[doc = "    \"params\": {"]
13845#[doc = "      \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
13846#[doc = "    }"]
13847#[doc = "  }"]
13848#[doc = "}"]
13849#[doc = r" ```"]
13850#[doc = r" </details>"]
13851#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13852pub struct JsonRpcRequestForExperimentalGenesisConfig {
13853    pub id: ::std::string::String,
13854    pub jsonrpc: ::std::string::String,
13855    pub method: JsonRpcRequestForExperimentalGenesisConfigMethod,
13856    pub params: GenesisConfigRequest,
13857}
13858impl ::std::convert::From<&JsonRpcRequestForExperimentalGenesisConfig>
13859    for JsonRpcRequestForExperimentalGenesisConfig
13860{
13861    fn from(value: &JsonRpcRequestForExperimentalGenesisConfig) -> Self {
13862        value.clone()
13863    }
13864}
13865#[doc = "`JsonRpcRequestForExperimentalGenesisConfigMethod`"]
13866#[doc = r""]
13867#[doc = r" <details><summary>JSON schema</summary>"]
13868#[doc = r""]
13869#[doc = r" ```json"]
13870#[doc = "{"]
13871#[doc = "  \"type\": \"string\","]
13872#[doc = "  \"enum\": ["]
13873#[doc = "    \"EXPERIMENTAL_genesis_config\""]
13874#[doc = "  ]"]
13875#[doc = "}"]
13876#[doc = r" ```"]
13877#[doc = r" </details>"]
13878#[derive(
13879    :: serde :: Deserialize,
13880    :: serde :: Serialize,
13881    Clone,
13882    Copy,
13883    Debug,
13884    Eq,
13885    Hash,
13886    Ord,
13887    PartialEq,
13888    PartialOrd,
13889)]
13890pub enum JsonRpcRequestForExperimentalGenesisConfigMethod {
13891    #[serde(rename = "EXPERIMENTAL_genesis_config")]
13892    ExperimentalGenesisConfig,
13893}
13894impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalGenesisConfigMethod {
13895    fn from(value: &JsonRpcRequestForExperimentalGenesisConfigMethod) -> Self {
13896        value.clone()
13897    }
13898}
13899impl ::std::fmt::Display for JsonRpcRequestForExperimentalGenesisConfigMethod {
13900    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13901        match *self {
13902            Self::ExperimentalGenesisConfig => f.write_str("EXPERIMENTAL_genesis_config"),
13903        }
13904    }
13905}
13906impl ::std::str::FromStr for JsonRpcRequestForExperimentalGenesisConfigMethod {
13907    type Err = self::error::ConversionError;
13908    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13909        match value {
13910            "EXPERIMENTAL_genesis_config" => Ok(Self::ExperimentalGenesisConfig),
13911            _ => Err("invalid value".into()),
13912        }
13913    }
13914}
13915impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalGenesisConfigMethod {
13916    type Error = self::error::ConversionError;
13917    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13918        value.parse()
13919    }
13920}
13921impl ::std::convert::TryFrom<&::std::string::String>
13922    for JsonRpcRequestForExperimentalGenesisConfigMethod
13923{
13924    type Error = self::error::ConversionError;
13925    fn try_from(
13926        value: &::std::string::String,
13927    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13928        value.parse()
13929    }
13930}
13931impl ::std::convert::TryFrom<::std::string::String>
13932    for JsonRpcRequestForExperimentalGenesisConfigMethod
13933{
13934    type Error = self::error::ConversionError;
13935    fn try_from(
13936        value: ::std::string::String,
13937    ) -> ::std::result::Result<Self, self::error::ConversionError> {
13938        value.parse()
13939    }
13940}
13941#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProof`"]
13942#[doc = r""]
13943#[doc = r" <details><summary>JSON schema</summary>"]
13944#[doc = r""]
13945#[doc = r" ```json"]
13946#[doc = "{"]
13947#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_block_proof\","]
13948#[doc = "  \"type\": \"object\","]
13949#[doc = "  \"required\": ["]
13950#[doc = "    \"id\","]
13951#[doc = "    \"jsonrpc\","]
13952#[doc = "    \"method\","]
13953#[doc = "    \"params\""]
13954#[doc = "  ],"]
13955#[doc = "  \"properties\": {"]
13956#[doc = "    \"id\": {"]
13957#[doc = "      \"type\": \"string\""]
13958#[doc = "    },"]
13959#[doc = "    \"jsonrpc\": {"]
13960#[doc = "      \"type\": \"string\""]
13961#[doc = "    },"]
13962#[doc = "    \"method\": {"]
13963#[doc = "      \"type\": \"string\","]
13964#[doc = "      \"enum\": ["]
13965#[doc = "        \"EXPERIMENTAL_light_client_block_proof\""]
13966#[doc = "      ]"]
13967#[doc = "    },"]
13968#[doc = "    \"params\": {"]
13969#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientBlockProofRequest\""]
13970#[doc = "    }"]
13971#[doc = "  }"]
13972#[doc = "}"]
13973#[doc = r" ```"]
13974#[doc = r" </details>"]
13975#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13976pub struct JsonRpcRequestForExperimentalLightClientBlockProof {
13977    pub id: ::std::string::String,
13978    pub jsonrpc: ::std::string::String,
13979    pub method: JsonRpcRequestForExperimentalLightClientBlockProofMethod,
13980    pub params: RpcLightClientBlockProofRequest,
13981}
13982impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientBlockProof>
13983    for JsonRpcRequestForExperimentalLightClientBlockProof
13984{
13985    fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProof) -> Self {
13986        value.clone()
13987    }
13988}
13989#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProofMethod`"]
13990#[doc = r""]
13991#[doc = r" <details><summary>JSON schema</summary>"]
13992#[doc = r""]
13993#[doc = r" ```json"]
13994#[doc = "{"]
13995#[doc = "  \"type\": \"string\","]
13996#[doc = "  \"enum\": ["]
13997#[doc = "    \"EXPERIMENTAL_light_client_block_proof\""]
13998#[doc = "  ]"]
13999#[doc = "}"]
14000#[doc = r" ```"]
14001#[doc = r" </details>"]
14002#[derive(
14003    :: serde :: Deserialize,
14004    :: serde :: Serialize,
14005    Clone,
14006    Copy,
14007    Debug,
14008    Eq,
14009    Hash,
14010    Ord,
14011    PartialEq,
14012    PartialOrd,
14013)]
14014pub enum JsonRpcRequestForExperimentalLightClientBlockProofMethod {
14015    #[serde(rename = "EXPERIMENTAL_light_client_block_proof")]
14016    ExperimentalLightClientBlockProof,
14017}
14018impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
14019    fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProofMethod) -> Self {
14020        value.clone()
14021    }
14022}
14023impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
14024    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14025        match *self {
14026            Self::ExperimentalLightClientBlockProof => {
14027                f.write_str("EXPERIMENTAL_light_client_block_proof")
14028            }
14029        }
14030    }
14031}
14032impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
14033    type Err = self::error::ConversionError;
14034    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14035        match value {
14036            "EXPERIMENTAL_light_client_block_proof" => Ok(Self::ExperimentalLightClientBlockProof),
14037            _ => Err("invalid value".into()),
14038        }
14039    }
14040}
14041impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
14042    type Error = self::error::ConversionError;
14043    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14044        value.parse()
14045    }
14046}
14047impl ::std::convert::TryFrom<&::std::string::String>
14048    for JsonRpcRequestForExperimentalLightClientBlockProofMethod
14049{
14050    type Error = self::error::ConversionError;
14051    fn try_from(
14052        value: &::std::string::String,
14053    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14054        value.parse()
14055    }
14056}
14057impl ::std::convert::TryFrom<::std::string::String>
14058    for JsonRpcRequestForExperimentalLightClientBlockProofMethod
14059{
14060    type Error = self::error::ConversionError;
14061    fn try_from(
14062        value: ::std::string::String,
14063    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14064        value.parse()
14065    }
14066}
14067#[doc = "`JsonRpcRequestForExperimentalLightClientProof`"]
14068#[doc = r""]
14069#[doc = r" <details><summary>JSON schema</summary>"]
14070#[doc = r""]
14071#[doc = r" ```json"]
14072#[doc = "{"]
14073#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_proof\","]
14074#[doc = "  \"type\": \"object\","]
14075#[doc = "  \"required\": ["]
14076#[doc = "    \"id\","]
14077#[doc = "    \"jsonrpc\","]
14078#[doc = "    \"method\","]
14079#[doc = "    \"params\""]
14080#[doc = "  ],"]
14081#[doc = "  \"properties\": {"]
14082#[doc = "    \"id\": {"]
14083#[doc = "      \"type\": \"string\""]
14084#[doc = "    },"]
14085#[doc = "    \"jsonrpc\": {"]
14086#[doc = "      \"type\": \"string\""]
14087#[doc = "    },"]
14088#[doc = "    \"method\": {"]
14089#[doc = "      \"type\": \"string\","]
14090#[doc = "      \"enum\": ["]
14091#[doc = "        \"EXPERIMENTAL_light_client_proof\""]
14092#[doc = "      ]"]
14093#[doc = "    },"]
14094#[doc = "    \"params\": {"]
14095#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
14096#[doc = "    }"]
14097#[doc = "  }"]
14098#[doc = "}"]
14099#[doc = r" ```"]
14100#[doc = r" </details>"]
14101#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14102pub struct JsonRpcRequestForExperimentalLightClientProof {
14103    pub id: ::std::string::String,
14104    pub jsonrpc: ::std::string::String,
14105    pub method: JsonRpcRequestForExperimentalLightClientProofMethod,
14106    pub params: RpcLightClientExecutionProofRequest,
14107}
14108impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientProof>
14109    for JsonRpcRequestForExperimentalLightClientProof
14110{
14111    fn from(value: &JsonRpcRequestForExperimentalLightClientProof) -> Self {
14112        value.clone()
14113    }
14114}
14115#[doc = "`JsonRpcRequestForExperimentalLightClientProofMethod`"]
14116#[doc = r""]
14117#[doc = r" <details><summary>JSON schema</summary>"]
14118#[doc = r""]
14119#[doc = r" ```json"]
14120#[doc = "{"]
14121#[doc = "  \"type\": \"string\","]
14122#[doc = "  \"enum\": ["]
14123#[doc = "    \"EXPERIMENTAL_light_client_proof\""]
14124#[doc = "  ]"]
14125#[doc = "}"]
14126#[doc = r" ```"]
14127#[doc = r" </details>"]
14128#[derive(
14129    :: serde :: Deserialize,
14130    :: serde :: Serialize,
14131    Clone,
14132    Copy,
14133    Debug,
14134    Eq,
14135    Hash,
14136    Ord,
14137    PartialEq,
14138    PartialOrd,
14139)]
14140pub enum JsonRpcRequestForExperimentalLightClientProofMethod {
14141    #[serde(rename = "EXPERIMENTAL_light_client_proof")]
14142    ExperimentalLightClientProof,
14143}
14144impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientProofMethod {
14145    fn from(value: &JsonRpcRequestForExperimentalLightClientProofMethod) -> Self {
14146        value.clone()
14147    }
14148}
14149impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientProofMethod {
14150    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14151        match *self {
14152            Self::ExperimentalLightClientProof => f.write_str("EXPERIMENTAL_light_client_proof"),
14153        }
14154    }
14155}
14156impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientProofMethod {
14157    type Err = self::error::ConversionError;
14158    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14159        match value {
14160            "EXPERIMENTAL_light_client_proof" => Ok(Self::ExperimentalLightClientProof),
14161            _ => Err("invalid value".into()),
14162        }
14163    }
14164}
14165impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientProofMethod {
14166    type Error = self::error::ConversionError;
14167    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14168        value.parse()
14169    }
14170}
14171impl ::std::convert::TryFrom<&::std::string::String>
14172    for JsonRpcRequestForExperimentalLightClientProofMethod
14173{
14174    type Error = self::error::ConversionError;
14175    fn try_from(
14176        value: &::std::string::String,
14177    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14178        value.parse()
14179    }
14180}
14181impl ::std::convert::TryFrom<::std::string::String>
14182    for JsonRpcRequestForExperimentalLightClientProofMethod
14183{
14184    type Error = self::error::ConversionError;
14185    fn try_from(
14186        value: ::std::string::String,
14187    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14188        value.parse()
14189    }
14190}
14191#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindows`"]
14192#[doc = r""]
14193#[doc = r" <details><summary>JSON schema</summary>"]
14194#[doc = r""]
14195#[doc = r" ```json"]
14196#[doc = "{"]
14197#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_maintenance_windows\","]
14198#[doc = "  \"type\": \"object\","]
14199#[doc = "  \"required\": ["]
14200#[doc = "    \"id\","]
14201#[doc = "    \"jsonrpc\","]
14202#[doc = "    \"method\","]
14203#[doc = "    \"params\""]
14204#[doc = "  ],"]
14205#[doc = "  \"properties\": {"]
14206#[doc = "    \"id\": {"]
14207#[doc = "      \"type\": \"string\""]
14208#[doc = "    },"]
14209#[doc = "    \"jsonrpc\": {"]
14210#[doc = "      \"type\": \"string\""]
14211#[doc = "    },"]
14212#[doc = "    \"method\": {"]
14213#[doc = "      \"type\": \"string\","]
14214#[doc = "      \"enum\": ["]
14215#[doc = "        \"EXPERIMENTAL_maintenance_windows\""]
14216#[doc = "      ]"]
14217#[doc = "    },"]
14218#[doc = "    \"params\": {"]
14219#[doc = "      \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
14220#[doc = "    }"]
14221#[doc = "  }"]
14222#[doc = "}"]
14223#[doc = r" ```"]
14224#[doc = r" </details>"]
14225#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14226pub struct JsonRpcRequestForExperimentalMaintenanceWindows {
14227    pub id: ::std::string::String,
14228    pub jsonrpc: ::std::string::String,
14229    pub method: JsonRpcRequestForExperimentalMaintenanceWindowsMethod,
14230    pub params: RpcMaintenanceWindowsRequest,
14231}
14232impl ::std::convert::From<&JsonRpcRequestForExperimentalMaintenanceWindows>
14233    for JsonRpcRequestForExperimentalMaintenanceWindows
14234{
14235    fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindows) -> Self {
14236        value.clone()
14237    }
14238}
14239#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindowsMethod`"]
14240#[doc = r""]
14241#[doc = r" <details><summary>JSON schema</summary>"]
14242#[doc = r""]
14243#[doc = r" ```json"]
14244#[doc = "{"]
14245#[doc = "  \"type\": \"string\","]
14246#[doc = "  \"enum\": ["]
14247#[doc = "    \"EXPERIMENTAL_maintenance_windows\""]
14248#[doc = "  ]"]
14249#[doc = "}"]
14250#[doc = r" ```"]
14251#[doc = r" </details>"]
14252#[derive(
14253    :: serde :: Deserialize,
14254    :: serde :: Serialize,
14255    Clone,
14256    Copy,
14257    Debug,
14258    Eq,
14259    Hash,
14260    Ord,
14261    PartialEq,
14262    PartialOrd,
14263)]
14264pub enum JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14265    #[serde(rename = "EXPERIMENTAL_maintenance_windows")]
14266    ExperimentalMaintenanceWindows,
14267}
14268impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14269    fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindowsMethod) -> Self {
14270        value.clone()
14271    }
14272}
14273impl ::std::fmt::Display for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14274    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14275        match *self {
14276            Self::ExperimentalMaintenanceWindows => f.write_str("EXPERIMENTAL_maintenance_windows"),
14277        }
14278    }
14279}
14280impl ::std::str::FromStr for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14281    type Err = self::error::ConversionError;
14282    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14283        match value {
14284            "EXPERIMENTAL_maintenance_windows" => Ok(Self::ExperimentalMaintenanceWindows),
14285            _ => Err("invalid value".into()),
14286        }
14287    }
14288}
14289impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14290    type Error = self::error::ConversionError;
14291    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14292        value.parse()
14293    }
14294}
14295impl ::std::convert::TryFrom<&::std::string::String>
14296    for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
14297{
14298    type Error = self::error::ConversionError;
14299    fn try_from(
14300        value: &::std::string::String,
14301    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14302        value.parse()
14303    }
14304}
14305impl ::std::convert::TryFrom<::std::string::String>
14306    for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
14307{
14308    type Error = self::error::ConversionError;
14309    fn try_from(
14310        value: ::std::string::String,
14311    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14312        value.parse()
14313    }
14314}
14315#[doc = "`JsonRpcRequestForExperimentalProtocolConfig`"]
14316#[doc = r""]
14317#[doc = r" <details><summary>JSON schema</summary>"]
14318#[doc = r""]
14319#[doc = r" ```json"]
14320#[doc = "{"]
14321#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_protocol_config\","]
14322#[doc = "  \"type\": \"object\","]
14323#[doc = "  \"required\": ["]
14324#[doc = "    \"id\","]
14325#[doc = "    \"jsonrpc\","]
14326#[doc = "    \"method\","]
14327#[doc = "    \"params\""]
14328#[doc = "  ],"]
14329#[doc = "  \"properties\": {"]
14330#[doc = "    \"id\": {"]
14331#[doc = "      \"type\": \"string\""]
14332#[doc = "    },"]
14333#[doc = "    \"jsonrpc\": {"]
14334#[doc = "      \"type\": \"string\""]
14335#[doc = "    },"]
14336#[doc = "    \"method\": {"]
14337#[doc = "      \"type\": \"string\","]
14338#[doc = "      \"enum\": ["]
14339#[doc = "        \"EXPERIMENTAL_protocol_config\""]
14340#[doc = "      ]"]
14341#[doc = "    },"]
14342#[doc = "    \"params\": {"]
14343#[doc = "      \"$ref\": \"#/components/schemas/RpcProtocolConfigRequest\""]
14344#[doc = "    }"]
14345#[doc = "  }"]
14346#[doc = "}"]
14347#[doc = r" ```"]
14348#[doc = r" </details>"]
14349#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14350pub struct JsonRpcRequestForExperimentalProtocolConfig {
14351    pub id: ::std::string::String,
14352    pub jsonrpc: ::std::string::String,
14353    pub method: JsonRpcRequestForExperimentalProtocolConfigMethod,
14354    pub params: RpcProtocolConfigRequest,
14355}
14356impl ::std::convert::From<&JsonRpcRequestForExperimentalProtocolConfig>
14357    for JsonRpcRequestForExperimentalProtocolConfig
14358{
14359    fn from(value: &JsonRpcRequestForExperimentalProtocolConfig) -> Self {
14360        value.clone()
14361    }
14362}
14363#[doc = "`JsonRpcRequestForExperimentalProtocolConfigMethod`"]
14364#[doc = r""]
14365#[doc = r" <details><summary>JSON schema</summary>"]
14366#[doc = r""]
14367#[doc = r" ```json"]
14368#[doc = "{"]
14369#[doc = "  \"type\": \"string\","]
14370#[doc = "  \"enum\": ["]
14371#[doc = "    \"EXPERIMENTAL_protocol_config\""]
14372#[doc = "  ]"]
14373#[doc = "}"]
14374#[doc = r" ```"]
14375#[doc = r" </details>"]
14376#[derive(
14377    :: serde :: Deserialize,
14378    :: serde :: Serialize,
14379    Clone,
14380    Copy,
14381    Debug,
14382    Eq,
14383    Hash,
14384    Ord,
14385    PartialEq,
14386    PartialOrd,
14387)]
14388pub enum JsonRpcRequestForExperimentalProtocolConfigMethod {
14389    #[serde(rename = "EXPERIMENTAL_protocol_config")]
14390    ExperimentalProtocolConfig,
14391}
14392impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalProtocolConfigMethod {
14393    fn from(value: &JsonRpcRequestForExperimentalProtocolConfigMethod) -> Self {
14394        value.clone()
14395    }
14396}
14397impl ::std::fmt::Display for JsonRpcRequestForExperimentalProtocolConfigMethod {
14398    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14399        match *self {
14400            Self::ExperimentalProtocolConfig => f.write_str("EXPERIMENTAL_protocol_config"),
14401        }
14402    }
14403}
14404impl ::std::str::FromStr for JsonRpcRequestForExperimentalProtocolConfigMethod {
14405    type Err = self::error::ConversionError;
14406    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14407        match value {
14408            "EXPERIMENTAL_protocol_config" => Ok(Self::ExperimentalProtocolConfig),
14409            _ => Err("invalid value".into()),
14410        }
14411    }
14412}
14413impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalProtocolConfigMethod {
14414    type Error = self::error::ConversionError;
14415    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14416        value.parse()
14417    }
14418}
14419impl ::std::convert::TryFrom<&::std::string::String>
14420    for JsonRpcRequestForExperimentalProtocolConfigMethod
14421{
14422    type Error = self::error::ConversionError;
14423    fn try_from(
14424        value: &::std::string::String,
14425    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14426        value.parse()
14427    }
14428}
14429impl ::std::convert::TryFrom<::std::string::String>
14430    for JsonRpcRequestForExperimentalProtocolConfigMethod
14431{
14432    type Error = self::error::ConversionError;
14433    fn try_from(
14434        value: ::std::string::String,
14435    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14436        value.parse()
14437    }
14438}
14439#[doc = "`JsonRpcRequestForExperimentalReceipt`"]
14440#[doc = r""]
14441#[doc = r" <details><summary>JSON schema</summary>"]
14442#[doc = r""]
14443#[doc = r" ```json"]
14444#[doc = "{"]
14445#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_receipt\","]
14446#[doc = "  \"type\": \"object\","]
14447#[doc = "  \"required\": ["]
14448#[doc = "    \"id\","]
14449#[doc = "    \"jsonrpc\","]
14450#[doc = "    \"method\","]
14451#[doc = "    \"params\""]
14452#[doc = "  ],"]
14453#[doc = "  \"properties\": {"]
14454#[doc = "    \"id\": {"]
14455#[doc = "      \"type\": \"string\""]
14456#[doc = "    },"]
14457#[doc = "    \"jsonrpc\": {"]
14458#[doc = "      \"type\": \"string\""]
14459#[doc = "    },"]
14460#[doc = "    \"method\": {"]
14461#[doc = "      \"type\": \"string\","]
14462#[doc = "      \"enum\": ["]
14463#[doc = "        \"EXPERIMENTAL_receipt\""]
14464#[doc = "      ]"]
14465#[doc = "    },"]
14466#[doc = "    \"params\": {"]
14467#[doc = "      \"$ref\": \"#/components/schemas/RpcReceiptRequest\""]
14468#[doc = "    }"]
14469#[doc = "  }"]
14470#[doc = "}"]
14471#[doc = r" ```"]
14472#[doc = r" </details>"]
14473#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14474pub struct JsonRpcRequestForExperimentalReceipt {
14475    pub id: ::std::string::String,
14476    pub jsonrpc: ::std::string::String,
14477    pub method: JsonRpcRequestForExperimentalReceiptMethod,
14478    pub params: RpcReceiptRequest,
14479}
14480impl ::std::convert::From<&JsonRpcRequestForExperimentalReceipt>
14481    for JsonRpcRequestForExperimentalReceipt
14482{
14483    fn from(value: &JsonRpcRequestForExperimentalReceipt) -> Self {
14484        value.clone()
14485    }
14486}
14487#[doc = "`JsonRpcRequestForExperimentalReceiptMethod`"]
14488#[doc = r""]
14489#[doc = r" <details><summary>JSON schema</summary>"]
14490#[doc = r""]
14491#[doc = r" ```json"]
14492#[doc = "{"]
14493#[doc = "  \"type\": \"string\","]
14494#[doc = "  \"enum\": ["]
14495#[doc = "    \"EXPERIMENTAL_receipt\""]
14496#[doc = "  ]"]
14497#[doc = "}"]
14498#[doc = r" ```"]
14499#[doc = r" </details>"]
14500#[derive(
14501    :: serde :: Deserialize,
14502    :: serde :: Serialize,
14503    Clone,
14504    Copy,
14505    Debug,
14506    Eq,
14507    Hash,
14508    Ord,
14509    PartialEq,
14510    PartialOrd,
14511)]
14512pub enum JsonRpcRequestForExperimentalReceiptMethod {
14513    #[serde(rename = "EXPERIMENTAL_receipt")]
14514    ExperimentalReceipt,
14515}
14516impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalReceiptMethod {
14517    fn from(value: &JsonRpcRequestForExperimentalReceiptMethod) -> Self {
14518        value.clone()
14519    }
14520}
14521impl ::std::fmt::Display for JsonRpcRequestForExperimentalReceiptMethod {
14522    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14523        match *self {
14524            Self::ExperimentalReceipt => f.write_str("EXPERIMENTAL_receipt"),
14525        }
14526    }
14527}
14528impl ::std::str::FromStr for JsonRpcRequestForExperimentalReceiptMethod {
14529    type Err = self::error::ConversionError;
14530    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14531        match value {
14532            "EXPERIMENTAL_receipt" => Ok(Self::ExperimentalReceipt),
14533            _ => Err("invalid value".into()),
14534        }
14535    }
14536}
14537impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalReceiptMethod {
14538    type Error = self::error::ConversionError;
14539    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14540        value.parse()
14541    }
14542}
14543impl ::std::convert::TryFrom<&::std::string::String>
14544    for JsonRpcRequestForExperimentalReceiptMethod
14545{
14546    type Error = self::error::ConversionError;
14547    fn try_from(
14548        value: &::std::string::String,
14549    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14550        value.parse()
14551    }
14552}
14553impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalReceiptMethod {
14554    type Error = self::error::ConversionError;
14555    fn try_from(
14556        value: ::std::string::String,
14557    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14558        value.parse()
14559    }
14560}
14561#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfo`"]
14562#[doc = r""]
14563#[doc = r" <details><summary>JSON schema</summary>"]
14564#[doc = r""]
14565#[doc = r" ```json"]
14566#[doc = "{"]
14567#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_split_storage_info\","]
14568#[doc = "  \"type\": \"object\","]
14569#[doc = "  \"required\": ["]
14570#[doc = "    \"id\","]
14571#[doc = "    \"jsonrpc\","]
14572#[doc = "    \"method\","]
14573#[doc = "    \"params\""]
14574#[doc = "  ],"]
14575#[doc = "  \"properties\": {"]
14576#[doc = "    \"id\": {"]
14577#[doc = "      \"type\": \"string\""]
14578#[doc = "    },"]
14579#[doc = "    \"jsonrpc\": {"]
14580#[doc = "      \"type\": \"string\""]
14581#[doc = "    },"]
14582#[doc = "    \"method\": {"]
14583#[doc = "      \"type\": \"string\","]
14584#[doc = "      \"enum\": ["]
14585#[doc = "        \"EXPERIMENTAL_split_storage_info\""]
14586#[doc = "      ]"]
14587#[doc = "    },"]
14588#[doc = "    \"params\": {"]
14589#[doc = "      \"$ref\": \"#/components/schemas/RpcSplitStorageInfoRequest\""]
14590#[doc = "    }"]
14591#[doc = "  }"]
14592#[doc = "}"]
14593#[doc = r" ```"]
14594#[doc = r" </details>"]
14595#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14596pub struct JsonRpcRequestForExperimentalSplitStorageInfo {
14597    pub id: ::std::string::String,
14598    pub jsonrpc: ::std::string::String,
14599    pub method: JsonRpcRequestForExperimentalSplitStorageInfoMethod,
14600    pub params: RpcSplitStorageInfoRequest,
14601}
14602impl ::std::convert::From<&JsonRpcRequestForExperimentalSplitStorageInfo>
14603    for JsonRpcRequestForExperimentalSplitStorageInfo
14604{
14605    fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfo) -> Self {
14606        value.clone()
14607    }
14608}
14609#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfoMethod`"]
14610#[doc = r""]
14611#[doc = r" <details><summary>JSON schema</summary>"]
14612#[doc = r""]
14613#[doc = r" ```json"]
14614#[doc = "{"]
14615#[doc = "  \"type\": \"string\","]
14616#[doc = "  \"enum\": ["]
14617#[doc = "    \"EXPERIMENTAL_split_storage_info\""]
14618#[doc = "  ]"]
14619#[doc = "}"]
14620#[doc = r" ```"]
14621#[doc = r" </details>"]
14622#[derive(
14623    :: serde :: Deserialize,
14624    :: serde :: Serialize,
14625    Clone,
14626    Copy,
14627    Debug,
14628    Eq,
14629    Hash,
14630    Ord,
14631    PartialEq,
14632    PartialOrd,
14633)]
14634pub enum JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14635    #[serde(rename = "EXPERIMENTAL_split_storage_info")]
14636    ExperimentalSplitStorageInfo,
14637}
14638impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14639    fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfoMethod) -> Self {
14640        value.clone()
14641    }
14642}
14643impl ::std::fmt::Display for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14644    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14645        match *self {
14646            Self::ExperimentalSplitStorageInfo => f.write_str("EXPERIMENTAL_split_storage_info"),
14647        }
14648    }
14649}
14650impl ::std::str::FromStr for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14651    type Err = self::error::ConversionError;
14652    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14653        match value {
14654            "EXPERIMENTAL_split_storage_info" => Ok(Self::ExperimentalSplitStorageInfo),
14655            _ => Err("invalid value".into()),
14656        }
14657    }
14658}
14659impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14660    type Error = self::error::ConversionError;
14661    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14662        value.parse()
14663    }
14664}
14665impl ::std::convert::TryFrom<&::std::string::String>
14666    for JsonRpcRequestForExperimentalSplitStorageInfoMethod
14667{
14668    type Error = self::error::ConversionError;
14669    fn try_from(
14670        value: &::std::string::String,
14671    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14672        value.parse()
14673    }
14674}
14675impl ::std::convert::TryFrom<::std::string::String>
14676    for JsonRpcRequestForExperimentalSplitStorageInfoMethod
14677{
14678    type Error = self::error::ConversionError;
14679    fn try_from(
14680        value: ::std::string::String,
14681    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14682        value.parse()
14683    }
14684}
14685#[doc = "`JsonRpcRequestForExperimentalTxStatus`"]
14686#[doc = r""]
14687#[doc = r" <details><summary>JSON schema</summary>"]
14688#[doc = r""]
14689#[doc = r" ```json"]
14690#[doc = "{"]
14691#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_tx_status\","]
14692#[doc = "  \"type\": \"object\","]
14693#[doc = "  \"required\": ["]
14694#[doc = "    \"id\","]
14695#[doc = "    \"jsonrpc\","]
14696#[doc = "    \"method\","]
14697#[doc = "    \"params\""]
14698#[doc = "  ],"]
14699#[doc = "  \"properties\": {"]
14700#[doc = "    \"id\": {"]
14701#[doc = "      \"type\": \"string\""]
14702#[doc = "    },"]
14703#[doc = "    \"jsonrpc\": {"]
14704#[doc = "      \"type\": \"string\""]
14705#[doc = "    },"]
14706#[doc = "    \"method\": {"]
14707#[doc = "      \"type\": \"string\","]
14708#[doc = "      \"enum\": ["]
14709#[doc = "        \"EXPERIMENTAL_tx_status\""]
14710#[doc = "      ]"]
14711#[doc = "    },"]
14712#[doc = "    \"params\": {"]
14713#[doc = "      \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
14714#[doc = "    }"]
14715#[doc = "  }"]
14716#[doc = "}"]
14717#[doc = r" ```"]
14718#[doc = r" </details>"]
14719#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14720pub struct JsonRpcRequestForExperimentalTxStatus {
14721    pub id: ::std::string::String,
14722    pub jsonrpc: ::std::string::String,
14723    pub method: JsonRpcRequestForExperimentalTxStatusMethod,
14724    pub params: RpcTransactionStatusRequest,
14725}
14726impl ::std::convert::From<&JsonRpcRequestForExperimentalTxStatus>
14727    for JsonRpcRequestForExperimentalTxStatus
14728{
14729    fn from(value: &JsonRpcRequestForExperimentalTxStatus) -> Self {
14730        value.clone()
14731    }
14732}
14733#[doc = "`JsonRpcRequestForExperimentalTxStatusMethod`"]
14734#[doc = r""]
14735#[doc = r" <details><summary>JSON schema</summary>"]
14736#[doc = r""]
14737#[doc = r" ```json"]
14738#[doc = "{"]
14739#[doc = "  \"type\": \"string\","]
14740#[doc = "  \"enum\": ["]
14741#[doc = "    \"EXPERIMENTAL_tx_status\""]
14742#[doc = "  ]"]
14743#[doc = "}"]
14744#[doc = r" ```"]
14745#[doc = r" </details>"]
14746#[derive(
14747    :: serde :: Deserialize,
14748    :: serde :: Serialize,
14749    Clone,
14750    Copy,
14751    Debug,
14752    Eq,
14753    Hash,
14754    Ord,
14755    PartialEq,
14756    PartialOrd,
14757)]
14758pub enum JsonRpcRequestForExperimentalTxStatusMethod {
14759    #[serde(rename = "EXPERIMENTAL_tx_status")]
14760    ExperimentalTxStatus,
14761}
14762impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalTxStatusMethod {
14763    fn from(value: &JsonRpcRequestForExperimentalTxStatusMethod) -> Self {
14764        value.clone()
14765    }
14766}
14767impl ::std::fmt::Display for JsonRpcRequestForExperimentalTxStatusMethod {
14768    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14769        match *self {
14770            Self::ExperimentalTxStatus => f.write_str("EXPERIMENTAL_tx_status"),
14771        }
14772    }
14773}
14774impl ::std::str::FromStr for JsonRpcRequestForExperimentalTxStatusMethod {
14775    type Err = self::error::ConversionError;
14776    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14777        match value {
14778            "EXPERIMENTAL_tx_status" => Ok(Self::ExperimentalTxStatus),
14779            _ => Err("invalid value".into()),
14780        }
14781    }
14782}
14783impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalTxStatusMethod {
14784    type Error = self::error::ConversionError;
14785    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14786        value.parse()
14787    }
14788}
14789impl ::std::convert::TryFrom<&::std::string::String>
14790    for JsonRpcRequestForExperimentalTxStatusMethod
14791{
14792    type Error = self::error::ConversionError;
14793    fn try_from(
14794        value: &::std::string::String,
14795    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14796        value.parse()
14797    }
14798}
14799impl ::std::convert::TryFrom<::std::string::String>
14800    for JsonRpcRequestForExperimentalTxStatusMethod
14801{
14802    type Error = self::error::ConversionError;
14803    fn try_from(
14804        value: ::std::string::String,
14805    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14806        value.parse()
14807    }
14808}
14809#[doc = "`JsonRpcRequestForExperimentalValidatorsOrdered`"]
14810#[doc = r""]
14811#[doc = r" <details><summary>JSON schema</summary>"]
14812#[doc = r""]
14813#[doc = r" ```json"]
14814#[doc = "{"]
14815#[doc = "  \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_validators_ordered\","]
14816#[doc = "  \"type\": \"object\","]
14817#[doc = "  \"required\": ["]
14818#[doc = "    \"id\","]
14819#[doc = "    \"jsonrpc\","]
14820#[doc = "    \"method\","]
14821#[doc = "    \"params\""]
14822#[doc = "  ],"]
14823#[doc = "  \"properties\": {"]
14824#[doc = "    \"id\": {"]
14825#[doc = "      \"type\": \"string\""]
14826#[doc = "    },"]
14827#[doc = "    \"jsonrpc\": {"]
14828#[doc = "      \"type\": \"string\""]
14829#[doc = "    },"]
14830#[doc = "    \"method\": {"]
14831#[doc = "      \"type\": \"string\","]
14832#[doc = "      \"enum\": ["]
14833#[doc = "        \"EXPERIMENTAL_validators_ordered\""]
14834#[doc = "      ]"]
14835#[doc = "    },"]
14836#[doc = "    \"params\": {"]
14837#[doc = "      \"$ref\": \"#/components/schemas/RpcValidatorsOrderedRequest\""]
14838#[doc = "    }"]
14839#[doc = "  }"]
14840#[doc = "}"]
14841#[doc = r" ```"]
14842#[doc = r" </details>"]
14843#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14844pub struct JsonRpcRequestForExperimentalValidatorsOrdered {
14845    pub id: ::std::string::String,
14846    pub jsonrpc: ::std::string::String,
14847    pub method: JsonRpcRequestForExperimentalValidatorsOrderedMethod,
14848    pub params: RpcValidatorsOrderedRequest,
14849}
14850impl ::std::convert::From<&JsonRpcRequestForExperimentalValidatorsOrdered>
14851    for JsonRpcRequestForExperimentalValidatorsOrdered
14852{
14853    fn from(value: &JsonRpcRequestForExperimentalValidatorsOrdered) -> Self {
14854        value.clone()
14855    }
14856}
14857#[doc = "`JsonRpcRequestForExperimentalValidatorsOrderedMethod`"]
14858#[doc = r""]
14859#[doc = r" <details><summary>JSON schema</summary>"]
14860#[doc = r""]
14861#[doc = r" ```json"]
14862#[doc = "{"]
14863#[doc = "  \"type\": \"string\","]
14864#[doc = "  \"enum\": ["]
14865#[doc = "    \"EXPERIMENTAL_validators_ordered\""]
14866#[doc = "  ]"]
14867#[doc = "}"]
14868#[doc = r" ```"]
14869#[doc = r" </details>"]
14870#[derive(
14871    :: serde :: Deserialize,
14872    :: serde :: Serialize,
14873    Clone,
14874    Copy,
14875    Debug,
14876    Eq,
14877    Hash,
14878    Ord,
14879    PartialEq,
14880    PartialOrd,
14881)]
14882pub enum JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14883    #[serde(rename = "EXPERIMENTAL_validators_ordered")]
14884    ExperimentalValidatorsOrdered,
14885}
14886impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14887    fn from(value: &JsonRpcRequestForExperimentalValidatorsOrderedMethod) -> Self {
14888        value.clone()
14889    }
14890}
14891impl ::std::fmt::Display for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14892    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14893        match *self {
14894            Self::ExperimentalValidatorsOrdered => f.write_str("EXPERIMENTAL_validators_ordered"),
14895        }
14896    }
14897}
14898impl ::std::str::FromStr for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14899    type Err = self::error::ConversionError;
14900    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14901        match value {
14902            "EXPERIMENTAL_validators_ordered" => Ok(Self::ExperimentalValidatorsOrdered),
14903            _ => Err("invalid value".into()),
14904        }
14905    }
14906}
14907impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14908    type Error = self::error::ConversionError;
14909    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14910        value.parse()
14911    }
14912}
14913impl ::std::convert::TryFrom<&::std::string::String>
14914    for JsonRpcRequestForExperimentalValidatorsOrderedMethod
14915{
14916    type Error = self::error::ConversionError;
14917    fn try_from(
14918        value: &::std::string::String,
14919    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14920        value.parse()
14921    }
14922}
14923impl ::std::convert::TryFrom<::std::string::String>
14924    for JsonRpcRequestForExperimentalValidatorsOrderedMethod
14925{
14926    type Error = self::error::ConversionError;
14927    fn try_from(
14928        value: ::std::string::String,
14929    ) -> ::std::result::Result<Self, self::error::ConversionError> {
14930        value.parse()
14931    }
14932}
14933#[doc = "`JsonRpcRequestForGasPrice`"]
14934#[doc = r""]
14935#[doc = r" <details><summary>JSON schema</summary>"]
14936#[doc = r""]
14937#[doc = r" ```json"]
14938#[doc = "{"]
14939#[doc = "  \"title\": \"JsonRpcRequest_for_gas_price\","]
14940#[doc = "  \"type\": \"object\","]
14941#[doc = "  \"required\": ["]
14942#[doc = "    \"id\","]
14943#[doc = "    \"jsonrpc\","]
14944#[doc = "    \"method\","]
14945#[doc = "    \"params\""]
14946#[doc = "  ],"]
14947#[doc = "  \"properties\": {"]
14948#[doc = "    \"id\": {"]
14949#[doc = "      \"type\": \"string\""]
14950#[doc = "    },"]
14951#[doc = "    \"jsonrpc\": {"]
14952#[doc = "      \"type\": \"string\""]
14953#[doc = "    },"]
14954#[doc = "    \"method\": {"]
14955#[doc = "      \"type\": \"string\","]
14956#[doc = "      \"enum\": ["]
14957#[doc = "        \"gas_price\""]
14958#[doc = "      ]"]
14959#[doc = "    },"]
14960#[doc = "    \"params\": {"]
14961#[doc = "      \"$ref\": \"#/components/schemas/RpcGasPriceRequest\""]
14962#[doc = "    }"]
14963#[doc = "  }"]
14964#[doc = "}"]
14965#[doc = r" ```"]
14966#[doc = r" </details>"]
14967#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14968pub struct JsonRpcRequestForGasPrice {
14969    pub id: ::std::string::String,
14970    pub jsonrpc: ::std::string::String,
14971    pub method: JsonRpcRequestForGasPriceMethod,
14972    pub params: RpcGasPriceRequest,
14973}
14974impl ::std::convert::From<&JsonRpcRequestForGasPrice> for JsonRpcRequestForGasPrice {
14975    fn from(value: &JsonRpcRequestForGasPrice) -> Self {
14976        value.clone()
14977    }
14978}
14979#[doc = "`JsonRpcRequestForGasPriceMethod`"]
14980#[doc = r""]
14981#[doc = r" <details><summary>JSON schema</summary>"]
14982#[doc = r""]
14983#[doc = r" ```json"]
14984#[doc = "{"]
14985#[doc = "  \"type\": \"string\","]
14986#[doc = "  \"enum\": ["]
14987#[doc = "    \"gas_price\""]
14988#[doc = "  ]"]
14989#[doc = "}"]
14990#[doc = r" ```"]
14991#[doc = r" </details>"]
14992#[derive(
14993    :: serde :: Deserialize,
14994    :: serde :: Serialize,
14995    Clone,
14996    Copy,
14997    Debug,
14998    Eq,
14999    Hash,
15000    Ord,
15001    PartialEq,
15002    PartialOrd,
15003)]
15004pub enum JsonRpcRequestForGasPriceMethod {
15005    #[serde(rename = "gas_price")]
15006    GasPrice,
15007}
15008impl ::std::convert::From<&Self> for JsonRpcRequestForGasPriceMethod {
15009    fn from(value: &JsonRpcRequestForGasPriceMethod) -> Self {
15010        value.clone()
15011    }
15012}
15013impl ::std::fmt::Display for JsonRpcRequestForGasPriceMethod {
15014    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15015        match *self {
15016            Self::GasPrice => f.write_str("gas_price"),
15017        }
15018    }
15019}
15020impl ::std::str::FromStr for JsonRpcRequestForGasPriceMethod {
15021    type Err = self::error::ConversionError;
15022    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15023        match value {
15024            "gas_price" => Ok(Self::GasPrice),
15025            _ => Err("invalid value".into()),
15026        }
15027    }
15028}
15029impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGasPriceMethod {
15030    type Error = self::error::ConversionError;
15031    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15032        value.parse()
15033    }
15034}
15035impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGasPriceMethod {
15036    type Error = self::error::ConversionError;
15037    fn try_from(
15038        value: &::std::string::String,
15039    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15040        value.parse()
15041    }
15042}
15043impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGasPriceMethod {
15044    type Error = self::error::ConversionError;
15045    fn try_from(
15046        value: ::std::string::String,
15047    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15048        value.parse()
15049    }
15050}
15051#[doc = "`JsonRpcRequestForGenesisConfig`"]
15052#[doc = r""]
15053#[doc = r" <details><summary>JSON schema</summary>"]
15054#[doc = r""]
15055#[doc = r" ```json"]
15056#[doc = "{"]
15057#[doc = "  \"title\": \"JsonRpcRequest_for_genesis_config\","]
15058#[doc = "  \"type\": \"object\","]
15059#[doc = "  \"required\": ["]
15060#[doc = "    \"id\","]
15061#[doc = "    \"jsonrpc\","]
15062#[doc = "    \"method\","]
15063#[doc = "    \"params\""]
15064#[doc = "  ],"]
15065#[doc = "  \"properties\": {"]
15066#[doc = "    \"id\": {"]
15067#[doc = "      \"type\": \"string\""]
15068#[doc = "    },"]
15069#[doc = "    \"jsonrpc\": {"]
15070#[doc = "      \"type\": \"string\""]
15071#[doc = "    },"]
15072#[doc = "    \"method\": {"]
15073#[doc = "      \"type\": \"string\","]
15074#[doc = "      \"enum\": ["]
15075#[doc = "        \"genesis_config\""]
15076#[doc = "      ]"]
15077#[doc = "    },"]
15078#[doc = "    \"params\": {"]
15079#[doc = "      \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
15080#[doc = "    }"]
15081#[doc = "  }"]
15082#[doc = "}"]
15083#[doc = r" ```"]
15084#[doc = r" </details>"]
15085#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15086pub struct JsonRpcRequestForGenesisConfig {
15087    pub id: ::std::string::String,
15088    pub jsonrpc: ::std::string::String,
15089    pub method: JsonRpcRequestForGenesisConfigMethod,
15090    pub params: GenesisConfigRequest,
15091}
15092impl ::std::convert::From<&JsonRpcRequestForGenesisConfig> for JsonRpcRequestForGenesisConfig {
15093    fn from(value: &JsonRpcRequestForGenesisConfig) -> Self {
15094        value.clone()
15095    }
15096}
15097#[doc = "`JsonRpcRequestForGenesisConfigMethod`"]
15098#[doc = r""]
15099#[doc = r" <details><summary>JSON schema</summary>"]
15100#[doc = r""]
15101#[doc = r" ```json"]
15102#[doc = "{"]
15103#[doc = "  \"type\": \"string\","]
15104#[doc = "  \"enum\": ["]
15105#[doc = "    \"genesis_config\""]
15106#[doc = "  ]"]
15107#[doc = "}"]
15108#[doc = r" ```"]
15109#[doc = r" </details>"]
15110#[derive(
15111    :: serde :: Deserialize,
15112    :: serde :: Serialize,
15113    Clone,
15114    Copy,
15115    Debug,
15116    Eq,
15117    Hash,
15118    Ord,
15119    PartialEq,
15120    PartialOrd,
15121)]
15122pub enum JsonRpcRequestForGenesisConfigMethod {
15123    #[serde(rename = "genesis_config")]
15124    GenesisConfig,
15125}
15126impl ::std::convert::From<&Self> for JsonRpcRequestForGenesisConfigMethod {
15127    fn from(value: &JsonRpcRequestForGenesisConfigMethod) -> Self {
15128        value.clone()
15129    }
15130}
15131impl ::std::fmt::Display for JsonRpcRequestForGenesisConfigMethod {
15132    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15133        match *self {
15134            Self::GenesisConfig => f.write_str("genesis_config"),
15135        }
15136    }
15137}
15138impl ::std::str::FromStr for JsonRpcRequestForGenesisConfigMethod {
15139    type Err = self::error::ConversionError;
15140    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15141        match value {
15142            "genesis_config" => Ok(Self::GenesisConfig),
15143            _ => Err("invalid value".into()),
15144        }
15145    }
15146}
15147impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGenesisConfigMethod {
15148    type Error = self::error::ConversionError;
15149    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15150        value.parse()
15151    }
15152}
15153impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
15154    type Error = self::error::ConversionError;
15155    fn try_from(
15156        value: &::std::string::String,
15157    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15158        value.parse()
15159    }
15160}
15161impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
15162    type Error = self::error::ConversionError;
15163    fn try_from(
15164        value: ::std::string::String,
15165    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15166        value.parse()
15167    }
15168}
15169#[doc = "`JsonRpcRequestForHealth`"]
15170#[doc = r""]
15171#[doc = r" <details><summary>JSON schema</summary>"]
15172#[doc = r""]
15173#[doc = r" ```json"]
15174#[doc = "{"]
15175#[doc = "  \"title\": \"JsonRpcRequest_for_health\","]
15176#[doc = "  \"type\": \"object\","]
15177#[doc = "  \"required\": ["]
15178#[doc = "    \"id\","]
15179#[doc = "    \"jsonrpc\","]
15180#[doc = "    \"method\","]
15181#[doc = "    \"params\""]
15182#[doc = "  ],"]
15183#[doc = "  \"properties\": {"]
15184#[doc = "    \"id\": {"]
15185#[doc = "      \"type\": \"string\""]
15186#[doc = "    },"]
15187#[doc = "    \"jsonrpc\": {"]
15188#[doc = "      \"type\": \"string\""]
15189#[doc = "    },"]
15190#[doc = "    \"method\": {"]
15191#[doc = "      \"type\": \"string\","]
15192#[doc = "      \"enum\": ["]
15193#[doc = "        \"health\""]
15194#[doc = "      ]"]
15195#[doc = "    },"]
15196#[doc = "    \"params\": {"]
15197#[doc = "      \"$ref\": \"#/components/schemas/RpcHealthRequest\""]
15198#[doc = "    }"]
15199#[doc = "  }"]
15200#[doc = "}"]
15201#[doc = r" ```"]
15202#[doc = r" </details>"]
15203#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15204pub struct JsonRpcRequestForHealth {
15205    pub id: ::std::string::String,
15206    pub jsonrpc: ::std::string::String,
15207    pub method: JsonRpcRequestForHealthMethod,
15208    pub params: RpcHealthRequest,
15209}
15210impl ::std::convert::From<&JsonRpcRequestForHealth> for JsonRpcRequestForHealth {
15211    fn from(value: &JsonRpcRequestForHealth) -> Self {
15212        value.clone()
15213    }
15214}
15215#[doc = "`JsonRpcRequestForHealthMethod`"]
15216#[doc = r""]
15217#[doc = r" <details><summary>JSON schema</summary>"]
15218#[doc = r""]
15219#[doc = r" ```json"]
15220#[doc = "{"]
15221#[doc = "  \"type\": \"string\","]
15222#[doc = "  \"enum\": ["]
15223#[doc = "    \"health\""]
15224#[doc = "  ]"]
15225#[doc = "}"]
15226#[doc = r" ```"]
15227#[doc = r" </details>"]
15228#[derive(
15229    :: serde :: Deserialize,
15230    :: serde :: Serialize,
15231    Clone,
15232    Copy,
15233    Debug,
15234    Eq,
15235    Hash,
15236    Ord,
15237    PartialEq,
15238    PartialOrd,
15239)]
15240pub enum JsonRpcRequestForHealthMethod {
15241    #[serde(rename = "health")]
15242    Health,
15243}
15244impl ::std::convert::From<&Self> for JsonRpcRequestForHealthMethod {
15245    fn from(value: &JsonRpcRequestForHealthMethod) -> Self {
15246        value.clone()
15247    }
15248}
15249impl ::std::fmt::Display for JsonRpcRequestForHealthMethod {
15250    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15251        match *self {
15252            Self::Health => f.write_str("health"),
15253        }
15254    }
15255}
15256impl ::std::str::FromStr for JsonRpcRequestForHealthMethod {
15257    type Err = self::error::ConversionError;
15258    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15259        match value {
15260            "health" => Ok(Self::Health),
15261            _ => Err("invalid value".into()),
15262        }
15263    }
15264}
15265impl ::std::convert::TryFrom<&str> for JsonRpcRequestForHealthMethod {
15266    type Error = self::error::ConversionError;
15267    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15268        value.parse()
15269    }
15270}
15271impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForHealthMethod {
15272    type Error = self::error::ConversionError;
15273    fn try_from(
15274        value: &::std::string::String,
15275    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15276        value.parse()
15277    }
15278}
15279impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForHealthMethod {
15280    type Error = self::error::ConversionError;
15281    fn try_from(
15282        value: ::std::string::String,
15283    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15284        value.parse()
15285    }
15286}
15287#[doc = "`JsonRpcRequestForLightClientProof`"]
15288#[doc = r""]
15289#[doc = r" <details><summary>JSON schema</summary>"]
15290#[doc = r""]
15291#[doc = r" ```json"]
15292#[doc = "{"]
15293#[doc = "  \"title\": \"JsonRpcRequest_for_light_client_proof\","]
15294#[doc = "  \"type\": \"object\","]
15295#[doc = "  \"required\": ["]
15296#[doc = "    \"id\","]
15297#[doc = "    \"jsonrpc\","]
15298#[doc = "    \"method\","]
15299#[doc = "    \"params\""]
15300#[doc = "  ],"]
15301#[doc = "  \"properties\": {"]
15302#[doc = "    \"id\": {"]
15303#[doc = "      \"type\": \"string\""]
15304#[doc = "    },"]
15305#[doc = "    \"jsonrpc\": {"]
15306#[doc = "      \"type\": \"string\""]
15307#[doc = "    },"]
15308#[doc = "    \"method\": {"]
15309#[doc = "      \"type\": \"string\","]
15310#[doc = "      \"enum\": ["]
15311#[doc = "        \"light_client_proof\""]
15312#[doc = "      ]"]
15313#[doc = "    },"]
15314#[doc = "    \"params\": {"]
15315#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
15316#[doc = "    }"]
15317#[doc = "  }"]
15318#[doc = "}"]
15319#[doc = r" ```"]
15320#[doc = r" </details>"]
15321#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15322pub struct JsonRpcRequestForLightClientProof {
15323    pub id: ::std::string::String,
15324    pub jsonrpc: ::std::string::String,
15325    pub method: JsonRpcRequestForLightClientProofMethod,
15326    pub params: RpcLightClientExecutionProofRequest,
15327}
15328impl ::std::convert::From<&JsonRpcRequestForLightClientProof>
15329    for JsonRpcRequestForLightClientProof
15330{
15331    fn from(value: &JsonRpcRequestForLightClientProof) -> Self {
15332        value.clone()
15333    }
15334}
15335#[doc = "`JsonRpcRequestForLightClientProofMethod`"]
15336#[doc = r""]
15337#[doc = r" <details><summary>JSON schema</summary>"]
15338#[doc = r""]
15339#[doc = r" ```json"]
15340#[doc = "{"]
15341#[doc = "  \"type\": \"string\","]
15342#[doc = "  \"enum\": ["]
15343#[doc = "    \"light_client_proof\""]
15344#[doc = "  ]"]
15345#[doc = "}"]
15346#[doc = r" ```"]
15347#[doc = r" </details>"]
15348#[derive(
15349    :: serde :: Deserialize,
15350    :: serde :: Serialize,
15351    Clone,
15352    Copy,
15353    Debug,
15354    Eq,
15355    Hash,
15356    Ord,
15357    PartialEq,
15358    PartialOrd,
15359)]
15360pub enum JsonRpcRequestForLightClientProofMethod {
15361    #[serde(rename = "light_client_proof")]
15362    LightClientProof,
15363}
15364impl ::std::convert::From<&Self> for JsonRpcRequestForLightClientProofMethod {
15365    fn from(value: &JsonRpcRequestForLightClientProofMethod) -> Self {
15366        value.clone()
15367    }
15368}
15369impl ::std::fmt::Display for JsonRpcRequestForLightClientProofMethod {
15370    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15371        match *self {
15372            Self::LightClientProof => f.write_str("light_client_proof"),
15373        }
15374    }
15375}
15376impl ::std::str::FromStr for JsonRpcRequestForLightClientProofMethod {
15377    type Err = self::error::ConversionError;
15378    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15379        match value {
15380            "light_client_proof" => Ok(Self::LightClientProof),
15381            _ => Err("invalid value".into()),
15382        }
15383    }
15384}
15385impl ::std::convert::TryFrom<&str> for JsonRpcRequestForLightClientProofMethod {
15386    type Error = self::error::ConversionError;
15387    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15388        value.parse()
15389    }
15390}
15391impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForLightClientProofMethod {
15392    type Error = self::error::ConversionError;
15393    fn try_from(
15394        value: &::std::string::String,
15395    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15396        value.parse()
15397    }
15398}
15399impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForLightClientProofMethod {
15400    type Error = self::error::ConversionError;
15401    fn try_from(
15402        value: ::std::string::String,
15403    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15404        value.parse()
15405    }
15406}
15407#[doc = "`JsonRpcRequestForMaintenanceWindows`"]
15408#[doc = r""]
15409#[doc = r" <details><summary>JSON schema</summary>"]
15410#[doc = r""]
15411#[doc = r" ```json"]
15412#[doc = "{"]
15413#[doc = "  \"title\": \"JsonRpcRequest_for_maintenance_windows\","]
15414#[doc = "  \"type\": \"object\","]
15415#[doc = "  \"required\": ["]
15416#[doc = "    \"id\","]
15417#[doc = "    \"jsonrpc\","]
15418#[doc = "    \"method\","]
15419#[doc = "    \"params\""]
15420#[doc = "  ],"]
15421#[doc = "  \"properties\": {"]
15422#[doc = "    \"id\": {"]
15423#[doc = "      \"type\": \"string\""]
15424#[doc = "    },"]
15425#[doc = "    \"jsonrpc\": {"]
15426#[doc = "      \"type\": \"string\""]
15427#[doc = "    },"]
15428#[doc = "    \"method\": {"]
15429#[doc = "      \"type\": \"string\","]
15430#[doc = "      \"enum\": ["]
15431#[doc = "        \"maintenance_windows\""]
15432#[doc = "      ]"]
15433#[doc = "    },"]
15434#[doc = "    \"params\": {"]
15435#[doc = "      \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
15436#[doc = "    }"]
15437#[doc = "  }"]
15438#[doc = "}"]
15439#[doc = r" ```"]
15440#[doc = r" </details>"]
15441#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15442pub struct JsonRpcRequestForMaintenanceWindows {
15443    pub id: ::std::string::String,
15444    pub jsonrpc: ::std::string::String,
15445    pub method: JsonRpcRequestForMaintenanceWindowsMethod,
15446    pub params: RpcMaintenanceWindowsRequest,
15447}
15448impl ::std::convert::From<&JsonRpcRequestForMaintenanceWindows>
15449    for JsonRpcRequestForMaintenanceWindows
15450{
15451    fn from(value: &JsonRpcRequestForMaintenanceWindows) -> Self {
15452        value.clone()
15453    }
15454}
15455#[doc = "`JsonRpcRequestForMaintenanceWindowsMethod`"]
15456#[doc = r""]
15457#[doc = r" <details><summary>JSON schema</summary>"]
15458#[doc = r""]
15459#[doc = r" ```json"]
15460#[doc = "{"]
15461#[doc = "  \"type\": \"string\","]
15462#[doc = "  \"enum\": ["]
15463#[doc = "    \"maintenance_windows\""]
15464#[doc = "  ]"]
15465#[doc = "}"]
15466#[doc = r" ```"]
15467#[doc = r" </details>"]
15468#[derive(
15469    :: serde :: Deserialize,
15470    :: serde :: Serialize,
15471    Clone,
15472    Copy,
15473    Debug,
15474    Eq,
15475    Hash,
15476    Ord,
15477    PartialEq,
15478    PartialOrd,
15479)]
15480pub enum JsonRpcRequestForMaintenanceWindowsMethod {
15481    #[serde(rename = "maintenance_windows")]
15482    MaintenanceWindows,
15483}
15484impl ::std::convert::From<&Self> for JsonRpcRequestForMaintenanceWindowsMethod {
15485    fn from(value: &JsonRpcRequestForMaintenanceWindowsMethod) -> Self {
15486        value.clone()
15487    }
15488}
15489impl ::std::fmt::Display for JsonRpcRequestForMaintenanceWindowsMethod {
15490    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15491        match *self {
15492            Self::MaintenanceWindows => f.write_str("maintenance_windows"),
15493        }
15494    }
15495}
15496impl ::std::str::FromStr for JsonRpcRequestForMaintenanceWindowsMethod {
15497    type Err = self::error::ConversionError;
15498    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15499        match value {
15500            "maintenance_windows" => Ok(Self::MaintenanceWindows),
15501            _ => Err("invalid value".into()),
15502        }
15503    }
15504}
15505impl ::std::convert::TryFrom<&str> for JsonRpcRequestForMaintenanceWindowsMethod {
15506    type Error = self::error::ConversionError;
15507    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15508        value.parse()
15509    }
15510}
15511impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
15512    type Error = self::error::ConversionError;
15513    fn try_from(
15514        value: &::std::string::String,
15515    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15516        value.parse()
15517    }
15518}
15519impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
15520    type Error = self::error::ConversionError;
15521    fn try_from(
15522        value: ::std::string::String,
15523    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15524        value.parse()
15525    }
15526}
15527#[doc = "`JsonRpcRequestForNetworkInfo`"]
15528#[doc = r""]
15529#[doc = r" <details><summary>JSON schema</summary>"]
15530#[doc = r""]
15531#[doc = r" ```json"]
15532#[doc = "{"]
15533#[doc = "  \"title\": \"JsonRpcRequest_for_network_info\","]
15534#[doc = "  \"type\": \"object\","]
15535#[doc = "  \"required\": ["]
15536#[doc = "    \"id\","]
15537#[doc = "    \"jsonrpc\","]
15538#[doc = "    \"method\","]
15539#[doc = "    \"params\""]
15540#[doc = "  ],"]
15541#[doc = "  \"properties\": {"]
15542#[doc = "    \"id\": {"]
15543#[doc = "      \"type\": \"string\""]
15544#[doc = "    },"]
15545#[doc = "    \"jsonrpc\": {"]
15546#[doc = "      \"type\": \"string\""]
15547#[doc = "    },"]
15548#[doc = "    \"method\": {"]
15549#[doc = "      \"type\": \"string\","]
15550#[doc = "      \"enum\": ["]
15551#[doc = "        \"network_info\""]
15552#[doc = "      ]"]
15553#[doc = "    },"]
15554#[doc = "    \"params\": {"]
15555#[doc = "      \"$ref\": \"#/components/schemas/RpcNetworkInfoRequest\""]
15556#[doc = "    }"]
15557#[doc = "  }"]
15558#[doc = "}"]
15559#[doc = r" ```"]
15560#[doc = r" </details>"]
15561#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15562pub struct JsonRpcRequestForNetworkInfo {
15563    pub id: ::std::string::String,
15564    pub jsonrpc: ::std::string::String,
15565    pub method: JsonRpcRequestForNetworkInfoMethod,
15566    pub params: RpcNetworkInfoRequest,
15567}
15568impl ::std::convert::From<&JsonRpcRequestForNetworkInfo> for JsonRpcRequestForNetworkInfo {
15569    fn from(value: &JsonRpcRequestForNetworkInfo) -> Self {
15570        value.clone()
15571    }
15572}
15573#[doc = "`JsonRpcRequestForNetworkInfoMethod`"]
15574#[doc = r""]
15575#[doc = r" <details><summary>JSON schema</summary>"]
15576#[doc = r""]
15577#[doc = r" ```json"]
15578#[doc = "{"]
15579#[doc = "  \"type\": \"string\","]
15580#[doc = "  \"enum\": ["]
15581#[doc = "    \"network_info\""]
15582#[doc = "  ]"]
15583#[doc = "}"]
15584#[doc = r" ```"]
15585#[doc = r" </details>"]
15586#[derive(
15587    :: serde :: Deserialize,
15588    :: serde :: Serialize,
15589    Clone,
15590    Copy,
15591    Debug,
15592    Eq,
15593    Hash,
15594    Ord,
15595    PartialEq,
15596    PartialOrd,
15597)]
15598pub enum JsonRpcRequestForNetworkInfoMethod {
15599    #[serde(rename = "network_info")]
15600    NetworkInfo,
15601}
15602impl ::std::convert::From<&Self> for JsonRpcRequestForNetworkInfoMethod {
15603    fn from(value: &JsonRpcRequestForNetworkInfoMethod) -> Self {
15604        value.clone()
15605    }
15606}
15607impl ::std::fmt::Display for JsonRpcRequestForNetworkInfoMethod {
15608    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15609        match *self {
15610            Self::NetworkInfo => f.write_str("network_info"),
15611        }
15612    }
15613}
15614impl ::std::str::FromStr for JsonRpcRequestForNetworkInfoMethod {
15615    type Err = self::error::ConversionError;
15616    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15617        match value {
15618            "network_info" => Ok(Self::NetworkInfo),
15619            _ => Err("invalid value".into()),
15620        }
15621    }
15622}
15623impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNetworkInfoMethod {
15624    type Error = self::error::ConversionError;
15625    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15626        value.parse()
15627    }
15628}
15629impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
15630    type Error = self::error::ConversionError;
15631    fn try_from(
15632        value: &::std::string::String,
15633    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15634        value.parse()
15635    }
15636}
15637impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
15638    type Error = self::error::ConversionError;
15639    fn try_from(
15640        value: ::std::string::String,
15641    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15642        value.parse()
15643    }
15644}
15645#[doc = "`JsonRpcRequestForNextLightClientBlock`"]
15646#[doc = r""]
15647#[doc = r" <details><summary>JSON schema</summary>"]
15648#[doc = r""]
15649#[doc = r" ```json"]
15650#[doc = "{"]
15651#[doc = "  \"title\": \"JsonRpcRequest_for_next_light_client_block\","]
15652#[doc = "  \"type\": \"object\","]
15653#[doc = "  \"required\": ["]
15654#[doc = "    \"id\","]
15655#[doc = "    \"jsonrpc\","]
15656#[doc = "    \"method\","]
15657#[doc = "    \"params\""]
15658#[doc = "  ],"]
15659#[doc = "  \"properties\": {"]
15660#[doc = "    \"id\": {"]
15661#[doc = "      \"type\": \"string\""]
15662#[doc = "    },"]
15663#[doc = "    \"jsonrpc\": {"]
15664#[doc = "      \"type\": \"string\""]
15665#[doc = "    },"]
15666#[doc = "    \"method\": {"]
15667#[doc = "      \"type\": \"string\","]
15668#[doc = "      \"enum\": ["]
15669#[doc = "        \"next_light_client_block\""]
15670#[doc = "      ]"]
15671#[doc = "    },"]
15672#[doc = "    \"params\": {"]
15673#[doc = "      \"$ref\": \"#/components/schemas/RpcLightClientNextBlockRequest\""]
15674#[doc = "    }"]
15675#[doc = "  }"]
15676#[doc = "}"]
15677#[doc = r" ```"]
15678#[doc = r" </details>"]
15679#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15680pub struct JsonRpcRequestForNextLightClientBlock {
15681    pub id: ::std::string::String,
15682    pub jsonrpc: ::std::string::String,
15683    pub method: JsonRpcRequestForNextLightClientBlockMethod,
15684    pub params: RpcLightClientNextBlockRequest,
15685}
15686impl ::std::convert::From<&JsonRpcRequestForNextLightClientBlock>
15687    for JsonRpcRequestForNextLightClientBlock
15688{
15689    fn from(value: &JsonRpcRequestForNextLightClientBlock) -> Self {
15690        value.clone()
15691    }
15692}
15693#[doc = "`JsonRpcRequestForNextLightClientBlockMethod`"]
15694#[doc = r""]
15695#[doc = r" <details><summary>JSON schema</summary>"]
15696#[doc = r""]
15697#[doc = r" ```json"]
15698#[doc = "{"]
15699#[doc = "  \"type\": \"string\","]
15700#[doc = "  \"enum\": ["]
15701#[doc = "    \"next_light_client_block\""]
15702#[doc = "  ]"]
15703#[doc = "}"]
15704#[doc = r" ```"]
15705#[doc = r" </details>"]
15706#[derive(
15707    :: serde :: Deserialize,
15708    :: serde :: Serialize,
15709    Clone,
15710    Copy,
15711    Debug,
15712    Eq,
15713    Hash,
15714    Ord,
15715    PartialEq,
15716    PartialOrd,
15717)]
15718pub enum JsonRpcRequestForNextLightClientBlockMethod {
15719    #[serde(rename = "next_light_client_block")]
15720    NextLightClientBlock,
15721}
15722impl ::std::convert::From<&Self> for JsonRpcRequestForNextLightClientBlockMethod {
15723    fn from(value: &JsonRpcRequestForNextLightClientBlockMethod) -> Self {
15724        value.clone()
15725    }
15726}
15727impl ::std::fmt::Display for JsonRpcRequestForNextLightClientBlockMethod {
15728    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15729        match *self {
15730            Self::NextLightClientBlock => f.write_str("next_light_client_block"),
15731        }
15732    }
15733}
15734impl ::std::str::FromStr for JsonRpcRequestForNextLightClientBlockMethod {
15735    type Err = self::error::ConversionError;
15736    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15737        match value {
15738            "next_light_client_block" => Ok(Self::NextLightClientBlock),
15739            _ => Err("invalid value".into()),
15740        }
15741    }
15742}
15743impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNextLightClientBlockMethod {
15744    type Error = self::error::ConversionError;
15745    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15746        value.parse()
15747    }
15748}
15749impl ::std::convert::TryFrom<&::std::string::String>
15750    for JsonRpcRequestForNextLightClientBlockMethod
15751{
15752    type Error = self::error::ConversionError;
15753    fn try_from(
15754        value: &::std::string::String,
15755    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15756        value.parse()
15757    }
15758}
15759impl ::std::convert::TryFrom<::std::string::String>
15760    for JsonRpcRequestForNextLightClientBlockMethod
15761{
15762    type Error = self::error::ConversionError;
15763    fn try_from(
15764        value: ::std::string::String,
15765    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15766        value.parse()
15767    }
15768}
15769#[doc = "`JsonRpcRequestForQuery`"]
15770#[doc = r""]
15771#[doc = r" <details><summary>JSON schema</summary>"]
15772#[doc = r""]
15773#[doc = r" ```json"]
15774#[doc = "{"]
15775#[doc = "  \"title\": \"JsonRpcRequest_for_query\","]
15776#[doc = "  \"type\": \"object\","]
15777#[doc = "  \"required\": ["]
15778#[doc = "    \"id\","]
15779#[doc = "    \"jsonrpc\","]
15780#[doc = "    \"method\","]
15781#[doc = "    \"params\""]
15782#[doc = "  ],"]
15783#[doc = "  \"properties\": {"]
15784#[doc = "    \"id\": {"]
15785#[doc = "      \"type\": \"string\""]
15786#[doc = "    },"]
15787#[doc = "    \"jsonrpc\": {"]
15788#[doc = "      \"type\": \"string\""]
15789#[doc = "    },"]
15790#[doc = "    \"method\": {"]
15791#[doc = "      \"type\": \"string\","]
15792#[doc = "      \"enum\": ["]
15793#[doc = "        \"query\""]
15794#[doc = "      ]"]
15795#[doc = "    },"]
15796#[doc = "    \"params\": {"]
15797#[doc = "      \"$ref\": \"#/components/schemas/RpcQueryRequest\""]
15798#[doc = "    }"]
15799#[doc = "  }"]
15800#[doc = "}"]
15801#[doc = r" ```"]
15802#[doc = r" </details>"]
15803#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15804pub struct JsonRpcRequestForQuery {
15805    pub id: ::std::string::String,
15806    pub jsonrpc: ::std::string::String,
15807    pub method: JsonRpcRequestForQueryMethod,
15808    pub params: RpcQueryRequest,
15809}
15810impl ::std::convert::From<&JsonRpcRequestForQuery> for JsonRpcRequestForQuery {
15811    fn from(value: &JsonRpcRequestForQuery) -> Self {
15812        value.clone()
15813    }
15814}
15815#[doc = "`JsonRpcRequestForQueryMethod`"]
15816#[doc = r""]
15817#[doc = r" <details><summary>JSON schema</summary>"]
15818#[doc = r""]
15819#[doc = r" ```json"]
15820#[doc = "{"]
15821#[doc = "  \"type\": \"string\","]
15822#[doc = "  \"enum\": ["]
15823#[doc = "    \"query\""]
15824#[doc = "  ]"]
15825#[doc = "}"]
15826#[doc = r" ```"]
15827#[doc = r" </details>"]
15828#[derive(
15829    :: serde :: Deserialize,
15830    :: serde :: Serialize,
15831    Clone,
15832    Copy,
15833    Debug,
15834    Eq,
15835    Hash,
15836    Ord,
15837    PartialEq,
15838    PartialOrd,
15839)]
15840pub enum JsonRpcRequestForQueryMethod {
15841    #[serde(rename = "query")]
15842    Query,
15843}
15844impl ::std::convert::From<&Self> for JsonRpcRequestForQueryMethod {
15845    fn from(value: &JsonRpcRequestForQueryMethod) -> Self {
15846        value.clone()
15847    }
15848}
15849impl ::std::fmt::Display for JsonRpcRequestForQueryMethod {
15850    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15851        match *self {
15852            Self::Query => f.write_str("query"),
15853        }
15854    }
15855}
15856impl ::std::str::FromStr for JsonRpcRequestForQueryMethod {
15857    type Err = self::error::ConversionError;
15858    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15859        match value {
15860            "query" => Ok(Self::Query),
15861            _ => Err("invalid value".into()),
15862        }
15863    }
15864}
15865impl ::std::convert::TryFrom<&str> for JsonRpcRequestForQueryMethod {
15866    type Error = self::error::ConversionError;
15867    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15868        value.parse()
15869    }
15870}
15871impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForQueryMethod {
15872    type Error = self::error::ConversionError;
15873    fn try_from(
15874        value: &::std::string::String,
15875    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15876        value.parse()
15877    }
15878}
15879impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForQueryMethod {
15880    type Error = self::error::ConversionError;
15881    fn try_from(
15882        value: ::std::string::String,
15883    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15884        value.parse()
15885    }
15886}
15887#[doc = "`JsonRpcRequestForSendTx`"]
15888#[doc = r""]
15889#[doc = r" <details><summary>JSON schema</summary>"]
15890#[doc = r""]
15891#[doc = r" ```json"]
15892#[doc = "{"]
15893#[doc = "  \"title\": \"JsonRpcRequest_for_send_tx\","]
15894#[doc = "  \"type\": \"object\","]
15895#[doc = "  \"required\": ["]
15896#[doc = "    \"id\","]
15897#[doc = "    \"jsonrpc\","]
15898#[doc = "    \"method\","]
15899#[doc = "    \"params\""]
15900#[doc = "  ],"]
15901#[doc = "  \"properties\": {"]
15902#[doc = "    \"id\": {"]
15903#[doc = "      \"type\": \"string\""]
15904#[doc = "    },"]
15905#[doc = "    \"jsonrpc\": {"]
15906#[doc = "      \"type\": \"string\""]
15907#[doc = "    },"]
15908#[doc = "    \"method\": {"]
15909#[doc = "      \"type\": \"string\","]
15910#[doc = "      \"enum\": ["]
15911#[doc = "        \"send_tx\""]
15912#[doc = "      ]"]
15913#[doc = "    },"]
15914#[doc = "    \"params\": {"]
15915#[doc = "      \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
15916#[doc = "    }"]
15917#[doc = "  }"]
15918#[doc = "}"]
15919#[doc = r" ```"]
15920#[doc = r" </details>"]
15921#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15922pub struct JsonRpcRequestForSendTx {
15923    pub id: ::std::string::String,
15924    pub jsonrpc: ::std::string::String,
15925    pub method: JsonRpcRequestForSendTxMethod,
15926    pub params: RpcSendTransactionRequest,
15927}
15928impl ::std::convert::From<&JsonRpcRequestForSendTx> for JsonRpcRequestForSendTx {
15929    fn from(value: &JsonRpcRequestForSendTx) -> Self {
15930        value.clone()
15931    }
15932}
15933#[doc = "`JsonRpcRequestForSendTxMethod`"]
15934#[doc = r""]
15935#[doc = r" <details><summary>JSON schema</summary>"]
15936#[doc = r""]
15937#[doc = r" ```json"]
15938#[doc = "{"]
15939#[doc = "  \"type\": \"string\","]
15940#[doc = "  \"enum\": ["]
15941#[doc = "    \"send_tx\""]
15942#[doc = "  ]"]
15943#[doc = "}"]
15944#[doc = r" ```"]
15945#[doc = r" </details>"]
15946#[derive(
15947    :: serde :: Deserialize,
15948    :: serde :: Serialize,
15949    Clone,
15950    Copy,
15951    Debug,
15952    Eq,
15953    Hash,
15954    Ord,
15955    PartialEq,
15956    PartialOrd,
15957)]
15958pub enum JsonRpcRequestForSendTxMethod {
15959    #[serde(rename = "send_tx")]
15960    SendTx,
15961}
15962impl ::std::convert::From<&Self> for JsonRpcRequestForSendTxMethod {
15963    fn from(value: &JsonRpcRequestForSendTxMethod) -> Self {
15964        value.clone()
15965    }
15966}
15967impl ::std::fmt::Display for JsonRpcRequestForSendTxMethod {
15968    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15969        match *self {
15970            Self::SendTx => f.write_str("send_tx"),
15971        }
15972    }
15973}
15974impl ::std::str::FromStr for JsonRpcRequestForSendTxMethod {
15975    type Err = self::error::ConversionError;
15976    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15977        match value {
15978            "send_tx" => Ok(Self::SendTx),
15979            _ => Err("invalid value".into()),
15980        }
15981    }
15982}
15983impl ::std::convert::TryFrom<&str> for JsonRpcRequestForSendTxMethod {
15984    type Error = self::error::ConversionError;
15985    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15986        value.parse()
15987    }
15988}
15989impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForSendTxMethod {
15990    type Error = self::error::ConversionError;
15991    fn try_from(
15992        value: &::std::string::String,
15993    ) -> ::std::result::Result<Self, self::error::ConversionError> {
15994        value.parse()
15995    }
15996}
15997impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForSendTxMethod {
15998    type Error = self::error::ConversionError;
15999    fn try_from(
16000        value: ::std::string::String,
16001    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16002        value.parse()
16003    }
16004}
16005#[doc = "`JsonRpcRequestForStatus`"]
16006#[doc = r""]
16007#[doc = r" <details><summary>JSON schema</summary>"]
16008#[doc = r""]
16009#[doc = r" ```json"]
16010#[doc = "{"]
16011#[doc = "  \"title\": \"JsonRpcRequest_for_status\","]
16012#[doc = "  \"type\": \"object\","]
16013#[doc = "  \"required\": ["]
16014#[doc = "    \"id\","]
16015#[doc = "    \"jsonrpc\","]
16016#[doc = "    \"method\","]
16017#[doc = "    \"params\""]
16018#[doc = "  ],"]
16019#[doc = "  \"properties\": {"]
16020#[doc = "    \"id\": {"]
16021#[doc = "      \"type\": \"string\""]
16022#[doc = "    },"]
16023#[doc = "    \"jsonrpc\": {"]
16024#[doc = "      \"type\": \"string\""]
16025#[doc = "    },"]
16026#[doc = "    \"method\": {"]
16027#[doc = "      \"type\": \"string\","]
16028#[doc = "      \"enum\": ["]
16029#[doc = "        \"status\""]
16030#[doc = "      ]"]
16031#[doc = "    },"]
16032#[doc = "    \"params\": {"]
16033#[doc = "      \"$ref\": \"#/components/schemas/RpcStatusRequest\""]
16034#[doc = "    }"]
16035#[doc = "  }"]
16036#[doc = "}"]
16037#[doc = r" ```"]
16038#[doc = r" </details>"]
16039#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16040pub struct JsonRpcRequestForStatus {
16041    pub id: ::std::string::String,
16042    pub jsonrpc: ::std::string::String,
16043    pub method: JsonRpcRequestForStatusMethod,
16044    pub params: RpcStatusRequest,
16045}
16046impl ::std::convert::From<&JsonRpcRequestForStatus> for JsonRpcRequestForStatus {
16047    fn from(value: &JsonRpcRequestForStatus) -> Self {
16048        value.clone()
16049    }
16050}
16051#[doc = "`JsonRpcRequestForStatusMethod`"]
16052#[doc = r""]
16053#[doc = r" <details><summary>JSON schema</summary>"]
16054#[doc = r""]
16055#[doc = r" ```json"]
16056#[doc = "{"]
16057#[doc = "  \"type\": \"string\","]
16058#[doc = "  \"enum\": ["]
16059#[doc = "    \"status\""]
16060#[doc = "  ]"]
16061#[doc = "}"]
16062#[doc = r" ```"]
16063#[doc = r" </details>"]
16064#[derive(
16065    :: serde :: Deserialize,
16066    :: serde :: Serialize,
16067    Clone,
16068    Copy,
16069    Debug,
16070    Eq,
16071    Hash,
16072    Ord,
16073    PartialEq,
16074    PartialOrd,
16075)]
16076pub enum JsonRpcRequestForStatusMethod {
16077    #[serde(rename = "status")]
16078    Status,
16079}
16080impl ::std::convert::From<&Self> for JsonRpcRequestForStatusMethod {
16081    fn from(value: &JsonRpcRequestForStatusMethod) -> Self {
16082        value.clone()
16083    }
16084}
16085impl ::std::fmt::Display for JsonRpcRequestForStatusMethod {
16086    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16087        match *self {
16088            Self::Status => f.write_str("status"),
16089        }
16090    }
16091}
16092impl ::std::str::FromStr for JsonRpcRequestForStatusMethod {
16093    type Err = self::error::ConversionError;
16094    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16095        match value {
16096            "status" => Ok(Self::Status),
16097            _ => Err("invalid value".into()),
16098        }
16099    }
16100}
16101impl ::std::convert::TryFrom<&str> for JsonRpcRequestForStatusMethod {
16102    type Error = self::error::ConversionError;
16103    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16104        value.parse()
16105    }
16106}
16107impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForStatusMethod {
16108    type Error = self::error::ConversionError;
16109    fn try_from(
16110        value: &::std::string::String,
16111    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16112        value.parse()
16113    }
16114}
16115impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForStatusMethod {
16116    type Error = self::error::ConversionError;
16117    fn try_from(
16118        value: ::std::string::String,
16119    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16120        value.parse()
16121    }
16122}
16123#[doc = "`JsonRpcRequestForTx`"]
16124#[doc = r""]
16125#[doc = r" <details><summary>JSON schema</summary>"]
16126#[doc = r""]
16127#[doc = r" ```json"]
16128#[doc = "{"]
16129#[doc = "  \"title\": \"JsonRpcRequest_for_tx\","]
16130#[doc = "  \"type\": \"object\","]
16131#[doc = "  \"required\": ["]
16132#[doc = "    \"id\","]
16133#[doc = "    \"jsonrpc\","]
16134#[doc = "    \"method\","]
16135#[doc = "    \"params\""]
16136#[doc = "  ],"]
16137#[doc = "  \"properties\": {"]
16138#[doc = "    \"id\": {"]
16139#[doc = "      \"type\": \"string\""]
16140#[doc = "    },"]
16141#[doc = "    \"jsonrpc\": {"]
16142#[doc = "      \"type\": \"string\""]
16143#[doc = "    },"]
16144#[doc = "    \"method\": {"]
16145#[doc = "      \"type\": \"string\","]
16146#[doc = "      \"enum\": ["]
16147#[doc = "        \"tx\""]
16148#[doc = "      ]"]
16149#[doc = "    },"]
16150#[doc = "    \"params\": {"]
16151#[doc = "      \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
16152#[doc = "    }"]
16153#[doc = "  }"]
16154#[doc = "}"]
16155#[doc = r" ```"]
16156#[doc = r" </details>"]
16157#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16158pub struct JsonRpcRequestForTx {
16159    pub id: ::std::string::String,
16160    pub jsonrpc: ::std::string::String,
16161    pub method: JsonRpcRequestForTxMethod,
16162    pub params: RpcTransactionStatusRequest,
16163}
16164impl ::std::convert::From<&JsonRpcRequestForTx> for JsonRpcRequestForTx {
16165    fn from(value: &JsonRpcRequestForTx) -> Self {
16166        value.clone()
16167    }
16168}
16169#[doc = "`JsonRpcRequestForTxMethod`"]
16170#[doc = r""]
16171#[doc = r" <details><summary>JSON schema</summary>"]
16172#[doc = r""]
16173#[doc = r" ```json"]
16174#[doc = "{"]
16175#[doc = "  \"type\": \"string\","]
16176#[doc = "  \"enum\": ["]
16177#[doc = "    \"tx\""]
16178#[doc = "  ]"]
16179#[doc = "}"]
16180#[doc = r" ```"]
16181#[doc = r" </details>"]
16182#[derive(
16183    :: serde :: Deserialize,
16184    :: serde :: Serialize,
16185    Clone,
16186    Copy,
16187    Debug,
16188    Eq,
16189    Hash,
16190    Ord,
16191    PartialEq,
16192    PartialOrd,
16193)]
16194pub enum JsonRpcRequestForTxMethod {
16195    #[serde(rename = "tx")]
16196    Tx,
16197}
16198impl ::std::convert::From<&Self> for JsonRpcRequestForTxMethod {
16199    fn from(value: &JsonRpcRequestForTxMethod) -> Self {
16200        value.clone()
16201    }
16202}
16203impl ::std::fmt::Display for JsonRpcRequestForTxMethod {
16204    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16205        match *self {
16206            Self::Tx => f.write_str("tx"),
16207        }
16208    }
16209}
16210impl ::std::str::FromStr for JsonRpcRequestForTxMethod {
16211    type Err = self::error::ConversionError;
16212    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16213        match value {
16214            "tx" => Ok(Self::Tx),
16215            _ => Err("invalid value".into()),
16216        }
16217    }
16218}
16219impl ::std::convert::TryFrom<&str> for JsonRpcRequestForTxMethod {
16220    type Error = self::error::ConversionError;
16221    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16222        value.parse()
16223    }
16224}
16225impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForTxMethod {
16226    type Error = self::error::ConversionError;
16227    fn try_from(
16228        value: &::std::string::String,
16229    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16230        value.parse()
16231    }
16232}
16233impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForTxMethod {
16234    type Error = self::error::ConversionError;
16235    fn try_from(
16236        value: ::std::string::String,
16237    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16238        value.parse()
16239    }
16240}
16241#[doc = "`JsonRpcRequestForValidators`"]
16242#[doc = r""]
16243#[doc = r" <details><summary>JSON schema</summary>"]
16244#[doc = r""]
16245#[doc = r" ```json"]
16246#[doc = "{"]
16247#[doc = "  \"title\": \"JsonRpcRequest_for_validators\","]
16248#[doc = "  \"type\": \"object\","]
16249#[doc = "  \"required\": ["]
16250#[doc = "    \"id\","]
16251#[doc = "    \"jsonrpc\","]
16252#[doc = "    \"method\","]
16253#[doc = "    \"params\""]
16254#[doc = "  ],"]
16255#[doc = "  \"properties\": {"]
16256#[doc = "    \"id\": {"]
16257#[doc = "      \"type\": \"string\""]
16258#[doc = "    },"]
16259#[doc = "    \"jsonrpc\": {"]
16260#[doc = "      \"type\": \"string\""]
16261#[doc = "    },"]
16262#[doc = "    \"method\": {"]
16263#[doc = "      \"type\": \"string\","]
16264#[doc = "      \"enum\": ["]
16265#[doc = "        \"validators\""]
16266#[doc = "      ]"]
16267#[doc = "    },"]
16268#[doc = "    \"params\": {"]
16269#[doc = "      \"$ref\": \"#/components/schemas/RpcValidatorRequest\""]
16270#[doc = "    }"]
16271#[doc = "  }"]
16272#[doc = "}"]
16273#[doc = r" ```"]
16274#[doc = r" </details>"]
16275#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16276pub struct JsonRpcRequestForValidators {
16277    pub id: ::std::string::String,
16278    pub jsonrpc: ::std::string::String,
16279    pub method: JsonRpcRequestForValidatorsMethod,
16280    pub params: RpcValidatorRequest,
16281}
16282impl ::std::convert::From<&JsonRpcRequestForValidators> for JsonRpcRequestForValidators {
16283    fn from(value: &JsonRpcRequestForValidators) -> Self {
16284        value.clone()
16285    }
16286}
16287#[doc = "`JsonRpcRequestForValidatorsMethod`"]
16288#[doc = r""]
16289#[doc = r" <details><summary>JSON schema</summary>"]
16290#[doc = r""]
16291#[doc = r" ```json"]
16292#[doc = "{"]
16293#[doc = "  \"type\": \"string\","]
16294#[doc = "  \"enum\": ["]
16295#[doc = "    \"validators\""]
16296#[doc = "  ]"]
16297#[doc = "}"]
16298#[doc = r" ```"]
16299#[doc = r" </details>"]
16300#[derive(
16301    :: serde :: Deserialize,
16302    :: serde :: Serialize,
16303    Clone,
16304    Copy,
16305    Debug,
16306    Eq,
16307    Hash,
16308    Ord,
16309    PartialEq,
16310    PartialOrd,
16311)]
16312pub enum JsonRpcRequestForValidatorsMethod {
16313    #[serde(rename = "validators")]
16314    Validators,
16315}
16316impl ::std::convert::From<&Self> for JsonRpcRequestForValidatorsMethod {
16317    fn from(value: &JsonRpcRequestForValidatorsMethod) -> Self {
16318        value.clone()
16319    }
16320}
16321impl ::std::fmt::Display for JsonRpcRequestForValidatorsMethod {
16322    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16323        match *self {
16324            Self::Validators => f.write_str("validators"),
16325        }
16326    }
16327}
16328impl ::std::str::FromStr for JsonRpcRequestForValidatorsMethod {
16329    type Err = self::error::ConversionError;
16330    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16331        match value {
16332            "validators" => Ok(Self::Validators),
16333            _ => Err("invalid value".into()),
16334        }
16335    }
16336}
16337impl ::std::convert::TryFrom<&str> for JsonRpcRequestForValidatorsMethod {
16338    type Error = self::error::ConversionError;
16339    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16340        value.parse()
16341    }
16342}
16343impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForValidatorsMethod {
16344    type Error = self::error::ConversionError;
16345    fn try_from(
16346        value: &::std::string::String,
16347    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16348        value.parse()
16349    }
16350}
16351impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForValidatorsMethod {
16352    type Error = self::error::ConversionError;
16353    fn try_from(
16354        value: ::std::string::String,
16355    ) -> ::std::result::Result<Self, self::error::ConversionError> {
16356        value.parse()
16357    }
16358}
16359#[doc = "`JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError`"]
16360#[doc = r""]
16361#[doc = r" <details><summary>JSON schema</summary>"]
16362#[doc = r""]
16363#[doc = r" ```json"]
16364#[doc = "{"]
16365#[doc = "  \"title\": \"JsonRpcResponse_for_Array_of_Range_of_uint64_and_RpcMaintenanceWindowsError\","]
16366#[doc = "  \"type\": \"object\","]
16367#[doc = "  \"oneOf\": ["]
16368#[doc = "    {"]
16369#[doc = "      \"type\": \"object\","]
16370#[doc = "      \"required\": ["]
16371#[doc = "        \"result\""]
16372#[doc = "      ],"]
16373#[doc = "      \"properties\": {"]
16374#[doc = "        \"result\": {"]
16375#[doc = "          \"type\": \"array\","]
16376#[doc = "          \"items\": {"]
16377#[doc = "            \"$ref\": \"#/components/schemas/Range_of_uint64\""]
16378#[doc = "          }"]
16379#[doc = "        }"]
16380#[doc = "      }"]
16381#[doc = "    },"]
16382#[doc = "    {"]
16383#[doc = "      \"type\": \"object\","]
16384#[doc = "      \"required\": ["]
16385#[doc = "        \"error\""]
16386#[doc = "      ],"]
16387#[doc = "      \"properties\": {"]
16388#[doc = "        \"error\": {"]
16389#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcMaintenanceWindowsError\""]
16390#[doc = "        }"]
16391#[doc = "      }"]
16392#[doc = "    }"]
16393#[doc = "  ],"]
16394#[doc = "  \"required\": ["]
16395#[doc = "    \"id\","]
16396#[doc = "    \"jsonrpc\""]
16397#[doc = "  ],"]
16398#[doc = "  \"properties\": {"]
16399#[doc = "    \"id\": {"]
16400#[doc = "      \"type\": \"string\""]
16401#[doc = "    },"]
16402#[doc = "    \"jsonrpc\": {"]
16403#[doc = "      \"type\": \"string\""]
16404#[doc = "    }"]
16405#[doc = "  }"]
16406#[doc = "}"]
16407#[doc = r" ```"]
16408#[doc = r" </details>"]
16409#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16410#[serde(untagged)]
16411pub enum JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError {
16412    Variant0 {
16413        id: ::std::string::String,
16414        jsonrpc: ::std::string::String,
16415        result: ::std::vec::Vec<RangeOfUint64>,
16416    },
16417    Variant1 {
16418        error: ErrorWrapperForRpcMaintenanceWindowsError,
16419        id: ::std::string::String,
16420        jsonrpc: ::std::string::String,
16421    },
16422}
16423impl ::std::convert::From<&Self>
16424    for JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError
16425{
16426    fn from(value: &JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError) -> Self {
16427        value.clone()
16428    }
16429}
16430#[doc = "`JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError`"]
16431#[doc = r""]
16432#[doc = r" <details><summary>JSON schema</summary>"]
16433#[doc = r""]
16434#[doc = r" ```json"]
16435#[doc = "{"]
16436#[doc = "  \"title\": \"JsonRpcResponse_for_Array_of_ValidatorStakeView_and_RpcValidatorError\","]
16437#[doc = "  \"type\": \"object\","]
16438#[doc = "  \"oneOf\": ["]
16439#[doc = "    {"]
16440#[doc = "      \"type\": \"object\","]
16441#[doc = "      \"required\": ["]
16442#[doc = "        \"result\""]
16443#[doc = "      ],"]
16444#[doc = "      \"properties\": {"]
16445#[doc = "        \"result\": {"]
16446#[doc = "          \"type\": \"array\","]
16447#[doc = "          \"items\": {"]
16448#[doc = "            \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
16449#[doc = "          }"]
16450#[doc = "        }"]
16451#[doc = "      }"]
16452#[doc = "    },"]
16453#[doc = "    {"]
16454#[doc = "      \"type\": \"object\","]
16455#[doc = "      \"required\": ["]
16456#[doc = "        \"error\""]
16457#[doc = "      ],"]
16458#[doc = "      \"properties\": {"]
16459#[doc = "        \"error\": {"]
16460#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcValidatorError\""]
16461#[doc = "        }"]
16462#[doc = "      }"]
16463#[doc = "    }"]
16464#[doc = "  ],"]
16465#[doc = "  \"required\": ["]
16466#[doc = "    \"id\","]
16467#[doc = "    \"jsonrpc\""]
16468#[doc = "  ],"]
16469#[doc = "  \"properties\": {"]
16470#[doc = "    \"id\": {"]
16471#[doc = "      \"type\": \"string\""]
16472#[doc = "    },"]
16473#[doc = "    \"jsonrpc\": {"]
16474#[doc = "      \"type\": \"string\""]
16475#[doc = "    }"]
16476#[doc = "  }"]
16477#[doc = "}"]
16478#[doc = r" ```"]
16479#[doc = r" </details>"]
16480#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16481#[serde(untagged)]
16482pub enum JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError {
16483    Variant0 {
16484        id: ::std::string::String,
16485        jsonrpc: ::std::string::String,
16486        result: ::std::vec::Vec<ValidatorStakeView>,
16487    },
16488    Variant1 {
16489        error: ErrorWrapperForRpcValidatorError,
16490        id: ::std::string::String,
16491        jsonrpc: ::std::string::String,
16492    },
16493}
16494impl ::std::convert::From<&Self>
16495    for JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError
16496{
16497    fn from(value: &JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError) -> Self {
16498        value.clone()
16499    }
16500}
16501#[doc = "`JsonRpcResponseForCryptoHashAndRpcTransactionError`"]
16502#[doc = r""]
16503#[doc = r" <details><summary>JSON schema</summary>"]
16504#[doc = r""]
16505#[doc = r" ```json"]
16506#[doc = "{"]
16507#[doc = "  \"title\": \"JsonRpcResponse_for_CryptoHash_and_RpcTransactionError\","]
16508#[doc = "  \"type\": \"object\","]
16509#[doc = "  \"oneOf\": ["]
16510#[doc = "    {"]
16511#[doc = "      \"type\": \"object\","]
16512#[doc = "      \"required\": ["]
16513#[doc = "        \"result\""]
16514#[doc = "      ],"]
16515#[doc = "      \"properties\": {"]
16516#[doc = "        \"result\": {"]
16517#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
16518#[doc = "        }"]
16519#[doc = "      }"]
16520#[doc = "    },"]
16521#[doc = "    {"]
16522#[doc = "      \"type\": \"object\","]
16523#[doc = "      \"required\": ["]
16524#[doc = "        \"error\""]
16525#[doc = "      ],"]
16526#[doc = "      \"properties\": {"]
16527#[doc = "        \"error\": {"]
16528#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcTransactionError\""]
16529#[doc = "        }"]
16530#[doc = "      }"]
16531#[doc = "    }"]
16532#[doc = "  ],"]
16533#[doc = "  \"required\": ["]
16534#[doc = "    \"id\","]
16535#[doc = "    \"jsonrpc\""]
16536#[doc = "  ],"]
16537#[doc = "  \"properties\": {"]
16538#[doc = "    \"id\": {"]
16539#[doc = "      \"type\": \"string\""]
16540#[doc = "    },"]
16541#[doc = "    \"jsonrpc\": {"]
16542#[doc = "      \"type\": \"string\""]
16543#[doc = "    }"]
16544#[doc = "  }"]
16545#[doc = "}"]
16546#[doc = r" ```"]
16547#[doc = r" </details>"]
16548#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16549#[serde(untagged)]
16550pub enum JsonRpcResponseForCryptoHashAndRpcTransactionError {
16551    Variant0 {
16552        id: ::std::string::String,
16553        jsonrpc: ::std::string::String,
16554        result: CryptoHash,
16555    },
16556    Variant1 {
16557        error: ErrorWrapperForRpcTransactionError,
16558        id: ::std::string::String,
16559        jsonrpc: ::std::string::String,
16560    },
16561}
16562impl ::std::convert::From<&Self> for JsonRpcResponseForCryptoHashAndRpcTransactionError {
16563    fn from(value: &JsonRpcResponseForCryptoHashAndRpcTransactionError) -> Self {
16564        value.clone()
16565    }
16566}
16567#[doc = "`JsonRpcResponseForGenesisConfigAndGenesisConfigError`"]
16568#[doc = r""]
16569#[doc = r" <details><summary>JSON schema</summary>"]
16570#[doc = r""]
16571#[doc = r" ```json"]
16572#[doc = "{"]
16573#[doc = "  \"title\": \"JsonRpcResponse_for_GenesisConfig_and_GenesisConfigError\","]
16574#[doc = "  \"type\": \"object\","]
16575#[doc = "  \"oneOf\": ["]
16576#[doc = "    {"]
16577#[doc = "      \"type\": \"object\","]
16578#[doc = "      \"required\": ["]
16579#[doc = "        \"result\""]
16580#[doc = "      ],"]
16581#[doc = "      \"properties\": {"]
16582#[doc = "        \"result\": {"]
16583#[doc = "          \"$ref\": \"#/components/schemas/GenesisConfig\""]
16584#[doc = "        }"]
16585#[doc = "      }"]
16586#[doc = "    },"]
16587#[doc = "    {"]
16588#[doc = "      \"type\": \"object\","]
16589#[doc = "      \"required\": ["]
16590#[doc = "        \"error\""]
16591#[doc = "      ],"]
16592#[doc = "      \"properties\": {"]
16593#[doc = "        \"error\": {"]
16594#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_GenesisConfigError\""]
16595#[doc = "        }"]
16596#[doc = "      }"]
16597#[doc = "    }"]
16598#[doc = "  ],"]
16599#[doc = "  \"required\": ["]
16600#[doc = "    \"id\","]
16601#[doc = "    \"jsonrpc\""]
16602#[doc = "  ],"]
16603#[doc = "  \"properties\": {"]
16604#[doc = "    \"id\": {"]
16605#[doc = "      \"type\": \"string\""]
16606#[doc = "    },"]
16607#[doc = "    \"jsonrpc\": {"]
16608#[doc = "      \"type\": \"string\""]
16609#[doc = "    }"]
16610#[doc = "  }"]
16611#[doc = "}"]
16612#[doc = r" ```"]
16613#[doc = r" </details>"]
16614#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16615#[serde(untagged)]
16616pub enum JsonRpcResponseForGenesisConfigAndGenesisConfigError {
16617    Variant0 {
16618        id: ::std::string::String,
16619        jsonrpc: ::std::string::String,
16620        result: GenesisConfig,
16621    },
16622    Variant1 {
16623        error: ErrorWrapperForGenesisConfigError,
16624        id: ::std::string::String,
16625        jsonrpc: ::std::string::String,
16626    },
16627}
16628impl ::std::convert::From<&Self> for JsonRpcResponseForGenesisConfigAndGenesisConfigError {
16629    fn from(value: &JsonRpcResponseForGenesisConfigAndGenesisConfigError) -> Self {
16630        value.clone()
16631    }
16632}
16633#[doc = "`JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError`"]
16634#[doc = r""]
16635#[doc = r" <details><summary>JSON schema</summary>"]
16636#[doc = r""]
16637#[doc = r" ```json"]
16638#[doc = "{"]
16639#[doc = "  \"title\": \"JsonRpcResponse_for_Nullable_RpcHealthResponse_and_RpcStatusError\","]
16640#[doc = "  \"type\": \"object\","]
16641#[doc = "  \"oneOf\": ["]
16642#[doc = "    {"]
16643#[doc = "      \"type\": \"object\","]
16644#[doc = "      \"required\": ["]
16645#[doc = "        \"result\""]
16646#[doc = "      ],"]
16647#[doc = "      \"properties\": {"]
16648#[doc = "        \"result\": {"]
16649#[doc = "          \"anyOf\": ["]
16650#[doc = "            {"]
16651#[doc = "              \"$ref\": \"#/components/schemas/RpcHealthResponse\""]
16652#[doc = "            },"]
16653#[doc = "            {"]
16654#[doc = "              \"type\": \"null\""]
16655#[doc = "            }"]
16656#[doc = "          ]"]
16657#[doc = "        }"]
16658#[doc = "      }"]
16659#[doc = "    },"]
16660#[doc = "    {"]
16661#[doc = "      \"type\": \"object\","]
16662#[doc = "      \"required\": ["]
16663#[doc = "        \"error\""]
16664#[doc = "      ],"]
16665#[doc = "      \"properties\": {"]
16666#[doc = "        \"error\": {"]
16667#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStatusError\""]
16668#[doc = "        }"]
16669#[doc = "      }"]
16670#[doc = "    }"]
16671#[doc = "  ],"]
16672#[doc = "  \"required\": ["]
16673#[doc = "    \"id\","]
16674#[doc = "    \"jsonrpc\""]
16675#[doc = "  ],"]
16676#[doc = "  \"properties\": {"]
16677#[doc = "    \"id\": {"]
16678#[doc = "      \"type\": \"string\""]
16679#[doc = "    },"]
16680#[doc = "    \"jsonrpc\": {"]
16681#[doc = "      \"type\": \"string\""]
16682#[doc = "    }"]
16683#[doc = "  }"]
16684#[doc = "}"]
16685#[doc = r" ```"]
16686#[doc = r" </details>"]
16687#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16688#[serde(untagged)]
16689pub enum JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError {
16690    Variant0 {
16691        id: ::std::string::String,
16692        jsonrpc: ::std::string::String,
16693        result: ::std::option::Option<RpcHealthResponse>,
16694    },
16695    Variant1 {
16696        error: ErrorWrapperForRpcStatusError,
16697        id: ::std::string::String,
16698        jsonrpc: ::std::string::String,
16699    },
16700}
16701impl ::std::convert::From<&Self> for JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError {
16702    fn from(value: &JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError) -> Self {
16703        value.clone()
16704    }
16705}
16706#[doc = "`JsonRpcResponseForRpcBlockResponseAndRpcBlockError`"]
16707#[doc = r""]
16708#[doc = r" <details><summary>JSON schema</summary>"]
16709#[doc = r""]
16710#[doc = r" ```json"]
16711#[doc = "{"]
16712#[doc = "  \"title\": \"JsonRpcResponse_for_RpcBlockResponse_and_RpcBlockError\","]
16713#[doc = "  \"type\": \"object\","]
16714#[doc = "  \"oneOf\": ["]
16715#[doc = "    {"]
16716#[doc = "      \"type\": \"object\","]
16717#[doc = "      \"required\": ["]
16718#[doc = "        \"result\""]
16719#[doc = "      ],"]
16720#[doc = "      \"properties\": {"]
16721#[doc = "        \"result\": {"]
16722#[doc = "          \"$ref\": \"#/components/schemas/RpcBlockResponse\""]
16723#[doc = "        }"]
16724#[doc = "      }"]
16725#[doc = "    },"]
16726#[doc = "    {"]
16727#[doc = "      \"type\": \"object\","]
16728#[doc = "      \"required\": ["]
16729#[doc = "        \"error\""]
16730#[doc = "      ],"]
16731#[doc = "      \"properties\": {"]
16732#[doc = "        \"error\": {"]
16733#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcBlockError\""]
16734#[doc = "        }"]
16735#[doc = "      }"]
16736#[doc = "    }"]
16737#[doc = "  ],"]
16738#[doc = "  \"required\": ["]
16739#[doc = "    \"id\","]
16740#[doc = "    \"jsonrpc\""]
16741#[doc = "  ],"]
16742#[doc = "  \"properties\": {"]
16743#[doc = "    \"id\": {"]
16744#[doc = "      \"type\": \"string\""]
16745#[doc = "    },"]
16746#[doc = "    \"jsonrpc\": {"]
16747#[doc = "      \"type\": \"string\""]
16748#[doc = "    }"]
16749#[doc = "  }"]
16750#[doc = "}"]
16751#[doc = r" ```"]
16752#[doc = r" </details>"]
16753#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16754#[serde(untagged)]
16755pub enum JsonRpcResponseForRpcBlockResponseAndRpcBlockError {
16756    Variant0 {
16757        id: ::std::string::String,
16758        jsonrpc: ::std::string::String,
16759        result: RpcBlockResponse,
16760    },
16761    Variant1 {
16762        error: ErrorWrapperForRpcBlockError,
16763        id: ::std::string::String,
16764        jsonrpc: ::std::string::String,
16765    },
16766}
16767impl ::std::convert::From<&Self> for JsonRpcResponseForRpcBlockResponseAndRpcBlockError {
16768    fn from(value: &JsonRpcResponseForRpcBlockResponseAndRpcBlockError) -> Self {
16769        value.clone()
16770    }
16771}
16772#[doc = "`JsonRpcResponseForRpcChunkResponseAndRpcChunkError`"]
16773#[doc = r""]
16774#[doc = r" <details><summary>JSON schema</summary>"]
16775#[doc = r""]
16776#[doc = r" ```json"]
16777#[doc = "{"]
16778#[doc = "  \"title\": \"JsonRpcResponse_for_RpcChunkResponse_and_RpcChunkError\","]
16779#[doc = "  \"type\": \"object\","]
16780#[doc = "  \"oneOf\": ["]
16781#[doc = "    {"]
16782#[doc = "      \"type\": \"object\","]
16783#[doc = "      \"required\": ["]
16784#[doc = "        \"result\""]
16785#[doc = "      ],"]
16786#[doc = "      \"properties\": {"]
16787#[doc = "        \"result\": {"]
16788#[doc = "          \"$ref\": \"#/components/schemas/RpcChunkResponse\""]
16789#[doc = "        }"]
16790#[doc = "      }"]
16791#[doc = "    },"]
16792#[doc = "    {"]
16793#[doc = "      \"type\": \"object\","]
16794#[doc = "      \"required\": ["]
16795#[doc = "        \"error\""]
16796#[doc = "      ],"]
16797#[doc = "      \"properties\": {"]
16798#[doc = "        \"error\": {"]
16799#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcChunkError\""]
16800#[doc = "        }"]
16801#[doc = "      }"]
16802#[doc = "    }"]
16803#[doc = "  ],"]
16804#[doc = "  \"required\": ["]
16805#[doc = "    \"id\","]
16806#[doc = "    \"jsonrpc\""]
16807#[doc = "  ],"]
16808#[doc = "  \"properties\": {"]
16809#[doc = "    \"id\": {"]
16810#[doc = "      \"type\": \"string\""]
16811#[doc = "    },"]
16812#[doc = "    \"jsonrpc\": {"]
16813#[doc = "      \"type\": \"string\""]
16814#[doc = "    }"]
16815#[doc = "  }"]
16816#[doc = "}"]
16817#[doc = r" ```"]
16818#[doc = r" </details>"]
16819#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16820#[serde(untagged)]
16821pub enum JsonRpcResponseForRpcChunkResponseAndRpcChunkError {
16822    Variant0 {
16823        id: ::std::string::String,
16824        jsonrpc: ::std::string::String,
16825        result: RpcChunkResponse,
16826    },
16827    Variant1 {
16828        error: ErrorWrapperForRpcChunkError,
16829        id: ::std::string::String,
16830        jsonrpc: ::std::string::String,
16831    },
16832}
16833impl ::std::convert::From<&Self> for JsonRpcResponseForRpcChunkResponseAndRpcChunkError {
16834    fn from(value: &JsonRpcResponseForRpcChunkResponseAndRpcChunkError) -> Self {
16835        value.clone()
16836    }
16837}
16838#[doc = "`JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError`"]
16839#[doc = r""]
16840#[doc = r" <details><summary>JSON schema</summary>"]
16841#[doc = r""]
16842#[doc = r" ```json"]
16843#[doc = "{"]
16844#[doc = "  \"title\": \"JsonRpcResponse_for_RpcClientConfigResponse_and_RpcClientConfigError\","]
16845#[doc = "  \"type\": \"object\","]
16846#[doc = "  \"oneOf\": ["]
16847#[doc = "    {"]
16848#[doc = "      \"type\": \"object\","]
16849#[doc = "      \"required\": ["]
16850#[doc = "        \"result\""]
16851#[doc = "      ],"]
16852#[doc = "      \"properties\": {"]
16853#[doc = "        \"result\": {"]
16854#[doc = "          \"$ref\": \"#/components/schemas/RpcClientConfigResponse\""]
16855#[doc = "        }"]
16856#[doc = "      }"]
16857#[doc = "    },"]
16858#[doc = "    {"]
16859#[doc = "      \"type\": \"object\","]
16860#[doc = "      \"required\": ["]
16861#[doc = "        \"error\""]
16862#[doc = "      ],"]
16863#[doc = "      \"properties\": {"]
16864#[doc = "        \"error\": {"]
16865#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcClientConfigError\""]
16866#[doc = "        }"]
16867#[doc = "      }"]
16868#[doc = "    }"]
16869#[doc = "  ],"]
16870#[doc = "  \"required\": ["]
16871#[doc = "    \"id\","]
16872#[doc = "    \"jsonrpc\""]
16873#[doc = "  ],"]
16874#[doc = "  \"properties\": {"]
16875#[doc = "    \"id\": {"]
16876#[doc = "      \"type\": \"string\""]
16877#[doc = "    },"]
16878#[doc = "    \"jsonrpc\": {"]
16879#[doc = "      \"type\": \"string\""]
16880#[doc = "    }"]
16881#[doc = "  }"]
16882#[doc = "}"]
16883#[doc = r" ```"]
16884#[doc = r" </details>"]
16885#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16886#[serde(untagged)]
16887pub enum JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError {
16888    Variant0 {
16889        id: ::std::string::String,
16890        jsonrpc: ::std::string::String,
16891        result: RpcClientConfigResponse,
16892    },
16893    Variant1 {
16894        error: ErrorWrapperForRpcClientConfigError,
16895        id: ::std::string::String,
16896        jsonrpc: ::std::string::String,
16897    },
16898}
16899impl ::std::convert::From<&Self>
16900    for JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError
16901{
16902    fn from(value: &JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError) -> Self {
16903        value.clone()
16904    }
16905}
16906#[doc = "`JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError`"]
16907#[doc = r""]
16908#[doc = r" <details><summary>JSON schema</summary>"]
16909#[doc = r""]
16910#[doc = r" ```json"]
16911#[doc = "{"]
16912#[doc = "  \"title\": \"JsonRpcResponse_for_RpcCongestionLevelResponse_and_RpcChunkError\","]
16913#[doc = "  \"type\": \"object\","]
16914#[doc = "  \"oneOf\": ["]
16915#[doc = "    {"]
16916#[doc = "      \"type\": \"object\","]
16917#[doc = "      \"required\": ["]
16918#[doc = "        \"result\""]
16919#[doc = "      ],"]
16920#[doc = "      \"properties\": {"]
16921#[doc = "        \"result\": {"]
16922#[doc = "          \"$ref\": \"#/components/schemas/RpcCongestionLevelResponse\""]
16923#[doc = "        }"]
16924#[doc = "      }"]
16925#[doc = "    },"]
16926#[doc = "    {"]
16927#[doc = "      \"type\": \"object\","]
16928#[doc = "      \"required\": ["]
16929#[doc = "        \"error\""]
16930#[doc = "      ],"]
16931#[doc = "      \"properties\": {"]
16932#[doc = "        \"error\": {"]
16933#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcChunkError\""]
16934#[doc = "        }"]
16935#[doc = "      }"]
16936#[doc = "    }"]
16937#[doc = "  ],"]
16938#[doc = "  \"required\": ["]
16939#[doc = "    \"id\","]
16940#[doc = "    \"jsonrpc\""]
16941#[doc = "  ],"]
16942#[doc = "  \"properties\": {"]
16943#[doc = "    \"id\": {"]
16944#[doc = "      \"type\": \"string\""]
16945#[doc = "    },"]
16946#[doc = "    \"jsonrpc\": {"]
16947#[doc = "      \"type\": \"string\""]
16948#[doc = "    }"]
16949#[doc = "  }"]
16950#[doc = "}"]
16951#[doc = r" ```"]
16952#[doc = r" </details>"]
16953#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16954#[serde(untagged)]
16955pub enum JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError {
16956    Variant0 {
16957        id: ::std::string::String,
16958        jsonrpc: ::std::string::String,
16959        result: RpcCongestionLevelResponse,
16960    },
16961    Variant1 {
16962        error: ErrorWrapperForRpcChunkError,
16963        id: ::std::string::String,
16964        jsonrpc: ::std::string::String,
16965    },
16966}
16967impl ::std::convert::From<&Self> for JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError {
16968    fn from(value: &JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError) -> Self {
16969        value.clone()
16970    }
16971}
16972#[doc = "`JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError`"]
16973#[doc = r""]
16974#[doc = r" <details><summary>JSON schema</summary>"]
16975#[doc = r""]
16976#[doc = r" ```json"]
16977#[doc = "{"]
16978#[doc = "  \"title\": \"JsonRpcResponse_for_RpcGasPriceResponse_and_RpcGasPriceError\","]
16979#[doc = "  \"type\": \"object\","]
16980#[doc = "  \"oneOf\": ["]
16981#[doc = "    {"]
16982#[doc = "      \"type\": \"object\","]
16983#[doc = "      \"required\": ["]
16984#[doc = "        \"result\""]
16985#[doc = "      ],"]
16986#[doc = "      \"properties\": {"]
16987#[doc = "        \"result\": {"]
16988#[doc = "          \"$ref\": \"#/components/schemas/RpcGasPriceResponse\""]
16989#[doc = "        }"]
16990#[doc = "      }"]
16991#[doc = "    },"]
16992#[doc = "    {"]
16993#[doc = "      \"type\": \"object\","]
16994#[doc = "      \"required\": ["]
16995#[doc = "        \"error\""]
16996#[doc = "      ],"]
16997#[doc = "      \"properties\": {"]
16998#[doc = "        \"error\": {"]
16999#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcGasPriceError\""]
17000#[doc = "        }"]
17001#[doc = "      }"]
17002#[doc = "    }"]
17003#[doc = "  ],"]
17004#[doc = "  \"required\": ["]
17005#[doc = "    \"id\","]
17006#[doc = "    \"jsonrpc\""]
17007#[doc = "  ],"]
17008#[doc = "  \"properties\": {"]
17009#[doc = "    \"id\": {"]
17010#[doc = "      \"type\": \"string\""]
17011#[doc = "    },"]
17012#[doc = "    \"jsonrpc\": {"]
17013#[doc = "      \"type\": \"string\""]
17014#[doc = "    }"]
17015#[doc = "  }"]
17016#[doc = "}"]
17017#[doc = r" ```"]
17018#[doc = r" </details>"]
17019#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17020#[serde(untagged)]
17021pub enum JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError {
17022    Variant0 {
17023        id: ::std::string::String,
17024        jsonrpc: ::std::string::String,
17025        result: RpcGasPriceResponse,
17026    },
17027    Variant1 {
17028        error: ErrorWrapperForRpcGasPriceError,
17029        id: ::std::string::String,
17030        jsonrpc: ::std::string::String,
17031    },
17032}
17033impl ::std::convert::From<&Self> for JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError {
17034    fn from(value: &JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError) -> Self {
17035        value.clone()
17036    }
17037}
17038#[doc = "`JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError`"]
17039#[doc = r""]
17040#[doc = r" <details><summary>JSON schema</summary>"]
17041#[doc = r""]
17042#[doc = r" ```json"]
17043#[doc = "{"]
17044#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientBlockProofResponse_and_RpcLightClientProofError\","]
17045#[doc = "  \"type\": \"object\","]
17046#[doc = "  \"oneOf\": ["]
17047#[doc = "    {"]
17048#[doc = "      \"type\": \"object\","]
17049#[doc = "      \"required\": ["]
17050#[doc = "        \"result\""]
17051#[doc = "      ],"]
17052#[doc = "      \"properties\": {"]
17053#[doc = "        \"result\": {"]
17054#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientBlockProofResponse\""]
17055#[doc = "        }"]
17056#[doc = "      }"]
17057#[doc = "    },"]
17058#[doc = "    {"]
17059#[doc = "      \"type\": \"object\","]
17060#[doc = "      \"required\": ["]
17061#[doc = "        \"error\""]
17062#[doc = "      ],"]
17063#[doc = "      \"properties\": {"]
17064#[doc = "        \"error\": {"]
17065#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientProofError\""]
17066#[doc = "        }"]
17067#[doc = "      }"]
17068#[doc = "    }"]
17069#[doc = "  ],"]
17070#[doc = "  \"required\": ["]
17071#[doc = "    \"id\","]
17072#[doc = "    \"jsonrpc\""]
17073#[doc = "  ],"]
17074#[doc = "  \"properties\": {"]
17075#[doc = "    \"id\": {"]
17076#[doc = "      \"type\": \"string\""]
17077#[doc = "    },"]
17078#[doc = "    \"jsonrpc\": {"]
17079#[doc = "      \"type\": \"string\""]
17080#[doc = "    }"]
17081#[doc = "  }"]
17082#[doc = "}"]
17083#[doc = r" ```"]
17084#[doc = r" </details>"]
17085#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17086#[serde(untagged)]
17087pub enum JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError {
17088    Variant0 {
17089        id: ::std::string::String,
17090        jsonrpc: ::std::string::String,
17091        result: RpcLightClientBlockProofResponse,
17092    },
17093    Variant1 {
17094        error: ErrorWrapperForRpcLightClientProofError,
17095        id: ::std::string::String,
17096        jsonrpc: ::std::string::String,
17097    },
17098}
17099impl ::std::convert::From<&Self>
17100    for JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError
17101{
17102    fn from(
17103        value: &JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError,
17104    ) -> Self {
17105        value.clone()
17106    }
17107}
17108#[doc = "`JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError`"]
17109#[doc = r""]
17110#[doc = r" <details><summary>JSON schema</summary>"]
17111#[doc = r""]
17112#[doc = r" ```json"]
17113#[doc = "{"]
17114#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientExecutionProofResponse_and_RpcLightClientProofError\","]
17115#[doc = "  \"type\": \"object\","]
17116#[doc = "  \"oneOf\": ["]
17117#[doc = "    {"]
17118#[doc = "      \"type\": \"object\","]
17119#[doc = "      \"required\": ["]
17120#[doc = "        \"result\""]
17121#[doc = "      ],"]
17122#[doc = "      \"properties\": {"]
17123#[doc = "        \"result\": {"]
17124#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofResponse\""]
17125#[doc = "        }"]
17126#[doc = "      }"]
17127#[doc = "    },"]
17128#[doc = "    {"]
17129#[doc = "      \"type\": \"object\","]
17130#[doc = "      \"required\": ["]
17131#[doc = "        \"error\""]
17132#[doc = "      ],"]
17133#[doc = "      \"properties\": {"]
17134#[doc = "        \"error\": {"]
17135#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientProofError\""]
17136#[doc = "        }"]
17137#[doc = "      }"]
17138#[doc = "    }"]
17139#[doc = "  ],"]
17140#[doc = "  \"required\": ["]
17141#[doc = "    \"id\","]
17142#[doc = "    \"jsonrpc\""]
17143#[doc = "  ],"]
17144#[doc = "  \"properties\": {"]
17145#[doc = "    \"id\": {"]
17146#[doc = "      \"type\": \"string\""]
17147#[doc = "    },"]
17148#[doc = "    \"jsonrpc\": {"]
17149#[doc = "      \"type\": \"string\""]
17150#[doc = "    }"]
17151#[doc = "  }"]
17152#[doc = "}"]
17153#[doc = r" ```"]
17154#[doc = r" </details>"]
17155#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17156#[serde(untagged)]
17157pub enum JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError {
17158    Variant0 {
17159        id: ::std::string::String,
17160        jsonrpc: ::std::string::String,
17161        result: RpcLightClientExecutionProofResponse,
17162    },
17163    Variant1 {
17164        error: ErrorWrapperForRpcLightClientProofError,
17165        id: ::std::string::String,
17166        jsonrpc: ::std::string::String,
17167    },
17168}
17169impl ::std::convert::From<&Self>
17170    for JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError
17171{
17172    fn from(
17173        value: &JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError,
17174    ) -> Self {
17175        value.clone()
17176    }
17177}
17178#[doc = "`JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError`"]
17179#[doc = r""]
17180#[doc = r" <details><summary>JSON schema</summary>"]
17181#[doc = r""]
17182#[doc = r" ```json"]
17183#[doc = "{"]
17184#[doc = "  \"title\": \"JsonRpcResponse_for_RpcLightClientNextBlockResponse_and_RpcLightClientNextBlockError\","]
17185#[doc = "  \"type\": \"object\","]
17186#[doc = "  \"oneOf\": ["]
17187#[doc = "    {"]
17188#[doc = "      \"type\": \"object\","]
17189#[doc = "      \"required\": ["]
17190#[doc = "        \"result\""]
17191#[doc = "      ],"]
17192#[doc = "      \"properties\": {"]
17193#[doc = "        \"result\": {"]
17194#[doc = "          \"$ref\": \"#/components/schemas/RpcLightClientNextBlockResponse\""]
17195#[doc = "        }"]
17196#[doc = "      }"]
17197#[doc = "    },"]
17198#[doc = "    {"]
17199#[doc = "      \"type\": \"object\","]
17200#[doc = "      \"required\": ["]
17201#[doc = "        \"error\""]
17202#[doc = "      ],"]
17203#[doc = "      \"properties\": {"]
17204#[doc = "        \"error\": {"]
17205#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientNextBlockError\""]
17206#[doc = "        }"]
17207#[doc = "      }"]
17208#[doc = "    }"]
17209#[doc = "  ],"]
17210#[doc = "  \"required\": ["]
17211#[doc = "    \"id\","]
17212#[doc = "    \"jsonrpc\""]
17213#[doc = "  ],"]
17214#[doc = "  \"properties\": {"]
17215#[doc = "    \"id\": {"]
17216#[doc = "      \"type\": \"string\""]
17217#[doc = "    },"]
17218#[doc = "    \"jsonrpc\": {"]
17219#[doc = "      \"type\": \"string\""]
17220#[doc = "    }"]
17221#[doc = "  }"]
17222#[doc = "}"]
17223#[doc = r" ```"]
17224#[doc = r" </details>"]
17225#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17226#[serde(untagged)]
17227pub enum JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError {
17228    Variant0 {
17229        id: ::std::string::String,
17230        jsonrpc: ::std::string::String,
17231        result: RpcLightClientNextBlockResponse,
17232    },
17233    Variant1 {
17234        error: ErrorWrapperForRpcLightClientNextBlockError,
17235        id: ::std::string::String,
17236        jsonrpc: ::std::string::String,
17237    },
17238}
17239impl ::std::convert::From<&Self>
17240    for JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError
17241{
17242    fn from(
17243        value: &JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError,
17244    ) -> Self {
17245        value.clone()
17246    }
17247}
17248#[doc = "`JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError`"]
17249#[doc = r""]
17250#[doc = r" <details><summary>JSON schema</summary>"]
17251#[doc = r""]
17252#[doc = r" ```json"]
17253#[doc = "{"]
17254#[doc = "  \"title\": \"JsonRpcResponse_for_RpcNetworkInfoResponse_and_RpcNetworkInfoError\","]
17255#[doc = "  \"type\": \"object\","]
17256#[doc = "  \"oneOf\": ["]
17257#[doc = "    {"]
17258#[doc = "      \"type\": \"object\","]
17259#[doc = "      \"required\": ["]
17260#[doc = "        \"result\""]
17261#[doc = "      ],"]
17262#[doc = "      \"properties\": {"]
17263#[doc = "        \"result\": {"]
17264#[doc = "          \"$ref\": \"#/components/schemas/RpcNetworkInfoResponse\""]
17265#[doc = "        }"]
17266#[doc = "      }"]
17267#[doc = "    },"]
17268#[doc = "    {"]
17269#[doc = "      \"type\": \"object\","]
17270#[doc = "      \"required\": ["]
17271#[doc = "        \"error\""]
17272#[doc = "      ],"]
17273#[doc = "      \"properties\": {"]
17274#[doc = "        \"error\": {"]
17275#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcNetworkInfoError\""]
17276#[doc = "        }"]
17277#[doc = "      }"]
17278#[doc = "    }"]
17279#[doc = "  ],"]
17280#[doc = "  \"required\": ["]
17281#[doc = "    \"id\","]
17282#[doc = "    \"jsonrpc\""]
17283#[doc = "  ],"]
17284#[doc = "  \"properties\": {"]
17285#[doc = "    \"id\": {"]
17286#[doc = "      \"type\": \"string\""]
17287#[doc = "    },"]
17288#[doc = "    \"jsonrpc\": {"]
17289#[doc = "      \"type\": \"string\""]
17290#[doc = "    }"]
17291#[doc = "  }"]
17292#[doc = "}"]
17293#[doc = r" ```"]
17294#[doc = r" </details>"]
17295#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17296#[serde(untagged)]
17297pub enum JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError {
17298    Variant0 {
17299        id: ::std::string::String,
17300        jsonrpc: ::std::string::String,
17301        result: RpcNetworkInfoResponse,
17302    },
17303    Variant1 {
17304        error: ErrorWrapperForRpcNetworkInfoError,
17305        id: ::std::string::String,
17306        jsonrpc: ::std::string::String,
17307    },
17308}
17309impl ::std::convert::From<&Self>
17310    for JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError
17311{
17312    fn from(value: &JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError) -> Self {
17313        value.clone()
17314    }
17315}
17316#[doc = "`JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError`"]
17317#[doc = r""]
17318#[doc = r" <details><summary>JSON schema</summary>"]
17319#[doc = r""]
17320#[doc = r" ```json"]
17321#[doc = "{"]
17322#[doc = "  \"title\": \"JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcProtocolConfigError\","]
17323#[doc = "  \"type\": \"object\","]
17324#[doc = "  \"oneOf\": ["]
17325#[doc = "    {"]
17326#[doc = "      \"type\": \"object\","]
17327#[doc = "      \"required\": ["]
17328#[doc = "        \"result\""]
17329#[doc = "      ],"]
17330#[doc = "      \"properties\": {"]
17331#[doc = "        \"result\": {"]
17332#[doc = "          \"$ref\": \"#/components/schemas/RpcProtocolConfigResponse\""]
17333#[doc = "        }"]
17334#[doc = "      }"]
17335#[doc = "    },"]
17336#[doc = "    {"]
17337#[doc = "      \"type\": \"object\","]
17338#[doc = "      \"required\": ["]
17339#[doc = "        \"error\""]
17340#[doc = "      ],"]
17341#[doc = "      \"properties\": {"]
17342#[doc = "        \"error\": {"]
17343#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcProtocolConfigError\""]
17344#[doc = "        }"]
17345#[doc = "      }"]
17346#[doc = "    }"]
17347#[doc = "  ],"]
17348#[doc = "  \"required\": ["]
17349#[doc = "    \"id\","]
17350#[doc = "    \"jsonrpc\""]
17351#[doc = "  ],"]
17352#[doc = "  \"properties\": {"]
17353#[doc = "    \"id\": {"]
17354#[doc = "      \"type\": \"string\""]
17355#[doc = "    },"]
17356#[doc = "    \"jsonrpc\": {"]
17357#[doc = "      \"type\": \"string\""]
17358#[doc = "    }"]
17359#[doc = "  }"]
17360#[doc = "}"]
17361#[doc = r" ```"]
17362#[doc = r" </details>"]
17363#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17364#[serde(untagged)]
17365pub enum JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError {
17366    Variant0 {
17367        id: ::std::string::String,
17368        jsonrpc: ::std::string::String,
17369        result: RpcProtocolConfigResponse,
17370    },
17371    Variant1 {
17372        error: ErrorWrapperForRpcProtocolConfigError,
17373        id: ::std::string::String,
17374        jsonrpc: ::std::string::String,
17375    },
17376}
17377impl ::std::convert::From<&Self>
17378    for JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError
17379{
17380    fn from(value: &JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError) -> Self {
17381        value.clone()
17382    }
17383}
17384#[doc = "`JsonRpcResponseForRpcQueryResponseAndRpcQueryError`"]
17385#[doc = r""]
17386#[doc = r" <details><summary>JSON schema</summary>"]
17387#[doc = r""]
17388#[doc = r" ```json"]
17389#[doc = "{"]
17390#[doc = "  \"title\": \"JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError\","]
17391#[doc = "  \"type\": \"object\","]
17392#[doc = "  \"oneOf\": ["]
17393#[doc = "    {"]
17394#[doc = "      \"type\": \"object\","]
17395#[doc = "      \"required\": ["]
17396#[doc = "        \"result\""]
17397#[doc = "      ],"]
17398#[doc = "      \"properties\": {"]
17399#[doc = "        \"result\": {"]
17400#[doc = "          \"$ref\": \"#/components/schemas/RpcQueryResponse\""]
17401#[doc = "        }"]
17402#[doc = "      }"]
17403#[doc = "    },"]
17404#[doc = "    {"]
17405#[doc = "      \"type\": \"object\","]
17406#[doc = "      \"required\": ["]
17407#[doc = "        \"error\""]
17408#[doc = "      ],"]
17409#[doc = "      \"properties\": {"]
17410#[doc = "        \"error\": {"]
17411#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcQueryError\""]
17412#[doc = "        }"]
17413#[doc = "      }"]
17414#[doc = "    }"]
17415#[doc = "  ],"]
17416#[doc = "  \"required\": ["]
17417#[doc = "    \"id\","]
17418#[doc = "    \"jsonrpc\""]
17419#[doc = "  ],"]
17420#[doc = "  \"properties\": {"]
17421#[doc = "    \"id\": {"]
17422#[doc = "      \"type\": \"string\""]
17423#[doc = "    },"]
17424#[doc = "    \"jsonrpc\": {"]
17425#[doc = "      \"type\": \"string\""]
17426#[doc = "    }"]
17427#[doc = "  }"]
17428#[doc = "}"]
17429#[doc = r" ```"]
17430#[doc = r" </details>"]
17431#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17432#[serde(untagged)]
17433pub enum JsonRpcResponseForRpcQueryResponseAndRpcQueryError {
17434    Variant0 {
17435        id: ::std::string::String,
17436        jsonrpc: ::std::string::String,
17437        result: RpcQueryResponse,
17438    },
17439    Variant1 {
17440        error: ErrorWrapperForRpcQueryError,
17441        id: ::std::string::String,
17442        jsonrpc: ::std::string::String,
17443    },
17444}
17445impl ::std::convert::From<&Self> for JsonRpcResponseForRpcQueryResponseAndRpcQueryError {
17446    fn from(value: &JsonRpcResponseForRpcQueryResponseAndRpcQueryError) -> Self {
17447        value.clone()
17448    }
17449}
17450#[doc = "`JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError`"]
17451#[doc = r""]
17452#[doc = r" <details><summary>JSON schema</summary>"]
17453#[doc = r""]
17454#[doc = r" ```json"]
17455#[doc = "{"]
17456#[doc = "  \"title\": \"JsonRpcResponse_for_RpcReceiptResponse_and_RpcReceiptError\","]
17457#[doc = "  \"type\": \"object\","]
17458#[doc = "  \"oneOf\": ["]
17459#[doc = "    {"]
17460#[doc = "      \"type\": \"object\","]
17461#[doc = "      \"required\": ["]
17462#[doc = "        \"result\""]
17463#[doc = "      ],"]
17464#[doc = "      \"properties\": {"]
17465#[doc = "        \"result\": {"]
17466#[doc = "          \"$ref\": \"#/components/schemas/RpcReceiptResponse\""]
17467#[doc = "        }"]
17468#[doc = "      }"]
17469#[doc = "    },"]
17470#[doc = "    {"]
17471#[doc = "      \"type\": \"object\","]
17472#[doc = "      \"required\": ["]
17473#[doc = "        \"error\""]
17474#[doc = "      ],"]
17475#[doc = "      \"properties\": {"]
17476#[doc = "        \"error\": {"]
17477#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcReceiptError\""]
17478#[doc = "        }"]
17479#[doc = "      }"]
17480#[doc = "    }"]
17481#[doc = "  ],"]
17482#[doc = "  \"required\": ["]
17483#[doc = "    \"id\","]
17484#[doc = "    \"jsonrpc\""]
17485#[doc = "  ],"]
17486#[doc = "  \"properties\": {"]
17487#[doc = "    \"id\": {"]
17488#[doc = "      \"type\": \"string\""]
17489#[doc = "    },"]
17490#[doc = "    \"jsonrpc\": {"]
17491#[doc = "      \"type\": \"string\""]
17492#[doc = "    }"]
17493#[doc = "  }"]
17494#[doc = "}"]
17495#[doc = r" ```"]
17496#[doc = r" </details>"]
17497#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17498#[serde(untagged)]
17499pub enum JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError {
17500    Variant0 {
17501        id: ::std::string::String,
17502        jsonrpc: ::std::string::String,
17503        result: RpcReceiptResponse,
17504    },
17505    Variant1 {
17506        error: ErrorWrapperForRpcReceiptError,
17507        id: ::std::string::String,
17508        jsonrpc: ::std::string::String,
17509    },
17510}
17511impl ::std::convert::From<&Self> for JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError {
17512    fn from(value: &JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError) -> Self {
17513        value.clone()
17514    }
17515}
17516#[doc = "`JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError`"]
17517#[doc = r""]
17518#[doc = r" <details><summary>JSON schema</summary>"]
17519#[doc = r""]
17520#[doc = r" ```json"]
17521#[doc = "{"]
17522#[doc = "  \"title\": \"JsonRpcResponse_for_RpcSplitStorageInfoResponse_and_RpcSplitStorageInfoError\","]
17523#[doc = "  \"type\": \"object\","]
17524#[doc = "  \"oneOf\": ["]
17525#[doc = "    {"]
17526#[doc = "      \"type\": \"object\","]
17527#[doc = "      \"required\": ["]
17528#[doc = "        \"result\""]
17529#[doc = "      ],"]
17530#[doc = "      \"properties\": {"]
17531#[doc = "        \"result\": {"]
17532#[doc = "          \"$ref\": \"#/components/schemas/RpcSplitStorageInfoResponse\""]
17533#[doc = "        }"]
17534#[doc = "      }"]
17535#[doc = "    },"]
17536#[doc = "    {"]
17537#[doc = "      \"type\": \"object\","]
17538#[doc = "      \"required\": ["]
17539#[doc = "        \"error\""]
17540#[doc = "      ],"]
17541#[doc = "      \"properties\": {"]
17542#[doc = "        \"error\": {"]
17543#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcSplitStorageInfoError\""]
17544#[doc = "        }"]
17545#[doc = "      }"]
17546#[doc = "    }"]
17547#[doc = "  ],"]
17548#[doc = "  \"required\": ["]
17549#[doc = "    \"id\","]
17550#[doc = "    \"jsonrpc\""]
17551#[doc = "  ],"]
17552#[doc = "  \"properties\": {"]
17553#[doc = "    \"id\": {"]
17554#[doc = "      \"type\": \"string\""]
17555#[doc = "    },"]
17556#[doc = "    \"jsonrpc\": {"]
17557#[doc = "      \"type\": \"string\""]
17558#[doc = "    }"]
17559#[doc = "  }"]
17560#[doc = "}"]
17561#[doc = r" ```"]
17562#[doc = r" </details>"]
17563#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17564#[serde(untagged)]
17565pub enum JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError {
17566    Variant0 {
17567        id: ::std::string::String,
17568        jsonrpc: ::std::string::String,
17569        result: RpcSplitStorageInfoResponse,
17570    },
17571    Variant1 {
17572        error: ErrorWrapperForRpcSplitStorageInfoError,
17573        id: ::std::string::String,
17574        jsonrpc: ::std::string::String,
17575    },
17576}
17577impl ::std::convert::From<&Self>
17578    for JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError
17579{
17580    fn from(
17581        value: &JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError,
17582    ) -> Self {
17583        value.clone()
17584    }
17585}
17586#[doc = "`JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError`"]
17587#[doc = r""]
17588#[doc = r" <details><summary>JSON schema</summary>"]
17589#[doc = r""]
17590#[doc = r" ```json"]
17591#[doc = "{"]
17592#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError\","]
17593#[doc = "  \"type\": \"object\","]
17594#[doc = "  \"oneOf\": ["]
17595#[doc = "    {"]
17596#[doc = "      \"type\": \"object\","]
17597#[doc = "      \"required\": ["]
17598#[doc = "        \"result\""]
17599#[doc = "      ],"]
17600#[doc = "      \"properties\": {"]
17601#[doc = "        \"result\": {"]
17602#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeResponse\""]
17603#[doc = "        }"]
17604#[doc = "      }"]
17605#[doc = "    },"]
17606#[doc = "    {"]
17607#[doc = "      \"type\": \"object\","]
17608#[doc = "      \"required\": ["]
17609#[doc = "        \"error\""]
17610#[doc = "      ],"]
17611#[doc = "      \"properties\": {"]
17612#[doc = "        \"error\": {"]
17613#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStateChangesError\""]
17614#[doc = "        }"]
17615#[doc = "      }"]
17616#[doc = "    }"]
17617#[doc = "  ],"]
17618#[doc = "  \"required\": ["]
17619#[doc = "    \"id\","]
17620#[doc = "    \"jsonrpc\""]
17621#[doc = "  ],"]
17622#[doc = "  \"properties\": {"]
17623#[doc = "    \"id\": {"]
17624#[doc = "      \"type\": \"string\""]
17625#[doc = "    },"]
17626#[doc = "    \"jsonrpc\": {"]
17627#[doc = "      \"type\": \"string\""]
17628#[doc = "    }"]
17629#[doc = "  }"]
17630#[doc = "}"]
17631#[doc = r" ```"]
17632#[doc = r" </details>"]
17633#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17634#[serde(untagged)]
17635pub enum JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError {
17636    Variant0 {
17637        id: ::std::string::String,
17638        jsonrpc: ::std::string::String,
17639        result: RpcStateChangesInBlockByTypeResponse,
17640    },
17641    Variant1 {
17642        error: ErrorWrapperForRpcStateChangesError,
17643        id: ::std::string::String,
17644        jsonrpc: ::std::string::String,
17645    },
17646}
17647impl ::std::convert::From<&Self>
17648    for JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError
17649{
17650    fn from(
17651        value: &JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError,
17652    ) -> Self {
17653        value.clone()
17654    }
17655}
17656#[doc = "`JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError`"]
17657#[doc = r""]
17658#[doc = r" <details><summary>JSON schema</summary>"]
17659#[doc = r""]
17660#[doc = r" ```json"]
17661#[doc = "{"]
17662#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockResponse_and_RpcStateChangesError\","]
17663#[doc = "  \"type\": \"object\","]
17664#[doc = "  \"oneOf\": ["]
17665#[doc = "    {"]
17666#[doc = "      \"type\": \"object\","]
17667#[doc = "      \"required\": ["]
17668#[doc = "        \"result\""]
17669#[doc = "      ],"]
17670#[doc = "      \"properties\": {"]
17671#[doc = "        \"result\": {"]
17672#[doc = "          \"$ref\": \"#/components/schemas/RpcStateChangesInBlockResponse\""]
17673#[doc = "        }"]
17674#[doc = "      }"]
17675#[doc = "    },"]
17676#[doc = "    {"]
17677#[doc = "      \"type\": \"object\","]
17678#[doc = "      \"required\": ["]
17679#[doc = "        \"error\""]
17680#[doc = "      ],"]
17681#[doc = "      \"properties\": {"]
17682#[doc = "        \"error\": {"]
17683#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStateChangesError\""]
17684#[doc = "        }"]
17685#[doc = "      }"]
17686#[doc = "    }"]
17687#[doc = "  ],"]
17688#[doc = "  \"required\": ["]
17689#[doc = "    \"id\","]
17690#[doc = "    \"jsonrpc\""]
17691#[doc = "  ],"]
17692#[doc = "  \"properties\": {"]
17693#[doc = "    \"id\": {"]
17694#[doc = "      \"type\": \"string\""]
17695#[doc = "    },"]
17696#[doc = "    \"jsonrpc\": {"]
17697#[doc = "      \"type\": \"string\""]
17698#[doc = "    }"]
17699#[doc = "  }"]
17700#[doc = "}"]
17701#[doc = r" ```"]
17702#[doc = r" </details>"]
17703#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17704#[serde(untagged)]
17705pub enum JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError {
17706    Variant0 {
17707        id: ::std::string::String,
17708        jsonrpc: ::std::string::String,
17709        result: RpcStateChangesInBlockResponse,
17710    },
17711    Variant1 {
17712        error: ErrorWrapperForRpcStateChangesError,
17713        id: ::std::string::String,
17714        jsonrpc: ::std::string::String,
17715    },
17716}
17717impl ::std::convert::From<&Self>
17718    for JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError
17719{
17720    fn from(
17721        value: &JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError,
17722    ) -> Self {
17723        value.clone()
17724    }
17725}
17726#[doc = "`JsonRpcResponseForRpcStatusResponseAndRpcStatusError`"]
17727#[doc = r""]
17728#[doc = r" <details><summary>JSON schema</summary>"]
17729#[doc = r""]
17730#[doc = r" ```json"]
17731#[doc = "{"]
17732#[doc = "  \"title\": \"JsonRpcResponse_for_RpcStatusResponse_and_RpcStatusError\","]
17733#[doc = "  \"type\": \"object\","]
17734#[doc = "  \"oneOf\": ["]
17735#[doc = "    {"]
17736#[doc = "      \"type\": \"object\","]
17737#[doc = "      \"required\": ["]
17738#[doc = "        \"result\""]
17739#[doc = "      ],"]
17740#[doc = "      \"properties\": {"]
17741#[doc = "        \"result\": {"]
17742#[doc = "          \"$ref\": \"#/components/schemas/RpcStatusResponse\""]
17743#[doc = "        }"]
17744#[doc = "      }"]
17745#[doc = "    },"]
17746#[doc = "    {"]
17747#[doc = "      \"type\": \"object\","]
17748#[doc = "      \"required\": ["]
17749#[doc = "        \"error\""]
17750#[doc = "      ],"]
17751#[doc = "      \"properties\": {"]
17752#[doc = "        \"error\": {"]
17753#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStatusError\""]
17754#[doc = "        }"]
17755#[doc = "      }"]
17756#[doc = "    }"]
17757#[doc = "  ],"]
17758#[doc = "  \"required\": ["]
17759#[doc = "    \"id\","]
17760#[doc = "    \"jsonrpc\""]
17761#[doc = "  ],"]
17762#[doc = "  \"properties\": {"]
17763#[doc = "    \"id\": {"]
17764#[doc = "      \"type\": \"string\""]
17765#[doc = "    },"]
17766#[doc = "    \"jsonrpc\": {"]
17767#[doc = "      \"type\": \"string\""]
17768#[doc = "    }"]
17769#[doc = "  }"]
17770#[doc = "}"]
17771#[doc = r" ```"]
17772#[doc = r" </details>"]
17773#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17774#[serde(untagged)]
17775pub enum JsonRpcResponseForRpcStatusResponseAndRpcStatusError {
17776    Variant0 {
17777        id: ::std::string::String,
17778        jsonrpc: ::std::string::String,
17779        result: RpcStatusResponse,
17780    },
17781    Variant1 {
17782        error: ErrorWrapperForRpcStatusError,
17783        id: ::std::string::String,
17784        jsonrpc: ::std::string::String,
17785    },
17786}
17787impl ::std::convert::From<&Self> for JsonRpcResponseForRpcStatusResponseAndRpcStatusError {
17788    fn from(value: &JsonRpcResponseForRpcStatusResponseAndRpcStatusError) -> Self {
17789        value.clone()
17790    }
17791}
17792#[doc = "`JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError`"]
17793#[doc = r""]
17794#[doc = r" <details><summary>JSON schema</summary>"]
17795#[doc = r""]
17796#[doc = r" ```json"]
17797#[doc = "{"]
17798#[doc = "  \"title\": \"JsonRpcResponse_for_RpcTransactionResponse_and_RpcTransactionError\","]
17799#[doc = "  \"type\": \"object\","]
17800#[doc = "  \"oneOf\": ["]
17801#[doc = "    {"]
17802#[doc = "      \"type\": \"object\","]
17803#[doc = "      \"required\": ["]
17804#[doc = "        \"result\""]
17805#[doc = "      ],"]
17806#[doc = "      \"properties\": {"]
17807#[doc = "        \"result\": {"]
17808#[doc = "          \"$ref\": \"#/components/schemas/RpcTransactionResponse\""]
17809#[doc = "        }"]
17810#[doc = "      }"]
17811#[doc = "    },"]
17812#[doc = "    {"]
17813#[doc = "      \"type\": \"object\","]
17814#[doc = "      \"required\": ["]
17815#[doc = "        \"error\""]
17816#[doc = "      ],"]
17817#[doc = "      \"properties\": {"]
17818#[doc = "        \"error\": {"]
17819#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcTransactionError\""]
17820#[doc = "        }"]
17821#[doc = "      }"]
17822#[doc = "    }"]
17823#[doc = "  ],"]
17824#[doc = "  \"required\": ["]
17825#[doc = "    \"id\","]
17826#[doc = "    \"jsonrpc\""]
17827#[doc = "  ],"]
17828#[doc = "  \"properties\": {"]
17829#[doc = "    \"id\": {"]
17830#[doc = "      \"type\": \"string\""]
17831#[doc = "    },"]
17832#[doc = "    \"jsonrpc\": {"]
17833#[doc = "      \"type\": \"string\""]
17834#[doc = "    }"]
17835#[doc = "  }"]
17836#[doc = "}"]
17837#[doc = r" ```"]
17838#[doc = r" </details>"]
17839#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17840#[serde(untagged)]
17841pub enum JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError {
17842    Variant0 {
17843        id: ::std::string::String,
17844        jsonrpc: ::std::string::String,
17845        result: RpcTransactionResponse,
17846    },
17847    Variant1 {
17848        error: ErrorWrapperForRpcTransactionError,
17849        id: ::std::string::String,
17850        jsonrpc: ::std::string::String,
17851    },
17852}
17853impl ::std::convert::From<&Self>
17854    for JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError
17855{
17856    fn from(value: &JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError) -> Self {
17857        value.clone()
17858    }
17859}
17860#[doc = "`JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError`"]
17861#[doc = r""]
17862#[doc = r" <details><summary>JSON schema</summary>"]
17863#[doc = r""]
17864#[doc = r" ```json"]
17865#[doc = "{"]
17866#[doc = "  \"title\": \"JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError\","]
17867#[doc = "  \"type\": \"object\","]
17868#[doc = "  \"oneOf\": ["]
17869#[doc = "    {"]
17870#[doc = "      \"type\": \"object\","]
17871#[doc = "      \"required\": ["]
17872#[doc = "        \"result\""]
17873#[doc = "      ],"]
17874#[doc = "      \"properties\": {"]
17875#[doc = "        \"result\": {"]
17876#[doc = "          \"$ref\": \"#/components/schemas/RpcValidatorResponse\""]
17877#[doc = "        }"]
17878#[doc = "      }"]
17879#[doc = "    },"]
17880#[doc = "    {"]
17881#[doc = "      \"type\": \"object\","]
17882#[doc = "      \"required\": ["]
17883#[doc = "        \"error\""]
17884#[doc = "      ],"]
17885#[doc = "      \"properties\": {"]
17886#[doc = "        \"error\": {"]
17887#[doc = "          \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcValidatorError\""]
17888#[doc = "        }"]
17889#[doc = "      }"]
17890#[doc = "    }"]
17891#[doc = "  ],"]
17892#[doc = "  \"required\": ["]
17893#[doc = "    \"id\","]
17894#[doc = "    \"jsonrpc\""]
17895#[doc = "  ],"]
17896#[doc = "  \"properties\": {"]
17897#[doc = "    \"id\": {"]
17898#[doc = "      \"type\": \"string\""]
17899#[doc = "    },"]
17900#[doc = "    \"jsonrpc\": {"]
17901#[doc = "      \"type\": \"string\""]
17902#[doc = "    }"]
17903#[doc = "  }"]
17904#[doc = "}"]
17905#[doc = r" ```"]
17906#[doc = r" </details>"]
17907#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17908#[serde(untagged)]
17909pub enum JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError {
17910    Variant0 {
17911        id: ::std::string::String,
17912        jsonrpc: ::std::string::String,
17913        result: RpcValidatorResponse,
17914    },
17915    Variant1 {
17916        error: ErrorWrapperForRpcValidatorError,
17917        id: ::std::string::String,
17918        jsonrpc: ::std::string::String,
17919    },
17920}
17921impl ::std::convert::From<&Self> for JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError {
17922    fn from(value: &JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError) -> Self {
17923        value.clone()
17924    }
17925}
17926#[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."]
17927#[doc = r""]
17928#[doc = r" <details><summary>JSON schema</summary>"]
17929#[doc = r""]
17930#[doc = r" ```json"]
17931#[doc = "{"]
17932#[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.\","]
17933#[doc = "  \"type\": \"object\","]
17934#[doc = "  \"required\": ["]
17935#[doc = "    \"account_id\","]
17936#[doc = "    \"peer_id\""]
17937#[doc = "  ],"]
17938#[doc = "  \"properties\": {"]
17939#[doc = "    \"account_id\": {"]
17940#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
17941#[doc = "    },"]
17942#[doc = "    \"next_hops\": {"]
17943#[doc = "      \"type\": ["]
17944#[doc = "        \"array\","]
17945#[doc = "        \"null\""]
17946#[doc = "      ],"]
17947#[doc = "      \"items\": {"]
17948#[doc = "        \"$ref\": \"#/components/schemas/PublicKey\""]
17949#[doc = "      }"]
17950#[doc = "    },"]
17951#[doc = "    \"peer_id\": {"]
17952#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
17953#[doc = "    }"]
17954#[doc = "  }"]
17955#[doc = "}"]
17956#[doc = r" ```"]
17957#[doc = r" </details>"]
17958#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17959pub struct KnownProducerView {
17960    pub account_id: AccountId,
17961    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17962    pub next_hops: ::std::option::Option<::std::vec::Vec<PublicKey>>,
17963    pub peer_id: PublicKey,
17964}
17965impl ::std::convert::From<&KnownProducerView> for KnownProducerView {
17966    fn from(value: &KnownProducerView) -> Self {
17967        value.clone()
17968    }
17969}
17970#[doc = "`LightClientBlockLiteView`"]
17971#[doc = r""]
17972#[doc = r" <details><summary>JSON schema</summary>"]
17973#[doc = r""]
17974#[doc = r" ```json"]
17975#[doc = "{"]
17976#[doc = "  \"type\": \"object\","]
17977#[doc = "  \"required\": ["]
17978#[doc = "    \"inner_lite\","]
17979#[doc = "    \"inner_rest_hash\","]
17980#[doc = "    \"prev_block_hash\""]
17981#[doc = "  ],"]
17982#[doc = "  \"properties\": {"]
17983#[doc = "    \"inner_lite\": {"]
17984#[doc = "      \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
17985#[doc = "    },"]
17986#[doc = "    \"inner_rest_hash\": {"]
17987#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
17988#[doc = "    },"]
17989#[doc = "    \"prev_block_hash\": {"]
17990#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
17991#[doc = "    }"]
17992#[doc = "  }"]
17993#[doc = "}"]
17994#[doc = r" ```"]
17995#[doc = r" </details>"]
17996#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17997pub struct LightClientBlockLiteView {
17998    pub inner_lite: BlockHeaderInnerLiteView,
17999    pub inner_rest_hash: CryptoHash,
18000    pub prev_block_hash: CryptoHash,
18001}
18002impl ::std::convert::From<&LightClientBlockLiteView> for LightClientBlockLiteView {
18003    fn from(value: &LightClientBlockLiteView) -> Self {
18004        value.clone()
18005    }
18006}
18007#[doc = "Describes limits for VM and Runtime.\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities"]
18008#[doc = r""]
18009#[doc = r" <details><summary>JSON schema</summary>"]
18010#[doc = r""]
18011#[doc = r" ```json"]
18012#[doc = "{"]
18013#[doc = "  \"description\": \"Describes limits for VM and Runtime.\\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities\","]
18014#[doc = "  \"type\": \"object\","]
18015#[doc = "  \"properties\": {"]
18016#[doc = "    \"account_id_validity_rules_version\": {"]
18017#[doc = "      \"description\": \"Whether to enforce account_id well-formed-ness where it wasn't enforced\\nhistorically.\","]
18018#[doc = "      \"default\": 0,"]
18019#[doc = "      \"allOf\": ["]
18020#[doc = "        {"]
18021#[doc = "          \"$ref\": \"#/components/schemas/AccountIdValidityRulesVersion\""]
18022#[doc = "        }"]
18023#[doc = "      ]"]
18024#[doc = "    },"]
18025#[doc = "    \"initial_memory_pages\": {"]
18026#[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.\","]
18027#[doc = "      \"type\": \"integer\","]
18028#[doc = "      \"format\": \"uint32\","]
18029#[doc = "      \"minimum\": 0.0"]
18030#[doc = "    },"]
18031#[doc = "    \"max_actions_per_receipt\": {"]
18032#[doc = "      \"description\": \"Max number of actions per receipt.\","]
18033#[doc = "      \"type\": \"integer\","]
18034#[doc = "      \"format\": \"uint64\","]
18035#[doc = "      \"minimum\": 0.0"]
18036#[doc = "    },"]
18037#[doc = "    \"max_arguments_length\": {"]
18038#[doc = "      \"description\": \"Max length of arguments in a function call action.\","]
18039#[doc = "      \"type\": \"integer\","]
18040#[doc = "      \"format\": \"uint64\","]
18041#[doc = "      \"minimum\": 0.0"]
18042#[doc = "    },"]
18043#[doc = "    \"max_contract_size\": {"]
18044#[doc = "      \"description\": \"Max contract size\","]
18045#[doc = "      \"type\": \"integer\","]
18046#[doc = "      \"format\": \"uint64\","]
18047#[doc = "      \"minimum\": 0.0"]
18048#[doc = "    },"]
18049#[doc = "    \"max_elements_per_contract_table\": {"]
18050#[doc = "      \"description\": \"If present, stores max number of elements in a single contract's table\","]
18051#[doc = "      \"type\": ["]
18052#[doc = "        \"integer\","]
18053#[doc = "        \"null\""]
18054#[doc = "      ],"]
18055#[doc = "      \"format\": \"uint\","]
18056#[doc = "      \"minimum\": 0.0"]
18057#[doc = "    },"]
18058#[doc = "    \"max_functions_number_per_contract\": {"]
18059#[doc = "      \"description\": \"If present, stores max number of functions in one contract\","]
18060#[doc = "      \"type\": ["]
18061#[doc = "        \"integer\","]
18062#[doc = "        \"null\""]
18063#[doc = "      ],"]
18064#[doc = "      \"format\": \"uint64\","]
18065#[doc = "      \"minimum\": 0.0"]
18066#[doc = "    },"]
18067#[doc = "    \"max_gas_burnt\": {"]
18068#[doc = "      \"description\": \"Max amount of gas that can be used, excluding gas attached to promises.\","]
18069#[doc = "      \"allOf\": ["]
18070#[doc = "        {"]
18071#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
18072#[doc = "        }"]
18073#[doc = "      ]"]
18074#[doc = "    },"]
18075#[doc = "    \"max_length_method_name\": {"]
18076#[doc = "      \"description\": \"Max length of any method name (without terminating character).\","]
18077#[doc = "      \"type\": \"integer\","]
18078#[doc = "      \"format\": \"uint64\","]
18079#[doc = "      \"minimum\": 0.0"]
18080#[doc = "    },"]
18081#[doc = "    \"max_length_returned_data\": {"]
18082#[doc = "      \"description\": \"Max length of returned data\","]
18083#[doc = "      \"type\": \"integer\","]
18084#[doc = "      \"format\": \"uint64\","]
18085#[doc = "      \"minimum\": 0.0"]
18086#[doc = "    },"]
18087#[doc = "    \"max_length_storage_key\": {"]
18088#[doc = "      \"description\": \"Max storage key size\","]
18089#[doc = "      \"type\": \"integer\","]
18090#[doc = "      \"format\": \"uint64\","]
18091#[doc = "      \"minimum\": 0.0"]
18092#[doc = "    },"]
18093#[doc = "    \"max_length_storage_value\": {"]
18094#[doc = "      \"description\": \"Max storage value size\","]
18095#[doc = "      \"type\": \"integer\","]
18096#[doc = "      \"format\": \"uint64\","]
18097#[doc = "      \"minimum\": 0.0"]
18098#[doc = "    },"]
18099#[doc = "    \"max_locals_per_contract\": {"]
18100#[doc = "      \"description\": \"If present, stores max number of locals declared globally in one contract\","]
18101#[doc = "      \"type\": ["]
18102#[doc = "        \"integer\","]
18103#[doc = "        \"null\""]
18104#[doc = "      ],"]
18105#[doc = "      \"format\": \"uint64\","]
18106#[doc = "      \"minimum\": 0.0"]
18107#[doc = "    },"]
18108#[doc = "    \"max_memory_pages\": {"]
18109#[doc = "      \"description\": \"What is the maximal memory pages amount is allowed to have for a contract.\","]
18110#[doc = "      \"type\": \"integer\","]
18111#[doc = "      \"format\": \"uint32\","]
18112#[doc = "      \"minimum\": 0.0"]
18113#[doc = "    },"]
18114#[doc = "    \"max_number_bytes_method_names\": {"]
18115#[doc = "      \"description\": \"Max total length of all method names (including terminating character) for a function call\\npermission access key.\","]
18116#[doc = "      \"type\": \"integer\","]
18117#[doc = "      \"format\": \"uint64\","]
18118#[doc = "      \"minimum\": 0.0"]
18119#[doc = "    },"]
18120#[doc = "    \"max_number_input_data_dependencies\": {"]
18121#[doc = "      \"description\": \"Max number of input data dependencies\","]
18122#[doc = "      \"type\": \"integer\","]
18123#[doc = "      \"format\": \"uint64\","]
18124#[doc = "      \"minimum\": 0.0"]
18125#[doc = "    },"]
18126#[doc = "    \"max_number_logs\": {"]
18127#[doc = "      \"description\": \"Maximum number of log entries.\","]
18128#[doc = "      \"type\": \"integer\","]
18129#[doc = "      \"format\": \"uint64\","]
18130#[doc = "      \"minimum\": 0.0"]
18131#[doc = "    },"]
18132#[doc = "    \"max_number_registers\": {"]
18133#[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.\","]
18134#[doc = "      \"type\": \"integer\","]
18135#[doc = "      \"format\": \"uint64\","]
18136#[doc = "      \"minimum\": 0.0"]
18137#[doc = "    },"]
18138#[doc = "    \"max_promises_per_function_call_action\": {"]
18139#[doc = "      \"description\": \"Max number of promises that a function call can create\","]
18140#[doc = "      \"type\": \"integer\","]
18141#[doc = "      \"format\": \"uint64\","]
18142#[doc = "      \"minimum\": 0.0"]
18143#[doc = "    },"]
18144#[doc = "    \"max_receipt_size\": {"]
18145#[doc = "      \"description\": \"Max receipt size\","]
18146#[doc = "      \"type\": \"integer\","]
18147#[doc = "      \"format\": \"uint64\","]
18148#[doc = "      \"minimum\": 0.0"]
18149#[doc = "    },"]
18150#[doc = "    \"max_register_size\": {"]
18151#[doc = "      \"description\": \"Maximum number of bytes that can be stored in a single register.\","]
18152#[doc = "      \"type\": \"integer\","]
18153#[doc = "      \"format\": \"uint64\","]
18154#[doc = "      \"minimum\": 0.0"]
18155#[doc = "    },"]
18156#[doc = "    \"max_stack_height\": {"]
18157#[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.\","]
18158#[doc = "      \"type\": \"integer\","]
18159#[doc = "      \"format\": \"uint32\","]
18160#[doc = "      \"minimum\": 0.0"]
18161#[doc = "    },"]
18162#[doc = "    \"max_tables_per_contract\": {"]
18163#[doc = "      \"description\": \"If present, stores max number of tables declared globally in one contract\","]
18164#[doc = "      \"type\": ["]
18165#[doc = "        \"integer\","]
18166#[doc = "        \"null\""]
18167#[doc = "      ],"]
18168#[doc = "      \"format\": \"uint32\","]
18169#[doc = "      \"minimum\": 0.0"]
18170#[doc = "    },"]
18171#[doc = "    \"max_total_log_length\": {"]
18172#[doc = "      \"description\": \"Maximum total length in bytes of all log messages.\","]
18173#[doc = "      \"type\": \"integer\","]
18174#[doc = "      \"format\": \"uint64\","]
18175#[doc = "      \"minimum\": 0.0"]
18176#[doc = "    },"]
18177#[doc = "    \"max_total_prepaid_gas\": {"]
18178#[doc = "      \"description\": \"Max total prepaid gas for all function call actions per receipt.\","]
18179#[doc = "      \"allOf\": ["]
18180#[doc = "        {"]
18181#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
18182#[doc = "        }"]
18183#[doc = "      ]"]
18184#[doc = "    },"]
18185#[doc = "    \"max_transaction_size\": {"]
18186#[doc = "      \"description\": \"Max transaction size\","]
18187#[doc = "      \"type\": \"integer\","]
18188#[doc = "      \"format\": \"uint64\","]
18189#[doc = "      \"minimum\": 0.0"]
18190#[doc = "    },"]
18191#[doc = "    \"max_yield_payload_size\": {"]
18192#[doc = "      \"description\": \"Maximum number of bytes for payload passed over a yield resume.\","]
18193#[doc = "      \"type\": \"integer\","]
18194#[doc = "      \"format\": \"uint64\","]
18195#[doc = "      \"minimum\": 0.0"]
18196#[doc = "    },"]
18197#[doc = "    \"per_receipt_storage_proof_size_limit\": {"]
18198#[doc = "      \"description\": \"Hard limit on the size of storage proof generated while executing a single receipt.\","]
18199#[doc = "      \"type\": \"integer\","]
18200#[doc = "      \"format\": \"uint\","]
18201#[doc = "      \"minimum\": 0.0"]
18202#[doc = "    },"]
18203#[doc = "    \"registers_memory_limit\": {"]
18204#[doc = "      \"description\": \"Limit of memory used by registers.\","]
18205#[doc = "      \"type\": \"integer\","]
18206#[doc = "      \"format\": \"uint64\","]
18207#[doc = "      \"minimum\": 0.0"]
18208#[doc = "    },"]
18209#[doc = "    \"yield_timeout_length_in_blocks\": {"]
18210#[doc = "      \"description\": \"Number of blocks after which a yielded promise times out.\","]
18211#[doc = "      \"type\": \"integer\","]
18212#[doc = "      \"format\": \"uint64\","]
18213#[doc = "      \"minimum\": 0.0"]
18214#[doc = "    }"]
18215#[doc = "  }"]
18216#[doc = "}"]
18217#[doc = r" ```"]
18218#[doc = r" </details>"]
18219#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18220pub struct LimitConfig {
18221    #[doc = "Whether to enforce account_id well-formed-ness where it wasn't enforced\nhistorically."]
18222    #[serde(default = "defaults::limit_config_account_id_validity_rules_version")]
18223    pub account_id_validity_rules_version: AccountIdValidityRulesVersion,
18224    #[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."]
18225    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18226    pub initial_memory_pages: ::std::option::Option<u32>,
18227    #[doc = "Max number of actions per receipt."]
18228    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18229    pub max_actions_per_receipt: ::std::option::Option<u64>,
18230    #[doc = "Max length of arguments in a function call action."]
18231    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18232    pub max_arguments_length: ::std::option::Option<u64>,
18233    #[doc = "Max contract size"]
18234    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18235    pub max_contract_size: ::std::option::Option<u64>,
18236    #[doc = "If present, stores max number of elements in a single contract's table"]
18237    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18238    pub max_elements_per_contract_table: ::std::option::Option<u32>,
18239    #[doc = "If present, stores max number of functions in one contract"]
18240    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18241    pub max_functions_number_per_contract: ::std::option::Option<u64>,
18242    #[doc = "Max amount of gas that can be used, excluding gas attached to promises."]
18243    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18244    pub max_gas_burnt: ::std::option::Option<NearGas>,
18245    #[doc = "Max length of any method name (without terminating character)."]
18246    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18247    pub max_length_method_name: ::std::option::Option<u64>,
18248    #[doc = "Max length of returned data"]
18249    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18250    pub max_length_returned_data: ::std::option::Option<u64>,
18251    #[doc = "Max storage key size"]
18252    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18253    pub max_length_storage_key: ::std::option::Option<u64>,
18254    #[doc = "Max storage value size"]
18255    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18256    pub max_length_storage_value: ::std::option::Option<u64>,
18257    #[doc = "If present, stores max number of locals declared globally in one contract"]
18258    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18259    pub max_locals_per_contract: ::std::option::Option<u64>,
18260    #[doc = "What is the maximal memory pages amount is allowed to have for a contract."]
18261    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18262    pub max_memory_pages: ::std::option::Option<u32>,
18263    #[doc = "Max total length of all method names (including terminating character) for a function call\npermission access key."]
18264    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18265    pub max_number_bytes_method_names: ::std::option::Option<u64>,
18266    #[doc = "Max number of input data dependencies"]
18267    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18268    pub max_number_input_data_dependencies: ::std::option::Option<u64>,
18269    #[doc = "Maximum number of log entries."]
18270    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18271    pub max_number_logs: ::std::option::Option<u64>,
18272    #[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."]
18273    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18274    pub max_number_registers: ::std::option::Option<u64>,
18275    #[doc = "Max number of promises that a function call can create"]
18276    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18277    pub max_promises_per_function_call_action: ::std::option::Option<u64>,
18278    #[doc = "Max receipt size"]
18279    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18280    pub max_receipt_size: ::std::option::Option<u64>,
18281    #[doc = "Maximum number of bytes that can be stored in a single register."]
18282    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18283    pub max_register_size: ::std::option::Option<u64>,
18284    #[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."]
18285    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18286    pub max_stack_height: ::std::option::Option<u32>,
18287    #[doc = "If present, stores max number of tables declared globally in one contract"]
18288    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18289    pub max_tables_per_contract: ::std::option::Option<u32>,
18290    #[doc = "Maximum total length in bytes of all log messages."]
18291    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18292    pub max_total_log_length: ::std::option::Option<u64>,
18293    #[doc = "Max total prepaid gas for all function call actions per receipt."]
18294    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18295    pub max_total_prepaid_gas: ::std::option::Option<NearGas>,
18296    #[doc = "Max transaction size"]
18297    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18298    pub max_transaction_size: ::std::option::Option<u64>,
18299    #[doc = "Maximum number of bytes for payload passed over a yield resume."]
18300    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18301    pub max_yield_payload_size: ::std::option::Option<u64>,
18302    #[doc = "Hard limit on the size of storage proof generated while executing a single receipt."]
18303    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18304    pub per_receipt_storage_proof_size_limit: ::std::option::Option<u32>,
18305    #[doc = "Limit of memory used by registers."]
18306    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18307    pub registers_memory_limit: ::std::option::Option<u64>,
18308    #[doc = "Number of blocks after which a yielded promise times out."]
18309    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18310    pub yield_timeout_length_in_blocks: ::std::option::Option<u64>,
18311}
18312impl ::std::convert::From<&LimitConfig> for LimitConfig {
18313    fn from(value: &LimitConfig) -> Self {
18314        value.clone()
18315    }
18316}
18317impl ::std::default::Default for LimitConfig {
18318    fn default() -> Self {
18319        Self {
18320            account_id_validity_rules_version:
18321                defaults::limit_config_account_id_validity_rules_version(),
18322            initial_memory_pages: Default::default(),
18323            max_actions_per_receipt: Default::default(),
18324            max_arguments_length: Default::default(),
18325            max_contract_size: Default::default(),
18326            max_elements_per_contract_table: Default::default(),
18327            max_functions_number_per_contract: Default::default(),
18328            max_gas_burnt: Default::default(),
18329            max_length_method_name: Default::default(),
18330            max_length_returned_data: Default::default(),
18331            max_length_storage_key: Default::default(),
18332            max_length_storage_value: Default::default(),
18333            max_locals_per_contract: Default::default(),
18334            max_memory_pages: Default::default(),
18335            max_number_bytes_method_names: Default::default(),
18336            max_number_input_data_dependencies: Default::default(),
18337            max_number_logs: Default::default(),
18338            max_number_registers: Default::default(),
18339            max_promises_per_function_call_action: Default::default(),
18340            max_receipt_size: Default::default(),
18341            max_register_size: Default::default(),
18342            max_stack_height: Default::default(),
18343            max_tables_per_contract: Default::default(),
18344            max_total_log_length: Default::default(),
18345            max_total_prepaid_gas: Default::default(),
18346            max_transaction_size: Default::default(),
18347            max_yield_payload_size: Default::default(),
18348            per_receipt_storage_proof_size_limit: Default::default(),
18349            registers_memory_limit: Default::default(),
18350            yield_timeout_length_in_blocks: Default::default(),
18351        }
18352    }
18353}
18354#[doc = "`LogSummaryStyle`"]
18355#[doc = r""]
18356#[doc = r" <details><summary>JSON schema</summary>"]
18357#[doc = r""]
18358#[doc = r" ```json"]
18359#[doc = "{"]
18360#[doc = "  \"type\": \"string\","]
18361#[doc = "  \"enum\": ["]
18362#[doc = "    \"plain\","]
18363#[doc = "    \"colored\""]
18364#[doc = "  ]"]
18365#[doc = "}"]
18366#[doc = r" ```"]
18367#[doc = r" </details>"]
18368#[derive(
18369    :: serde :: Deserialize,
18370    :: serde :: Serialize,
18371    Clone,
18372    Copy,
18373    Debug,
18374    Eq,
18375    Hash,
18376    Ord,
18377    PartialEq,
18378    PartialOrd,
18379)]
18380pub enum LogSummaryStyle {
18381    #[serde(rename = "plain")]
18382    Plain,
18383    #[serde(rename = "colored")]
18384    Colored,
18385}
18386impl ::std::convert::From<&Self> for LogSummaryStyle {
18387    fn from(value: &LogSummaryStyle) -> Self {
18388        value.clone()
18389    }
18390}
18391impl ::std::fmt::Display for LogSummaryStyle {
18392    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18393        match *self {
18394            Self::Plain => f.write_str("plain"),
18395            Self::Colored => f.write_str("colored"),
18396        }
18397    }
18398}
18399impl ::std::str::FromStr for LogSummaryStyle {
18400    type Err = self::error::ConversionError;
18401    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18402        match value {
18403            "plain" => Ok(Self::Plain),
18404            "colored" => Ok(Self::Colored),
18405            _ => Err("invalid value".into()),
18406        }
18407    }
18408}
18409impl ::std::convert::TryFrom<&str> for LogSummaryStyle {
18410    type Error = self::error::ConversionError;
18411    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18412        value.parse()
18413    }
18414}
18415impl ::std::convert::TryFrom<&::std::string::String> for LogSummaryStyle {
18416    type Error = self::error::ConversionError;
18417    fn try_from(
18418        value: &::std::string::String,
18419    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18420        value.parse()
18421    }
18422}
18423impl ::std::convert::TryFrom<::std::string::String> for LogSummaryStyle {
18424    type Error = self::error::ConversionError;
18425    fn try_from(
18426        value: ::std::string::String,
18427    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18428        value.parse()
18429    }
18430}
18431#[doc = "`MerklePathItem`"]
18432#[doc = r""]
18433#[doc = r" <details><summary>JSON schema</summary>"]
18434#[doc = r""]
18435#[doc = r" ```json"]
18436#[doc = "{"]
18437#[doc = "  \"type\": \"object\","]
18438#[doc = "  \"required\": ["]
18439#[doc = "    \"direction\","]
18440#[doc = "    \"hash\""]
18441#[doc = "  ],"]
18442#[doc = "  \"properties\": {"]
18443#[doc = "    \"direction\": {"]
18444#[doc = "      \"$ref\": \"#/components/schemas/Direction\""]
18445#[doc = "    },"]
18446#[doc = "    \"hash\": {"]
18447#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
18448#[doc = "    }"]
18449#[doc = "  }"]
18450#[doc = "}"]
18451#[doc = r" ```"]
18452#[doc = r" </details>"]
18453#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18454pub struct MerklePathItem {
18455    pub direction: Direction,
18456    pub hash: CryptoHash,
18457}
18458impl ::std::convert::From<&MerklePathItem> for MerklePathItem {
18459    fn from(value: &MerklePathItem) -> Self {
18460        value.clone()
18461    }
18462}
18463#[doc = "`MethodResolveError`"]
18464#[doc = r""]
18465#[doc = r" <details><summary>JSON schema</summary>"]
18466#[doc = r""]
18467#[doc = r" ```json"]
18468#[doc = "{"]
18469#[doc = "  \"type\": \"string\","]
18470#[doc = "  \"enum\": ["]
18471#[doc = "    \"MethodEmptyName\","]
18472#[doc = "    \"MethodNotFound\","]
18473#[doc = "    \"MethodInvalidSignature\""]
18474#[doc = "  ]"]
18475#[doc = "}"]
18476#[doc = r" ```"]
18477#[doc = r" </details>"]
18478#[derive(
18479    :: serde :: Deserialize,
18480    :: serde :: Serialize,
18481    Clone,
18482    Copy,
18483    Debug,
18484    Eq,
18485    Hash,
18486    Ord,
18487    PartialEq,
18488    PartialOrd,
18489    thiserror::Error,
18490)]
18491pub enum MethodResolveError {
18492    MethodEmptyName,
18493    MethodNotFound,
18494    MethodInvalidSignature,
18495}
18496impl ::std::convert::From<&Self> for MethodResolveError {
18497    fn from(value: &MethodResolveError) -> Self {
18498        value.clone()
18499    }
18500}
18501impl ::std::fmt::Display for MethodResolveError {
18502    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18503        match *self {
18504            Self::MethodEmptyName => f.write_str("MethodEmptyName"),
18505            Self::MethodNotFound => f.write_str("MethodNotFound"),
18506            Self::MethodInvalidSignature => f.write_str("MethodInvalidSignature"),
18507        }
18508    }
18509}
18510impl ::std::str::FromStr for MethodResolveError {
18511    type Err = self::error::ConversionError;
18512    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18513        match value {
18514            "MethodEmptyName" => Ok(Self::MethodEmptyName),
18515            "MethodNotFound" => Ok(Self::MethodNotFound),
18516            "MethodInvalidSignature" => Ok(Self::MethodInvalidSignature),
18517            _ => Err("invalid value".into()),
18518        }
18519    }
18520}
18521impl ::std::convert::TryFrom<&str> for MethodResolveError {
18522    type Error = self::error::ConversionError;
18523    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18524        value.parse()
18525    }
18526}
18527impl ::std::convert::TryFrom<&::std::string::String> for MethodResolveError {
18528    type Error = self::error::ConversionError;
18529    fn try_from(
18530        value: &::std::string::String,
18531    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18532        value.parse()
18533    }
18534}
18535impl ::std::convert::TryFrom<::std::string::String> for MethodResolveError {
18536    type Error = self::error::ConversionError;
18537    fn try_from(
18538        value: ::std::string::String,
18539    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18540        value.parse()
18541    }
18542}
18543#[doc = "`MissingTrieValue`"]
18544#[doc = r""]
18545#[doc = r" <details><summary>JSON schema</summary>"]
18546#[doc = r""]
18547#[doc = r" ```json"]
18548#[doc = "{"]
18549#[doc = "  \"type\": \"object\","]
18550#[doc = "  \"required\": ["]
18551#[doc = "    \"context\","]
18552#[doc = "    \"hash\""]
18553#[doc = "  ],"]
18554#[doc = "  \"properties\": {"]
18555#[doc = "    \"context\": {"]
18556#[doc = "      \"$ref\": \"#/components/schemas/MissingTrieValueContext\""]
18557#[doc = "    },"]
18558#[doc = "    \"hash\": {"]
18559#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
18560#[doc = "    }"]
18561#[doc = "  }"]
18562#[doc = "}"]
18563#[doc = r" ```"]
18564#[doc = r" </details>"]
18565#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18566pub struct MissingTrieValue {
18567    pub context: MissingTrieValueContext,
18568    pub hash: CryptoHash,
18569}
18570impl ::std::convert::From<&MissingTrieValue> for MissingTrieValue {
18571    fn from(value: &MissingTrieValue) -> Self {
18572        value.clone()
18573    }
18574}
18575#[doc = "Contexts in which `StorageError::MissingTrieValue` error might occur."]
18576#[doc = r""]
18577#[doc = r" <details><summary>JSON schema</summary>"]
18578#[doc = r""]
18579#[doc = r" ```json"]
18580#[doc = "{"]
18581#[doc = "  \"description\": \"Contexts in which `StorageError::MissingTrieValue` error might occur.\","]
18582#[doc = "  \"oneOf\": ["]
18583#[doc = "    {"]
18584#[doc = "      \"description\": \"Missing trie value when reading from TrieIterator.\","]
18585#[doc = "      \"type\": \"string\","]
18586#[doc = "      \"enum\": ["]
18587#[doc = "        \"TrieIterator\""]
18588#[doc = "      ]"]
18589#[doc = "    },"]
18590#[doc = "    {"]
18591#[doc = "      \"description\": \"Missing trie value when reading from TriePrefetchingStorage.\","]
18592#[doc = "      \"type\": \"string\","]
18593#[doc = "      \"enum\": ["]
18594#[doc = "        \"TriePrefetchingStorage\""]
18595#[doc = "      ]"]
18596#[doc = "    },"]
18597#[doc = "    {"]
18598#[doc = "      \"description\": \"Missing trie value when reading from TrieMemoryPartialStorage.\","]
18599#[doc = "      \"type\": \"string\","]
18600#[doc = "      \"enum\": ["]
18601#[doc = "        \"TrieMemoryPartialStorage\""]
18602#[doc = "      ]"]
18603#[doc = "    },"]
18604#[doc = "    {"]
18605#[doc = "      \"description\": \"Missing trie value when reading from TrieStorage.\","]
18606#[doc = "      \"type\": \"string\","]
18607#[doc = "      \"enum\": ["]
18608#[doc = "        \"TrieStorage\""]
18609#[doc = "      ]"]
18610#[doc = "    }"]
18611#[doc = "  ]"]
18612#[doc = "}"]
18613#[doc = r" ```"]
18614#[doc = r" </details>"]
18615#[derive(
18616    :: serde :: Deserialize,
18617    :: serde :: Serialize,
18618    Clone,
18619    Copy,
18620    Debug,
18621    Eq,
18622    Hash,
18623    Ord,
18624    PartialEq,
18625    PartialOrd,
18626)]
18627pub enum MissingTrieValueContext {
18628    #[doc = "Missing trie value when reading from TrieIterator."]
18629    TrieIterator,
18630    #[doc = "Missing trie value when reading from TriePrefetchingStorage."]
18631    TriePrefetchingStorage,
18632    #[doc = "Missing trie value when reading from TrieMemoryPartialStorage."]
18633    TrieMemoryPartialStorage,
18634    #[doc = "Missing trie value when reading from TrieStorage."]
18635    TrieStorage,
18636}
18637impl ::std::convert::From<&Self> for MissingTrieValueContext {
18638    fn from(value: &MissingTrieValueContext) -> Self {
18639        value.clone()
18640    }
18641}
18642impl ::std::fmt::Display for MissingTrieValueContext {
18643    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18644        match *self {
18645            Self::TrieIterator => f.write_str("TrieIterator"),
18646            Self::TriePrefetchingStorage => f.write_str("TriePrefetchingStorage"),
18647            Self::TrieMemoryPartialStorage => f.write_str("TrieMemoryPartialStorage"),
18648            Self::TrieStorage => f.write_str("TrieStorage"),
18649        }
18650    }
18651}
18652impl ::std::str::FromStr for MissingTrieValueContext {
18653    type Err = self::error::ConversionError;
18654    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18655        match value {
18656            "TrieIterator" => Ok(Self::TrieIterator),
18657            "TriePrefetchingStorage" => Ok(Self::TriePrefetchingStorage),
18658            "TrieMemoryPartialStorage" => Ok(Self::TrieMemoryPartialStorage),
18659            "TrieStorage" => Ok(Self::TrieStorage),
18660            _ => Err("invalid value".into()),
18661        }
18662    }
18663}
18664impl ::std::convert::TryFrom<&str> for MissingTrieValueContext {
18665    type Error = self::error::ConversionError;
18666    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18667        value.parse()
18668    }
18669}
18670impl ::std::convert::TryFrom<&::std::string::String> for MissingTrieValueContext {
18671    type Error = self::error::ConversionError;
18672    fn try_from(
18673        value: &::std::string::String,
18674    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18675        value.parse()
18676    }
18677}
18678impl ::std::convert::TryFrom<::std::string::String> for MissingTrieValueContext {
18679    type Error = self::error::ConversionError;
18680    fn try_from(
18681        value: ::std::string::String,
18682    ) -> ::std::result::Result<Self, self::error::ConversionError> {
18683        value.parse()
18684    }
18685}
18686#[doc = "`MutableConfigValue`"]
18687#[doc = r""]
18688#[doc = r" <details><summary>JSON schema</summary>"]
18689#[doc = r""]
18690#[doc = r" ```json"]
18691#[doc = "{"]
18692#[doc = "  \"type\": \"string\""]
18693#[doc = "}"]
18694#[doc = r" ```"]
18695#[doc = r" </details>"]
18696#[derive(
18697    :: serde :: Deserialize,
18698    :: serde :: Serialize,
18699    Clone,
18700    Debug,
18701    Eq,
18702    Hash,
18703    Ord,
18704    PartialEq,
18705    PartialOrd,
18706)]
18707#[serde(transparent)]
18708pub struct MutableConfigValue(pub ::std::string::String);
18709impl ::std::ops::Deref for MutableConfigValue {
18710    type Target = ::std::string::String;
18711    fn deref(&self) -> &::std::string::String {
18712        &self.0
18713    }
18714}
18715impl ::std::convert::From<MutableConfigValue> for ::std::string::String {
18716    fn from(value: MutableConfigValue) -> Self {
18717        value.0
18718    }
18719}
18720impl ::std::convert::From<&MutableConfigValue> for MutableConfigValue {
18721    fn from(value: &MutableConfigValue) -> Self {
18722        value.clone()
18723    }
18724}
18725impl ::std::convert::From<::std::string::String> for MutableConfigValue {
18726    fn from(value: ::std::string::String) -> Self {
18727        Self(value)
18728    }
18729}
18730impl ::std::str::FromStr for MutableConfigValue {
18731    type Err = ::std::convert::Infallible;
18732    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
18733        Ok(Self(value.to_string()))
18734    }
18735}
18736impl ::std::fmt::Display for MutableConfigValue {
18737    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18738        self.0.fmt(f)
18739    }
18740}
18741#[doc = "`NetworkInfoView`"]
18742#[doc = r""]
18743#[doc = r" <details><summary>JSON schema</summary>"]
18744#[doc = r""]
18745#[doc = r" ```json"]
18746#[doc = "{"]
18747#[doc = "  \"type\": \"object\","]
18748#[doc = "  \"required\": ["]
18749#[doc = "    \"connected_peers\","]
18750#[doc = "    \"known_producers\","]
18751#[doc = "    \"num_connected_peers\","]
18752#[doc = "    \"peer_max_count\","]
18753#[doc = "    \"tier1_accounts_data\","]
18754#[doc = "    \"tier1_accounts_keys\","]
18755#[doc = "    \"tier1_connections\""]
18756#[doc = "  ],"]
18757#[doc = "  \"properties\": {"]
18758#[doc = "    \"connected_peers\": {"]
18759#[doc = "      \"type\": \"array\","]
18760#[doc = "      \"items\": {"]
18761#[doc = "        \"$ref\": \"#/components/schemas/PeerInfoView\""]
18762#[doc = "      }"]
18763#[doc = "    },"]
18764#[doc = "    \"known_producers\": {"]
18765#[doc = "      \"type\": \"array\","]
18766#[doc = "      \"items\": {"]
18767#[doc = "        \"$ref\": \"#/components/schemas/KnownProducerView\""]
18768#[doc = "      }"]
18769#[doc = "    },"]
18770#[doc = "    \"num_connected_peers\": {"]
18771#[doc = "      \"type\": \"integer\","]
18772#[doc = "      \"format\": \"uint\","]
18773#[doc = "      \"minimum\": 0.0"]
18774#[doc = "    },"]
18775#[doc = "    \"peer_max_count\": {"]
18776#[doc = "      \"type\": \"integer\","]
18777#[doc = "      \"format\": \"uint32\","]
18778#[doc = "      \"minimum\": 0.0"]
18779#[doc = "    },"]
18780#[doc = "    \"tier1_accounts_data\": {"]
18781#[doc = "      \"type\": \"array\","]
18782#[doc = "      \"items\": {"]
18783#[doc = "        \"$ref\": \"#/components/schemas/AccountDataView\""]
18784#[doc = "      }"]
18785#[doc = "    },"]
18786#[doc = "    \"tier1_accounts_keys\": {"]
18787#[doc = "      \"type\": \"array\","]
18788#[doc = "      \"items\": {"]
18789#[doc = "        \"$ref\": \"#/components/schemas/PublicKey\""]
18790#[doc = "      }"]
18791#[doc = "    },"]
18792#[doc = "    \"tier1_connections\": {"]
18793#[doc = "      \"type\": \"array\","]
18794#[doc = "      \"items\": {"]
18795#[doc = "        \"$ref\": \"#/components/schemas/PeerInfoView\""]
18796#[doc = "      }"]
18797#[doc = "    }"]
18798#[doc = "  }"]
18799#[doc = "}"]
18800#[doc = r" ```"]
18801#[doc = r" </details>"]
18802#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18803pub struct NetworkInfoView {
18804    pub connected_peers: ::std::vec::Vec<PeerInfoView>,
18805    pub known_producers: ::std::vec::Vec<KnownProducerView>,
18806    pub num_connected_peers: u32,
18807    pub peer_max_count: u32,
18808    pub tier1_accounts_data: ::std::vec::Vec<AccountDataView>,
18809    pub tier1_accounts_keys: ::std::vec::Vec<PublicKey>,
18810    pub tier1_connections: ::std::vec::Vec<PeerInfoView>,
18811}
18812impl ::std::convert::From<&NetworkInfoView> for NetworkInfoView {
18813    fn from(value: &NetworkInfoView) -> Self {
18814        value.clone()
18815    }
18816}
18817#[doc = "`NextEpochValidatorInfo`"]
18818#[doc = r""]
18819#[doc = r" <details><summary>JSON schema</summary>"]
18820#[doc = r""]
18821#[doc = r" ```json"]
18822#[doc = "{"]
18823#[doc = "  \"type\": \"object\","]
18824#[doc = "  \"required\": ["]
18825#[doc = "    \"account_id\","]
18826#[doc = "    \"public_key\","]
18827#[doc = "    \"shards\","]
18828#[doc = "    \"stake\""]
18829#[doc = "  ],"]
18830#[doc = "  \"properties\": {"]
18831#[doc = "    \"account_id\": {"]
18832#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
18833#[doc = "    },"]
18834#[doc = "    \"public_key\": {"]
18835#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
18836#[doc = "    },"]
18837#[doc = "    \"shards\": {"]
18838#[doc = "      \"type\": \"array\","]
18839#[doc = "      \"items\": {"]
18840#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
18841#[doc = "      }"]
18842#[doc = "    },"]
18843#[doc = "    \"stake\": {"]
18844#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
18845#[doc = "    }"]
18846#[doc = "  }"]
18847#[doc = "}"]
18848#[doc = r" ```"]
18849#[doc = r" </details>"]
18850#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18851pub struct NextEpochValidatorInfo {
18852    pub account_id: AccountId,
18853    pub public_key: PublicKey,
18854    pub shards: ::std::vec::Vec<ShardId>,
18855    pub stake: NearToken,
18856}
18857impl ::std::convert::From<&NextEpochValidatorInfo> for NextEpochValidatorInfo {
18858    fn from(value: &NextEpochValidatorInfo) -> Self {
18859        value.clone()
18860    }
18861}
18862#[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."]
18863#[doc = r""]
18864#[doc = r" <details><summary>JSON schema</summary>"]
18865#[doc = r""]
18866#[doc = r" ```json"]
18867#[doc = "{"]
18868#[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.\","]
18869#[doc = "  \"oneOf\": ["]
18870#[doc = "    {"]
18871#[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>.\","]
18872#[doc = "      \"type\": \"object\","]
18873#[doc = "      \"required\": ["]
18874#[doc = "        \"CreateAccount\""]
18875#[doc = "      ],"]
18876#[doc = "      \"properties\": {"]
18877#[doc = "        \"CreateAccount\": {"]
18878#[doc = "          \"$ref\": \"#/components/schemas/CreateAccountAction\""]
18879#[doc = "        }"]
18880#[doc = "      },"]
18881#[doc = "      \"additionalProperties\": false"]
18882#[doc = "    },"]
18883#[doc = "    {"]
18884#[doc = "      \"description\": \"Sets a Wasm code to a receiver_id\","]
18885#[doc = "      \"type\": \"object\","]
18886#[doc = "      \"required\": ["]
18887#[doc = "        \"DeployContract\""]
18888#[doc = "      ],"]
18889#[doc = "      \"properties\": {"]
18890#[doc = "        \"DeployContract\": {"]
18891#[doc = "          \"$ref\": \"#/components/schemas/DeployContractAction\""]
18892#[doc = "        }"]
18893#[doc = "      },"]
18894#[doc = "      \"additionalProperties\": false"]
18895#[doc = "    },"]
18896#[doc = "    {"]
18897#[doc = "      \"type\": \"object\","]
18898#[doc = "      \"required\": ["]
18899#[doc = "        \"FunctionCall\""]
18900#[doc = "      ],"]
18901#[doc = "      \"properties\": {"]
18902#[doc = "        \"FunctionCall\": {"]
18903#[doc = "          \"$ref\": \"#/components/schemas/FunctionCallAction\""]
18904#[doc = "        }"]
18905#[doc = "      },"]
18906#[doc = "      \"additionalProperties\": false"]
18907#[doc = "    },"]
18908#[doc = "    {"]
18909#[doc = "      \"type\": \"object\","]
18910#[doc = "      \"required\": ["]
18911#[doc = "        \"Transfer\""]
18912#[doc = "      ],"]
18913#[doc = "      \"properties\": {"]
18914#[doc = "        \"Transfer\": {"]
18915#[doc = "          \"$ref\": \"#/components/schemas/TransferAction\""]
18916#[doc = "        }"]
18917#[doc = "      },"]
18918#[doc = "      \"additionalProperties\": false"]
18919#[doc = "    },"]
18920#[doc = "    {"]
18921#[doc = "      \"type\": \"object\","]
18922#[doc = "      \"required\": ["]
18923#[doc = "        \"Stake\""]
18924#[doc = "      ],"]
18925#[doc = "      \"properties\": {"]
18926#[doc = "        \"Stake\": {"]
18927#[doc = "          \"$ref\": \"#/components/schemas/StakeAction\""]
18928#[doc = "        }"]
18929#[doc = "      },"]
18930#[doc = "      \"additionalProperties\": false"]
18931#[doc = "    },"]
18932#[doc = "    {"]
18933#[doc = "      \"type\": \"object\","]
18934#[doc = "      \"required\": ["]
18935#[doc = "        \"AddKey\""]
18936#[doc = "      ],"]
18937#[doc = "      \"properties\": {"]
18938#[doc = "        \"AddKey\": {"]
18939#[doc = "          \"$ref\": \"#/components/schemas/AddKeyAction\""]
18940#[doc = "        }"]
18941#[doc = "      },"]
18942#[doc = "      \"additionalProperties\": false"]
18943#[doc = "    },"]
18944#[doc = "    {"]
18945#[doc = "      \"type\": \"object\","]
18946#[doc = "      \"required\": ["]
18947#[doc = "        \"DeleteKey\""]
18948#[doc = "      ],"]
18949#[doc = "      \"properties\": {"]
18950#[doc = "        \"DeleteKey\": {"]
18951#[doc = "          \"$ref\": \"#/components/schemas/DeleteKeyAction\""]
18952#[doc = "        }"]
18953#[doc = "      },"]
18954#[doc = "      \"additionalProperties\": false"]
18955#[doc = "    },"]
18956#[doc = "    {"]
18957#[doc = "      \"type\": \"object\","]
18958#[doc = "      \"required\": ["]
18959#[doc = "        \"DeleteAccount\""]
18960#[doc = "      ],"]
18961#[doc = "      \"properties\": {"]
18962#[doc = "        \"DeleteAccount\": {"]
18963#[doc = "          \"$ref\": \"#/components/schemas/DeleteAccountAction\""]
18964#[doc = "        }"]
18965#[doc = "      },"]
18966#[doc = "      \"additionalProperties\": false"]
18967#[doc = "    },"]
18968#[doc = "    {"]
18969#[doc = "      \"type\": \"object\","]
18970#[doc = "      \"required\": ["]
18971#[doc = "        \"DeployGlobalContract\""]
18972#[doc = "      ],"]
18973#[doc = "      \"properties\": {"]
18974#[doc = "        \"DeployGlobalContract\": {"]
18975#[doc = "          \"$ref\": \"#/components/schemas/DeployGlobalContractAction\""]
18976#[doc = "        }"]
18977#[doc = "      },"]
18978#[doc = "      \"additionalProperties\": false"]
18979#[doc = "    },"]
18980#[doc = "    {"]
18981#[doc = "      \"type\": \"object\","]
18982#[doc = "      \"required\": ["]
18983#[doc = "        \"UseGlobalContract\""]
18984#[doc = "      ],"]
18985#[doc = "      \"properties\": {"]
18986#[doc = "        \"UseGlobalContract\": {"]
18987#[doc = "          \"$ref\": \"#/components/schemas/UseGlobalContractAction\""]
18988#[doc = "        }"]
18989#[doc = "      },"]
18990#[doc = "      \"additionalProperties\": false"]
18991#[doc = "    },"]
18992#[doc = "    {"]
18993#[doc = "      \"type\": \"object\","]
18994#[doc = "      \"required\": ["]
18995#[doc = "        \"DeterministicStateInit\""]
18996#[doc = "      ],"]
18997#[doc = "      \"properties\": {"]
18998#[doc = "        \"DeterministicStateInit\": {"]
18999#[doc = "          \"$ref\": \"#/components/schemas/DeterministicStateInitAction\""]
19000#[doc = "        }"]
19001#[doc = "      },"]
19002#[doc = "      \"additionalProperties\": false"]
19003#[doc = "    },"]
19004#[doc = "    {"]
19005#[doc = "      \"type\": \"object\","]
19006#[doc = "      \"required\": ["]
19007#[doc = "        \"AddGasKey\""]
19008#[doc = "      ],"]
19009#[doc = "      \"properties\": {"]
19010#[doc = "        \"AddGasKey\": {"]
19011#[doc = "          \"$ref\": \"#/components/schemas/AddGasKeyAction\""]
19012#[doc = "        }"]
19013#[doc = "      },"]
19014#[doc = "      \"additionalProperties\": false"]
19015#[doc = "    },"]
19016#[doc = "    {"]
19017#[doc = "      \"type\": \"object\","]
19018#[doc = "      \"required\": ["]
19019#[doc = "        \"DeleteGasKey\""]
19020#[doc = "      ],"]
19021#[doc = "      \"properties\": {"]
19022#[doc = "        \"DeleteGasKey\": {"]
19023#[doc = "          \"$ref\": \"#/components/schemas/DeleteGasKeyAction\""]
19024#[doc = "        }"]
19025#[doc = "      },"]
19026#[doc = "      \"additionalProperties\": false"]
19027#[doc = "    },"]
19028#[doc = "    {"]
19029#[doc = "      \"type\": \"object\","]
19030#[doc = "      \"required\": ["]
19031#[doc = "        \"TransferToGasKey\""]
19032#[doc = "      ],"]
19033#[doc = "      \"properties\": {"]
19034#[doc = "        \"TransferToGasKey\": {"]
19035#[doc = "          \"$ref\": \"#/components/schemas/TransferToGasKeyAction\""]
19036#[doc = "        }"]
19037#[doc = "      },"]
19038#[doc = "      \"additionalProperties\": false"]
19039#[doc = "    }"]
19040#[doc = "  ]"]
19041#[doc = "}"]
19042#[doc = r" ```"]
19043#[doc = r" </details>"]
19044#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19045pub enum NonDelegateAction {
19046    #[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>."]
19047    CreateAccount(CreateAccountAction),
19048    #[doc = "Sets a Wasm code to a receiver_id"]
19049    DeployContract(DeployContractAction),
19050    FunctionCall(FunctionCallAction),
19051    Transfer(TransferAction),
19052    Stake(StakeAction),
19053    AddKey(AddKeyAction),
19054    DeleteKey(DeleteKeyAction),
19055    DeleteAccount(DeleteAccountAction),
19056    DeployGlobalContract(DeployGlobalContractAction),
19057    UseGlobalContract(UseGlobalContractAction),
19058    DeterministicStateInit(DeterministicStateInitAction),
19059    AddGasKey(AddGasKeyAction),
19060    DeleteGasKey(DeleteGasKeyAction),
19061    TransferToGasKey(TransferToGasKeyAction),
19062}
19063impl ::std::convert::From<&Self> for NonDelegateAction {
19064    fn from(value: &NonDelegateAction) -> Self {
19065        value.clone()
19066    }
19067}
19068impl ::std::convert::From<CreateAccountAction> for NonDelegateAction {
19069    fn from(value: CreateAccountAction) -> Self {
19070        Self::CreateAccount(value)
19071    }
19072}
19073impl ::std::convert::From<DeployContractAction> for NonDelegateAction {
19074    fn from(value: DeployContractAction) -> Self {
19075        Self::DeployContract(value)
19076    }
19077}
19078impl ::std::convert::From<FunctionCallAction> for NonDelegateAction {
19079    fn from(value: FunctionCallAction) -> Self {
19080        Self::FunctionCall(value)
19081    }
19082}
19083impl ::std::convert::From<TransferAction> for NonDelegateAction {
19084    fn from(value: TransferAction) -> Self {
19085        Self::Transfer(value)
19086    }
19087}
19088impl ::std::convert::From<StakeAction> for NonDelegateAction {
19089    fn from(value: StakeAction) -> Self {
19090        Self::Stake(value)
19091    }
19092}
19093impl ::std::convert::From<AddKeyAction> for NonDelegateAction {
19094    fn from(value: AddKeyAction) -> Self {
19095        Self::AddKey(value)
19096    }
19097}
19098impl ::std::convert::From<DeleteKeyAction> for NonDelegateAction {
19099    fn from(value: DeleteKeyAction) -> Self {
19100        Self::DeleteKey(value)
19101    }
19102}
19103impl ::std::convert::From<DeleteAccountAction> for NonDelegateAction {
19104    fn from(value: DeleteAccountAction) -> Self {
19105        Self::DeleteAccount(value)
19106    }
19107}
19108impl ::std::convert::From<DeployGlobalContractAction> for NonDelegateAction {
19109    fn from(value: DeployGlobalContractAction) -> Self {
19110        Self::DeployGlobalContract(value)
19111    }
19112}
19113impl ::std::convert::From<UseGlobalContractAction> for NonDelegateAction {
19114    fn from(value: UseGlobalContractAction) -> Self {
19115        Self::UseGlobalContract(value)
19116    }
19117}
19118impl ::std::convert::From<DeterministicStateInitAction> for NonDelegateAction {
19119    fn from(value: DeterministicStateInitAction) -> Self {
19120        Self::DeterministicStateInit(value)
19121    }
19122}
19123impl ::std::convert::From<AddGasKeyAction> for NonDelegateAction {
19124    fn from(value: AddGasKeyAction) -> Self {
19125        Self::AddGasKey(value)
19126    }
19127}
19128impl ::std::convert::From<DeleteGasKeyAction> for NonDelegateAction {
19129    fn from(value: DeleteGasKeyAction) -> Self {
19130        Self::DeleteGasKey(value)
19131    }
19132}
19133impl ::std::convert::From<TransferToGasKeyAction> for NonDelegateAction {
19134    fn from(value: TransferToGasKeyAction) -> Self {
19135        Self::TransferToGasKey(value)
19136    }
19137}
19138#[doc = "Peer id is the public key."]
19139#[doc = r""]
19140#[doc = r" <details><summary>JSON schema</summary>"]
19141#[doc = r""]
19142#[doc = r" ```json"]
19143#[doc = "{"]
19144#[doc = "  \"description\": \"Peer id is the public key.\","]
19145#[doc = "  \"allOf\": ["]
19146#[doc = "    {"]
19147#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
19148#[doc = "    }"]
19149#[doc = "  ]"]
19150#[doc = "}"]
19151#[doc = r" ```"]
19152#[doc = r" </details>"]
19153#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19154#[serde(transparent)]
19155pub struct PeerId(pub PublicKey);
19156impl ::std::ops::Deref for PeerId {
19157    type Target = PublicKey;
19158    fn deref(&self) -> &PublicKey {
19159        &self.0
19160    }
19161}
19162impl ::std::convert::From<PeerId> for PublicKey {
19163    fn from(value: PeerId) -> Self {
19164        value.0
19165    }
19166}
19167impl ::std::convert::From<&PeerId> for PeerId {
19168    fn from(value: &PeerId) -> Self {
19169        value.clone()
19170    }
19171}
19172impl ::std::convert::From<PublicKey> for PeerId {
19173    fn from(value: PublicKey) -> Self {
19174        Self(value)
19175    }
19176}
19177impl ::std::str::FromStr for PeerId {
19178    type Err = <PublicKey as ::std::str::FromStr>::Err;
19179    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
19180        Ok(Self(value.parse()?))
19181    }
19182}
19183impl ::std::convert::TryFrom<&str> for PeerId {
19184    type Error = <PublicKey as ::std::str::FromStr>::Err;
19185    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
19186        value.parse()
19187    }
19188}
19189impl ::std::convert::TryFrom<&String> for PeerId {
19190    type Error = <PublicKey as ::std::str::FromStr>::Err;
19191    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
19192        value.parse()
19193    }
19194}
19195impl ::std::convert::TryFrom<String> for PeerId {
19196    type Error = <PublicKey as ::std::str::FromStr>::Err;
19197    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
19198        value.parse()
19199    }
19200}
19201impl ::std::fmt::Display for PeerId {
19202    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19203        self.0.fmt(f)
19204    }
19205}
19206#[doc = "`PeerInfoView`"]
19207#[doc = r""]
19208#[doc = r" <details><summary>JSON schema</summary>"]
19209#[doc = r""]
19210#[doc = r" ```json"]
19211#[doc = "{"]
19212#[doc = "  \"type\": \"object\","]
19213#[doc = "  \"required\": ["]
19214#[doc = "    \"addr\","]
19215#[doc = "    \"archival\","]
19216#[doc = "    \"connection_established_time_millis\","]
19217#[doc = "    \"is_highest_block_invalid\","]
19218#[doc = "    \"is_outbound_peer\","]
19219#[doc = "    \"last_time_peer_requested_millis\","]
19220#[doc = "    \"last_time_received_message_millis\","]
19221#[doc = "    \"nonce\","]
19222#[doc = "    \"peer_id\","]
19223#[doc = "    \"received_bytes_per_sec\","]
19224#[doc = "    \"sent_bytes_per_sec\","]
19225#[doc = "    \"tracked_shards\""]
19226#[doc = "  ],"]
19227#[doc = "  \"properties\": {"]
19228#[doc = "    \"account_id\": {"]
19229#[doc = "      \"anyOf\": ["]
19230#[doc = "        {"]
19231#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
19232#[doc = "        },"]
19233#[doc = "        {"]
19234#[doc = "          \"type\": \"null\""]
19235#[doc = "        }"]
19236#[doc = "      ]"]
19237#[doc = "    },"]
19238#[doc = "    \"addr\": {"]
19239#[doc = "      \"type\": \"string\""]
19240#[doc = "    },"]
19241#[doc = "    \"archival\": {"]
19242#[doc = "      \"type\": \"boolean\""]
19243#[doc = "    },"]
19244#[doc = "    \"block_hash\": {"]
19245#[doc = "      \"anyOf\": ["]
19246#[doc = "        {"]
19247#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
19248#[doc = "        },"]
19249#[doc = "        {"]
19250#[doc = "          \"type\": \"null\""]
19251#[doc = "        }"]
19252#[doc = "      ]"]
19253#[doc = "    },"]
19254#[doc = "    \"connection_established_time_millis\": {"]
19255#[doc = "      \"type\": \"integer\","]
19256#[doc = "      \"format\": \"uint64\","]
19257#[doc = "      \"minimum\": 0.0"]
19258#[doc = "    },"]
19259#[doc = "    \"height\": {"]
19260#[doc = "      \"type\": ["]
19261#[doc = "        \"integer\","]
19262#[doc = "        \"null\""]
19263#[doc = "      ],"]
19264#[doc = "      \"format\": \"uint64\","]
19265#[doc = "      \"minimum\": 0.0"]
19266#[doc = "    },"]
19267#[doc = "    \"is_highest_block_invalid\": {"]
19268#[doc = "      \"type\": \"boolean\""]
19269#[doc = "    },"]
19270#[doc = "    \"is_outbound_peer\": {"]
19271#[doc = "      \"type\": \"boolean\""]
19272#[doc = "    },"]
19273#[doc = "    \"last_time_peer_requested_millis\": {"]
19274#[doc = "      \"type\": \"integer\","]
19275#[doc = "      \"format\": \"uint64\","]
19276#[doc = "      \"minimum\": 0.0"]
19277#[doc = "    },"]
19278#[doc = "    \"last_time_received_message_millis\": {"]
19279#[doc = "      \"type\": \"integer\","]
19280#[doc = "      \"format\": \"uint64\","]
19281#[doc = "      \"minimum\": 0.0"]
19282#[doc = "    },"]
19283#[doc = "    \"nonce\": {"]
19284#[doc = "      \"description\": \"Connection nonce.\","]
19285#[doc = "      \"type\": \"integer\","]
19286#[doc = "      \"format\": \"uint64\","]
19287#[doc = "      \"minimum\": 0.0"]
19288#[doc = "    },"]
19289#[doc = "    \"peer_id\": {"]
19290#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
19291#[doc = "    },"]
19292#[doc = "    \"received_bytes_per_sec\": {"]
19293#[doc = "      \"type\": \"integer\","]
19294#[doc = "      \"format\": \"uint64\","]
19295#[doc = "      \"minimum\": 0.0"]
19296#[doc = "    },"]
19297#[doc = "    \"sent_bytes_per_sec\": {"]
19298#[doc = "      \"type\": \"integer\","]
19299#[doc = "      \"format\": \"uint64\","]
19300#[doc = "      \"minimum\": 0.0"]
19301#[doc = "    },"]
19302#[doc = "    \"tracked_shards\": {"]
19303#[doc = "      \"type\": \"array\","]
19304#[doc = "      \"items\": {"]
19305#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
19306#[doc = "      }"]
19307#[doc = "    }"]
19308#[doc = "  }"]
19309#[doc = "}"]
19310#[doc = r" ```"]
19311#[doc = r" </details>"]
19312#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19313pub struct PeerInfoView {
19314    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19315    pub account_id: ::std::option::Option<AccountId>,
19316    pub addr: ::std::string::String,
19317    pub archival: bool,
19318    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19319    pub block_hash: ::std::option::Option<CryptoHash>,
19320    pub connection_established_time_millis: u64,
19321    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19322    pub height: ::std::option::Option<u64>,
19323    pub is_highest_block_invalid: bool,
19324    pub is_outbound_peer: bool,
19325    pub last_time_peer_requested_millis: u64,
19326    pub last_time_received_message_millis: u64,
19327    #[doc = "Connection nonce."]
19328    pub nonce: u64,
19329    pub peer_id: PublicKey,
19330    pub received_bytes_per_sec: u64,
19331    pub sent_bytes_per_sec: u64,
19332    pub tracked_shards: ::std::vec::Vec<ShardId>,
19333}
19334impl ::std::convert::From<&PeerInfoView> for PeerInfoView {
19335    fn from(value: &PeerInfoView) -> Self {
19336        value.clone()
19337    }
19338}
19339#[doc = "Error that can occur while preparing or executing Wasm smart-contract."]
19340#[doc = r""]
19341#[doc = r" <details><summary>JSON schema</summary>"]
19342#[doc = r""]
19343#[doc = r" ```json"]
19344#[doc = "{"]
19345#[doc = "  \"description\": \"Error that can occur while preparing or executing Wasm smart-contract.\","]
19346#[doc = "  \"oneOf\": ["]
19347#[doc = "    {"]
19348#[doc = "      \"description\": \"Error happened while serializing the module.\","]
19349#[doc = "      \"type\": \"string\","]
19350#[doc = "      \"enum\": ["]
19351#[doc = "        \"Serialization\""]
19352#[doc = "      ]"]
19353#[doc = "    },"]
19354#[doc = "    {"]
19355#[doc = "      \"description\": \"Error happened while deserializing the module.\","]
19356#[doc = "      \"type\": \"string\","]
19357#[doc = "      \"enum\": ["]
19358#[doc = "        \"Deserialization\""]
19359#[doc = "      ]"]
19360#[doc = "    },"]
19361#[doc = "    {"]
19362#[doc = "      \"description\": \"Internal memory declaration has been found in the module.\","]
19363#[doc = "      \"type\": \"string\","]
19364#[doc = "      \"enum\": ["]
19365#[doc = "        \"InternalMemoryDeclared\""]
19366#[doc = "      ]"]
19367#[doc = "    },"]
19368#[doc = "    {"]
19369#[doc = "      \"description\": \"Gas instrumentation failed.\\n\\nThis most likely indicates the module isn't valid.\","]
19370#[doc = "      \"type\": \"string\","]
19371#[doc = "      \"enum\": ["]
19372#[doc = "        \"GasInstrumentation\""]
19373#[doc = "      ]"]
19374#[doc = "    },"]
19375#[doc = "    {"]
19376#[doc = "      \"description\": \"Stack instrumentation failed.\\n\\nThis  most likely indicates the module isn't valid.\","]
19377#[doc = "      \"type\": \"string\","]
19378#[doc = "      \"enum\": ["]
19379#[doc = "        \"StackHeightInstrumentation\""]
19380#[doc = "      ]"]
19381#[doc = "    },"]
19382#[doc = "    {"]
19383#[doc = "      \"description\": \"Error happened during instantiation.\\n\\nThis might indicate that `start` function trapped, or module isn't\\ninstantiable and/or un-linkable.\","]
19384#[doc = "      \"type\": \"string\","]
19385#[doc = "      \"enum\": ["]
19386#[doc = "        \"Instantiate\""]
19387#[doc = "      ]"]
19388#[doc = "    },"]
19389#[doc = "    {"]
19390#[doc = "      \"description\": \"Error creating memory.\","]
19391#[doc = "      \"type\": \"string\","]
19392#[doc = "      \"enum\": ["]
19393#[doc = "        \"Memory\""]
19394#[doc = "      ]"]
19395#[doc = "    },"]
19396#[doc = "    {"]
19397#[doc = "      \"description\": \"Contract contains too many functions.\","]
19398#[doc = "      \"type\": \"string\","]
19399#[doc = "      \"enum\": ["]
19400#[doc = "        \"TooManyFunctions\""]
19401#[doc = "      ]"]
19402#[doc = "    },"]
19403#[doc = "    {"]
19404#[doc = "      \"description\": \"Contract contains too many locals.\","]
19405#[doc = "      \"type\": \"string\","]
19406#[doc = "      \"enum\": ["]
19407#[doc = "        \"TooManyLocals\""]
19408#[doc = "      ]"]
19409#[doc = "    },"]
19410#[doc = "    {"]
19411#[doc = "      \"description\": \"Contract contains too many tables.\","]
19412#[doc = "      \"type\": \"string\","]
19413#[doc = "      \"enum\": ["]
19414#[doc = "        \"TooManyTables\""]
19415#[doc = "      ]"]
19416#[doc = "    },"]
19417#[doc = "    {"]
19418#[doc = "      \"description\": \"Contract contains too many table elements.\","]
19419#[doc = "      \"type\": \"string\","]
19420#[doc = "      \"enum\": ["]
19421#[doc = "        \"TooManyTableElements\""]
19422#[doc = "      ]"]
19423#[doc = "    }"]
19424#[doc = "  ]"]
19425#[doc = "}"]
19426#[doc = r" ```"]
19427#[doc = r" </details>"]
19428#[derive(
19429    :: serde :: Deserialize,
19430    :: serde :: Serialize,
19431    Clone,
19432    Copy,
19433    Debug,
19434    Eq,
19435    Hash,
19436    Ord,
19437    PartialEq,
19438    PartialOrd,
19439    thiserror::Error,
19440)]
19441pub enum PrepareError {
19442    #[doc = "Error happened while serializing the module."]
19443    Serialization,
19444    #[doc = "Error happened while deserializing the module."]
19445    Deserialization,
19446    #[doc = "Internal memory declaration has been found in the module."]
19447    InternalMemoryDeclared,
19448    #[doc = "Gas instrumentation failed.\n\nThis most likely indicates the module isn't valid."]
19449    GasInstrumentation,
19450    #[doc = "Stack instrumentation failed.\n\nThis  most likely indicates the module isn't valid."]
19451    StackHeightInstrumentation,
19452    #[doc = "Error happened during instantiation.\n\nThis might indicate that `start` function trapped, or module isn't\ninstantiable and/or un-linkable."]
19453    Instantiate,
19454    #[doc = "Error creating memory."]
19455    Memory,
19456    #[doc = "Contract contains too many functions."]
19457    TooManyFunctions,
19458    #[doc = "Contract contains too many locals."]
19459    TooManyLocals,
19460    #[doc = "Contract contains too many tables."]
19461    TooManyTables,
19462    #[doc = "Contract contains too many table elements."]
19463    TooManyTableElements,
19464}
19465impl ::std::convert::From<&Self> for PrepareError {
19466    fn from(value: &PrepareError) -> Self {
19467        value.clone()
19468    }
19469}
19470impl ::std::fmt::Display for PrepareError {
19471    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19472        match *self {
19473            Self::Serialization => f.write_str("Serialization"),
19474            Self::Deserialization => f.write_str("Deserialization"),
19475            Self::InternalMemoryDeclared => f.write_str("InternalMemoryDeclared"),
19476            Self::GasInstrumentation => f.write_str("GasInstrumentation"),
19477            Self::StackHeightInstrumentation => f.write_str("StackHeightInstrumentation"),
19478            Self::Instantiate => f.write_str("Instantiate"),
19479            Self::Memory => f.write_str("Memory"),
19480            Self::TooManyFunctions => f.write_str("TooManyFunctions"),
19481            Self::TooManyLocals => f.write_str("TooManyLocals"),
19482            Self::TooManyTables => f.write_str("TooManyTables"),
19483            Self::TooManyTableElements => f.write_str("TooManyTableElements"),
19484        }
19485    }
19486}
19487impl ::std::str::FromStr for PrepareError {
19488    type Err = self::error::ConversionError;
19489    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19490        match value {
19491            "Serialization" => Ok(Self::Serialization),
19492            "Deserialization" => Ok(Self::Deserialization),
19493            "InternalMemoryDeclared" => Ok(Self::InternalMemoryDeclared),
19494            "GasInstrumentation" => Ok(Self::GasInstrumentation),
19495            "StackHeightInstrumentation" => Ok(Self::StackHeightInstrumentation),
19496            "Instantiate" => Ok(Self::Instantiate),
19497            "Memory" => Ok(Self::Memory),
19498            "TooManyFunctions" => Ok(Self::TooManyFunctions),
19499            "TooManyLocals" => Ok(Self::TooManyLocals),
19500            "TooManyTables" => Ok(Self::TooManyTables),
19501            "TooManyTableElements" => Ok(Self::TooManyTableElements),
19502            _ => Err("invalid value".into()),
19503        }
19504    }
19505}
19506impl ::std::convert::TryFrom<&str> for PrepareError {
19507    type Error = self::error::ConversionError;
19508    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19509        value.parse()
19510    }
19511}
19512impl ::std::convert::TryFrom<&::std::string::String> for PrepareError {
19513    type Error = self::error::ConversionError;
19514    fn try_from(
19515        value: &::std::string::String,
19516    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19517        value.parse()
19518    }
19519}
19520impl ::std::convert::TryFrom<::std::string::String> for PrepareError {
19521    type Error = self::error::ConversionError;
19522    fn try_from(
19523        value: ::std::string::String,
19524    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19525        value.parse()
19526    }
19527}
19528#[doc = "Configures whether the node checks the next or the next next epoch for network version compatibility."]
19529#[doc = r""]
19530#[doc = r" <details><summary>JSON schema</summary>"]
19531#[doc = r""]
19532#[doc = r" ```json"]
19533#[doc = "{"]
19534#[doc = "  \"description\": \"Configures whether the node checks the next or the next next epoch for network version compatibility.\","]
19535#[doc = "  \"type\": \"string\","]
19536#[doc = "  \"enum\": ["]
19537#[doc = "    \"Next\","]
19538#[doc = "    \"NextNext\""]
19539#[doc = "  ]"]
19540#[doc = "}"]
19541#[doc = r" ```"]
19542#[doc = r" </details>"]
19543#[derive(
19544    :: serde :: Deserialize,
19545    :: serde :: Serialize,
19546    Clone,
19547    Copy,
19548    Debug,
19549    Eq,
19550    Hash,
19551    Ord,
19552    PartialEq,
19553    PartialOrd,
19554)]
19555pub enum ProtocolVersionCheckConfig {
19556    Next,
19557    NextNext,
19558}
19559impl ::std::convert::From<&Self> for ProtocolVersionCheckConfig {
19560    fn from(value: &ProtocolVersionCheckConfig) -> Self {
19561        value.clone()
19562    }
19563}
19564impl ::std::fmt::Display for ProtocolVersionCheckConfig {
19565    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19566        match *self {
19567            Self::Next => f.write_str("Next"),
19568            Self::NextNext => f.write_str("NextNext"),
19569        }
19570    }
19571}
19572impl ::std::str::FromStr for ProtocolVersionCheckConfig {
19573    type Err = self::error::ConversionError;
19574    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19575        match value {
19576            "Next" => Ok(Self::Next),
19577            "NextNext" => Ok(Self::NextNext),
19578            _ => Err("invalid value".into()),
19579        }
19580    }
19581}
19582impl ::std::convert::TryFrom<&str> for ProtocolVersionCheckConfig {
19583    type Error = self::error::ConversionError;
19584    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19585        value.parse()
19586    }
19587}
19588impl ::std::convert::TryFrom<&::std::string::String> for ProtocolVersionCheckConfig {
19589    type Error = self::error::ConversionError;
19590    fn try_from(
19591        value: &::std::string::String,
19592    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19593        value.parse()
19594    }
19595}
19596impl ::std::convert::TryFrom<::std::string::String> for ProtocolVersionCheckConfig {
19597    type Error = self::error::ConversionError;
19598    fn try_from(
19599        value: ::std::string::String,
19600    ) -> ::std::result::Result<Self, self::error::ConversionError> {
19601        value.parse()
19602    }
19603}
19604#[doc = "`PublicKey`"]
19605#[doc = r""]
19606#[doc = r" <details><summary>JSON schema</summary>"]
19607#[doc = r""]
19608#[doc = r" ```json"]
19609#[doc = "{"]
19610#[doc = "  \"type\": \"string\""]
19611#[doc = "}"]
19612#[doc = r" ```"]
19613#[doc = r" </details>"]
19614#[derive(
19615    :: serde :: Deserialize,
19616    :: serde :: Serialize,
19617    Clone,
19618    Debug,
19619    Eq,
19620    Hash,
19621    Ord,
19622    PartialEq,
19623    PartialOrd,
19624)]
19625#[serde(transparent)]
19626pub struct PublicKey(pub ::std::string::String);
19627impl ::std::ops::Deref for PublicKey {
19628    type Target = ::std::string::String;
19629    fn deref(&self) -> &::std::string::String {
19630        &self.0
19631    }
19632}
19633impl ::std::convert::From<PublicKey> for ::std::string::String {
19634    fn from(value: PublicKey) -> Self {
19635        value.0
19636    }
19637}
19638impl ::std::convert::From<&PublicKey> for PublicKey {
19639    fn from(value: &PublicKey) -> Self {
19640        value.clone()
19641    }
19642}
19643impl ::std::convert::From<::std::string::String> for PublicKey {
19644    fn from(value: ::std::string::String) -> Self {
19645        Self(value)
19646    }
19647}
19648impl ::std::str::FromStr for PublicKey {
19649    type Err = ::std::convert::Infallible;
19650    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
19651        Ok(Self(value.to_string()))
19652    }
19653}
19654impl ::std::fmt::Display for PublicKey {
19655    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19656        self.0.fmt(f)
19657    }
19658}
19659#[doc = "`RangeOfUint64`"]
19660#[doc = r""]
19661#[doc = r" <details><summary>JSON schema</summary>"]
19662#[doc = r""]
19663#[doc = r" ```json"]
19664#[doc = "{"]
19665#[doc = "  \"type\": \"object\","]
19666#[doc = "  \"required\": ["]
19667#[doc = "    \"end\","]
19668#[doc = "    \"start\""]
19669#[doc = "  ],"]
19670#[doc = "  \"properties\": {"]
19671#[doc = "    \"end\": {"]
19672#[doc = "      \"type\": \"integer\","]
19673#[doc = "      \"format\": \"uint64\","]
19674#[doc = "      \"minimum\": 0.0"]
19675#[doc = "    },"]
19676#[doc = "    \"start\": {"]
19677#[doc = "      \"type\": \"integer\","]
19678#[doc = "      \"format\": \"uint64\","]
19679#[doc = "      \"minimum\": 0.0"]
19680#[doc = "    }"]
19681#[doc = "  }"]
19682#[doc = "}"]
19683#[doc = r" ```"]
19684#[doc = r" </details>"]
19685#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19686pub struct RangeOfUint64 {
19687    pub end: u64,
19688    pub start: u64,
19689}
19690impl ::std::convert::From<&RangeOfUint64> for RangeOfUint64 {
19691    fn from(value: &RangeOfUint64) -> Self {
19692        value.clone()
19693    }
19694}
19695#[doc = "`ReceiptEnumView`"]
19696#[doc = r""]
19697#[doc = r" <details><summary>JSON schema</summary>"]
19698#[doc = r""]
19699#[doc = r" ```json"]
19700#[doc = "{"]
19701#[doc = "  \"oneOf\": ["]
19702#[doc = "    {"]
19703#[doc = "      \"type\": \"object\","]
19704#[doc = "      \"required\": ["]
19705#[doc = "        \"Action\""]
19706#[doc = "      ],"]
19707#[doc = "      \"properties\": {"]
19708#[doc = "        \"Action\": {"]
19709#[doc = "          \"type\": \"object\","]
19710#[doc = "          \"required\": ["]
19711#[doc = "            \"actions\","]
19712#[doc = "            \"gas_price\","]
19713#[doc = "            \"input_data_ids\","]
19714#[doc = "            \"output_data_receivers\","]
19715#[doc = "            \"signer_id\","]
19716#[doc = "            \"signer_public_key\""]
19717#[doc = "          ],"]
19718#[doc = "          \"properties\": {"]
19719#[doc = "            \"actions\": {"]
19720#[doc = "              \"type\": \"array\","]
19721#[doc = "              \"items\": {"]
19722#[doc = "                \"$ref\": \"#/components/schemas/ActionView\""]
19723#[doc = "              }"]
19724#[doc = "            },"]
19725#[doc = "            \"gas_price\": {"]
19726#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
19727#[doc = "            },"]
19728#[doc = "            \"input_data_ids\": {"]
19729#[doc = "              \"type\": \"array\","]
19730#[doc = "              \"items\": {"]
19731#[doc = "                \"$ref\": \"#/components/schemas/CryptoHash\""]
19732#[doc = "              }"]
19733#[doc = "            },"]
19734#[doc = "            \"is_promise_yield\": {"]
19735#[doc = "              \"default\": false,"]
19736#[doc = "              \"type\": \"boolean\""]
19737#[doc = "            },"]
19738#[doc = "            \"output_data_receivers\": {"]
19739#[doc = "              \"type\": \"array\","]
19740#[doc = "              \"items\": {"]
19741#[doc = "                \"$ref\": \"#/components/schemas/DataReceiverView\""]
19742#[doc = "              }"]
19743#[doc = "            },"]
19744#[doc = "            \"refund_to\": {"]
19745#[doc = "              \"anyOf\": ["]
19746#[doc = "                {"]
19747#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
19748#[doc = "                },"]
19749#[doc = "                {"]
19750#[doc = "                  \"type\": \"null\""]
19751#[doc = "                }"]
19752#[doc = "              ]"]
19753#[doc = "            },"]
19754#[doc = "            \"signer_id\": {"]
19755#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
19756#[doc = "            },"]
19757#[doc = "            \"signer_public_key\": {"]
19758#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
19759#[doc = "            }"]
19760#[doc = "          }"]
19761#[doc = "        }"]
19762#[doc = "      },"]
19763#[doc = "      \"additionalProperties\": false"]
19764#[doc = "    },"]
19765#[doc = "    {"]
19766#[doc = "      \"type\": \"object\","]
19767#[doc = "      \"required\": ["]
19768#[doc = "        \"Data\""]
19769#[doc = "      ],"]
19770#[doc = "      \"properties\": {"]
19771#[doc = "        \"Data\": {"]
19772#[doc = "          \"type\": \"object\","]
19773#[doc = "          \"required\": ["]
19774#[doc = "            \"data_id\""]
19775#[doc = "          ],"]
19776#[doc = "          \"properties\": {"]
19777#[doc = "            \"data\": {"]
19778#[doc = "              \"type\": ["]
19779#[doc = "                \"string\","]
19780#[doc = "                \"null\""]
19781#[doc = "              ]"]
19782#[doc = "            },"]
19783#[doc = "            \"data_id\": {"]
19784#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
19785#[doc = "            },"]
19786#[doc = "            \"is_promise_resume\": {"]
19787#[doc = "              \"default\": false,"]
19788#[doc = "              \"type\": \"boolean\""]
19789#[doc = "            }"]
19790#[doc = "          }"]
19791#[doc = "        }"]
19792#[doc = "      },"]
19793#[doc = "      \"additionalProperties\": false"]
19794#[doc = "    },"]
19795#[doc = "    {"]
19796#[doc = "      \"type\": \"object\","]
19797#[doc = "      \"required\": ["]
19798#[doc = "        \"GlobalContractDistribution\""]
19799#[doc = "      ],"]
19800#[doc = "      \"properties\": {"]
19801#[doc = "        \"GlobalContractDistribution\": {"]
19802#[doc = "          \"type\": \"object\","]
19803#[doc = "          \"required\": ["]
19804#[doc = "            \"already_delivered_shards\","]
19805#[doc = "            \"code\","]
19806#[doc = "            \"id\","]
19807#[doc = "            \"target_shard\""]
19808#[doc = "          ],"]
19809#[doc = "          \"properties\": {"]
19810#[doc = "            \"already_delivered_shards\": {"]
19811#[doc = "              \"type\": \"array\","]
19812#[doc = "              \"items\": {"]
19813#[doc = "                \"$ref\": \"#/components/schemas/ShardId\""]
19814#[doc = "              }"]
19815#[doc = "            },"]
19816#[doc = "            \"code\": {"]
19817#[doc = "              \"type\": \"string\""]
19818#[doc = "            },"]
19819#[doc = "            \"id\": {"]
19820#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
19821#[doc = "            },"]
19822#[doc = "            \"target_shard\": {"]
19823#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
19824#[doc = "            }"]
19825#[doc = "          }"]
19826#[doc = "        }"]
19827#[doc = "      },"]
19828#[doc = "      \"additionalProperties\": false"]
19829#[doc = "    }"]
19830#[doc = "  ]"]
19831#[doc = "}"]
19832#[doc = r" ```"]
19833#[doc = r" </details>"]
19834#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19835pub enum ReceiptEnumView {
19836    Action {
19837        actions: ::std::vec::Vec<ActionView>,
19838        gas_price: NearToken,
19839        input_data_ids: ::std::vec::Vec<CryptoHash>,
19840        #[serde(default)]
19841        is_promise_yield: bool,
19842        output_data_receivers: ::std::vec::Vec<DataReceiverView>,
19843        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19844        refund_to: ::std::option::Option<AccountId>,
19845        signer_id: AccountId,
19846        signer_public_key: PublicKey,
19847    },
19848    Data {
19849        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19850        data: ::std::option::Option<::std::string::String>,
19851        data_id: CryptoHash,
19852        #[serde(default)]
19853        is_promise_resume: bool,
19854    },
19855    GlobalContractDistribution {
19856        already_delivered_shards: ::std::vec::Vec<ShardId>,
19857        code: ::std::string::String,
19858        id: GlobalContractIdentifier,
19859        target_shard: ShardId,
19860    },
19861}
19862impl ::std::convert::From<&Self> for ReceiptEnumView {
19863    fn from(value: &ReceiptEnumView) -> Self {
19864        value.clone()
19865    }
19866}
19867#[doc = "Describes the error for validating a receipt."]
19868#[doc = r""]
19869#[doc = r" <details><summary>JSON schema</summary>"]
19870#[doc = r""]
19871#[doc = r" ```json"]
19872#[doc = "{"]
19873#[doc = "  \"description\": \"Describes the error for validating a receipt.\","]
19874#[doc = "  \"oneOf\": ["]
19875#[doc = "    {"]
19876#[doc = "      \"description\": \"The `predecessor_id` of a Receipt is not valid.\","]
19877#[doc = "      \"type\": \"object\","]
19878#[doc = "      \"required\": ["]
19879#[doc = "        \"InvalidPredecessorId\""]
19880#[doc = "      ],"]
19881#[doc = "      \"properties\": {"]
19882#[doc = "        \"InvalidPredecessorId\": {"]
19883#[doc = "          \"type\": \"object\","]
19884#[doc = "          \"required\": ["]
19885#[doc = "            \"account_id\""]
19886#[doc = "          ],"]
19887#[doc = "          \"properties\": {"]
19888#[doc = "            \"account_id\": {"]
19889#[doc = "              \"type\": \"string\""]
19890#[doc = "            }"]
19891#[doc = "          }"]
19892#[doc = "        }"]
19893#[doc = "      },"]
19894#[doc = "      \"additionalProperties\": false"]
19895#[doc = "    },"]
19896#[doc = "    {"]
19897#[doc = "      \"description\": \"The `receiver_id` of a Receipt is not valid.\","]
19898#[doc = "      \"type\": \"object\","]
19899#[doc = "      \"required\": ["]
19900#[doc = "        \"InvalidReceiverId\""]
19901#[doc = "      ],"]
19902#[doc = "      \"properties\": {"]
19903#[doc = "        \"InvalidReceiverId\": {"]
19904#[doc = "          \"type\": \"object\","]
19905#[doc = "          \"required\": ["]
19906#[doc = "            \"account_id\""]
19907#[doc = "          ],"]
19908#[doc = "          \"properties\": {"]
19909#[doc = "            \"account_id\": {"]
19910#[doc = "              \"type\": \"string\""]
19911#[doc = "            }"]
19912#[doc = "          }"]
19913#[doc = "        }"]
19914#[doc = "      },"]
19915#[doc = "      \"additionalProperties\": false"]
19916#[doc = "    },"]
19917#[doc = "    {"]
19918#[doc = "      \"description\": \"The `signer_id` of an ActionReceipt is not valid.\","]
19919#[doc = "      \"type\": \"object\","]
19920#[doc = "      \"required\": ["]
19921#[doc = "        \"InvalidSignerId\""]
19922#[doc = "      ],"]
19923#[doc = "      \"properties\": {"]
19924#[doc = "        \"InvalidSignerId\": {"]
19925#[doc = "          \"type\": \"object\","]
19926#[doc = "          \"required\": ["]
19927#[doc = "            \"account_id\""]
19928#[doc = "          ],"]
19929#[doc = "          \"properties\": {"]
19930#[doc = "            \"account_id\": {"]
19931#[doc = "              \"type\": \"string\""]
19932#[doc = "            }"]
19933#[doc = "          }"]
19934#[doc = "        }"]
19935#[doc = "      },"]
19936#[doc = "      \"additionalProperties\": false"]
19937#[doc = "    },"]
19938#[doc = "    {"]
19939#[doc = "      \"description\": \"The `receiver_id` of a DataReceiver within an ActionReceipt is not valid.\","]
19940#[doc = "      \"type\": \"object\","]
19941#[doc = "      \"required\": ["]
19942#[doc = "        \"InvalidDataReceiverId\""]
19943#[doc = "      ],"]
19944#[doc = "      \"properties\": {"]
19945#[doc = "        \"InvalidDataReceiverId\": {"]
19946#[doc = "          \"type\": \"object\","]
19947#[doc = "          \"required\": ["]
19948#[doc = "            \"account_id\""]
19949#[doc = "          ],"]
19950#[doc = "          \"properties\": {"]
19951#[doc = "            \"account_id\": {"]
19952#[doc = "              \"type\": \"string\""]
19953#[doc = "            }"]
19954#[doc = "          }"]
19955#[doc = "        }"]
19956#[doc = "      },"]
19957#[doc = "      \"additionalProperties\": false"]
19958#[doc = "    },"]
19959#[doc = "    {"]
19960#[doc = "      \"description\": \"The length of the returned data exceeded the limit in a DataReceipt.\","]
19961#[doc = "      \"type\": \"object\","]
19962#[doc = "      \"required\": ["]
19963#[doc = "        \"ReturnedValueLengthExceeded\""]
19964#[doc = "      ],"]
19965#[doc = "      \"properties\": {"]
19966#[doc = "        \"ReturnedValueLengthExceeded\": {"]
19967#[doc = "          \"type\": \"object\","]
19968#[doc = "          \"required\": ["]
19969#[doc = "            \"length\","]
19970#[doc = "            \"limit\""]
19971#[doc = "          ],"]
19972#[doc = "          \"properties\": {"]
19973#[doc = "            \"length\": {"]
19974#[doc = "              \"type\": \"integer\","]
19975#[doc = "              \"format\": \"uint64\","]
19976#[doc = "              \"minimum\": 0.0"]
19977#[doc = "            },"]
19978#[doc = "            \"limit\": {"]
19979#[doc = "              \"type\": \"integer\","]
19980#[doc = "              \"format\": \"uint64\","]
19981#[doc = "              \"minimum\": 0.0"]
19982#[doc = "            }"]
19983#[doc = "          }"]
19984#[doc = "        }"]
19985#[doc = "      },"]
19986#[doc = "      \"additionalProperties\": false"]
19987#[doc = "    },"]
19988#[doc = "    {"]
19989#[doc = "      \"description\": \"The number of input data dependencies exceeds the limit in an ActionReceipt.\","]
19990#[doc = "      \"type\": \"object\","]
19991#[doc = "      \"required\": ["]
19992#[doc = "        \"NumberInputDataDependenciesExceeded\""]
19993#[doc = "      ],"]
19994#[doc = "      \"properties\": {"]
19995#[doc = "        \"NumberInputDataDependenciesExceeded\": {"]
19996#[doc = "          \"type\": \"object\","]
19997#[doc = "          \"required\": ["]
19998#[doc = "            \"limit\","]
19999#[doc = "            \"number_of_input_data_dependencies\""]
20000#[doc = "          ],"]
20001#[doc = "          \"properties\": {"]
20002#[doc = "            \"limit\": {"]
20003#[doc = "              \"type\": \"integer\","]
20004#[doc = "              \"format\": \"uint64\","]
20005#[doc = "              \"minimum\": 0.0"]
20006#[doc = "            },"]
20007#[doc = "            \"number_of_input_data_dependencies\": {"]
20008#[doc = "              \"type\": \"integer\","]
20009#[doc = "              \"format\": \"uint64\","]
20010#[doc = "              \"minimum\": 0.0"]
20011#[doc = "            }"]
20012#[doc = "          }"]
20013#[doc = "        }"]
20014#[doc = "      },"]
20015#[doc = "      \"additionalProperties\": false"]
20016#[doc = "    },"]
20017#[doc = "    {"]
20018#[doc = "      \"description\": \"An error occurred while validating actions of an ActionReceipt.\","]
20019#[doc = "      \"type\": \"object\","]
20020#[doc = "      \"required\": ["]
20021#[doc = "        \"ActionsValidation\""]
20022#[doc = "      ],"]
20023#[doc = "      \"properties\": {"]
20024#[doc = "        \"ActionsValidation\": {"]
20025#[doc = "          \"$ref\": \"#/components/schemas/ActionsValidationError\""]
20026#[doc = "        }"]
20027#[doc = "      },"]
20028#[doc = "      \"additionalProperties\": false"]
20029#[doc = "    },"]
20030#[doc = "    {"]
20031#[doc = "      \"description\": \"Receipt is bigger than the limit.\","]
20032#[doc = "      \"type\": \"object\","]
20033#[doc = "      \"required\": ["]
20034#[doc = "        \"ReceiptSizeExceeded\""]
20035#[doc = "      ],"]
20036#[doc = "      \"properties\": {"]
20037#[doc = "        \"ReceiptSizeExceeded\": {"]
20038#[doc = "          \"type\": \"object\","]
20039#[doc = "          \"required\": ["]
20040#[doc = "            \"limit\","]
20041#[doc = "            \"size\""]
20042#[doc = "          ],"]
20043#[doc = "          \"properties\": {"]
20044#[doc = "            \"limit\": {"]
20045#[doc = "              \"type\": \"integer\","]
20046#[doc = "              \"format\": \"uint64\","]
20047#[doc = "              \"minimum\": 0.0"]
20048#[doc = "            },"]
20049#[doc = "            \"size\": {"]
20050#[doc = "              \"type\": \"integer\","]
20051#[doc = "              \"format\": \"uint64\","]
20052#[doc = "              \"minimum\": 0.0"]
20053#[doc = "            }"]
20054#[doc = "          }"]
20055#[doc = "        }"]
20056#[doc = "      },"]
20057#[doc = "      \"additionalProperties\": false"]
20058#[doc = "    },"]
20059#[doc = "    {"]
20060#[doc = "      \"description\": \"The `refund_to` of an ActionReceipt is not valid.\","]
20061#[doc = "      \"type\": \"object\","]
20062#[doc = "      \"required\": ["]
20063#[doc = "        \"InvalidRefundTo\""]
20064#[doc = "      ],"]
20065#[doc = "      \"properties\": {"]
20066#[doc = "        \"InvalidRefundTo\": {"]
20067#[doc = "          \"type\": \"object\","]
20068#[doc = "          \"required\": ["]
20069#[doc = "            \"account_id\""]
20070#[doc = "          ],"]
20071#[doc = "          \"properties\": {"]
20072#[doc = "            \"account_id\": {"]
20073#[doc = "              \"type\": \"string\""]
20074#[doc = "            }"]
20075#[doc = "          }"]
20076#[doc = "        }"]
20077#[doc = "      },"]
20078#[doc = "      \"additionalProperties\": false"]
20079#[doc = "    }"]
20080#[doc = "  ]"]
20081#[doc = "}"]
20082#[doc = r" ```"]
20083#[doc = r" </details>"]
20084#[derive(
20085    :: serde :: Deserialize,
20086    :: serde :: Serialize,
20087    Clone,
20088    Debug,
20089    thiserror::Error,
20090    strum_macros::Display,
20091)]
20092pub enum ReceiptValidationError {
20093    #[doc = "The `predecessor_id` of a Receipt is not valid."]
20094    InvalidPredecessorId { account_id: ::std::string::String },
20095    #[doc = "The `receiver_id` of a Receipt is not valid."]
20096    InvalidReceiverId { account_id: ::std::string::String },
20097    #[doc = "The `signer_id` of an ActionReceipt is not valid."]
20098    InvalidSignerId { account_id: ::std::string::String },
20099    #[doc = "The `receiver_id` of a DataReceiver within an ActionReceipt is not valid."]
20100    InvalidDataReceiverId { account_id: ::std::string::String },
20101    #[doc = "The length of the returned data exceeded the limit in a DataReceipt."]
20102    ReturnedValueLengthExceeded { length: u64, limit: u64 },
20103    #[doc = "The number of input data dependencies exceeds the limit in an ActionReceipt."]
20104    NumberInputDataDependenciesExceeded {
20105        limit: u64,
20106        number_of_input_data_dependencies: u64,
20107    },
20108    #[doc = "An error occurred while validating actions of an ActionReceipt."]
20109    ActionsValidation(ActionsValidationError),
20110    #[doc = "Receipt is bigger than the limit."]
20111    ReceiptSizeExceeded { limit: u64, size: u64 },
20112    #[doc = "The `refund_to` of an ActionReceipt is not valid."]
20113    InvalidRefundTo { account_id: ::std::string::String },
20114}
20115impl ::std::convert::From<&Self> for ReceiptValidationError {
20116    fn from(value: &ReceiptValidationError) -> Self {
20117        value.clone()
20118    }
20119}
20120impl ::std::convert::From<ActionsValidationError> for ReceiptValidationError {
20121    fn from(value: ActionsValidationError) -> Self {
20122        Self::ActionsValidation(value)
20123    }
20124}
20125#[doc = "`ReceiptView`"]
20126#[doc = r""]
20127#[doc = r" <details><summary>JSON schema</summary>"]
20128#[doc = r""]
20129#[doc = r" ```json"]
20130#[doc = "{"]
20131#[doc = "  \"type\": \"object\","]
20132#[doc = "  \"required\": ["]
20133#[doc = "    \"predecessor_id\","]
20134#[doc = "    \"receipt\","]
20135#[doc = "    \"receipt_id\","]
20136#[doc = "    \"receiver_id\""]
20137#[doc = "  ],"]
20138#[doc = "  \"properties\": {"]
20139#[doc = "    \"predecessor_id\": {"]
20140#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
20141#[doc = "    },"]
20142#[doc = "    \"priority\": {"]
20143#[doc = "      \"default\": 0,"]
20144#[doc = "      \"type\": \"integer\","]
20145#[doc = "      \"format\": \"uint64\","]
20146#[doc = "      \"minimum\": 0.0"]
20147#[doc = "    },"]
20148#[doc = "    \"receipt\": {"]
20149#[doc = "      \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
20150#[doc = "    },"]
20151#[doc = "    \"receipt_id\": {"]
20152#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
20153#[doc = "    },"]
20154#[doc = "    \"receiver_id\": {"]
20155#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
20156#[doc = "    }"]
20157#[doc = "  }"]
20158#[doc = "}"]
20159#[doc = r" ```"]
20160#[doc = r" </details>"]
20161#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20162pub struct ReceiptView {
20163    pub predecessor_id: AccountId,
20164    #[serde(default)]
20165    pub priority: u64,
20166    pub receipt: ReceiptEnumView,
20167    pub receipt_id: CryptoHash,
20168    pub receiver_id: AccountId,
20169}
20170impl ::std::convert::From<&ReceiptView> for ReceiptView {
20171    fn from(value: &ReceiptView) -> Self {
20172        value.clone()
20173    }
20174}
20175#[doc = "`RpcBlockError`"]
20176#[doc = r""]
20177#[doc = r" <details><summary>JSON schema</summary>"]
20178#[doc = r""]
20179#[doc = r" ```json"]
20180#[doc = "{"]
20181#[doc = "  \"oneOf\": ["]
20182#[doc = "    {"]
20183#[doc = "      \"type\": \"object\","]
20184#[doc = "      \"required\": ["]
20185#[doc = "        \"info\","]
20186#[doc = "        \"name\""]
20187#[doc = "      ],"]
20188#[doc = "      \"properties\": {"]
20189#[doc = "        \"info\": {"]
20190#[doc = "          \"type\": \"object\""]
20191#[doc = "        },"]
20192#[doc = "        \"name\": {"]
20193#[doc = "          \"type\": \"string\","]
20194#[doc = "          \"enum\": ["]
20195#[doc = "            \"UNKNOWN_BLOCK\""]
20196#[doc = "          ]"]
20197#[doc = "        }"]
20198#[doc = "      }"]
20199#[doc = "    },"]
20200#[doc = "    {"]
20201#[doc = "      \"type\": \"object\","]
20202#[doc = "      \"required\": ["]
20203#[doc = "        \"name\""]
20204#[doc = "      ],"]
20205#[doc = "      \"properties\": {"]
20206#[doc = "        \"name\": {"]
20207#[doc = "          \"type\": \"string\","]
20208#[doc = "          \"enum\": ["]
20209#[doc = "            \"NOT_SYNCED_YET\""]
20210#[doc = "          ]"]
20211#[doc = "        }"]
20212#[doc = "      }"]
20213#[doc = "    },"]
20214#[doc = "    {"]
20215#[doc = "      \"type\": \"object\","]
20216#[doc = "      \"required\": ["]
20217#[doc = "        \"info\","]
20218#[doc = "        \"name\""]
20219#[doc = "      ],"]
20220#[doc = "      \"properties\": {"]
20221#[doc = "        \"info\": {"]
20222#[doc = "          \"type\": \"object\","]
20223#[doc = "          \"required\": ["]
20224#[doc = "            \"error_message\""]
20225#[doc = "          ],"]
20226#[doc = "          \"properties\": {"]
20227#[doc = "            \"error_message\": {"]
20228#[doc = "              \"type\": \"string\""]
20229#[doc = "            }"]
20230#[doc = "          }"]
20231#[doc = "        },"]
20232#[doc = "        \"name\": {"]
20233#[doc = "          \"type\": \"string\","]
20234#[doc = "          \"enum\": ["]
20235#[doc = "            \"INTERNAL_ERROR\""]
20236#[doc = "          ]"]
20237#[doc = "        }"]
20238#[doc = "      }"]
20239#[doc = "    }"]
20240#[doc = "  ]"]
20241#[doc = "}"]
20242#[doc = r" ```"]
20243#[doc = r" </details>"]
20244#[derive(
20245    :: serde :: Deserialize,
20246    :: serde :: Serialize,
20247    Clone,
20248    Debug,
20249    thiserror::Error,
20250    strum_macros::Display,
20251)]
20252#[serde(tag = "name", content = "info")]
20253pub enum RpcBlockError {
20254    #[serde(rename = "UNKNOWN_BLOCK")]
20255    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
20256    #[serde(rename = "NOT_SYNCED_YET")]
20257    NotSyncedYet,
20258    #[serde(rename = "INTERNAL_ERROR")]
20259    InternalError {
20260        error_message: ::std::string::String,
20261    },
20262}
20263impl ::std::convert::From<&Self> for RpcBlockError {
20264    fn from(value: &RpcBlockError) -> Self {
20265        value.clone()
20266    }
20267}
20268impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
20269    for RpcBlockError
20270{
20271    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
20272        Self::UnknownBlock(value)
20273    }
20274}
20275#[doc = "`RpcBlockRequest`"]
20276#[doc = r""]
20277#[doc = r" <details><summary>JSON schema</summary>"]
20278#[doc = r""]
20279#[doc = r" ```json"]
20280#[doc = "{"]
20281#[doc = "  \"title\": \"RpcBlockRequest\","]
20282#[doc = "  \"type\": \"object\","]
20283#[doc = "  \"oneOf\": ["]
20284#[doc = "    {"]
20285#[doc = "      \"type\": \"object\","]
20286#[doc = "      \"required\": ["]
20287#[doc = "        \"block_id\""]
20288#[doc = "      ],"]
20289#[doc = "      \"properties\": {"]
20290#[doc = "        \"block_id\": {"]
20291#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
20292#[doc = "        }"]
20293#[doc = "      }"]
20294#[doc = "    },"]
20295#[doc = "    {"]
20296#[doc = "      \"type\": \"object\","]
20297#[doc = "      \"required\": ["]
20298#[doc = "        \"finality\""]
20299#[doc = "      ],"]
20300#[doc = "      \"properties\": {"]
20301#[doc = "        \"finality\": {"]
20302#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
20303#[doc = "        }"]
20304#[doc = "      }"]
20305#[doc = "    },"]
20306#[doc = "    {"]
20307#[doc = "      \"type\": \"object\","]
20308#[doc = "      \"required\": ["]
20309#[doc = "        \"sync_checkpoint\""]
20310#[doc = "      ],"]
20311#[doc = "      \"properties\": {"]
20312#[doc = "        \"sync_checkpoint\": {"]
20313#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20314#[doc = "        }"]
20315#[doc = "      }"]
20316#[doc = "    }"]
20317#[doc = "  ]"]
20318#[doc = "}"]
20319#[doc = r" ```"]
20320#[doc = r" </details>"]
20321#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20322pub enum RpcBlockRequest {
20323    #[serde(rename = "block_id")]
20324    BlockId(BlockId),
20325    #[serde(rename = "finality")]
20326    Finality(Finality),
20327    #[serde(rename = "sync_checkpoint")]
20328    SyncCheckpoint(SyncCheckpoint),
20329}
20330impl ::std::convert::From<&Self> for RpcBlockRequest {
20331    fn from(value: &RpcBlockRequest) -> Self {
20332        value.clone()
20333    }
20334}
20335impl ::std::convert::From<BlockId> for RpcBlockRequest {
20336    fn from(value: BlockId) -> Self {
20337        Self::BlockId(value)
20338    }
20339}
20340impl ::std::convert::From<Finality> for RpcBlockRequest {
20341    fn from(value: Finality) -> Self {
20342        Self::Finality(value)
20343    }
20344}
20345impl ::std::convert::From<SyncCheckpoint> for RpcBlockRequest {
20346    fn from(value: SyncCheckpoint) -> Self {
20347        Self::SyncCheckpoint(value)
20348    }
20349}
20350#[doc = "`RpcBlockResponse`"]
20351#[doc = r""]
20352#[doc = r" <details><summary>JSON schema</summary>"]
20353#[doc = r""]
20354#[doc = r" ```json"]
20355#[doc = "{"]
20356#[doc = "  \"type\": \"object\","]
20357#[doc = "  \"required\": ["]
20358#[doc = "    \"author\","]
20359#[doc = "    \"chunks\","]
20360#[doc = "    \"header\""]
20361#[doc = "  ],"]
20362#[doc = "  \"properties\": {"]
20363#[doc = "    \"author\": {"]
20364#[doc = "      \"description\": \"The AccountId of the author of the Block\","]
20365#[doc = "      \"allOf\": ["]
20366#[doc = "        {"]
20367#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
20368#[doc = "        }"]
20369#[doc = "      ]"]
20370#[doc = "    },"]
20371#[doc = "    \"chunks\": {"]
20372#[doc = "      \"type\": \"array\","]
20373#[doc = "      \"items\": {"]
20374#[doc = "        \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
20375#[doc = "      }"]
20376#[doc = "    },"]
20377#[doc = "    \"header\": {"]
20378#[doc = "      \"$ref\": \"#/components/schemas/BlockHeaderView\""]
20379#[doc = "    }"]
20380#[doc = "  }"]
20381#[doc = "}"]
20382#[doc = r" ```"]
20383#[doc = r" </details>"]
20384#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20385pub struct RpcBlockResponse {
20386    #[doc = "The AccountId of the author of the Block"]
20387    pub author: AccountId,
20388    pub chunks: ::std::vec::Vec<ChunkHeaderView>,
20389    pub header: BlockHeaderView,
20390}
20391impl ::std::convert::From<&RpcBlockResponse> for RpcBlockResponse {
20392    fn from(value: &RpcBlockResponse) -> Self {
20393        value.clone()
20394    }
20395}
20396#[doc = "`RpcChunkError`"]
20397#[doc = r""]
20398#[doc = r" <details><summary>JSON schema</summary>"]
20399#[doc = r""]
20400#[doc = r" ```json"]
20401#[doc = "{"]
20402#[doc = "  \"oneOf\": ["]
20403#[doc = "    {"]
20404#[doc = "      \"type\": \"object\","]
20405#[doc = "      \"required\": ["]
20406#[doc = "        \"info\","]
20407#[doc = "        \"name\""]
20408#[doc = "      ],"]
20409#[doc = "      \"properties\": {"]
20410#[doc = "        \"info\": {"]
20411#[doc = "          \"type\": \"object\","]
20412#[doc = "          \"required\": ["]
20413#[doc = "            \"error_message\""]
20414#[doc = "          ],"]
20415#[doc = "          \"properties\": {"]
20416#[doc = "            \"error_message\": {"]
20417#[doc = "              \"type\": \"string\""]
20418#[doc = "            }"]
20419#[doc = "          }"]
20420#[doc = "        },"]
20421#[doc = "        \"name\": {"]
20422#[doc = "          \"type\": \"string\","]
20423#[doc = "          \"enum\": ["]
20424#[doc = "            \"INTERNAL_ERROR\""]
20425#[doc = "          ]"]
20426#[doc = "        }"]
20427#[doc = "      }"]
20428#[doc = "    },"]
20429#[doc = "    {"]
20430#[doc = "      \"type\": \"object\","]
20431#[doc = "      \"required\": ["]
20432#[doc = "        \"info\","]
20433#[doc = "        \"name\""]
20434#[doc = "      ],"]
20435#[doc = "      \"properties\": {"]
20436#[doc = "        \"info\": {"]
20437#[doc = "          \"type\": \"object\""]
20438#[doc = "        },"]
20439#[doc = "        \"name\": {"]
20440#[doc = "          \"type\": \"string\","]
20441#[doc = "          \"enum\": ["]
20442#[doc = "            \"UNKNOWN_BLOCK\""]
20443#[doc = "          ]"]
20444#[doc = "        }"]
20445#[doc = "      }"]
20446#[doc = "    },"]
20447#[doc = "    {"]
20448#[doc = "      \"type\": \"object\","]
20449#[doc = "      \"required\": ["]
20450#[doc = "        \"info\","]
20451#[doc = "        \"name\""]
20452#[doc = "      ],"]
20453#[doc = "      \"properties\": {"]
20454#[doc = "        \"info\": {"]
20455#[doc = "          \"type\": \"object\","]
20456#[doc = "          \"required\": ["]
20457#[doc = "            \"shard_id\""]
20458#[doc = "          ],"]
20459#[doc = "          \"properties\": {"]
20460#[doc = "            \"shard_id\": {"]
20461#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
20462#[doc = "            }"]
20463#[doc = "          }"]
20464#[doc = "        },"]
20465#[doc = "        \"name\": {"]
20466#[doc = "          \"type\": \"string\","]
20467#[doc = "          \"enum\": ["]
20468#[doc = "            \"INVALID_SHARD_ID\""]
20469#[doc = "          ]"]
20470#[doc = "        }"]
20471#[doc = "      }"]
20472#[doc = "    },"]
20473#[doc = "    {"]
20474#[doc = "      \"type\": \"object\","]
20475#[doc = "      \"required\": ["]
20476#[doc = "        \"info\","]
20477#[doc = "        \"name\""]
20478#[doc = "      ],"]
20479#[doc = "      \"properties\": {"]
20480#[doc = "        \"info\": {"]
20481#[doc = "          \"type\": \"object\","]
20482#[doc = "          \"required\": ["]
20483#[doc = "            \"chunk_hash\""]
20484#[doc = "          ],"]
20485#[doc = "          \"properties\": {"]
20486#[doc = "            \"chunk_hash\": {"]
20487#[doc = "              \"$ref\": \"#/components/schemas/ChunkHash\""]
20488#[doc = "            }"]
20489#[doc = "          }"]
20490#[doc = "        },"]
20491#[doc = "        \"name\": {"]
20492#[doc = "          \"type\": \"string\","]
20493#[doc = "          \"enum\": ["]
20494#[doc = "            \"UNKNOWN_CHUNK\""]
20495#[doc = "          ]"]
20496#[doc = "        }"]
20497#[doc = "      }"]
20498#[doc = "    }"]
20499#[doc = "  ]"]
20500#[doc = "}"]
20501#[doc = r" ```"]
20502#[doc = r" </details>"]
20503#[derive(
20504    :: serde :: Deserialize,
20505    :: serde :: Serialize,
20506    Clone,
20507    Debug,
20508    thiserror::Error,
20509    strum_macros::Display,
20510)]
20511#[serde(tag = "name", content = "info")]
20512pub enum RpcChunkError {
20513    #[serde(rename = "INTERNAL_ERROR")]
20514    InternalError {
20515        error_message: ::std::string::String,
20516    },
20517    #[serde(rename = "UNKNOWN_BLOCK")]
20518    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
20519    #[serde(rename = "INVALID_SHARD_ID")]
20520    InvalidShardId { shard_id: ShardId },
20521    #[serde(rename = "UNKNOWN_CHUNK")]
20522    UnknownChunk { chunk_hash: ChunkHash },
20523}
20524impl ::std::convert::From<&Self> for RpcChunkError {
20525    fn from(value: &RpcChunkError) -> Self {
20526        value.clone()
20527    }
20528}
20529impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
20530    for RpcChunkError
20531{
20532    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
20533        Self::UnknownBlock(value)
20534    }
20535}
20536#[doc = "`RpcChunkRequest`"]
20537#[doc = r""]
20538#[doc = r" <details><summary>JSON schema</summary>"]
20539#[doc = r""]
20540#[doc = r" ```json"]
20541#[doc = "{"]
20542#[doc = "  \"title\": \"RpcChunkRequest\","]
20543#[doc = "  \"type\": \"object\","]
20544#[doc = "  \"anyOf\": ["]
20545#[doc = "    {"]
20546#[doc = "      \"title\": \"block_shard_id\","]
20547#[doc = "      \"type\": \"object\","]
20548#[doc = "      \"required\": ["]
20549#[doc = "        \"block_id\","]
20550#[doc = "        \"shard_id\""]
20551#[doc = "      ],"]
20552#[doc = "      \"properties\": {"]
20553#[doc = "        \"block_id\": {"]
20554#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
20555#[doc = "        },"]
20556#[doc = "        \"shard_id\": {"]
20557#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
20558#[doc = "        }"]
20559#[doc = "      }"]
20560#[doc = "    },"]
20561#[doc = "    {"]
20562#[doc = "      \"title\": \"chunk_hash\","]
20563#[doc = "      \"type\": \"object\","]
20564#[doc = "      \"required\": ["]
20565#[doc = "        \"chunk_id\""]
20566#[doc = "      ],"]
20567#[doc = "      \"properties\": {"]
20568#[doc = "        \"chunk_id\": {"]
20569#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
20570#[doc = "        }"]
20571#[doc = "      }"]
20572#[doc = "    }"]
20573#[doc = "  ]"]
20574#[doc = "}"]
20575#[doc = r" ```"]
20576#[doc = r" </details>"]
20577#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20578#[serde(untagged)]
20579pub enum RpcChunkRequest {
20580    BlockShardId {
20581        block_id: BlockId,
20582        shard_id: ShardId,
20583    },
20584    ChunkHash {
20585        chunk_id: CryptoHash,
20586    },
20587}
20588impl ::std::convert::From<&Self> for RpcChunkRequest {
20589    fn from(value: &RpcChunkRequest) -> Self {
20590        value.clone()
20591    }
20592}
20593#[doc = "`RpcChunkResponse`"]
20594#[doc = r""]
20595#[doc = r" <details><summary>JSON schema</summary>"]
20596#[doc = r""]
20597#[doc = r" ```json"]
20598#[doc = "{"]
20599#[doc = "  \"type\": \"object\","]
20600#[doc = "  \"required\": ["]
20601#[doc = "    \"author\","]
20602#[doc = "    \"header\","]
20603#[doc = "    \"receipts\","]
20604#[doc = "    \"transactions\""]
20605#[doc = "  ],"]
20606#[doc = "  \"properties\": {"]
20607#[doc = "    \"author\": {"]
20608#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
20609#[doc = "    },"]
20610#[doc = "    \"header\": {"]
20611#[doc = "      \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
20612#[doc = "    },"]
20613#[doc = "    \"receipts\": {"]
20614#[doc = "      \"type\": \"array\","]
20615#[doc = "      \"items\": {"]
20616#[doc = "        \"$ref\": \"#/components/schemas/ReceiptView\""]
20617#[doc = "      }"]
20618#[doc = "    },"]
20619#[doc = "    \"transactions\": {"]
20620#[doc = "      \"type\": \"array\","]
20621#[doc = "      \"items\": {"]
20622#[doc = "        \"$ref\": \"#/components/schemas/SignedTransactionView\""]
20623#[doc = "      }"]
20624#[doc = "    }"]
20625#[doc = "  }"]
20626#[doc = "}"]
20627#[doc = r" ```"]
20628#[doc = r" </details>"]
20629#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20630pub struct RpcChunkResponse {
20631    pub author: AccountId,
20632    pub header: ChunkHeaderView,
20633    pub receipts: ::std::vec::Vec<ReceiptView>,
20634    pub transactions: ::std::vec::Vec<SignedTransactionView>,
20635}
20636impl ::std::convert::From<&RpcChunkResponse> for RpcChunkResponse {
20637    fn from(value: &RpcChunkResponse) -> Self {
20638        value.clone()
20639    }
20640}
20641#[doc = "`RpcClientConfigError`"]
20642#[doc = r""]
20643#[doc = r" <details><summary>JSON schema</summary>"]
20644#[doc = r""]
20645#[doc = r" ```json"]
20646#[doc = "{"]
20647#[doc = "  \"oneOf\": ["]
20648#[doc = "    {"]
20649#[doc = "      \"type\": \"object\","]
20650#[doc = "      \"required\": ["]
20651#[doc = "        \"info\","]
20652#[doc = "        \"name\""]
20653#[doc = "      ],"]
20654#[doc = "      \"properties\": {"]
20655#[doc = "        \"info\": {"]
20656#[doc = "          \"type\": \"object\","]
20657#[doc = "          \"required\": ["]
20658#[doc = "            \"error_message\""]
20659#[doc = "          ],"]
20660#[doc = "          \"properties\": {"]
20661#[doc = "            \"error_message\": {"]
20662#[doc = "              \"type\": \"string\""]
20663#[doc = "            }"]
20664#[doc = "          }"]
20665#[doc = "        },"]
20666#[doc = "        \"name\": {"]
20667#[doc = "          \"type\": \"string\","]
20668#[doc = "          \"enum\": ["]
20669#[doc = "            \"INTERNAL_ERROR\""]
20670#[doc = "          ]"]
20671#[doc = "        }"]
20672#[doc = "      }"]
20673#[doc = "    }"]
20674#[doc = "  ]"]
20675#[doc = "}"]
20676#[doc = r" ```"]
20677#[doc = r" </details>"]
20678#[derive(
20679    :: serde :: Deserialize,
20680    :: serde :: Serialize,
20681    Clone,
20682    Debug,
20683    thiserror::Error,
20684    strum_macros::Display,
20685)]
20686#[serde(tag = "name", content = "info")]
20687pub enum RpcClientConfigError {
20688    #[serde(rename = "INTERNAL_ERROR")]
20689    InternalError {
20690        error_message: ::std::string::String,
20691    },
20692}
20693impl ::std::convert::From<&Self> for RpcClientConfigError {
20694    fn from(value: &RpcClientConfigError) -> Self {
20695        value.clone()
20696    }
20697}
20698#[doc = "`RpcClientConfigRequest`"]
20699#[doc = r""]
20700#[doc = r" <details><summary>JSON schema</summary>"]
20701#[doc = r""]
20702#[doc = r" ```json"]
20703#[doc = "{"]
20704#[doc = "  \"title\": \"RpcClientConfigRequest\","]
20705#[doc = "  \"type\": \"null\""]
20706#[doc = "}"]
20707#[doc = r" ```"]
20708#[doc = r" </details>"]
20709#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20710#[serde(transparent)]
20711pub struct RpcClientConfigRequest(pub ());
20712impl ::std::ops::Deref for RpcClientConfigRequest {
20713    type Target = ();
20714    fn deref(&self) -> &() {
20715        &self.0
20716    }
20717}
20718impl ::std::convert::From<RpcClientConfigRequest> for () {
20719    fn from(value: RpcClientConfigRequest) -> Self {
20720        value.0
20721    }
20722}
20723impl ::std::convert::From<&RpcClientConfigRequest> for RpcClientConfigRequest {
20724    fn from(value: &RpcClientConfigRequest) -> Self {
20725        value.clone()
20726    }
20727}
20728impl ::std::convert::From<()> for RpcClientConfigRequest {
20729    fn from(value: ()) -> Self {
20730        Self(value)
20731    }
20732}
20733#[doc = "ClientConfig where some fields can be updated at runtime."]
20734#[doc = r""]
20735#[doc = r" <details><summary>JSON schema</summary>"]
20736#[doc = r""]
20737#[doc = r" ```json"]
20738#[doc = "{"]
20739#[doc = "  \"description\": \"ClientConfig where some fields can be updated at runtime.\","]
20740#[doc = "  \"type\": \"object\","]
20741#[doc = "  \"properties\": {"]
20742#[doc = "    \"archive\": {"]
20743#[doc = "      \"description\": \"Not clear old data, set `true` for archive nodes.\","]
20744#[doc = "      \"type\": \"boolean\""]
20745#[doc = "    },"]
20746#[doc = "    \"block_fetch_horizon\": {"]
20747#[doc = "      \"description\": \"Horizon at which instead of fetching block, fetch full state.\","]
20748#[doc = "      \"type\": \"integer\","]
20749#[doc = "      \"format\": \"uint64\","]
20750#[doc = "      \"minimum\": 0.0"]
20751#[doc = "    },"]
20752#[doc = "    \"block_header_fetch_horizon\": {"]
20753#[doc = "      \"description\": \"Behind this horizon header fetch kicks in.\","]
20754#[doc = "      \"type\": \"integer\","]
20755#[doc = "      \"format\": \"uint64\","]
20756#[doc = "      \"minimum\": 0.0"]
20757#[doc = "    },"]
20758#[doc = "    \"block_production_tracking_delay\": {"]
20759#[doc = "      \"description\": \"Duration to check for producing / skipping block.\","]
20760#[doc = "      \"type\": \"array\","]
20761#[doc = "      \"items\": {"]
20762#[doc = "        \"type\": \"integer\","]
20763#[doc = "        \"format\": \"uint64\","]
20764#[doc = "        \"minimum\": 0.0"]
20765#[doc = "      },"]
20766#[doc = "      \"maxItems\": 2,"]
20767#[doc = "      \"minItems\": 2"]
20768#[doc = "    },"]
20769#[doc = "    \"catchup_step_period\": {"]
20770#[doc = "      \"description\": \"Time between check to perform catchup.\","]
20771#[doc = "      \"type\": \"array\","]
20772#[doc = "      \"items\": {"]
20773#[doc = "        \"type\": \"integer\","]
20774#[doc = "        \"format\": \"uint64\","]
20775#[doc = "        \"minimum\": 0.0"]
20776#[doc = "      },"]
20777#[doc = "      \"maxItems\": 2,"]
20778#[doc = "      \"minItems\": 2"]
20779#[doc = "    },"]
20780#[doc = "    \"chain_id\": {"]
20781#[doc = "      \"description\": \"Chain id for status.\","]
20782#[doc = "      \"type\": \"string\""]
20783#[doc = "    },"]
20784#[doc = "    \"chunk_distribution_network\": {"]
20785#[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.\","]
20786#[doc = "      \"anyOf\": ["]
20787#[doc = "        {"]
20788#[doc = "          \"$ref\": \"#/components/schemas/ChunkDistributionNetworkConfig\""]
20789#[doc = "        },"]
20790#[doc = "        {"]
20791#[doc = "          \"type\": \"null\""]
20792#[doc = "        }"]
20793#[doc = "      ]"]
20794#[doc = "    },"]
20795#[doc = "    \"chunk_request_retry_period\": {"]
20796#[doc = "      \"description\": \"Time between checking to re-request chunks.\","]
20797#[doc = "      \"type\": \"array\","]
20798#[doc = "      \"items\": {"]
20799#[doc = "        \"type\": \"integer\","]
20800#[doc = "        \"format\": \"uint64\","]
20801#[doc = "        \"minimum\": 0.0"]
20802#[doc = "      },"]
20803#[doc = "      \"maxItems\": 2,"]
20804#[doc = "      \"minItems\": 2"]
20805#[doc = "    },"]
20806#[doc = "    \"chunk_validation_threads\": {"]
20807#[doc = "      \"description\": \"Number of threads for ChunkValidationActor pool.\","]
20808#[doc = "      \"type\": \"integer\","]
20809#[doc = "      \"format\": \"uint\","]
20810#[doc = "      \"minimum\": 0.0"]
20811#[doc = "    },"]
20812#[doc = "    \"chunk_wait_mult\": {"]
20813#[doc = "      \"description\": \"Multiplier for the wait time for all chunks to be received.\","]
20814#[doc = "      \"type\": \"array\","]
20815#[doc = "      \"items\": {"]
20816#[doc = "        \"type\": \"integer\","]
20817#[doc = "        \"format\": \"int32\""]
20818#[doc = "      },"]
20819#[doc = "      \"maxItems\": 2,"]
20820#[doc = "      \"minItems\": 2"]
20821#[doc = "    },"]
20822#[doc = "    \"chunks_cache_height_horizon\": {"]
20823#[doc = "      \"description\": \"Height horizon for the chunk cache. A chunk is removed from the cache\\nif its height + chunks_cache_height_horizon < largest_seen_height.\\nThe default value is DEFAULT_CHUNKS_CACHE_HEIGHT_HORIZON.\","]
20824#[doc = "      \"type\": \"integer\","]
20825#[doc = "      \"format\": \"uint64\","]
20826#[doc = "      \"minimum\": 0.0"]
20827#[doc = "    },"]
20828#[doc = "    \"client_background_migration_threads\": {"]
20829#[doc = "      \"description\": \"Number of threads to execute background migration work in client.\","]
20830#[doc = "      \"type\": \"integer\","]
20831#[doc = "      \"format\": \"uint\","]
20832#[doc = "      \"minimum\": 0.0"]
20833#[doc = "    },"]
20834#[doc = "    \"cloud_archival_writer\": {"]
20835#[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.\","]
20836#[doc = "      \"anyOf\": ["]
20837#[doc = "        {"]
20838#[doc = "          \"$ref\": \"#/components/schemas/CloudArchivalWriterConfig\""]
20839#[doc = "        },"]
20840#[doc = "        {"]
20841#[doc = "          \"type\": \"null\""]
20842#[doc = "        }"]
20843#[doc = "      ]"]
20844#[doc = "    },"]
20845#[doc = "    \"disable_tx_routing\": {"]
20846#[doc = "      \"description\": \"If true, the node won't forward transactions to next the chunk producers.\","]
20847#[doc = "      \"type\": \"boolean\""]
20848#[doc = "    },"]
20849#[doc = "    \"doomslug_step_period\": {"]
20850#[doc = "      \"description\": \"Time between running doomslug timer.\","]
20851#[doc = "      \"type\": \"array\","]
20852#[doc = "      \"items\": {"]
20853#[doc = "        \"type\": \"integer\","]
20854#[doc = "        \"format\": \"uint64\","]
20855#[doc = "        \"minimum\": 0.0"]
20856#[doc = "      },"]
20857#[doc = "      \"maxItems\": 2,"]
20858#[doc = "      \"minItems\": 2"]
20859#[doc = "    },"]
20860#[doc = "    \"dynamic_resharding_dry_run\": {"]
20861#[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.\","]
20862#[doc = "      \"type\": \"boolean\""]
20863#[doc = "    },"]
20864#[doc = "    \"enable_early_prepare_transactions\": {"]
20865#[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.\","]
20866#[doc = "      \"type\": \"boolean\""]
20867#[doc = "    },"]
20868#[doc = "    \"enable_multiline_logging\": {"]
20869#[doc = "      \"type\": \"boolean\""]
20870#[doc = "    },"]
20871#[doc = "    \"enable_statistics_export\": {"]
20872#[doc = "      \"description\": \"Re-export storage layer statistics as prometheus metrics.\","]
20873#[doc = "      \"type\": \"boolean\""]
20874#[doc = "    },"]
20875#[doc = "    \"epoch_length\": {"]
20876#[doc = "      \"description\": \"Epoch length.\","]
20877#[doc = "      \"type\": \"integer\","]
20878#[doc = "      \"format\": \"uint64\","]
20879#[doc = "      \"minimum\": 0.0"]
20880#[doc = "    },"]
20881#[doc = "    \"epoch_sync\": {"]
20882#[doc = "      \"description\": \"Options for epoch sync.\","]
20883#[doc = "      \"allOf\": ["]
20884#[doc = "        {"]
20885#[doc = "          \"$ref\": \"#/components/schemas/EpochSyncConfig\""]
20886#[doc = "        }"]
20887#[doc = "      ]"]
20888#[doc = "    },"]
20889#[doc = "    \"expected_shutdown\": {"]
20890#[doc = "      \"description\": \"Graceful shutdown at expected block height.\","]
20891#[doc = "      \"allOf\": ["]
20892#[doc = "        {"]
20893#[doc = "          \"$ref\": \"#/components/schemas/MutableConfigValue\""]
20894#[doc = "        }"]
20895#[doc = "      ]"]
20896#[doc = "    },"]
20897#[doc = "    \"gc\": {"]
20898#[doc = "      \"description\": \"Garbage collection configuration.\","]
20899#[doc = "      \"allOf\": ["]
20900#[doc = "        {"]
20901#[doc = "          \"$ref\": \"#/components/schemas/GCConfig\""]
20902#[doc = "        }"]
20903#[doc = "      ]"]
20904#[doc = "    },"]
20905#[doc = "    \"header_sync_expected_height_per_second\": {"]
20906#[doc = "      \"description\": \"Expected increase of header head height per second during header sync\","]
20907#[doc = "      \"type\": \"integer\","]
20908#[doc = "      \"format\": \"uint64\","]
20909#[doc = "      \"minimum\": 0.0"]
20910#[doc = "    },"]
20911#[doc = "    \"header_sync_initial_timeout\": {"]
20912#[doc = "      \"description\": \"How much time to wait after initial header sync\","]
20913#[doc = "      \"type\": \"array\","]
20914#[doc = "      \"items\": {"]
20915#[doc = "        \"type\": \"integer\","]
20916#[doc = "        \"format\": \"uint64\","]
20917#[doc = "        \"minimum\": 0.0"]
20918#[doc = "      },"]
20919#[doc = "      \"maxItems\": 2,"]
20920#[doc = "      \"minItems\": 2"]
20921#[doc = "    },"]
20922#[doc = "    \"header_sync_progress_timeout\": {"]
20923#[doc = "      \"description\": \"How much time to wait after some progress is made in header sync\","]
20924#[doc = "      \"type\": \"array\","]
20925#[doc = "      \"items\": {"]
20926#[doc = "        \"type\": \"integer\","]
20927#[doc = "        \"format\": \"uint64\","]
20928#[doc = "        \"minimum\": 0.0"]
20929#[doc = "      },"]
20930#[doc = "      \"maxItems\": 2,"]
20931#[doc = "      \"minItems\": 2"]
20932#[doc = "    },"]
20933#[doc = "    \"header_sync_stall_ban_timeout\": {"]
20934#[doc = "      \"description\": \"How much time to wait before banning a peer in header sync if sync is too slow\","]
20935#[doc = "      \"type\": \"array\","]
20936#[doc = "      \"items\": {"]
20937#[doc = "        \"type\": \"integer\","]
20938#[doc = "        \"format\": \"uint64\","]
20939#[doc = "        \"minimum\": 0.0"]
20940#[doc = "      },"]
20941#[doc = "      \"maxItems\": 2,"]
20942#[doc = "      \"minItems\": 2"]
20943#[doc = "    },"]
20944#[doc = "    \"log_summary_period\": {"]
20945#[doc = "      \"description\": \"Period between logging summary information.\","]
20946#[doc = "      \"type\": \"array\","]
20947#[doc = "      \"items\": {"]
20948#[doc = "        \"type\": \"integer\","]
20949#[doc = "        \"format\": \"uint64\","]
20950#[doc = "        \"minimum\": 0.0"]
20951#[doc = "      },"]
20952#[doc = "      \"maxItems\": 2,"]
20953#[doc = "      \"minItems\": 2"]
20954#[doc = "    },"]
20955#[doc = "    \"log_summary_style\": {"]
20956#[doc = "      \"description\": \"Enable coloring of the logs\","]
20957#[doc = "      \"allOf\": ["]
20958#[doc = "        {"]
20959#[doc = "          \"$ref\": \"#/components/schemas/LogSummaryStyle\""]
20960#[doc = "        }"]
20961#[doc = "      ]"]
20962#[doc = "    },"]
20963#[doc = "    \"max_block_production_delay\": {"]
20964#[doc = "      \"description\": \"Maximum wait for approvals before producing block.\","]
20965#[doc = "      \"type\": \"array\","]
20966#[doc = "      \"items\": {"]
20967#[doc = "        \"type\": \"integer\","]
20968#[doc = "        \"format\": \"uint64\","]
20969#[doc = "        \"minimum\": 0.0"]
20970#[doc = "      },"]
20971#[doc = "      \"maxItems\": 2,"]
20972#[doc = "      \"minItems\": 2"]
20973#[doc = "    },"]
20974#[doc = "    \"max_block_wait_delay\": {"]
20975#[doc = "      \"description\": \"Maximum duration before skipping given height.\","]
20976#[doc = "      \"type\": \"array\","]
20977#[doc = "      \"items\": {"]
20978#[doc = "        \"type\": \"integer\","]
20979#[doc = "        \"format\": \"uint64\","]
20980#[doc = "        \"minimum\": 0.0"]
20981#[doc = "      },"]
20982#[doc = "      \"maxItems\": 2,"]
20983#[doc = "      \"minItems\": 2"]
20984#[doc = "    },"]
20985#[doc = "    \"max_gas_burnt_view\": {"]
20986#[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.\","]
20987#[doc = "      \"anyOf\": ["]
20988#[doc = "        {"]
20989#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
20990#[doc = "        },"]
20991#[doc = "        {"]
20992#[doc = "          \"type\": \"null\""]
20993#[doc = "        }"]
20994#[doc = "      ]"]
20995#[doc = "    },"]
20996#[doc = "    \"min_block_production_delay\": {"]
20997#[doc = "      \"description\": \"Minimum duration before producing block.\","]
20998#[doc = "      \"type\": \"array\","]
20999#[doc = "      \"items\": {"]
21000#[doc = "        \"type\": \"integer\","]
21001#[doc = "        \"format\": \"uint64\","]
21002#[doc = "        \"minimum\": 0.0"]
21003#[doc = "      },"]
21004#[doc = "      \"maxItems\": 2,"]
21005#[doc = "      \"minItems\": 2"]
21006#[doc = "    },"]
21007#[doc = "    \"min_num_peers\": {"]
21008#[doc = "      \"description\": \"Minimum number of peers to start syncing.\","]
21009#[doc = "      \"type\": \"integer\","]
21010#[doc = "      \"format\": \"uint\","]
21011#[doc = "      \"minimum\": 0.0"]
21012#[doc = "    },"]
21013#[doc = "    \"num_block_producer_seats\": {"]
21014#[doc = "      \"description\": \"Number of block producer seats\","]
21015#[doc = "      \"type\": \"integer\","]
21016#[doc = "      \"format\": \"uint64\","]
21017#[doc = "      \"minimum\": 0.0"]
21018#[doc = "    },"]
21019#[doc = "    \"orphan_state_witness_max_size\": {"]
21020#[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.\","]
21021#[doc = "      \"type\": \"integer\","]
21022#[doc = "      \"format\": \"uint64\","]
21023#[doc = "      \"minimum\": 0.0"]
21024#[doc = "    },"]
21025#[doc = "    \"orphan_state_witness_pool_size\": {"]
21026#[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.\","]
21027#[doc = "      \"type\": \"integer\","]
21028#[doc = "      \"format\": \"uint\","]
21029#[doc = "      \"minimum\": 0.0"]
21030#[doc = "    },"]
21031#[doc = "    \"produce_chunk_add_transactions_time_limit\": {"]
21032#[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.\","]
21033#[doc = "      \"type\": \"string\""]
21034#[doc = "    },"]
21035#[doc = "    \"produce_empty_blocks\": {"]
21036#[doc = "      \"description\": \"Produce empty blocks, use `false` for testing.\","]
21037#[doc = "      \"type\": \"boolean\""]
21038#[doc = "    },"]
21039#[doc = "    \"protocol_version_check\": {"]
21040#[doc = "      \"description\": \"Determines whether client should exit if the protocol version is not supported\\nfor the next or next next epoch.\","]
21041#[doc = "      \"allOf\": ["]
21042#[doc = "        {"]
21043#[doc = "          \"$ref\": \"#/components/schemas/ProtocolVersionCheckConfig\""]
21044#[doc = "        }"]
21045#[doc = "      ]"]
21046#[doc = "    },"]
21047#[doc = "    \"resharding_config\": {"]
21048#[doc = "      \"$ref\": \"#/components/schemas/MutableConfigValue\""]
21049#[doc = "    },"]
21050#[doc = "    \"rpc_addr\": {"]
21051#[doc = "      \"description\": \"Listening rpc port for status.\","]
21052#[doc = "      \"type\": ["]
21053#[doc = "        \"string\","]
21054#[doc = "        \"null\""]
21055#[doc = "      ]"]
21056#[doc = "    },"]
21057#[doc = "    \"save_invalid_witnesses\": {"]
21058#[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.\","]
21059#[doc = "      \"type\": \"boolean\""]
21060#[doc = "    },"]
21061#[doc = "    \"save_latest_witnesses\": {"]
21062#[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.\","]
21063#[doc = "      \"type\": \"boolean\""]
21064#[doc = "    },"]
21065#[doc = "    \"save_state_changes\": {"]
21066#[doc = "      \"description\": \"Whether to persist state changes on disk or not.\","]
21067#[doc = "      \"type\": \"boolean\""]
21068#[doc = "    },"]
21069#[doc = "    \"save_trie_changes\": {"]
21070#[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.\","]
21071#[doc = "      \"type\": \"boolean\""]
21072#[doc = "    },"]
21073#[doc = "    \"save_tx_outcomes\": {"]
21074#[doc = "      \"description\": \"Whether to persist transaction outcomes to disk or not.\","]
21075#[doc = "      \"type\": \"boolean\""]
21076#[doc = "    },"]
21077#[doc = "    \"save_untracked_partial_chunks_parts\": {"]
21078#[doc = "      \"description\": \"Whether to persist partial chunk parts for untracked shards or not.\","]
21079#[doc = "      \"type\": \"boolean\""]
21080#[doc = "    },"]
21081#[doc = "    \"skip_sync_wait\": {"]
21082#[doc = "      \"description\": \"Skip waiting for sync (for testing or single node testnet).\","]
21083#[doc = "      \"type\": \"boolean\""]
21084#[doc = "    },"]
21085#[doc = "    \"state_request_server_threads\": {"]
21086#[doc = "      \"description\": \"Number of threads for StateRequestActor pool.\","]
21087#[doc = "      \"type\": \"integer\","]
21088#[doc = "      \"format\": \"uint\","]
21089#[doc = "      \"minimum\": 0.0"]
21090#[doc = "    },"]
21091#[doc = "    \"state_request_throttle_period\": {"]
21092#[doc = "      \"description\": \"Number of seconds between state requests for view client.\\nThrottling window for state requests (headers and parts).\","]
21093#[doc = "      \"type\": \"array\","]
21094#[doc = "      \"items\": {"]
21095#[doc = "        \"type\": \"integer\","]
21096#[doc = "        \"format\": \"uint64\","]
21097#[doc = "        \"minimum\": 0.0"]
21098#[doc = "      },"]
21099#[doc = "      \"maxItems\": 2,"]
21100#[doc = "      \"minItems\": 2"]
21101#[doc = "    },"]
21102#[doc = "    \"state_requests_per_throttle_period\": {"]
21103#[doc = "      \"description\": \"Maximum number of state requests served per throttle period\","]
21104#[doc = "      \"type\": \"integer\","]
21105#[doc = "      \"format\": \"uint\","]
21106#[doc = "      \"minimum\": 0.0"]
21107#[doc = "    },"]
21108#[doc = "    \"state_sync\": {"]
21109#[doc = "      \"description\": \"Options for syncing state.\","]
21110#[doc = "      \"allOf\": ["]
21111#[doc = "        {"]
21112#[doc = "          \"$ref\": \"#/components/schemas/StateSyncConfig\""]
21113#[doc = "        }"]
21114#[doc = "      ]"]
21115#[doc = "    },"]
21116#[doc = "    \"state_sync_enabled\": {"]
21117#[doc = "      \"description\": \"Whether to use the State Sync mechanism.\\nIf disabled, the node will do Block Sync instead of State Sync.\","]
21118#[doc = "      \"type\": \"boolean\""]
21119#[doc = "    },"]
21120#[doc = "    \"state_sync_external_backoff\": {"]
21121#[doc = "      \"description\": \"Additional waiting period after a failed request to external storage\","]
21122#[doc = "      \"type\": \"array\","]
21123#[doc = "      \"items\": {"]
21124#[doc = "        \"type\": \"integer\","]
21125#[doc = "        \"format\": \"uint64\","]
21126#[doc = "        \"minimum\": 0.0"]
21127#[doc = "      },"]
21128#[doc = "      \"maxItems\": 2,"]
21129#[doc = "      \"minItems\": 2"]
21130#[doc = "    },"]
21131#[doc = "    \"state_sync_external_timeout\": {"]
21132#[doc = "      \"description\": \"How long to wait for a response from centralized state sync\","]
21133#[doc = "      \"type\": \"array\","]
21134#[doc = "      \"items\": {"]
21135#[doc = "        \"type\": \"integer\","]
21136#[doc = "        \"format\": \"uint64\","]
21137#[doc = "        \"minimum\": 0.0"]
21138#[doc = "      },"]
21139#[doc = "      \"maxItems\": 2,"]
21140#[doc = "      \"minItems\": 2"]
21141#[doc = "    },"]
21142#[doc = "    \"state_sync_p2p_timeout\": {"]
21143#[doc = "      \"description\": \"How long to wait for a response from p2p state sync\","]
21144#[doc = "      \"type\": \"array\","]
21145#[doc = "      \"items\": {"]
21146#[doc = "        \"type\": \"integer\","]
21147#[doc = "        \"format\": \"uint64\","]
21148#[doc = "        \"minimum\": 0.0"]
21149#[doc = "      },"]
21150#[doc = "      \"maxItems\": 2,"]
21151#[doc = "      \"minItems\": 2"]
21152#[doc = "    },"]
21153#[doc = "    \"state_sync_retry_backoff\": {"]
21154#[doc = "      \"description\": \"How long to wait after a failed state sync request\","]
21155#[doc = "      \"type\": \"array\","]
21156#[doc = "      \"items\": {"]
21157#[doc = "        \"type\": \"integer\","]
21158#[doc = "        \"format\": \"uint64\","]
21159#[doc = "        \"minimum\": 0.0"]
21160#[doc = "      },"]
21161#[doc = "      \"maxItems\": 2,"]
21162#[doc = "      \"minItems\": 2"]
21163#[doc = "    },"]
21164#[doc = "    \"sync_check_period\": {"]
21165#[doc = "      \"description\": \"How often to check that we are not out of sync.\","]
21166#[doc = "      \"type\": \"array\","]
21167#[doc = "      \"items\": {"]
21168#[doc = "        \"type\": \"integer\","]
21169#[doc = "        \"format\": \"uint64\","]
21170#[doc = "        \"minimum\": 0.0"]
21171#[doc = "      },"]
21172#[doc = "      \"maxItems\": 2,"]
21173#[doc = "      \"minItems\": 2"]
21174#[doc = "    },"]
21175#[doc = "    \"sync_height_threshold\": {"]
21176#[doc = "      \"description\": \"Sync height threshold: below this difference in height don't start syncing.\","]
21177#[doc = "      \"type\": \"integer\","]
21178#[doc = "      \"format\": \"uint64\","]
21179#[doc = "      \"minimum\": 0.0"]
21180#[doc = "    },"]
21181#[doc = "    \"sync_max_block_requests\": {"]
21182#[doc = "      \"description\": \"Maximum number of block requests to send to peers to sync\","]
21183#[doc = "      \"type\": \"integer\","]
21184#[doc = "      \"format\": \"uint\","]
21185#[doc = "      \"minimum\": 0.0"]
21186#[doc = "    },"]
21187#[doc = "    \"sync_step_period\": {"]
21188#[doc = "      \"description\": \"While syncing, how long to check for each step.\","]
21189#[doc = "      \"type\": \"array\","]
21190#[doc = "      \"items\": {"]
21191#[doc = "        \"type\": \"integer\","]
21192#[doc = "        \"format\": \"uint64\","]
21193#[doc = "        \"minimum\": 0.0"]
21194#[doc = "      },"]
21195#[doc = "      \"maxItems\": 2,"]
21196#[doc = "      \"minItems\": 2"]
21197#[doc = "    },"]
21198#[doc = "    \"tracked_shards_config\": {"]
21199#[doc = "      \"$ref\": \"#/components/schemas/TrackedShardsConfig\""]
21200#[doc = "    },"]
21201#[doc = "    \"transaction_pool_size_limit\": {"]
21202#[doc = "      \"description\": \"Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\\nwill be unbounded.\","]
21203#[doc = "      \"type\": ["]
21204#[doc = "        \"integer\","]
21205#[doc = "        \"null\""]
21206#[doc = "      ],"]
21207#[doc = "      \"format\": \"uint64\","]
21208#[doc = "      \"minimum\": 0.0"]
21209#[doc = "    },"]
21210#[doc = "    \"transaction_request_handler_threads\": {"]
21211#[doc = "      \"type\": \"integer\","]
21212#[doc = "      \"format\": \"uint\","]
21213#[doc = "      \"minimum\": 0.0"]
21214#[doc = "    },"]
21215#[doc = "    \"trie_viewer_state_size_limit\": {"]
21216#[doc = "      \"description\": \"Upper bound of the byte size of contract state that is still viewable. None is no limit\","]
21217#[doc = "      \"type\": ["]
21218#[doc = "        \"integer\","]
21219#[doc = "        \"null\""]
21220#[doc = "      ],"]
21221#[doc = "      \"format\": \"uint64\","]
21222#[doc = "      \"minimum\": 0.0"]
21223#[doc = "    },"]
21224#[doc = "    \"ttl_account_id_router\": {"]
21225#[doc = "      \"description\": \"Time to persist Accounts Id in the router without removing them.\","]
21226#[doc = "      \"type\": \"array\","]
21227#[doc = "      \"items\": {"]
21228#[doc = "        \"type\": \"integer\","]
21229#[doc = "        \"format\": \"uint64\","]
21230#[doc = "        \"minimum\": 0.0"]
21231#[doc = "      },"]
21232#[doc = "      \"maxItems\": 2,"]
21233#[doc = "      \"minItems\": 2"]
21234#[doc = "    },"]
21235#[doc = "    \"tx_routing_height_horizon\": {"]
21236#[doc = "      \"description\": \"If the node is not a chunk producer within that many blocks, then route\\nto upcoming chunk producers.\","]
21237#[doc = "      \"type\": \"integer\","]
21238#[doc = "      \"format\": \"uint64\","]
21239#[doc = "      \"minimum\": 0.0"]
21240#[doc = "    },"]
21241#[doc = "    \"version\": {"]
21242#[doc = "      \"description\": \"Version of the binary.\","]
21243#[doc = "      \"allOf\": ["]
21244#[doc = "        {"]
21245#[doc = "          \"$ref\": \"#/components/schemas/Version\""]
21246#[doc = "        }"]
21247#[doc = "      ]"]
21248#[doc = "    },"]
21249#[doc = "    \"view_client_threads\": {"]
21250#[doc = "      \"description\": \"Number of threads for ViewClientActor pool.\","]
21251#[doc = "      \"type\": \"integer\","]
21252#[doc = "      \"format\": \"uint\","]
21253#[doc = "      \"minimum\": 0.0"]
21254#[doc = "    }"]
21255#[doc = "  }"]
21256#[doc = "}"]
21257#[doc = r" ```"]
21258#[doc = r" </details>"]
21259#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21260pub struct RpcClientConfigResponse {
21261    #[doc = "Not clear old data, set `true` for archive nodes."]
21262    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21263    pub archive: ::std::option::Option<bool>,
21264    #[doc = "Horizon at which instead of fetching block, fetch full state."]
21265    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21266    pub block_fetch_horizon: ::std::option::Option<u64>,
21267    #[doc = "Behind this horizon header fetch kicks in."]
21268    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21269    pub block_header_fetch_horizon: ::std::option::Option<u64>,
21270    #[doc = "Duration to check for producing / skipping block."]
21271    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21272    pub block_production_tracking_delay: ::std::option::Option<[u64; 2usize]>,
21273    #[doc = "Time between check to perform catchup."]
21274    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21275    pub catchup_step_period: ::std::option::Option<[u64; 2usize]>,
21276    #[doc = "Chain id for status."]
21277    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21278    pub chain_id: ::std::option::Option<::std::string::String>,
21279    #[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."]
21280    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21281    pub chunk_distribution_network: ::std::option::Option<ChunkDistributionNetworkConfig>,
21282    #[doc = "Time between checking to re-request chunks."]
21283    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21284    pub chunk_request_retry_period: ::std::option::Option<[u64; 2usize]>,
21285    #[doc = "Number of threads for ChunkValidationActor pool."]
21286    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21287    pub chunk_validation_threads: ::std::option::Option<u32>,
21288    #[doc = "Multiplier for the wait time for all chunks to be received."]
21289    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21290    pub chunk_wait_mult: ::std::option::Option<[i32; 2usize]>,
21291    #[doc = "Height horizon for the chunk cache. A chunk is removed from the cache\nif its height + chunks_cache_height_horizon < largest_seen_height.\nThe default value is DEFAULT_CHUNKS_CACHE_HEIGHT_HORIZON."]
21292    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21293    pub chunks_cache_height_horizon: ::std::option::Option<u64>,
21294    #[doc = "Number of threads to execute background migration work in client."]
21295    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21296    pub client_background_migration_threads: ::std::option::Option<u32>,
21297    #[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."]
21298    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21299    pub cloud_archival_writer: ::std::option::Option<CloudArchivalWriterConfig>,
21300    #[doc = "If true, the node won't forward transactions to next the chunk producers."]
21301    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21302    pub disable_tx_routing: ::std::option::Option<bool>,
21303    #[doc = "Time between running doomslug timer."]
21304    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21305    pub doomslug_step_period: ::std::option::Option<[u64; 2usize]>,
21306    #[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."]
21307    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21308    pub dynamic_resharding_dry_run: ::std::option::Option<bool>,
21309    #[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."]
21310    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21311    pub enable_early_prepare_transactions: ::std::option::Option<bool>,
21312    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21313    pub enable_multiline_logging: ::std::option::Option<bool>,
21314    #[doc = "Re-export storage layer statistics as prometheus metrics."]
21315    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21316    pub enable_statistics_export: ::std::option::Option<bool>,
21317    #[doc = "Epoch length."]
21318    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21319    pub epoch_length: ::std::option::Option<u64>,
21320    #[doc = "Options for epoch sync."]
21321    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21322    pub epoch_sync: ::std::option::Option<EpochSyncConfig>,
21323    #[doc = "Graceful shutdown at expected block height."]
21324    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21325    pub expected_shutdown: ::std::option::Option<MutableConfigValue>,
21326    #[doc = "Garbage collection configuration."]
21327    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21328    pub gc: ::std::option::Option<GcConfig>,
21329    #[doc = "Expected increase of header head height per second during header sync"]
21330    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21331    pub header_sync_expected_height_per_second: ::std::option::Option<u64>,
21332    #[doc = "How much time to wait after initial header sync"]
21333    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21334    pub header_sync_initial_timeout: ::std::option::Option<[u64; 2usize]>,
21335    #[doc = "How much time to wait after some progress is made in header sync"]
21336    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21337    pub header_sync_progress_timeout: ::std::option::Option<[u64; 2usize]>,
21338    #[doc = "How much time to wait before banning a peer in header sync if sync is too slow"]
21339    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21340    pub header_sync_stall_ban_timeout: ::std::option::Option<[u64; 2usize]>,
21341    #[doc = "Period between logging summary information."]
21342    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21343    pub log_summary_period: ::std::option::Option<[u64; 2usize]>,
21344    #[doc = "Enable coloring of the logs"]
21345    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21346    pub log_summary_style: ::std::option::Option<LogSummaryStyle>,
21347    #[doc = "Maximum wait for approvals before producing block."]
21348    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21349    pub max_block_production_delay: ::std::option::Option<[u64; 2usize]>,
21350    #[doc = "Maximum duration before skipping given height."]
21351    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21352    pub max_block_wait_delay: ::std::option::Option<[u64; 2usize]>,
21353    #[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."]
21354    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21355    pub max_gas_burnt_view: ::std::option::Option<NearGas>,
21356    #[doc = "Minimum duration before producing block."]
21357    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21358    pub min_block_production_delay: ::std::option::Option<[u64; 2usize]>,
21359    #[doc = "Minimum number of peers to start syncing."]
21360    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21361    pub min_num_peers: ::std::option::Option<u32>,
21362    #[doc = "Number of block producer seats"]
21363    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21364    pub num_block_producer_seats: ::std::option::Option<u64>,
21365    #[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."]
21366    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21367    pub orphan_state_witness_max_size: ::std::option::Option<u64>,
21368    #[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."]
21369    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21370    pub orphan_state_witness_pool_size: ::std::option::Option<u32>,
21371    #[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."]
21372    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21373    pub produce_chunk_add_transactions_time_limit: ::std::option::Option<::std::string::String>,
21374    #[doc = "Produce empty blocks, use `false` for testing."]
21375    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21376    pub produce_empty_blocks: ::std::option::Option<bool>,
21377    #[doc = "Determines whether client should exit if the protocol version is not supported\nfor the next or next next epoch."]
21378    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21379    pub protocol_version_check: ::std::option::Option<ProtocolVersionCheckConfig>,
21380    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21381    pub resharding_config: ::std::option::Option<MutableConfigValue>,
21382    #[doc = "Listening rpc port for status."]
21383    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21384    pub rpc_addr: ::std::option::Option<::std::string::String>,
21385    #[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."]
21386    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21387    pub save_invalid_witnesses: ::std::option::Option<bool>,
21388    #[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."]
21389    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21390    pub save_latest_witnesses: ::std::option::Option<bool>,
21391    #[doc = "Whether to persist state changes on disk or not."]
21392    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21393    pub save_state_changes: ::std::option::Option<bool>,
21394    #[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."]
21395    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21396    pub save_trie_changes: ::std::option::Option<bool>,
21397    #[doc = "Whether to persist transaction outcomes to disk or not."]
21398    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21399    pub save_tx_outcomes: ::std::option::Option<bool>,
21400    #[doc = "Whether to persist partial chunk parts for untracked shards or not."]
21401    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21402    pub save_untracked_partial_chunks_parts: ::std::option::Option<bool>,
21403    #[doc = "Skip waiting for sync (for testing or single node testnet)."]
21404    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21405    pub skip_sync_wait: ::std::option::Option<bool>,
21406    #[doc = "Number of threads for StateRequestActor pool."]
21407    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21408    pub state_request_server_threads: ::std::option::Option<u32>,
21409    #[doc = "Number of seconds between state requests for view client.\nThrottling window for state requests (headers and parts)."]
21410    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21411    pub state_request_throttle_period: ::std::option::Option<[u64; 2usize]>,
21412    #[doc = "Maximum number of state requests served per throttle period"]
21413    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21414    pub state_requests_per_throttle_period: ::std::option::Option<u32>,
21415    #[doc = "Options for syncing state."]
21416    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21417    pub state_sync: ::std::option::Option<StateSyncConfig>,
21418    #[doc = "Whether to use the State Sync mechanism.\nIf disabled, the node will do Block Sync instead of State Sync."]
21419    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21420    pub state_sync_enabled: ::std::option::Option<bool>,
21421    #[doc = "Additional waiting period after a failed request to external storage"]
21422    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21423    pub state_sync_external_backoff: ::std::option::Option<[u64; 2usize]>,
21424    #[doc = "How long to wait for a response from centralized state sync"]
21425    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21426    pub state_sync_external_timeout: ::std::option::Option<[u64; 2usize]>,
21427    #[doc = "How long to wait for a response from p2p state sync"]
21428    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21429    pub state_sync_p2p_timeout: ::std::option::Option<[u64; 2usize]>,
21430    #[doc = "How long to wait after a failed state sync request"]
21431    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21432    pub state_sync_retry_backoff: ::std::option::Option<[u64; 2usize]>,
21433    #[doc = "How often to check that we are not out of sync."]
21434    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21435    pub sync_check_period: ::std::option::Option<[u64; 2usize]>,
21436    #[doc = "Sync height threshold: below this difference in height don't start syncing."]
21437    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21438    pub sync_height_threshold: ::std::option::Option<u64>,
21439    #[doc = "Maximum number of block requests to send to peers to sync"]
21440    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21441    pub sync_max_block_requests: ::std::option::Option<u32>,
21442    #[doc = "While syncing, how long to check for each step."]
21443    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21444    pub sync_step_period: ::std::option::Option<[u64; 2usize]>,
21445    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21446    pub tracked_shards_config: ::std::option::Option<TrackedShardsConfig>,
21447    #[doc = "Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\nwill be unbounded."]
21448    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21449    pub transaction_pool_size_limit: ::std::option::Option<u64>,
21450    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21451    pub transaction_request_handler_threads: ::std::option::Option<u32>,
21452    #[doc = "Upper bound of the byte size of contract state that is still viewable. None is no limit"]
21453    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21454    pub trie_viewer_state_size_limit: ::std::option::Option<u64>,
21455    #[doc = "Time to persist Accounts Id in the router without removing them."]
21456    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21457    pub ttl_account_id_router: ::std::option::Option<[u64; 2usize]>,
21458    #[doc = "If the node is not a chunk producer within that many blocks, then route\nto upcoming chunk producers."]
21459    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21460    pub tx_routing_height_horizon: ::std::option::Option<u64>,
21461    #[doc = "Version of the binary."]
21462    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21463    pub version: ::std::option::Option<Version>,
21464    #[doc = "Number of threads for ViewClientActor pool."]
21465    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21466    pub view_client_threads: ::std::option::Option<u32>,
21467}
21468impl ::std::convert::From<&RpcClientConfigResponse> for RpcClientConfigResponse {
21469    fn from(value: &RpcClientConfigResponse) -> Self {
21470        value.clone()
21471    }
21472}
21473impl ::std::default::Default for RpcClientConfigResponse {
21474    fn default() -> Self {
21475        Self {
21476            archive: Default::default(),
21477            block_fetch_horizon: Default::default(),
21478            block_header_fetch_horizon: Default::default(),
21479            block_production_tracking_delay: Default::default(),
21480            catchup_step_period: Default::default(),
21481            chain_id: Default::default(),
21482            chunk_distribution_network: Default::default(),
21483            chunk_request_retry_period: Default::default(),
21484            chunk_validation_threads: Default::default(),
21485            chunk_wait_mult: Default::default(),
21486            chunks_cache_height_horizon: Default::default(),
21487            client_background_migration_threads: Default::default(),
21488            cloud_archival_writer: Default::default(),
21489            disable_tx_routing: Default::default(),
21490            doomslug_step_period: Default::default(),
21491            dynamic_resharding_dry_run: Default::default(),
21492            enable_early_prepare_transactions: Default::default(),
21493            enable_multiline_logging: Default::default(),
21494            enable_statistics_export: Default::default(),
21495            epoch_length: Default::default(),
21496            epoch_sync: Default::default(),
21497            expected_shutdown: Default::default(),
21498            gc: Default::default(),
21499            header_sync_expected_height_per_second: Default::default(),
21500            header_sync_initial_timeout: Default::default(),
21501            header_sync_progress_timeout: Default::default(),
21502            header_sync_stall_ban_timeout: Default::default(),
21503            log_summary_period: Default::default(),
21504            log_summary_style: Default::default(),
21505            max_block_production_delay: Default::default(),
21506            max_block_wait_delay: Default::default(),
21507            max_gas_burnt_view: Default::default(),
21508            min_block_production_delay: Default::default(),
21509            min_num_peers: Default::default(),
21510            num_block_producer_seats: Default::default(),
21511            orphan_state_witness_max_size: Default::default(),
21512            orphan_state_witness_pool_size: Default::default(),
21513            produce_chunk_add_transactions_time_limit: Default::default(),
21514            produce_empty_blocks: Default::default(),
21515            protocol_version_check: Default::default(),
21516            resharding_config: Default::default(),
21517            rpc_addr: Default::default(),
21518            save_invalid_witnesses: Default::default(),
21519            save_latest_witnesses: Default::default(),
21520            save_state_changes: Default::default(),
21521            save_trie_changes: Default::default(),
21522            save_tx_outcomes: Default::default(),
21523            save_untracked_partial_chunks_parts: Default::default(),
21524            skip_sync_wait: Default::default(),
21525            state_request_server_threads: Default::default(),
21526            state_request_throttle_period: Default::default(),
21527            state_requests_per_throttle_period: Default::default(),
21528            state_sync: Default::default(),
21529            state_sync_enabled: Default::default(),
21530            state_sync_external_backoff: Default::default(),
21531            state_sync_external_timeout: Default::default(),
21532            state_sync_p2p_timeout: Default::default(),
21533            state_sync_retry_backoff: Default::default(),
21534            sync_check_period: Default::default(),
21535            sync_height_threshold: Default::default(),
21536            sync_max_block_requests: Default::default(),
21537            sync_step_period: Default::default(),
21538            tracked_shards_config: Default::default(),
21539            transaction_pool_size_limit: Default::default(),
21540            transaction_request_handler_threads: Default::default(),
21541            trie_viewer_state_size_limit: Default::default(),
21542            ttl_account_id_router: Default::default(),
21543            tx_routing_height_horizon: Default::default(),
21544            version: Default::default(),
21545            view_client_threads: Default::default(),
21546        }
21547    }
21548}
21549#[doc = "`RpcCongestionLevelRequest`"]
21550#[doc = r""]
21551#[doc = r" <details><summary>JSON schema</summary>"]
21552#[doc = r""]
21553#[doc = r" ```json"]
21554#[doc = "{"]
21555#[doc = "  \"title\": \"RpcCongestionLevelRequest\","]
21556#[doc = "  \"type\": \"object\","]
21557#[doc = "  \"anyOf\": ["]
21558#[doc = "    {"]
21559#[doc = "      \"title\": \"block_shard_id\","]
21560#[doc = "      \"type\": \"object\","]
21561#[doc = "      \"required\": ["]
21562#[doc = "        \"block_id\","]
21563#[doc = "        \"shard_id\""]
21564#[doc = "      ],"]
21565#[doc = "      \"properties\": {"]
21566#[doc = "        \"block_id\": {"]
21567#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
21568#[doc = "        },"]
21569#[doc = "        \"shard_id\": {"]
21570#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
21571#[doc = "        }"]
21572#[doc = "      }"]
21573#[doc = "    },"]
21574#[doc = "    {"]
21575#[doc = "      \"title\": \"chunk_hash\","]
21576#[doc = "      \"type\": \"object\","]
21577#[doc = "      \"required\": ["]
21578#[doc = "        \"chunk_id\""]
21579#[doc = "      ],"]
21580#[doc = "      \"properties\": {"]
21581#[doc = "        \"chunk_id\": {"]
21582#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
21583#[doc = "        }"]
21584#[doc = "      }"]
21585#[doc = "    }"]
21586#[doc = "  ]"]
21587#[doc = "}"]
21588#[doc = r" ```"]
21589#[doc = r" </details>"]
21590#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21591#[serde(untagged)]
21592pub enum RpcCongestionLevelRequest {
21593    BlockShardId {
21594        block_id: BlockId,
21595        shard_id: ShardId,
21596    },
21597    ChunkHash {
21598        chunk_id: CryptoHash,
21599    },
21600}
21601impl ::std::convert::From<&Self> for RpcCongestionLevelRequest {
21602    fn from(value: &RpcCongestionLevelRequest) -> Self {
21603        value.clone()
21604    }
21605}
21606#[doc = "`RpcCongestionLevelResponse`"]
21607#[doc = r""]
21608#[doc = r" <details><summary>JSON schema</summary>"]
21609#[doc = r""]
21610#[doc = r" ```json"]
21611#[doc = "{"]
21612#[doc = "  \"type\": \"object\","]
21613#[doc = "  \"required\": ["]
21614#[doc = "    \"congestion_level\""]
21615#[doc = "  ],"]
21616#[doc = "  \"properties\": {"]
21617#[doc = "    \"congestion_level\": {"]
21618#[doc = "      \"type\": \"number\","]
21619#[doc = "      \"format\": \"double\""]
21620#[doc = "    }"]
21621#[doc = "  }"]
21622#[doc = "}"]
21623#[doc = r" ```"]
21624#[doc = r" </details>"]
21625#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21626pub struct RpcCongestionLevelResponse {
21627    pub congestion_level: f64,
21628}
21629impl ::std::convert::From<&RpcCongestionLevelResponse> for RpcCongestionLevelResponse {
21630    fn from(value: &RpcCongestionLevelResponse) -> Self {
21631        value.clone()
21632    }
21633}
21634#[doc = "`RpcGasPriceError`"]
21635#[doc = r""]
21636#[doc = r" <details><summary>JSON schema</summary>"]
21637#[doc = r""]
21638#[doc = r" ```json"]
21639#[doc = "{"]
21640#[doc = "  \"oneOf\": ["]
21641#[doc = "    {"]
21642#[doc = "      \"type\": \"object\","]
21643#[doc = "      \"required\": ["]
21644#[doc = "        \"info\","]
21645#[doc = "        \"name\""]
21646#[doc = "      ],"]
21647#[doc = "      \"properties\": {"]
21648#[doc = "        \"info\": {"]
21649#[doc = "          \"type\": \"object\","]
21650#[doc = "          \"required\": ["]
21651#[doc = "            \"error_message\""]
21652#[doc = "          ],"]
21653#[doc = "          \"properties\": {"]
21654#[doc = "            \"error_message\": {"]
21655#[doc = "              \"type\": \"string\""]
21656#[doc = "            }"]
21657#[doc = "          }"]
21658#[doc = "        },"]
21659#[doc = "        \"name\": {"]
21660#[doc = "          \"type\": \"string\","]
21661#[doc = "          \"enum\": ["]
21662#[doc = "            \"INTERNAL_ERROR\""]
21663#[doc = "          ]"]
21664#[doc = "        }"]
21665#[doc = "      }"]
21666#[doc = "    },"]
21667#[doc = "    {"]
21668#[doc = "      \"type\": \"object\","]
21669#[doc = "      \"required\": ["]
21670#[doc = "        \"info\","]
21671#[doc = "        \"name\""]
21672#[doc = "      ],"]
21673#[doc = "      \"properties\": {"]
21674#[doc = "        \"info\": {"]
21675#[doc = "          \"type\": \"object\""]
21676#[doc = "        },"]
21677#[doc = "        \"name\": {"]
21678#[doc = "          \"type\": \"string\","]
21679#[doc = "          \"enum\": ["]
21680#[doc = "            \"UNKNOWN_BLOCK\""]
21681#[doc = "          ]"]
21682#[doc = "        }"]
21683#[doc = "      }"]
21684#[doc = "    }"]
21685#[doc = "  ]"]
21686#[doc = "}"]
21687#[doc = r" ```"]
21688#[doc = r" </details>"]
21689#[derive(
21690    :: serde :: Deserialize,
21691    :: serde :: Serialize,
21692    Clone,
21693    Debug,
21694    thiserror::Error,
21695    strum_macros::Display,
21696)]
21697#[serde(tag = "name", content = "info")]
21698pub enum RpcGasPriceError {
21699    #[serde(rename = "INTERNAL_ERROR")]
21700    InternalError {
21701        error_message: ::std::string::String,
21702    },
21703    #[serde(rename = "UNKNOWN_BLOCK")]
21704    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
21705}
21706impl ::std::convert::From<&Self> for RpcGasPriceError {
21707    fn from(value: &RpcGasPriceError) -> Self {
21708        value.clone()
21709    }
21710}
21711impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
21712    for RpcGasPriceError
21713{
21714    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
21715        Self::UnknownBlock(value)
21716    }
21717}
21718#[doc = "`RpcGasPriceRequest`"]
21719#[doc = r""]
21720#[doc = r" <details><summary>JSON schema</summary>"]
21721#[doc = r""]
21722#[doc = r" ```json"]
21723#[doc = "{"]
21724#[doc = "  \"title\": \"RpcGasPriceRequest\","]
21725#[doc = "  \"type\": \"object\","]
21726#[doc = "  \"properties\": {"]
21727#[doc = "    \"block_id\": {"]
21728#[doc = "      \"anyOf\": ["]
21729#[doc = "        {"]
21730#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
21731#[doc = "        },"]
21732#[doc = "        {"]
21733#[doc = "          \"type\": \"null\""]
21734#[doc = "        }"]
21735#[doc = "      ]"]
21736#[doc = "    }"]
21737#[doc = "  }"]
21738#[doc = "}"]
21739#[doc = r" ```"]
21740#[doc = r" </details>"]
21741#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21742pub struct RpcGasPriceRequest {
21743    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21744    pub block_id: ::std::option::Option<BlockId>,
21745}
21746impl ::std::convert::From<&RpcGasPriceRequest> for RpcGasPriceRequest {
21747    fn from(value: &RpcGasPriceRequest) -> Self {
21748        value.clone()
21749    }
21750}
21751impl ::std::default::Default for RpcGasPriceRequest {
21752    fn default() -> Self {
21753        Self {
21754            block_id: Default::default(),
21755        }
21756    }
21757}
21758#[doc = "`RpcGasPriceResponse`"]
21759#[doc = r""]
21760#[doc = r" <details><summary>JSON schema</summary>"]
21761#[doc = r""]
21762#[doc = r" ```json"]
21763#[doc = "{"]
21764#[doc = "  \"type\": \"object\","]
21765#[doc = "  \"required\": ["]
21766#[doc = "    \"gas_price\""]
21767#[doc = "  ],"]
21768#[doc = "  \"properties\": {"]
21769#[doc = "    \"gas_price\": {"]
21770#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
21771#[doc = "    }"]
21772#[doc = "  }"]
21773#[doc = "}"]
21774#[doc = r" ```"]
21775#[doc = r" </details>"]
21776#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21777pub struct RpcGasPriceResponse {
21778    pub gas_price: NearToken,
21779}
21780impl ::std::convert::From<&RpcGasPriceResponse> for RpcGasPriceResponse {
21781    fn from(value: &RpcGasPriceResponse) -> Self {
21782        value.clone()
21783    }
21784}
21785#[doc = "`RpcHealthRequest`"]
21786#[doc = r""]
21787#[doc = r" <details><summary>JSON schema</summary>"]
21788#[doc = r""]
21789#[doc = r" ```json"]
21790#[doc = "{"]
21791#[doc = "  \"title\": \"RpcHealthRequest\","]
21792#[doc = "  \"type\": \"null\""]
21793#[doc = "}"]
21794#[doc = r" ```"]
21795#[doc = r" </details>"]
21796#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21797#[serde(transparent)]
21798pub struct RpcHealthRequest(pub ());
21799impl ::std::ops::Deref for RpcHealthRequest {
21800    type Target = ();
21801    fn deref(&self) -> &() {
21802        &self.0
21803    }
21804}
21805impl ::std::convert::From<RpcHealthRequest> for () {
21806    fn from(value: RpcHealthRequest) -> Self {
21807        value.0
21808    }
21809}
21810impl ::std::convert::From<&RpcHealthRequest> for RpcHealthRequest {
21811    fn from(value: &RpcHealthRequest) -> Self {
21812        value.clone()
21813    }
21814}
21815impl ::std::convert::From<()> for RpcHealthRequest {
21816    fn from(value: ()) -> Self {
21817        Self(value)
21818    }
21819}
21820#[doc = "`RpcHealthResponse`"]
21821#[doc = r""]
21822#[doc = r" <details><summary>JSON schema</summary>"]
21823#[doc = r""]
21824#[doc = r" ```json"]
21825#[doc = "{"]
21826#[doc = "  \"type\": \"null\""]
21827#[doc = "}"]
21828#[doc = r" ```"]
21829#[doc = r" </details>"]
21830#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21831#[serde(transparent)]
21832pub struct RpcHealthResponse(pub ());
21833impl ::std::ops::Deref for RpcHealthResponse {
21834    type Target = ();
21835    fn deref(&self) -> &() {
21836        &self.0
21837    }
21838}
21839impl ::std::convert::From<RpcHealthResponse> for () {
21840    fn from(value: RpcHealthResponse) -> Self {
21841        value.0
21842    }
21843}
21844impl ::std::convert::From<&RpcHealthResponse> for RpcHealthResponse {
21845    fn from(value: &RpcHealthResponse) -> Self {
21846        value.clone()
21847    }
21848}
21849impl ::std::convert::From<()> for RpcHealthResponse {
21850    fn from(value: ()) -> Self {
21851        Self(value)
21852    }
21853}
21854#[doc = "`RpcKnownProducer`"]
21855#[doc = r""]
21856#[doc = r" <details><summary>JSON schema</summary>"]
21857#[doc = r""]
21858#[doc = r" ```json"]
21859#[doc = "{"]
21860#[doc = "  \"type\": \"object\","]
21861#[doc = "  \"required\": ["]
21862#[doc = "    \"account_id\","]
21863#[doc = "    \"peer_id\""]
21864#[doc = "  ],"]
21865#[doc = "  \"properties\": {"]
21866#[doc = "    \"account_id\": {"]
21867#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
21868#[doc = "    },"]
21869#[doc = "    \"addr\": {"]
21870#[doc = "      \"type\": ["]
21871#[doc = "        \"string\","]
21872#[doc = "        \"null\""]
21873#[doc = "      ]"]
21874#[doc = "    },"]
21875#[doc = "    \"peer_id\": {"]
21876#[doc = "      \"$ref\": \"#/components/schemas/PeerId\""]
21877#[doc = "    }"]
21878#[doc = "  }"]
21879#[doc = "}"]
21880#[doc = r" ```"]
21881#[doc = r" </details>"]
21882#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21883pub struct RpcKnownProducer {
21884    pub account_id: AccountId,
21885    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21886    pub addr: ::std::option::Option<::std::string::String>,
21887    pub peer_id: PeerId,
21888}
21889impl ::std::convert::From<&RpcKnownProducer> for RpcKnownProducer {
21890    fn from(value: &RpcKnownProducer) -> Self {
21891        value.clone()
21892    }
21893}
21894#[doc = "`RpcLightClientBlockProofRequest`"]
21895#[doc = r""]
21896#[doc = r" <details><summary>JSON schema</summary>"]
21897#[doc = r""]
21898#[doc = r" ```json"]
21899#[doc = "{"]
21900#[doc = "  \"title\": \"RpcLightClientBlockProofRequest\","]
21901#[doc = "  \"type\": \"object\","]
21902#[doc = "  \"required\": ["]
21903#[doc = "    \"block_hash\","]
21904#[doc = "    \"light_client_head\""]
21905#[doc = "  ],"]
21906#[doc = "  \"properties\": {"]
21907#[doc = "    \"block_hash\": {"]
21908#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21909#[doc = "    },"]
21910#[doc = "    \"light_client_head\": {"]
21911#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
21912#[doc = "    }"]
21913#[doc = "  }"]
21914#[doc = "}"]
21915#[doc = r" ```"]
21916#[doc = r" </details>"]
21917#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21918pub struct RpcLightClientBlockProofRequest {
21919    pub block_hash: CryptoHash,
21920    pub light_client_head: CryptoHash,
21921}
21922impl ::std::convert::From<&RpcLightClientBlockProofRequest> for RpcLightClientBlockProofRequest {
21923    fn from(value: &RpcLightClientBlockProofRequest) -> Self {
21924        value.clone()
21925    }
21926}
21927#[doc = "`RpcLightClientBlockProofResponse`"]
21928#[doc = r""]
21929#[doc = r" <details><summary>JSON schema</summary>"]
21930#[doc = r""]
21931#[doc = r" ```json"]
21932#[doc = "{"]
21933#[doc = "  \"type\": \"object\","]
21934#[doc = "  \"required\": ["]
21935#[doc = "    \"block_header_lite\","]
21936#[doc = "    \"block_proof\""]
21937#[doc = "  ],"]
21938#[doc = "  \"properties\": {"]
21939#[doc = "    \"block_header_lite\": {"]
21940#[doc = "      \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
21941#[doc = "    },"]
21942#[doc = "    \"block_proof\": {"]
21943#[doc = "      \"type\": \"array\","]
21944#[doc = "      \"items\": {"]
21945#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
21946#[doc = "      }"]
21947#[doc = "    }"]
21948#[doc = "  }"]
21949#[doc = "}"]
21950#[doc = r" ```"]
21951#[doc = r" </details>"]
21952#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21953pub struct RpcLightClientBlockProofResponse {
21954    pub block_header_lite: LightClientBlockLiteView,
21955    pub block_proof: ::std::vec::Vec<MerklePathItem>,
21956}
21957impl ::std::convert::From<&RpcLightClientBlockProofResponse> for RpcLightClientBlockProofResponse {
21958    fn from(value: &RpcLightClientBlockProofResponse) -> Self {
21959        value.clone()
21960    }
21961}
21962#[doc = "`RpcLightClientExecutionProofRequest`"]
21963#[doc = r""]
21964#[doc = r" <details><summary>JSON schema</summary>"]
21965#[doc = r""]
21966#[doc = r" ```json"]
21967#[doc = "{"]
21968#[doc = "  \"title\": \"RpcLightClientExecutionProofRequest\","]
21969#[doc = "  \"type\": \"object\","]
21970#[doc = "  \"oneOf\": ["]
21971#[doc = "    {"]
21972#[doc = "      \"type\": \"object\","]
21973#[doc = "      \"required\": ["]
21974#[doc = "        \"sender_id\","]
21975#[doc = "        \"transaction_hash\","]
21976#[doc = "        \"type\""]
21977#[doc = "      ],"]
21978#[doc = "      \"properties\": {"]
21979#[doc = "        \"sender_id\": {"]
21980#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
21981#[doc = "        },"]
21982#[doc = "        \"transaction_hash\": {"]
21983#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
21984#[doc = "        },"]
21985#[doc = "        \"type\": {"]
21986#[doc = "          \"type\": \"string\","]
21987#[doc = "          \"enum\": ["]
21988#[doc = "            \"transaction\""]
21989#[doc = "          ]"]
21990#[doc = "        }"]
21991#[doc = "      }"]
21992#[doc = "    },"]
21993#[doc = "    {"]
21994#[doc = "      \"type\": \"object\","]
21995#[doc = "      \"required\": ["]
21996#[doc = "        \"receipt_id\","]
21997#[doc = "        \"receiver_id\","]
21998#[doc = "        \"type\""]
21999#[doc = "      ],"]
22000#[doc = "      \"properties\": {"]
22001#[doc = "        \"receipt_id\": {"]
22002#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
22003#[doc = "        },"]
22004#[doc = "        \"receiver_id\": {"]
22005#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
22006#[doc = "        },"]
22007#[doc = "        \"type\": {"]
22008#[doc = "          \"type\": \"string\","]
22009#[doc = "          \"enum\": ["]
22010#[doc = "            \"receipt\""]
22011#[doc = "          ]"]
22012#[doc = "        }"]
22013#[doc = "      }"]
22014#[doc = "    }"]
22015#[doc = "  ],"]
22016#[doc = "  \"required\": ["]
22017#[doc = "    \"light_client_head\""]
22018#[doc = "  ],"]
22019#[doc = "  \"properties\": {"]
22020#[doc = "    \"light_client_head\": {"]
22021#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
22022#[doc = "    }"]
22023#[doc = "  }"]
22024#[doc = "}"]
22025#[doc = r" ```"]
22026#[doc = r" </details>"]
22027#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22028#[serde(untagged)]
22029pub enum RpcLightClientExecutionProofRequest {
22030    Variant0 {
22031        light_client_head: CryptoHash,
22032        sender_id: AccountId,
22033        transaction_hash: CryptoHash,
22034        #[serde(rename = "type")]
22035        type_: RpcLightClientExecutionProofRequestVariant0Type,
22036    },
22037    Variant1 {
22038        light_client_head: CryptoHash,
22039        receipt_id: CryptoHash,
22040        receiver_id: AccountId,
22041        #[serde(rename = "type")]
22042        type_: RpcLightClientExecutionProofRequestVariant1Type,
22043    },
22044}
22045impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequest {
22046    fn from(value: &RpcLightClientExecutionProofRequest) -> Self {
22047        value.clone()
22048    }
22049}
22050#[doc = "`RpcLightClientExecutionProofRequestVariant0Type`"]
22051#[doc = r""]
22052#[doc = r" <details><summary>JSON schema</summary>"]
22053#[doc = r""]
22054#[doc = r" ```json"]
22055#[doc = "{"]
22056#[doc = "  \"type\": \"string\","]
22057#[doc = "  \"enum\": ["]
22058#[doc = "    \"transaction\""]
22059#[doc = "  ]"]
22060#[doc = "}"]
22061#[doc = r" ```"]
22062#[doc = r" </details>"]
22063#[derive(
22064    :: serde :: Deserialize,
22065    :: serde :: Serialize,
22066    Clone,
22067    Copy,
22068    Debug,
22069    Eq,
22070    Hash,
22071    Ord,
22072    PartialEq,
22073    PartialOrd,
22074)]
22075pub enum RpcLightClientExecutionProofRequestVariant0Type {
22076    #[serde(rename = "transaction")]
22077    Transaction,
22078}
22079impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant0Type {
22080    fn from(value: &RpcLightClientExecutionProofRequestVariant0Type) -> Self {
22081        value.clone()
22082    }
22083}
22084impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant0Type {
22085    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22086        match *self {
22087            Self::Transaction => f.write_str("transaction"),
22088        }
22089    }
22090}
22091impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant0Type {
22092    type Err = self::error::ConversionError;
22093    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22094        match value {
22095            "transaction" => Ok(Self::Transaction),
22096            _ => Err("invalid value".into()),
22097        }
22098    }
22099}
22100impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant0Type {
22101    type Error = self::error::ConversionError;
22102    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22103        value.parse()
22104    }
22105}
22106impl ::std::convert::TryFrom<&::std::string::String>
22107    for RpcLightClientExecutionProofRequestVariant0Type
22108{
22109    type Error = self::error::ConversionError;
22110    fn try_from(
22111        value: &::std::string::String,
22112    ) -> ::std::result::Result<Self, self::error::ConversionError> {
22113        value.parse()
22114    }
22115}
22116impl ::std::convert::TryFrom<::std::string::String>
22117    for RpcLightClientExecutionProofRequestVariant0Type
22118{
22119    type Error = self::error::ConversionError;
22120    fn try_from(
22121        value: ::std::string::String,
22122    ) -> ::std::result::Result<Self, self::error::ConversionError> {
22123        value.parse()
22124    }
22125}
22126#[doc = "`RpcLightClientExecutionProofRequestVariant1Type`"]
22127#[doc = r""]
22128#[doc = r" <details><summary>JSON schema</summary>"]
22129#[doc = r""]
22130#[doc = r" ```json"]
22131#[doc = "{"]
22132#[doc = "  \"type\": \"string\","]
22133#[doc = "  \"enum\": ["]
22134#[doc = "    \"receipt\""]
22135#[doc = "  ]"]
22136#[doc = "}"]
22137#[doc = r" ```"]
22138#[doc = r" </details>"]
22139#[derive(
22140    :: serde :: Deserialize,
22141    :: serde :: Serialize,
22142    Clone,
22143    Copy,
22144    Debug,
22145    Eq,
22146    Hash,
22147    Ord,
22148    PartialEq,
22149    PartialOrd,
22150)]
22151pub enum RpcLightClientExecutionProofRequestVariant1Type {
22152    #[serde(rename = "receipt")]
22153    Receipt,
22154}
22155impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant1Type {
22156    fn from(value: &RpcLightClientExecutionProofRequestVariant1Type) -> Self {
22157        value.clone()
22158    }
22159}
22160impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant1Type {
22161    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22162        match *self {
22163            Self::Receipt => f.write_str("receipt"),
22164        }
22165    }
22166}
22167impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant1Type {
22168    type Err = self::error::ConversionError;
22169    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22170        match value {
22171            "receipt" => Ok(Self::Receipt),
22172            _ => Err("invalid value".into()),
22173        }
22174    }
22175}
22176impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant1Type {
22177    type Error = self::error::ConversionError;
22178    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22179        value.parse()
22180    }
22181}
22182impl ::std::convert::TryFrom<&::std::string::String>
22183    for RpcLightClientExecutionProofRequestVariant1Type
22184{
22185    type Error = self::error::ConversionError;
22186    fn try_from(
22187        value: &::std::string::String,
22188    ) -> ::std::result::Result<Self, self::error::ConversionError> {
22189        value.parse()
22190    }
22191}
22192impl ::std::convert::TryFrom<::std::string::String>
22193    for RpcLightClientExecutionProofRequestVariant1Type
22194{
22195    type Error = self::error::ConversionError;
22196    fn try_from(
22197        value: ::std::string::String,
22198    ) -> ::std::result::Result<Self, self::error::ConversionError> {
22199        value.parse()
22200    }
22201}
22202#[doc = "`RpcLightClientExecutionProofResponse`"]
22203#[doc = r""]
22204#[doc = r" <details><summary>JSON schema</summary>"]
22205#[doc = r""]
22206#[doc = r" ```json"]
22207#[doc = "{"]
22208#[doc = "  \"type\": \"object\","]
22209#[doc = "  \"required\": ["]
22210#[doc = "    \"block_header_lite\","]
22211#[doc = "    \"block_proof\","]
22212#[doc = "    \"outcome_proof\","]
22213#[doc = "    \"outcome_root_proof\""]
22214#[doc = "  ],"]
22215#[doc = "  \"properties\": {"]
22216#[doc = "    \"block_header_lite\": {"]
22217#[doc = "      \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
22218#[doc = "    },"]
22219#[doc = "    \"block_proof\": {"]
22220#[doc = "      \"type\": \"array\","]
22221#[doc = "      \"items\": {"]
22222#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
22223#[doc = "      }"]
22224#[doc = "    },"]
22225#[doc = "    \"outcome_proof\": {"]
22226#[doc = "      \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
22227#[doc = "    },"]
22228#[doc = "    \"outcome_root_proof\": {"]
22229#[doc = "      \"type\": \"array\","]
22230#[doc = "      \"items\": {"]
22231#[doc = "        \"$ref\": \"#/components/schemas/MerklePathItem\""]
22232#[doc = "      }"]
22233#[doc = "    }"]
22234#[doc = "  }"]
22235#[doc = "}"]
22236#[doc = r" ```"]
22237#[doc = r" </details>"]
22238#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22239pub struct RpcLightClientExecutionProofResponse {
22240    pub block_header_lite: LightClientBlockLiteView,
22241    pub block_proof: ::std::vec::Vec<MerklePathItem>,
22242    pub outcome_proof: ExecutionOutcomeWithIdView,
22243    pub outcome_root_proof: ::std::vec::Vec<MerklePathItem>,
22244}
22245impl ::std::convert::From<&RpcLightClientExecutionProofResponse>
22246    for RpcLightClientExecutionProofResponse
22247{
22248    fn from(value: &RpcLightClientExecutionProofResponse) -> Self {
22249        value.clone()
22250    }
22251}
22252#[doc = "`RpcLightClientNextBlockError`"]
22253#[doc = r""]
22254#[doc = r" <details><summary>JSON schema</summary>"]
22255#[doc = r""]
22256#[doc = r" ```json"]
22257#[doc = "{"]
22258#[doc = "  \"oneOf\": ["]
22259#[doc = "    {"]
22260#[doc = "      \"type\": \"object\","]
22261#[doc = "      \"required\": ["]
22262#[doc = "        \"info\","]
22263#[doc = "        \"name\""]
22264#[doc = "      ],"]
22265#[doc = "      \"properties\": {"]
22266#[doc = "        \"info\": {"]
22267#[doc = "          \"type\": \"object\","]
22268#[doc = "          \"required\": ["]
22269#[doc = "            \"error_message\""]
22270#[doc = "          ],"]
22271#[doc = "          \"properties\": {"]
22272#[doc = "            \"error_message\": {"]
22273#[doc = "              \"type\": \"string\""]
22274#[doc = "            }"]
22275#[doc = "          }"]
22276#[doc = "        },"]
22277#[doc = "        \"name\": {"]
22278#[doc = "          \"type\": \"string\","]
22279#[doc = "          \"enum\": ["]
22280#[doc = "            \"INTERNAL_ERROR\""]
22281#[doc = "          ]"]
22282#[doc = "        }"]
22283#[doc = "      }"]
22284#[doc = "    },"]
22285#[doc = "    {"]
22286#[doc = "      \"type\": \"object\","]
22287#[doc = "      \"required\": ["]
22288#[doc = "        \"info\","]
22289#[doc = "        \"name\""]
22290#[doc = "      ],"]
22291#[doc = "      \"properties\": {"]
22292#[doc = "        \"info\": {"]
22293#[doc = "          \"type\": \"object\""]
22294#[doc = "        },"]
22295#[doc = "        \"name\": {"]
22296#[doc = "          \"type\": \"string\","]
22297#[doc = "          \"enum\": ["]
22298#[doc = "            \"UNKNOWN_BLOCK\""]
22299#[doc = "          ]"]
22300#[doc = "        }"]
22301#[doc = "      }"]
22302#[doc = "    },"]
22303#[doc = "    {"]
22304#[doc = "      \"type\": \"object\","]
22305#[doc = "      \"required\": ["]
22306#[doc = "        \"info\","]
22307#[doc = "        \"name\""]
22308#[doc = "      ],"]
22309#[doc = "      \"properties\": {"]
22310#[doc = "        \"info\": {"]
22311#[doc = "          \"type\": \"object\","]
22312#[doc = "          \"required\": ["]
22313#[doc = "            \"epoch_id\""]
22314#[doc = "          ],"]
22315#[doc = "          \"properties\": {"]
22316#[doc = "            \"epoch_id\": {"]
22317#[doc = "              \"$ref\": \"#/components/schemas/EpochId\""]
22318#[doc = "            }"]
22319#[doc = "          }"]
22320#[doc = "        },"]
22321#[doc = "        \"name\": {"]
22322#[doc = "          \"type\": \"string\","]
22323#[doc = "          \"enum\": ["]
22324#[doc = "            \"EPOCH_OUT_OF_BOUNDS\""]
22325#[doc = "          ]"]
22326#[doc = "        }"]
22327#[doc = "      }"]
22328#[doc = "    }"]
22329#[doc = "  ]"]
22330#[doc = "}"]
22331#[doc = r" ```"]
22332#[doc = r" </details>"]
22333#[derive(
22334    :: serde :: Deserialize,
22335    :: serde :: Serialize,
22336    Clone,
22337    Debug,
22338    thiserror::Error,
22339    strum_macros::Display,
22340)]
22341#[serde(tag = "name", content = "info")]
22342pub enum RpcLightClientNextBlockError {
22343    #[serde(rename = "INTERNAL_ERROR")]
22344    InternalError {
22345        error_message: ::std::string::String,
22346    },
22347    #[serde(rename = "UNKNOWN_BLOCK")]
22348    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
22349    #[serde(rename = "EPOCH_OUT_OF_BOUNDS")]
22350    EpochOutOfBounds { epoch_id: EpochId },
22351}
22352impl ::std::convert::From<&Self> for RpcLightClientNextBlockError {
22353    fn from(value: &RpcLightClientNextBlockError) -> Self {
22354        value.clone()
22355    }
22356}
22357impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
22358    for RpcLightClientNextBlockError
22359{
22360    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
22361        Self::UnknownBlock(value)
22362    }
22363}
22364#[doc = "`RpcLightClientNextBlockRequest`"]
22365#[doc = r""]
22366#[doc = r" <details><summary>JSON schema</summary>"]
22367#[doc = r""]
22368#[doc = r" ```json"]
22369#[doc = "{"]
22370#[doc = "  \"title\": \"RpcLightClientNextBlockRequest\","]
22371#[doc = "  \"type\": \"object\","]
22372#[doc = "  \"required\": ["]
22373#[doc = "    \"last_block_hash\""]
22374#[doc = "  ],"]
22375#[doc = "  \"properties\": {"]
22376#[doc = "    \"last_block_hash\": {"]
22377#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
22378#[doc = "    }"]
22379#[doc = "  }"]
22380#[doc = "}"]
22381#[doc = r" ```"]
22382#[doc = r" </details>"]
22383#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22384pub struct RpcLightClientNextBlockRequest {
22385    pub last_block_hash: CryptoHash,
22386}
22387impl ::std::convert::From<&RpcLightClientNextBlockRequest> for RpcLightClientNextBlockRequest {
22388    fn from(value: &RpcLightClientNextBlockRequest) -> Self {
22389        value.clone()
22390    }
22391}
22392#[doc = "A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
22393#[doc = r""]
22394#[doc = r" <details><summary>JSON schema</summary>"]
22395#[doc = r""]
22396#[doc = r" ```json"]
22397#[doc = "{"]
22398#[doc = "  \"description\": \"A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
22399#[doc = "  \"type\": \"object\","]
22400#[doc = "  \"properties\": {"]
22401#[doc = "    \"approvals_after_next\": {"]
22402#[doc = "      \"type\": \"array\","]
22403#[doc = "      \"items\": {"]
22404#[doc = "        \"anyOf\": ["]
22405#[doc = "          {"]
22406#[doc = "            \"$ref\": \"#/components/schemas/Signature\""]
22407#[doc = "          },"]
22408#[doc = "          {"]
22409#[doc = "            \"type\": \"null\""]
22410#[doc = "          }"]
22411#[doc = "        ]"]
22412#[doc = "      }"]
22413#[doc = "    },"]
22414#[doc = "    \"inner_lite\": {"]
22415#[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\","]
22416#[doc = "      \"allOf\": ["]
22417#[doc = "        {"]
22418#[doc = "          \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
22419#[doc = "        }"]
22420#[doc = "      ]"]
22421#[doc = "    },"]
22422#[doc = "    \"inner_rest_hash\": {"]
22423#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
22424#[doc = "    },"]
22425#[doc = "    \"next_block_inner_hash\": {"]
22426#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
22427#[doc = "    },"]
22428#[doc = "    \"next_bps\": {"]
22429#[doc = "      \"type\": ["]
22430#[doc = "        \"array\","]
22431#[doc = "        \"null\""]
22432#[doc = "      ],"]
22433#[doc = "      \"items\": {"]
22434#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
22435#[doc = "      }"]
22436#[doc = "    },"]
22437#[doc = "    \"prev_block_hash\": {"]
22438#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
22439#[doc = "    }"]
22440#[doc = "  }"]
22441#[doc = "}"]
22442#[doc = r" ```"]
22443#[doc = r" </details>"]
22444#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22445pub struct RpcLightClientNextBlockResponse {
22446    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
22447    pub approvals_after_next: ::std::vec::Vec<::std::option::Option<Signature>>,
22448    #[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"]
22449    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22450    pub inner_lite: ::std::option::Option<BlockHeaderInnerLiteView>,
22451    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22452    pub inner_rest_hash: ::std::option::Option<CryptoHash>,
22453    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22454    pub next_block_inner_hash: ::std::option::Option<CryptoHash>,
22455    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22456    pub next_bps: ::std::option::Option<::std::vec::Vec<ValidatorStakeView>>,
22457    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22458    pub prev_block_hash: ::std::option::Option<CryptoHash>,
22459}
22460impl ::std::convert::From<&RpcLightClientNextBlockResponse> for RpcLightClientNextBlockResponse {
22461    fn from(value: &RpcLightClientNextBlockResponse) -> Self {
22462        value.clone()
22463    }
22464}
22465impl ::std::default::Default for RpcLightClientNextBlockResponse {
22466    fn default() -> Self {
22467        Self {
22468            approvals_after_next: Default::default(),
22469            inner_lite: Default::default(),
22470            inner_rest_hash: Default::default(),
22471            next_block_inner_hash: Default::default(),
22472            next_bps: Default::default(),
22473            prev_block_hash: Default::default(),
22474        }
22475    }
22476}
22477#[doc = "`RpcLightClientProofError`"]
22478#[doc = r""]
22479#[doc = r" <details><summary>JSON schema</summary>"]
22480#[doc = r""]
22481#[doc = r" ```json"]
22482#[doc = "{"]
22483#[doc = "  \"oneOf\": ["]
22484#[doc = "    {"]
22485#[doc = "      \"type\": \"object\","]
22486#[doc = "      \"required\": ["]
22487#[doc = "        \"info\","]
22488#[doc = "        \"name\""]
22489#[doc = "      ],"]
22490#[doc = "      \"properties\": {"]
22491#[doc = "        \"info\": {"]
22492#[doc = "          \"type\": \"object\""]
22493#[doc = "        },"]
22494#[doc = "        \"name\": {"]
22495#[doc = "          \"type\": \"string\","]
22496#[doc = "          \"enum\": ["]
22497#[doc = "            \"UNKNOWN_BLOCK\""]
22498#[doc = "          ]"]
22499#[doc = "        }"]
22500#[doc = "      }"]
22501#[doc = "    },"]
22502#[doc = "    {"]
22503#[doc = "      \"type\": \"object\","]
22504#[doc = "      \"required\": ["]
22505#[doc = "        \"info\","]
22506#[doc = "        \"name\""]
22507#[doc = "      ],"]
22508#[doc = "      \"properties\": {"]
22509#[doc = "        \"info\": {"]
22510#[doc = "          \"type\": \"object\","]
22511#[doc = "          \"required\": ["]
22512#[doc = "            \"execution_outcome_shard_id\","]
22513#[doc = "            \"number_or_shards\""]
22514#[doc = "          ],"]
22515#[doc = "          \"properties\": {"]
22516#[doc = "            \"execution_outcome_shard_id\": {"]
22517#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
22518#[doc = "            },"]
22519#[doc = "            \"number_or_shards\": {"]
22520#[doc = "              \"type\": \"integer\","]
22521#[doc = "              \"format\": \"uint\","]
22522#[doc = "              \"minimum\": 0.0"]
22523#[doc = "            }"]
22524#[doc = "          }"]
22525#[doc = "        },"]
22526#[doc = "        \"name\": {"]
22527#[doc = "          \"type\": \"string\","]
22528#[doc = "          \"enum\": ["]
22529#[doc = "            \"INCONSISTENT_STATE\""]
22530#[doc = "          ]"]
22531#[doc = "        }"]
22532#[doc = "      }"]
22533#[doc = "    },"]
22534#[doc = "    {"]
22535#[doc = "      \"type\": \"object\","]
22536#[doc = "      \"required\": ["]
22537#[doc = "        \"info\","]
22538#[doc = "        \"name\""]
22539#[doc = "      ],"]
22540#[doc = "      \"properties\": {"]
22541#[doc = "        \"info\": {"]
22542#[doc = "          \"type\": \"object\","]
22543#[doc = "          \"required\": ["]
22544#[doc = "            \"transaction_or_receipt_id\""]
22545#[doc = "          ],"]
22546#[doc = "          \"properties\": {"]
22547#[doc = "            \"transaction_or_receipt_id\": {"]
22548#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22549#[doc = "            }"]
22550#[doc = "          }"]
22551#[doc = "        },"]
22552#[doc = "        \"name\": {"]
22553#[doc = "          \"type\": \"string\","]
22554#[doc = "          \"enum\": ["]
22555#[doc = "            \"NOT_CONFIRMED\""]
22556#[doc = "          ]"]
22557#[doc = "        }"]
22558#[doc = "      }"]
22559#[doc = "    },"]
22560#[doc = "    {"]
22561#[doc = "      \"type\": \"object\","]
22562#[doc = "      \"required\": ["]
22563#[doc = "        \"info\","]
22564#[doc = "        \"name\""]
22565#[doc = "      ],"]
22566#[doc = "      \"properties\": {"]
22567#[doc = "        \"info\": {"]
22568#[doc = "          \"type\": \"object\","]
22569#[doc = "          \"required\": ["]
22570#[doc = "            \"transaction_or_receipt_id\""]
22571#[doc = "          ],"]
22572#[doc = "          \"properties\": {"]
22573#[doc = "            \"transaction_or_receipt_id\": {"]
22574#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22575#[doc = "            }"]
22576#[doc = "          }"]
22577#[doc = "        },"]
22578#[doc = "        \"name\": {"]
22579#[doc = "          \"type\": \"string\","]
22580#[doc = "          \"enum\": ["]
22581#[doc = "            \"UNKNOWN_TRANSACTION_OR_RECEIPT\""]
22582#[doc = "          ]"]
22583#[doc = "        }"]
22584#[doc = "      }"]
22585#[doc = "    },"]
22586#[doc = "    {"]
22587#[doc = "      \"type\": \"object\","]
22588#[doc = "      \"required\": ["]
22589#[doc = "        \"info\","]
22590#[doc = "        \"name\""]
22591#[doc = "      ],"]
22592#[doc = "      \"properties\": {"]
22593#[doc = "        \"info\": {"]
22594#[doc = "          \"type\": \"object\","]
22595#[doc = "          \"required\": ["]
22596#[doc = "            \"shard_id\","]
22597#[doc = "            \"transaction_or_receipt_id\""]
22598#[doc = "          ],"]
22599#[doc = "          \"properties\": {"]
22600#[doc = "            \"shard_id\": {"]
22601#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
22602#[doc = "            },"]
22603#[doc = "            \"transaction_or_receipt_id\": {"]
22604#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
22605#[doc = "            }"]
22606#[doc = "          }"]
22607#[doc = "        },"]
22608#[doc = "        \"name\": {"]
22609#[doc = "          \"type\": \"string\","]
22610#[doc = "          \"enum\": ["]
22611#[doc = "            \"UNAVAILABLE_SHARD\""]
22612#[doc = "          ]"]
22613#[doc = "        }"]
22614#[doc = "      }"]
22615#[doc = "    },"]
22616#[doc = "    {"]
22617#[doc = "      \"type\": \"object\","]
22618#[doc = "      \"required\": ["]
22619#[doc = "        \"info\","]
22620#[doc = "        \"name\""]
22621#[doc = "      ],"]
22622#[doc = "      \"properties\": {"]
22623#[doc = "        \"info\": {"]
22624#[doc = "          \"type\": \"object\","]
22625#[doc = "          \"required\": ["]
22626#[doc = "            \"error_message\""]
22627#[doc = "          ],"]
22628#[doc = "          \"properties\": {"]
22629#[doc = "            \"error_message\": {"]
22630#[doc = "              \"type\": \"string\""]
22631#[doc = "            }"]
22632#[doc = "          }"]
22633#[doc = "        },"]
22634#[doc = "        \"name\": {"]
22635#[doc = "          \"type\": \"string\","]
22636#[doc = "          \"enum\": ["]
22637#[doc = "            \"INTERNAL_ERROR\""]
22638#[doc = "          ]"]
22639#[doc = "        }"]
22640#[doc = "      }"]
22641#[doc = "    }"]
22642#[doc = "  ]"]
22643#[doc = "}"]
22644#[doc = r" ```"]
22645#[doc = r" </details>"]
22646#[derive(
22647    :: serde :: Deserialize,
22648    :: serde :: Serialize,
22649    Clone,
22650    Debug,
22651    thiserror::Error,
22652    strum_macros::Display,
22653)]
22654#[serde(tag = "name", content = "info")]
22655pub enum RpcLightClientProofError {
22656    #[serde(rename = "UNKNOWN_BLOCK")]
22657    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
22658    #[serde(rename = "INCONSISTENT_STATE")]
22659    InconsistentState {
22660        execution_outcome_shard_id: ShardId,
22661        number_or_shards: u32,
22662    },
22663    #[serde(rename = "NOT_CONFIRMED")]
22664    NotConfirmed {
22665        transaction_or_receipt_id: CryptoHash,
22666    },
22667    #[serde(rename = "UNKNOWN_TRANSACTION_OR_RECEIPT")]
22668    UnknownTransactionOrReceipt {
22669        transaction_or_receipt_id: CryptoHash,
22670    },
22671    #[serde(rename = "UNAVAILABLE_SHARD")]
22672    UnavailableShard {
22673        shard_id: ShardId,
22674        transaction_or_receipt_id: CryptoHash,
22675    },
22676    #[serde(rename = "INTERNAL_ERROR")]
22677    InternalError {
22678        error_message: ::std::string::String,
22679    },
22680}
22681impl ::std::convert::From<&Self> for RpcLightClientProofError {
22682    fn from(value: &RpcLightClientProofError) -> Self {
22683        value.clone()
22684    }
22685}
22686impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
22687    for RpcLightClientProofError
22688{
22689    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
22690        Self::UnknownBlock(value)
22691    }
22692}
22693#[doc = "`RpcMaintenanceWindowsError`"]
22694#[doc = r""]
22695#[doc = r" <details><summary>JSON schema</summary>"]
22696#[doc = r""]
22697#[doc = r" ```json"]
22698#[doc = "{"]
22699#[doc = "  \"oneOf\": ["]
22700#[doc = "    {"]
22701#[doc = "      \"type\": \"object\","]
22702#[doc = "      \"required\": ["]
22703#[doc = "        \"info\","]
22704#[doc = "        \"name\""]
22705#[doc = "      ],"]
22706#[doc = "      \"properties\": {"]
22707#[doc = "        \"info\": {"]
22708#[doc = "          \"type\": \"object\","]
22709#[doc = "          \"required\": ["]
22710#[doc = "            \"error_message\""]
22711#[doc = "          ],"]
22712#[doc = "          \"properties\": {"]
22713#[doc = "            \"error_message\": {"]
22714#[doc = "              \"type\": \"string\""]
22715#[doc = "            }"]
22716#[doc = "          }"]
22717#[doc = "        },"]
22718#[doc = "        \"name\": {"]
22719#[doc = "          \"type\": \"string\","]
22720#[doc = "          \"enum\": ["]
22721#[doc = "            \"INTERNAL_ERROR\""]
22722#[doc = "          ]"]
22723#[doc = "        }"]
22724#[doc = "      }"]
22725#[doc = "    }"]
22726#[doc = "  ]"]
22727#[doc = "}"]
22728#[doc = r" ```"]
22729#[doc = r" </details>"]
22730#[derive(
22731    :: serde :: Deserialize,
22732    :: serde :: Serialize,
22733    Clone,
22734    Debug,
22735    thiserror::Error,
22736    strum_macros::Display,
22737)]
22738#[serde(tag = "name", content = "info")]
22739pub enum RpcMaintenanceWindowsError {
22740    #[serde(rename = "INTERNAL_ERROR")]
22741    InternalError {
22742        error_message: ::std::string::String,
22743    },
22744}
22745impl ::std::convert::From<&Self> for RpcMaintenanceWindowsError {
22746    fn from(value: &RpcMaintenanceWindowsError) -> Self {
22747        value.clone()
22748    }
22749}
22750#[doc = "`RpcMaintenanceWindowsRequest`"]
22751#[doc = r""]
22752#[doc = r" <details><summary>JSON schema</summary>"]
22753#[doc = r""]
22754#[doc = r" ```json"]
22755#[doc = "{"]
22756#[doc = "  \"title\": \"RpcMaintenanceWindowsRequest\","]
22757#[doc = "  \"type\": \"object\","]
22758#[doc = "  \"required\": ["]
22759#[doc = "    \"account_id\""]
22760#[doc = "  ],"]
22761#[doc = "  \"properties\": {"]
22762#[doc = "    \"account_id\": {"]
22763#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
22764#[doc = "    }"]
22765#[doc = "  }"]
22766#[doc = "}"]
22767#[doc = r" ```"]
22768#[doc = r" </details>"]
22769#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22770pub struct RpcMaintenanceWindowsRequest {
22771    pub account_id: AccountId,
22772}
22773impl ::std::convert::From<&RpcMaintenanceWindowsRequest> for RpcMaintenanceWindowsRequest {
22774    fn from(value: &RpcMaintenanceWindowsRequest) -> Self {
22775        value.clone()
22776    }
22777}
22778#[doc = "`RpcNetworkInfoError`"]
22779#[doc = r""]
22780#[doc = r" <details><summary>JSON schema</summary>"]
22781#[doc = r""]
22782#[doc = r" ```json"]
22783#[doc = "{"]
22784#[doc = "  \"oneOf\": ["]
22785#[doc = "    {"]
22786#[doc = "      \"type\": \"object\","]
22787#[doc = "      \"required\": ["]
22788#[doc = "        \"info\","]
22789#[doc = "        \"name\""]
22790#[doc = "      ],"]
22791#[doc = "      \"properties\": {"]
22792#[doc = "        \"info\": {"]
22793#[doc = "          \"type\": \"object\","]
22794#[doc = "          \"required\": ["]
22795#[doc = "            \"error_message\""]
22796#[doc = "          ],"]
22797#[doc = "          \"properties\": {"]
22798#[doc = "            \"error_message\": {"]
22799#[doc = "              \"type\": \"string\""]
22800#[doc = "            }"]
22801#[doc = "          }"]
22802#[doc = "        },"]
22803#[doc = "        \"name\": {"]
22804#[doc = "          \"type\": \"string\","]
22805#[doc = "          \"enum\": ["]
22806#[doc = "            \"INTERNAL_ERROR\""]
22807#[doc = "          ]"]
22808#[doc = "        }"]
22809#[doc = "      }"]
22810#[doc = "    }"]
22811#[doc = "  ]"]
22812#[doc = "}"]
22813#[doc = r" ```"]
22814#[doc = r" </details>"]
22815#[derive(
22816    :: serde :: Deserialize,
22817    :: serde :: Serialize,
22818    Clone,
22819    Debug,
22820    thiserror::Error,
22821    strum_macros::Display,
22822)]
22823#[serde(tag = "name", content = "info")]
22824pub enum RpcNetworkInfoError {
22825    #[serde(rename = "INTERNAL_ERROR")]
22826    InternalError {
22827        error_message: ::std::string::String,
22828    },
22829}
22830impl ::std::convert::From<&Self> for RpcNetworkInfoError {
22831    fn from(value: &RpcNetworkInfoError) -> Self {
22832        value.clone()
22833    }
22834}
22835#[doc = "`RpcNetworkInfoRequest`"]
22836#[doc = r""]
22837#[doc = r" <details><summary>JSON schema</summary>"]
22838#[doc = r""]
22839#[doc = r" ```json"]
22840#[doc = "{"]
22841#[doc = "  \"title\": \"RpcNetworkInfoRequest\","]
22842#[doc = "  \"type\": \"null\""]
22843#[doc = "}"]
22844#[doc = r" ```"]
22845#[doc = r" </details>"]
22846#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22847#[serde(transparent)]
22848pub struct RpcNetworkInfoRequest(pub ());
22849impl ::std::ops::Deref for RpcNetworkInfoRequest {
22850    type Target = ();
22851    fn deref(&self) -> &() {
22852        &self.0
22853    }
22854}
22855impl ::std::convert::From<RpcNetworkInfoRequest> for () {
22856    fn from(value: RpcNetworkInfoRequest) -> Self {
22857        value.0
22858    }
22859}
22860impl ::std::convert::From<&RpcNetworkInfoRequest> for RpcNetworkInfoRequest {
22861    fn from(value: &RpcNetworkInfoRequest) -> Self {
22862        value.clone()
22863    }
22864}
22865impl ::std::convert::From<()> for RpcNetworkInfoRequest {
22866    fn from(value: ()) -> Self {
22867        Self(value)
22868    }
22869}
22870#[doc = "`RpcNetworkInfoResponse`"]
22871#[doc = r""]
22872#[doc = r" <details><summary>JSON schema</summary>"]
22873#[doc = r""]
22874#[doc = r" ```json"]
22875#[doc = "{"]
22876#[doc = "  \"type\": \"object\","]
22877#[doc = "  \"required\": ["]
22878#[doc = "    \"active_peers\","]
22879#[doc = "    \"known_producers\","]
22880#[doc = "    \"num_active_peers\","]
22881#[doc = "    \"peer_max_count\","]
22882#[doc = "    \"received_bytes_per_sec\","]
22883#[doc = "    \"sent_bytes_per_sec\""]
22884#[doc = "  ],"]
22885#[doc = "  \"properties\": {"]
22886#[doc = "    \"active_peers\": {"]
22887#[doc = "      \"type\": \"array\","]
22888#[doc = "      \"items\": {"]
22889#[doc = "        \"$ref\": \"#/components/schemas/RpcPeerInfo\""]
22890#[doc = "      }"]
22891#[doc = "    },"]
22892#[doc = "    \"known_producers\": {"]
22893#[doc = "      \"description\": \"Accounts of known block and chunk producers from routing table.\","]
22894#[doc = "      \"type\": \"array\","]
22895#[doc = "      \"items\": {"]
22896#[doc = "        \"$ref\": \"#/components/schemas/RpcKnownProducer\""]
22897#[doc = "      }"]
22898#[doc = "    },"]
22899#[doc = "    \"num_active_peers\": {"]
22900#[doc = "      \"type\": \"integer\","]
22901#[doc = "      \"format\": \"uint\","]
22902#[doc = "      \"minimum\": 0.0"]
22903#[doc = "    },"]
22904#[doc = "    \"peer_max_count\": {"]
22905#[doc = "      \"type\": \"integer\","]
22906#[doc = "      \"format\": \"uint32\","]
22907#[doc = "      \"minimum\": 0.0"]
22908#[doc = "    },"]
22909#[doc = "    \"received_bytes_per_sec\": {"]
22910#[doc = "      \"type\": \"integer\","]
22911#[doc = "      \"format\": \"uint64\","]
22912#[doc = "      \"minimum\": 0.0"]
22913#[doc = "    },"]
22914#[doc = "    \"sent_bytes_per_sec\": {"]
22915#[doc = "      \"type\": \"integer\","]
22916#[doc = "      \"format\": \"uint64\","]
22917#[doc = "      \"minimum\": 0.0"]
22918#[doc = "    }"]
22919#[doc = "  }"]
22920#[doc = "}"]
22921#[doc = r" ```"]
22922#[doc = r" </details>"]
22923#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22924pub struct RpcNetworkInfoResponse {
22925    pub active_peers: ::std::vec::Vec<RpcPeerInfo>,
22926    #[doc = "Accounts of known block and chunk producers from routing table."]
22927    pub known_producers: ::std::vec::Vec<RpcKnownProducer>,
22928    pub num_active_peers: u32,
22929    pub peer_max_count: u32,
22930    pub received_bytes_per_sec: u64,
22931    pub sent_bytes_per_sec: u64,
22932}
22933impl ::std::convert::From<&RpcNetworkInfoResponse> for RpcNetworkInfoResponse {
22934    fn from(value: &RpcNetworkInfoResponse) -> Self {
22935        value.clone()
22936    }
22937}
22938#[doc = "`RpcPeerInfo`"]
22939#[doc = r""]
22940#[doc = r" <details><summary>JSON schema</summary>"]
22941#[doc = r""]
22942#[doc = r" ```json"]
22943#[doc = "{"]
22944#[doc = "  \"type\": \"object\","]
22945#[doc = "  \"required\": ["]
22946#[doc = "    \"id\""]
22947#[doc = "  ],"]
22948#[doc = "  \"properties\": {"]
22949#[doc = "    \"account_id\": {"]
22950#[doc = "      \"anyOf\": ["]
22951#[doc = "        {"]
22952#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
22953#[doc = "        },"]
22954#[doc = "        {"]
22955#[doc = "          \"type\": \"null\""]
22956#[doc = "        }"]
22957#[doc = "      ]"]
22958#[doc = "    },"]
22959#[doc = "    \"addr\": {"]
22960#[doc = "      \"type\": ["]
22961#[doc = "        \"string\","]
22962#[doc = "        \"null\""]
22963#[doc = "      ]"]
22964#[doc = "    },"]
22965#[doc = "    \"id\": {"]
22966#[doc = "      \"$ref\": \"#/components/schemas/PeerId\""]
22967#[doc = "    }"]
22968#[doc = "  }"]
22969#[doc = "}"]
22970#[doc = r" ```"]
22971#[doc = r" </details>"]
22972#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22973pub struct RpcPeerInfo {
22974    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22975    pub account_id: ::std::option::Option<AccountId>,
22976    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22977    pub addr: ::std::option::Option<::std::string::String>,
22978    pub id: PeerId,
22979}
22980impl ::std::convert::From<&RpcPeerInfo> for RpcPeerInfo {
22981    fn from(value: &RpcPeerInfo) -> Self {
22982        value.clone()
22983    }
22984}
22985#[doc = "`RpcProtocolConfigError`"]
22986#[doc = r""]
22987#[doc = r" <details><summary>JSON schema</summary>"]
22988#[doc = r""]
22989#[doc = r" ```json"]
22990#[doc = "{"]
22991#[doc = "  \"oneOf\": ["]
22992#[doc = "    {"]
22993#[doc = "      \"type\": \"object\","]
22994#[doc = "      \"required\": ["]
22995#[doc = "        \"info\","]
22996#[doc = "        \"name\""]
22997#[doc = "      ],"]
22998#[doc = "      \"properties\": {"]
22999#[doc = "        \"info\": {"]
23000#[doc = "          \"type\": \"object\""]
23001#[doc = "        },"]
23002#[doc = "        \"name\": {"]
23003#[doc = "          \"type\": \"string\","]
23004#[doc = "          \"enum\": ["]
23005#[doc = "            \"UNKNOWN_BLOCK\""]
23006#[doc = "          ]"]
23007#[doc = "        }"]
23008#[doc = "      }"]
23009#[doc = "    },"]
23010#[doc = "    {"]
23011#[doc = "      \"type\": \"object\","]
23012#[doc = "      \"required\": ["]
23013#[doc = "        \"info\","]
23014#[doc = "        \"name\""]
23015#[doc = "      ],"]
23016#[doc = "      \"properties\": {"]
23017#[doc = "        \"info\": {"]
23018#[doc = "          \"type\": \"object\","]
23019#[doc = "          \"required\": ["]
23020#[doc = "            \"error_message\""]
23021#[doc = "          ],"]
23022#[doc = "          \"properties\": {"]
23023#[doc = "            \"error_message\": {"]
23024#[doc = "              \"type\": \"string\""]
23025#[doc = "            }"]
23026#[doc = "          }"]
23027#[doc = "        },"]
23028#[doc = "        \"name\": {"]
23029#[doc = "          \"type\": \"string\","]
23030#[doc = "          \"enum\": ["]
23031#[doc = "            \"INTERNAL_ERROR\""]
23032#[doc = "          ]"]
23033#[doc = "        }"]
23034#[doc = "      }"]
23035#[doc = "    }"]
23036#[doc = "  ]"]
23037#[doc = "}"]
23038#[doc = r" ```"]
23039#[doc = r" </details>"]
23040#[derive(
23041    :: serde :: Deserialize,
23042    :: serde :: Serialize,
23043    Clone,
23044    Debug,
23045    thiserror::Error,
23046    strum_macros::Display,
23047)]
23048#[serde(tag = "name", content = "info")]
23049pub enum RpcProtocolConfigError {
23050    #[serde(rename = "UNKNOWN_BLOCK")]
23051    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
23052    #[serde(rename = "INTERNAL_ERROR")]
23053    InternalError {
23054        error_message: ::std::string::String,
23055    },
23056}
23057impl ::std::convert::From<&Self> for RpcProtocolConfigError {
23058    fn from(value: &RpcProtocolConfigError) -> Self {
23059        value.clone()
23060    }
23061}
23062impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
23063    for RpcProtocolConfigError
23064{
23065    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
23066        Self::UnknownBlock(value)
23067    }
23068}
23069#[doc = "`RpcProtocolConfigRequest`"]
23070#[doc = r""]
23071#[doc = r" <details><summary>JSON schema</summary>"]
23072#[doc = r""]
23073#[doc = r" ```json"]
23074#[doc = "{"]
23075#[doc = "  \"title\": \"RpcProtocolConfigRequest\","]
23076#[doc = "  \"type\": \"object\","]
23077#[doc = "  \"oneOf\": ["]
23078#[doc = "    {"]
23079#[doc = "      \"type\": \"object\","]
23080#[doc = "      \"required\": ["]
23081#[doc = "        \"block_id\""]
23082#[doc = "      ],"]
23083#[doc = "      \"properties\": {"]
23084#[doc = "        \"block_id\": {"]
23085#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
23086#[doc = "        }"]
23087#[doc = "      }"]
23088#[doc = "    },"]
23089#[doc = "    {"]
23090#[doc = "      \"type\": \"object\","]
23091#[doc = "      \"required\": ["]
23092#[doc = "        \"finality\""]
23093#[doc = "      ],"]
23094#[doc = "      \"properties\": {"]
23095#[doc = "        \"finality\": {"]
23096#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
23097#[doc = "        }"]
23098#[doc = "      }"]
23099#[doc = "    },"]
23100#[doc = "    {"]
23101#[doc = "      \"type\": \"object\","]
23102#[doc = "      \"required\": ["]
23103#[doc = "        \"sync_checkpoint\""]
23104#[doc = "      ],"]
23105#[doc = "      \"properties\": {"]
23106#[doc = "        \"sync_checkpoint\": {"]
23107#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
23108#[doc = "        }"]
23109#[doc = "      }"]
23110#[doc = "    }"]
23111#[doc = "  ]"]
23112#[doc = "}"]
23113#[doc = r" ```"]
23114#[doc = r" </details>"]
23115#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23116pub enum RpcProtocolConfigRequest {
23117    #[serde(rename = "block_id")]
23118    BlockId(BlockId),
23119    #[serde(rename = "finality")]
23120    Finality(Finality),
23121    #[serde(rename = "sync_checkpoint")]
23122    SyncCheckpoint(SyncCheckpoint),
23123}
23124impl ::std::convert::From<&Self> for RpcProtocolConfigRequest {
23125    fn from(value: &RpcProtocolConfigRequest) -> Self {
23126        value.clone()
23127    }
23128}
23129impl ::std::convert::From<BlockId> for RpcProtocolConfigRequest {
23130    fn from(value: BlockId) -> Self {
23131        Self::BlockId(value)
23132    }
23133}
23134impl ::std::convert::From<Finality> for RpcProtocolConfigRequest {
23135    fn from(value: Finality) -> Self {
23136        Self::Finality(value)
23137    }
23138}
23139impl ::std::convert::From<SyncCheckpoint> for RpcProtocolConfigRequest {
23140    fn from(value: SyncCheckpoint) -> Self {
23141        Self::SyncCheckpoint(value)
23142    }
23143}
23144#[doc = "`RpcProtocolConfigResponse`"]
23145#[doc = r""]
23146#[doc = r" <details><summary>JSON schema</summary>"]
23147#[doc = r""]
23148#[doc = r" ```json"]
23149#[doc = "{"]
23150#[doc = "  \"type\": \"object\","]
23151#[doc = "  \"properties\": {"]
23152#[doc = "    \"avg_hidden_validator_seats_per_shard\": {"]
23153#[doc = "      \"description\": \"Expected number of hidden validators per shard.\","]
23154#[doc = "      \"type\": \"array\","]
23155#[doc = "      \"items\": {"]
23156#[doc = "        \"type\": \"integer\","]
23157#[doc = "        \"format\": \"uint64\","]
23158#[doc = "        \"minimum\": 0.0"]
23159#[doc = "      }"]
23160#[doc = "    },"]
23161#[doc = "    \"block_producer_kickout_threshold\": {"]
23162#[doc = "      \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
23163#[doc = "      \"type\": \"integer\","]
23164#[doc = "      \"format\": \"uint8\","]
23165#[doc = "      \"maximum\": 255.0,"]
23166#[doc = "      \"minimum\": 0.0"]
23167#[doc = "    },"]
23168#[doc = "    \"chain_id\": {"]
23169#[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.\","]
23170#[doc = "      \"type\": \"string\""]
23171#[doc = "    },"]
23172#[doc = "    \"chunk_producer_kickout_threshold\": {"]
23173#[doc = "      \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
23174#[doc = "      \"type\": \"integer\","]
23175#[doc = "      \"format\": \"uint8\","]
23176#[doc = "      \"maximum\": 255.0,"]
23177#[doc = "      \"minimum\": 0.0"]
23178#[doc = "    },"]
23179#[doc = "    \"chunk_validator_only_kickout_threshold\": {"]
23180#[doc = "      \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
23181#[doc = "      \"type\": \"integer\","]
23182#[doc = "      \"format\": \"uint8\","]
23183#[doc = "      \"maximum\": 255.0,"]
23184#[doc = "      \"minimum\": 0.0"]
23185#[doc = "    },"]
23186#[doc = "    \"dynamic_resharding\": {"]
23187#[doc = "      \"description\": \"Enable dynamic re-sharding.\","]
23188#[doc = "      \"type\": \"boolean\""]
23189#[doc = "    },"]
23190#[doc = "    \"epoch_length\": {"]
23191#[doc = "      \"description\": \"Epoch length counted in block heights.\","]
23192#[doc = "      \"type\": \"integer\","]
23193#[doc = "      \"format\": \"uint64\","]
23194#[doc = "      \"minimum\": 0.0"]
23195#[doc = "    },"]
23196#[doc = "    \"fishermen_threshold\": {"]
23197#[doc = "      \"description\": \"Fishermen stake threshold.\","]
23198#[doc = "      \"allOf\": ["]
23199#[doc = "        {"]
23200#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
23201#[doc = "        }"]
23202#[doc = "      ]"]
23203#[doc = "    },"]
23204#[doc = "    \"gas_limit\": {"]
23205#[doc = "      \"description\": \"Initial gas limit.\","]
23206#[doc = "      \"allOf\": ["]
23207#[doc = "        {"]
23208#[doc = "          \"$ref\": \"#/components/schemas/NearGas\""]
23209#[doc = "        }"]
23210#[doc = "      ]"]
23211#[doc = "    },"]
23212#[doc = "    \"gas_price_adjustment_rate\": {"]
23213#[doc = "      \"description\": \"Gas price adjustment rate\","]
23214#[doc = "      \"type\": \"array\","]
23215#[doc = "      \"items\": {"]
23216#[doc = "        \"type\": \"integer\","]
23217#[doc = "        \"format\": \"int32\""]
23218#[doc = "      },"]
23219#[doc = "      \"maxItems\": 2,"]
23220#[doc = "      \"minItems\": 2"]
23221#[doc = "    },"]
23222#[doc = "    \"genesis_height\": {"]
23223#[doc = "      \"description\": \"Height of genesis block.\","]
23224#[doc = "      \"type\": \"integer\","]
23225#[doc = "      \"format\": \"uint64\","]
23226#[doc = "      \"minimum\": 0.0"]
23227#[doc = "    },"]
23228#[doc = "    \"genesis_time\": {"]
23229#[doc = "      \"description\": \"Official time of blockchain start.\","]
23230#[doc = "      \"type\": \"string\","]
23231#[doc = "      \"format\": \"date-time\""]
23232#[doc = "    },"]
23233#[doc = "    \"max_gas_price\": {"]
23234#[doc = "      \"description\": \"Maximum gas price.\","]
23235#[doc = "      \"allOf\": ["]
23236#[doc = "        {"]
23237#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
23238#[doc = "        }"]
23239#[doc = "      ]"]
23240#[doc = "    },"]
23241#[doc = "    \"max_inflation_rate\": {"]
23242#[doc = "      \"description\": \"Maximum inflation on the total supply every epoch.\","]
23243#[doc = "      \"type\": \"array\","]
23244#[doc = "      \"items\": {"]
23245#[doc = "        \"type\": \"integer\","]
23246#[doc = "        \"format\": \"int32\""]
23247#[doc = "      },"]
23248#[doc = "      \"maxItems\": 2,"]
23249#[doc = "      \"minItems\": 2"]
23250#[doc = "    },"]
23251#[doc = "    \"max_kickout_stake_perc\": {"]
23252#[doc = "      \"description\": \"Max stake percentage of the validators we will kick out.\","]
23253#[doc = "      \"type\": \"integer\","]
23254#[doc = "      \"format\": \"uint8\","]
23255#[doc = "      \"maximum\": 255.0,"]
23256#[doc = "      \"minimum\": 0.0"]
23257#[doc = "    },"]
23258#[doc = "    \"min_gas_price\": {"]
23259#[doc = "      \"description\": \"Minimum gas price. It is also the initial gas price.\","]
23260#[doc = "      \"allOf\": ["]
23261#[doc = "        {"]
23262#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
23263#[doc = "        }"]
23264#[doc = "      ]"]
23265#[doc = "    },"]
23266#[doc = "    \"minimum_stake_divisor\": {"]
23267#[doc = "      \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
23268#[doc = "      \"type\": \"integer\","]
23269#[doc = "      \"format\": \"uint64\","]
23270#[doc = "      \"minimum\": 0.0"]
23271#[doc = "    },"]
23272#[doc = "    \"minimum_stake_ratio\": {"]
23273#[doc = "      \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
23274#[doc = "      \"type\": \"array\","]
23275#[doc = "      \"items\": {"]
23276#[doc = "        \"type\": \"integer\","]
23277#[doc = "        \"format\": \"int32\""]
23278#[doc = "      },"]
23279#[doc = "      \"maxItems\": 2,"]
23280#[doc = "      \"minItems\": 2"]
23281#[doc = "    },"]
23282#[doc = "    \"minimum_validators_per_shard\": {"]
23283#[doc = "      \"description\": \"The minimum number of validators each shard must have\","]
23284#[doc = "      \"type\": \"integer\","]
23285#[doc = "      \"format\": \"uint64\","]
23286#[doc = "      \"minimum\": 0.0"]
23287#[doc = "    },"]
23288#[doc = "    \"num_block_producer_seats\": {"]
23289#[doc = "      \"description\": \"Number of block producer seats at genesis.\","]
23290#[doc = "      \"type\": \"integer\","]
23291#[doc = "      \"format\": \"uint64\","]
23292#[doc = "      \"minimum\": 0.0"]
23293#[doc = "    },"]
23294#[doc = "    \"num_block_producer_seats_per_shard\": {"]
23295#[doc = "      \"description\": \"Defines number of shards and number of block producer seats per each shard at genesis.\","]
23296#[doc = "      \"type\": \"array\","]
23297#[doc = "      \"items\": {"]
23298#[doc = "        \"type\": \"integer\","]
23299#[doc = "        \"format\": \"uint64\","]
23300#[doc = "        \"minimum\": 0.0"]
23301#[doc = "      }"]
23302#[doc = "    },"]
23303#[doc = "    \"num_blocks_per_year\": {"]
23304#[doc = "      \"description\": \"Expected number of blocks per year\","]
23305#[doc = "      \"type\": \"integer\","]
23306#[doc = "      \"format\": \"uint64\","]
23307#[doc = "      \"minimum\": 0.0"]
23308#[doc = "    },"]
23309#[doc = "    \"online_max_threshold\": {"]
23310#[doc = "      \"description\": \"Online maximum threshold above which validator gets full reward.\","]
23311#[doc = "      \"type\": \"array\","]
23312#[doc = "      \"items\": {"]
23313#[doc = "        \"type\": \"integer\","]
23314#[doc = "        \"format\": \"int32\""]
23315#[doc = "      },"]
23316#[doc = "      \"maxItems\": 2,"]
23317#[doc = "      \"minItems\": 2"]
23318#[doc = "    },"]
23319#[doc = "    \"online_min_threshold\": {"]
23320#[doc = "      \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
23321#[doc = "      \"type\": \"array\","]
23322#[doc = "      \"items\": {"]
23323#[doc = "        \"type\": \"integer\","]
23324#[doc = "        \"format\": \"int32\""]
23325#[doc = "      },"]
23326#[doc = "      \"maxItems\": 2,"]
23327#[doc = "      \"minItems\": 2"]
23328#[doc = "    },"]
23329#[doc = "    \"protocol_reward_rate\": {"]
23330#[doc = "      \"description\": \"Protocol treasury rate\","]
23331#[doc = "      \"type\": \"array\","]
23332#[doc = "      \"items\": {"]
23333#[doc = "        \"type\": \"integer\","]
23334#[doc = "        \"format\": \"int32\""]
23335#[doc = "      },"]
23336#[doc = "      \"maxItems\": 2,"]
23337#[doc = "      \"minItems\": 2"]
23338#[doc = "    },"]
23339#[doc = "    \"protocol_treasury_account\": {"]
23340#[doc = "      \"description\": \"Protocol treasury account\","]
23341#[doc = "      \"allOf\": ["]
23342#[doc = "        {"]
23343#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
23344#[doc = "        }"]
23345#[doc = "      ]"]
23346#[doc = "    },"]
23347#[doc = "    \"protocol_upgrade_stake_threshold\": {"]
23348#[doc = "      \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
23349#[doc = "      \"type\": \"array\","]
23350#[doc = "      \"items\": {"]
23351#[doc = "        \"type\": \"integer\","]
23352#[doc = "        \"format\": \"int32\""]
23353#[doc = "      },"]
23354#[doc = "      \"maxItems\": 2,"]
23355#[doc = "      \"minItems\": 2"]
23356#[doc = "    },"]
23357#[doc = "    \"protocol_version\": {"]
23358#[doc = "      \"description\": \"Current Protocol Version\","]
23359#[doc = "      \"type\": \"integer\","]
23360#[doc = "      \"format\": \"uint32\","]
23361#[doc = "      \"minimum\": 0.0"]
23362#[doc = "    },"]
23363#[doc = "    \"runtime_config\": {"]
23364#[doc = "      \"description\": \"Runtime configuration (mostly economics constants).\","]
23365#[doc = "      \"allOf\": ["]
23366#[doc = "        {"]
23367#[doc = "          \"$ref\": \"#/components/schemas/RuntimeConfigView\""]
23368#[doc = "        }"]
23369#[doc = "      ]"]
23370#[doc = "    },"]
23371#[doc = "    \"shard_layout\": {"]
23372#[doc = "      \"description\": \"Layout information regarding how to split accounts to shards\","]
23373#[doc = "      \"allOf\": ["]
23374#[doc = "        {"]
23375#[doc = "          \"$ref\": \"#/components/schemas/ShardLayout\""]
23376#[doc = "        }"]
23377#[doc = "      ]"]
23378#[doc = "    },"]
23379#[doc = "    \"shuffle_shard_assignment_for_chunk_producers\": {"]
23380#[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]`.\","]
23381#[doc = "      \"type\": \"boolean\""]
23382#[doc = "    },"]
23383#[doc = "    \"target_validator_mandates_per_shard\": {"]
23384#[doc = "      \"description\": \"Number of target chunk validator mandates for each shard.\","]
23385#[doc = "      \"type\": \"integer\","]
23386#[doc = "      \"format\": \"uint64\","]
23387#[doc = "      \"minimum\": 0.0"]
23388#[doc = "    },"]
23389#[doc = "    \"transaction_validity_period\": {"]
23390#[doc = "      \"description\": \"Number of blocks for which a given transaction is valid\","]
23391#[doc = "      \"type\": \"integer\","]
23392#[doc = "      \"format\": \"uint64\","]
23393#[doc = "      \"minimum\": 0.0"]
23394#[doc = "    }"]
23395#[doc = "  }"]
23396#[doc = "}"]
23397#[doc = r" ```"]
23398#[doc = r" </details>"]
23399#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23400pub struct RpcProtocolConfigResponse {
23401    #[doc = "Expected number of hidden validators per shard."]
23402    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
23403    pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
23404    #[doc = "Threshold for kicking out block producers, between 0 and 100."]
23405    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23406    pub block_producer_kickout_threshold: ::std::option::Option<u8>,
23407    #[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."]
23408    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23409    pub chain_id: ::std::option::Option<::std::string::String>,
23410    #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
23411    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23412    pub chunk_producer_kickout_threshold: ::std::option::Option<u8>,
23413    #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
23414    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23415    pub chunk_validator_only_kickout_threshold: ::std::option::Option<u8>,
23416    #[doc = "Enable dynamic re-sharding."]
23417    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23418    pub dynamic_resharding: ::std::option::Option<bool>,
23419    #[doc = "Epoch length counted in block heights."]
23420    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23421    pub epoch_length: ::std::option::Option<u64>,
23422    #[doc = "Fishermen stake threshold."]
23423    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23424    pub fishermen_threshold: ::std::option::Option<NearToken>,
23425    #[doc = "Initial gas limit."]
23426    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23427    pub gas_limit: ::std::option::Option<NearGas>,
23428    #[doc = "Gas price adjustment rate"]
23429    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23430    pub gas_price_adjustment_rate: ::std::option::Option<[i32; 2usize]>,
23431    #[doc = "Height of genesis block."]
23432    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23433    pub genesis_height: ::std::option::Option<u64>,
23434    #[doc = "Official time of blockchain start."]
23435    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23436    pub genesis_time: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
23437    #[doc = "Maximum gas price."]
23438    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23439    pub max_gas_price: ::std::option::Option<NearToken>,
23440    #[doc = "Maximum inflation on the total supply every epoch."]
23441    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23442    pub max_inflation_rate: ::std::option::Option<[i32; 2usize]>,
23443    #[doc = "Max stake percentage of the validators we will kick out."]
23444    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23445    pub max_kickout_stake_perc: ::std::option::Option<u8>,
23446    #[doc = "Minimum gas price. It is also the initial gas price."]
23447    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23448    pub min_gas_price: ::std::option::Option<NearToken>,
23449    #[doc = "The minimum stake required for staking is last seat price divided by this number."]
23450    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23451    pub minimum_stake_divisor: ::std::option::Option<u64>,
23452    #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
23453    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23454    pub minimum_stake_ratio: ::std::option::Option<[i32; 2usize]>,
23455    #[doc = "The minimum number of validators each shard must have"]
23456    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23457    pub minimum_validators_per_shard: ::std::option::Option<u64>,
23458    #[doc = "Number of block producer seats at genesis."]
23459    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23460    pub num_block_producer_seats: ::std::option::Option<u64>,
23461    #[doc = "Defines number of shards and number of block producer seats per each shard at genesis."]
23462    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
23463    pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
23464    #[doc = "Expected number of blocks per year"]
23465    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23466    pub num_blocks_per_year: ::std::option::Option<u64>,
23467    #[doc = "Online maximum threshold above which validator gets full reward."]
23468    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23469    pub online_max_threshold: ::std::option::Option<[i32; 2usize]>,
23470    #[doc = "Online minimum threshold below which validator doesn't receive reward."]
23471    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23472    pub online_min_threshold: ::std::option::Option<[i32; 2usize]>,
23473    #[doc = "Protocol treasury rate"]
23474    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23475    pub protocol_reward_rate: ::std::option::Option<[i32; 2usize]>,
23476    #[doc = "Protocol treasury account"]
23477    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23478    pub protocol_treasury_account: ::std::option::Option<AccountId>,
23479    #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
23480    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23481    pub protocol_upgrade_stake_threshold: ::std::option::Option<[i32; 2usize]>,
23482    #[doc = "Current Protocol Version"]
23483    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23484    pub protocol_version: ::std::option::Option<u32>,
23485    #[doc = "Runtime configuration (mostly economics constants)."]
23486    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23487    pub runtime_config: ::std::option::Option<RuntimeConfigView>,
23488    #[doc = "Layout information regarding how to split accounts to shards"]
23489    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23490    pub shard_layout: ::std::option::Option<ShardLayout>,
23491    #[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]`."]
23492    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23493    pub shuffle_shard_assignment_for_chunk_producers: ::std::option::Option<bool>,
23494    #[doc = "Number of target chunk validator mandates for each shard."]
23495    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23496    pub target_validator_mandates_per_shard: ::std::option::Option<u64>,
23497    #[doc = "Number of blocks for which a given transaction is valid"]
23498    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
23499    pub transaction_validity_period: ::std::option::Option<u64>,
23500}
23501impl ::std::convert::From<&RpcProtocolConfigResponse> for RpcProtocolConfigResponse {
23502    fn from(value: &RpcProtocolConfigResponse) -> Self {
23503        value.clone()
23504    }
23505}
23506impl ::std::default::Default for RpcProtocolConfigResponse {
23507    fn default() -> Self {
23508        Self {
23509            avg_hidden_validator_seats_per_shard: Default::default(),
23510            block_producer_kickout_threshold: Default::default(),
23511            chain_id: Default::default(),
23512            chunk_producer_kickout_threshold: Default::default(),
23513            chunk_validator_only_kickout_threshold: Default::default(),
23514            dynamic_resharding: Default::default(),
23515            epoch_length: Default::default(),
23516            fishermen_threshold: Default::default(),
23517            gas_limit: Default::default(),
23518            gas_price_adjustment_rate: Default::default(),
23519            genesis_height: Default::default(),
23520            genesis_time: Default::default(),
23521            max_gas_price: Default::default(),
23522            max_inflation_rate: Default::default(),
23523            max_kickout_stake_perc: Default::default(),
23524            min_gas_price: Default::default(),
23525            minimum_stake_divisor: Default::default(),
23526            minimum_stake_ratio: Default::default(),
23527            minimum_validators_per_shard: Default::default(),
23528            num_block_producer_seats: Default::default(),
23529            num_block_producer_seats_per_shard: Default::default(),
23530            num_blocks_per_year: Default::default(),
23531            online_max_threshold: Default::default(),
23532            online_min_threshold: Default::default(),
23533            protocol_reward_rate: Default::default(),
23534            protocol_treasury_account: Default::default(),
23535            protocol_upgrade_stake_threshold: Default::default(),
23536            protocol_version: Default::default(),
23537            runtime_config: Default::default(),
23538            shard_layout: Default::default(),
23539            shuffle_shard_assignment_for_chunk_producers: Default::default(),
23540            target_validator_mandates_per_shard: Default::default(),
23541            transaction_validity_period: Default::default(),
23542        }
23543    }
23544}
23545#[doc = "`RpcQueryError`"]
23546#[doc = r""]
23547#[doc = r" <details><summary>JSON schema</summary>"]
23548#[doc = r""]
23549#[doc = r" ```json"]
23550#[doc = "{"]
23551#[doc = "  \"oneOf\": ["]
23552#[doc = "    {"]
23553#[doc = "      \"type\": \"object\","]
23554#[doc = "      \"required\": ["]
23555#[doc = "        \"name\""]
23556#[doc = "      ],"]
23557#[doc = "      \"properties\": {"]
23558#[doc = "        \"name\": {"]
23559#[doc = "          \"type\": \"string\","]
23560#[doc = "          \"enum\": ["]
23561#[doc = "            \"NO_SYNCED_BLOCKS\""]
23562#[doc = "          ]"]
23563#[doc = "        }"]
23564#[doc = "      }"]
23565#[doc = "    },"]
23566#[doc = "    {"]
23567#[doc = "      \"type\": \"object\","]
23568#[doc = "      \"required\": ["]
23569#[doc = "        \"info\","]
23570#[doc = "        \"name\""]
23571#[doc = "      ],"]
23572#[doc = "      \"properties\": {"]
23573#[doc = "        \"info\": {"]
23574#[doc = "          \"type\": \"object\","]
23575#[doc = "          \"required\": ["]
23576#[doc = "            \"requested_shard_id\""]
23577#[doc = "          ],"]
23578#[doc = "          \"properties\": {"]
23579#[doc = "            \"requested_shard_id\": {"]
23580#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
23581#[doc = "            }"]
23582#[doc = "          }"]
23583#[doc = "        },"]
23584#[doc = "        \"name\": {"]
23585#[doc = "          \"type\": \"string\","]
23586#[doc = "          \"enum\": ["]
23587#[doc = "            \"UNAVAILABLE_SHARD\""]
23588#[doc = "          ]"]
23589#[doc = "        }"]
23590#[doc = "      }"]
23591#[doc = "    },"]
23592#[doc = "    {"]
23593#[doc = "      \"type\": \"object\","]
23594#[doc = "      \"required\": ["]
23595#[doc = "        \"info\","]
23596#[doc = "        \"name\""]
23597#[doc = "      ],"]
23598#[doc = "      \"properties\": {"]
23599#[doc = "        \"info\": {"]
23600#[doc = "          \"type\": \"object\","]
23601#[doc = "          \"required\": ["]
23602#[doc = "            \"block_hash\","]
23603#[doc = "            \"block_height\""]
23604#[doc = "          ],"]
23605#[doc = "          \"properties\": {"]
23606#[doc = "            \"block_hash\": {"]
23607#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23608#[doc = "            },"]
23609#[doc = "            \"block_height\": {"]
23610#[doc = "              \"type\": \"integer\","]
23611#[doc = "              \"format\": \"uint64\","]
23612#[doc = "              \"minimum\": 0.0"]
23613#[doc = "            }"]
23614#[doc = "          }"]
23615#[doc = "        },"]
23616#[doc = "        \"name\": {"]
23617#[doc = "          \"type\": \"string\","]
23618#[doc = "          \"enum\": ["]
23619#[doc = "            \"GARBAGE_COLLECTED_BLOCK\""]
23620#[doc = "          ]"]
23621#[doc = "        }"]
23622#[doc = "      }"]
23623#[doc = "    },"]
23624#[doc = "    {"]
23625#[doc = "      \"type\": \"object\","]
23626#[doc = "      \"required\": ["]
23627#[doc = "        \"info\","]
23628#[doc = "        \"name\""]
23629#[doc = "      ],"]
23630#[doc = "      \"properties\": {"]
23631#[doc = "        \"info\": {"]
23632#[doc = "          \"type\": \"object\","]
23633#[doc = "          \"required\": ["]
23634#[doc = "            \"block_reference\""]
23635#[doc = "          ],"]
23636#[doc = "          \"properties\": {"]
23637#[doc = "            \"block_reference\": {"]
23638#[doc = "              \"$ref\": \"#/components/schemas/BlockReference\""]
23639#[doc = "            }"]
23640#[doc = "          }"]
23641#[doc = "        },"]
23642#[doc = "        \"name\": {"]
23643#[doc = "          \"type\": \"string\","]
23644#[doc = "          \"enum\": ["]
23645#[doc = "            \"UNKNOWN_BLOCK\""]
23646#[doc = "          ]"]
23647#[doc = "        }"]
23648#[doc = "      }"]
23649#[doc = "    },"]
23650#[doc = "    {"]
23651#[doc = "      \"type\": \"object\","]
23652#[doc = "      \"required\": ["]
23653#[doc = "        \"info\","]
23654#[doc = "        \"name\""]
23655#[doc = "      ],"]
23656#[doc = "      \"properties\": {"]
23657#[doc = "        \"info\": {"]
23658#[doc = "          \"type\": \"object\","]
23659#[doc = "          \"required\": ["]
23660#[doc = "            \"block_hash\","]
23661#[doc = "            \"block_height\","]
23662#[doc = "            \"requested_account_id\""]
23663#[doc = "          ],"]
23664#[doc = "          \"properties\": {"]
23665#[doc = "            \"block_hash\": {"]
23666#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23667#[doc = "            },"]
23668#[doc = "            \"block_height\": {"]
23669#[doc = "              \"type\": \"integer\","]
23670#[doc = "              \"format\": \"uint64\","]
23671#[doc = "              \"minimum\": 0.0"]
23672#[doc = "            },"]
23673#[doc = "            \"requested_account_id\": {"]
23674#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23675#[doc = "            }"]
23676#[doc = "          }"]
23677#[doc = "        },"]
23678#[doc = "        \"name\": {"]
23679#[doc = "          \"type\": \"string\","]
23680#[doc = "          \"enum\": ["]
23681#[doc = "            \"INVALID_ACCOUNT\""]
23682#[doc = "          ]"]
23683#[doc = "        }"]
23684#[doc = "      }"]
23685#[doc = "    },"]
23686#[doc = "    {"]
23687#[doc = "      \"type\": \"object\","]
23688#[doc = "      \"required\": ["]
23689#[doc = "        \"info\","]
23690#[doc = "        \"name\""]
23691#[doc = "      ],"]
23692#[doc = "      \"properties\": {"]
23693#[doc = "        \"info\": {"]
23694#[doc = "          \"type\": \"object\","]
23695#[doc = "          \"required\": ["]
23696#[doc = "            \"block_hash\","]
23697#[doc = "            \"block_height\","]
23698#[doc = "            \"requested_account_id\""]
23699#[doc = "          ],"]
23700#[doc = "          \"properties\": {"]
23701#[doc = "            \"block_hash\": {"]
23702#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23703#[doc = "            },"]
23704#[doc = "            \"block_height\": {"]
23705#[doc = "              \"type\": \"integer\","]
23706#[doc = "              \"format\": \"uint64\","]
23707#[doc = "              \"minimum\": 0.0"]
23708#[doc = "            },"]
23709#[doc = "            \"requested_account_id\": {"]
23710#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23711#[doc = "            }"]
23712#[doc = "          }"]
23713#[doc = "        },"]
23714#[doc = "        \"name\": {"]
23715#[doc = "          \"type\": \"string\","]
23716#[doc = "          \"enum\": ["]
23717#[doc = "            \"UNKNOWN_ACCOUNT\""]
23718#[doc = "          ]"]
23719#[doc = "        }"]
23720#[doc = "      }"]
23721#[doc = "    },"]
23722#[doc = "    {"]
23723#[doc = "      \"type\": \"object\","]
23724#[doc = "      \"required\": ["]
23725#[doc = "        \"info\","]
23726#[doc = "        \"name\""]
23727#[doc = "      ],"]
23728#[doc = "      \"properties\": {"]
23729#[doc = "        \"info\": {"]
23730#[doc = "          \"type\": \"object\","]
23731#[doc = "          \"required\": ["]
23732#[doc = "            \"block_hash\","]
23733#[doc = "            \"block_height\","]
23734#[doc = "            \"contract_account_id\""]
23735#[doc = "          ],"]
23736#[doc = "          \"properties\": {"]
23737#[doc = "            \"block_hash\": {"]
23738#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23739#[doc = "            },"]
23740#[doc = "            \"block_height\": {"]
23741#[doc = "              \"type\": \"integer\","]
23742#[doc = "              \"format\": \"uint64\","]
23743#[doc = "              \"minimum\": 0.0"]
23744#[doc = "            },"]
23745#[doc = "            \"contract_account_id\": {"]
23746#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23747#[doc = "            }"]
23748#[doc = "          }"]
23749#[doc = "        },"]
23750#[doc = "        \"name\": {"]
23751#[doc = "          \"type\": \"string\","]
23752#[doc = "          \"enum\": ["]
23753#[doc = "            \"NO_CONTRACT_CODE\""]
23754#[doc = "          ]"]
23755#[doc = "        }"]
23756#[doc = "      }"]
23757#[doc = "    },"]
23758#[doc = "    {"]
23759#[doc = "      \"type\": \"object\","]
23760#[doc = "      \"required\": ["]
23761#[doc = "        \"info\","]
23762#[doc = "        \"name\""]
23763#[doc = "      ],"]
23764#[doc = "      \"properties\": {"]
23765#[doc = "        \"info\": {"]
23766#[doc = "          \"type\": \"object\","]
23767#[doc = "          \"required\": ["]
23768#[doc = "            \"block_hash\","]
23769#[doc = "            \"block_height\","]
23770#[doc = "            \"contract_account_id\""]
23771#[doc = "          ],"]
23772#[doc = "          \"properties\": {"]
23773#[doc = "            \"block_hash\": {"]
23774#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23775#[doc = "            },"]
23776#[doc = "            \"block_height\": {"]
23777#[doc = "              \"type\": \"integer\","]
23778#[doc = "              \"format\": \"uint64\","]
23779#[doc = "              \"minimum\": 0.0"]
23780#[doc = "            },"]
23781#[doc = "            \"contract_account_id\": {"]
23782#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
23783#[doc = "            }"]
23784#[doc = "          }"]
23785#[doc = "        },"]
23786#[doc = "        \"name\": {"]
23787#[doc = "          \"type\": \"string\","]
23788#[doc = "          \"enum\": ["]
23789#[doc = "            \"TOO_LARGE_CONTRACT_STATE\""]
23790#[doc = "          ]"]
23791#[doc = "        }"]
23792#[doc = "      }"]
23793#[doc = "    },"]
23794#[doc = "    {"]
23795#[doc = "      \"type\": \"object\","]
23796#[doc = "      \"required\": ["]
23797#[doc = "        \"info\","]
23798#[doc = "        \"name\""]
23799#[doc = "      ],"]
23800#[doc = "      \"properties\": {"]
23801#[doc = "        \"info\": {"]
23802#[doc = "          \"type\": \"object\","]
23803#[doc = "          \"required\": ["]
23804#[doc = "            \"block_hash\","]
23805#[doc = "            \"block_height\","]
23806#[doc = "            \"public_key\""]
23807#[doc = "          ],"]
23808#[doc = "          \"properties\": {"]
23809#[doc = "            \"block_hash\": {"]
23810#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23811#[doc = "            },"]
23812#[doc = "            \"block_height\": {"]
23813#[doc = "              \"type\": \"integer\","]
23814#[doc = "              \"format\": \"uint64\","]
23815#[doc = "              \"minimum\": 0.0"]
23816#[doc = "            },"]
23817#[doc = "            \"public_key\": {"]
23818#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
23819#[doc = "            }"]
23820#[doc = "          }"]
23821#[doc = "        },"]
23822#[doc = "        \"name\": {"]
23823#[doc = "          \"type\": \"string\","]
23824#[doc = "          \"enum\": ["]
23825#[doc = "            \"UNKNOWN_ACCESS_KEY\""]
23826#[doc = "          ]"]
23827#[doc = "        }"]
23828#[doc = "      }"]
23829#[doc = "    },"]
23830#[doc = "    {"]
23831#[doc = "      \"type\": \"object\","]
23832#[doc = "      \"required\": ["]
23833#[doc = "        \"info\","]
23834#[doc = "        \"name\""]
23835#[doc = "      ],"]
23836#[doc = "      \"properties\": {"]
23837#[doc = "        \"info\": {"]
23838#[doc = "          \"type\": \"object\","]
23839#[doc = "          \"required\": ["]
23840#[doc = "            \"block_hash\","]
23841#[doc = "            \"block_height\","]
23842#[doc = "            \"public_key\""]
23843#[doc = "          ],"]
23844#[doc = "          \"properties\": {"]
23845#[doc = "            \"block_hash\": {"]
23846#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23847#[doc = "            },"]
23848#[doc = "            \"block_height\": {"]
23849#[doc = "              \"type\": \"integer\","]
23850#[doc = "              \"format\": \"uint64\","]
23851#[doc = "              \"minimum\": 0.0"]
23852#[doc = "            },"]
23853#[doc = "            \"public_key\": {"]
23854#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
23855#[doc = "            }"]
23856#[doc = "          }"]
23857#[doc = "        },"]
23858#[doc = "        \"name\": {"]
23859#[doc = "          \"type\": \"string\","]
23860#[doc = "          \"enum\": ["]
23861#[doc = "            \"UNKNOWN_GAS_KEY\""]
23862#[doc = "          ]"]
23863#[doc = "        }"]
23864#[doc = "      }"]
23865#[doc = "    },"]
23866#[doc = "    {"]
23867#[doc = "      \"type\": \"object\","]
23868#[doc = "      \"required\": ["]
23869#[doc = "        \"info\","]
23870#[doc = "        \"name\""]
23871#[doc = "      ],"]
23872#[doc = "      \"properties\": {"]
23873#[doc = "        \"info\": {"]
23874#[doc = "          \"type\": \"object\","]
23875#[doc = "          \"required\": ["]
23876#[doc = "            \"block_hash\","]
23877#[doc = "            \"block_height\","]
23878#[doc = "            \"vm_error\""]
23879#[doc = "          ],"]
23880#[doc = "          \"properties\": {"]
23881#[doc = "            \"block_hash\": {"]
23882#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23883#[doc = "            },"]
23884#[doc = "            \"block_height\": {"]
23885#[doc = "              \"type\": \"integer\","]
23886#[doc = "              \"format\": \"uint64\","]
23887#[doc = "              \"minimum\": 0.0"]
23888#[doc = "            },"]
23889#[doc = "            \"vm_error\": {"]
23890#[doc = "              \"type\": \"string\""]
23891#[doc = "            }"]
23892#[doc = "          }"]
23893#[doc = "        },"]
23894#[doc = "        \"name\": {"]
23895#[doc = "          \"type\": \"string\","]
23896#[doc = "          \"enum\": ["]
23897#[doc = "            \"CONTRACT_EXECUTION_ERROR\""]
23898#[doc = "          ]"]
23899#[doc = "        }"]
23900#[doc = "      }"]
23901#[doc = "    },"]
23902#[doc = "    {"]
23903#[doc = "      \"type\": \"object\","]
23904#[doc = "      \"required\": ["]
23905#[doc = "        \"info\","]
23906#[doc = "        \"name\""]
23907#[doc = "      ],"]
23908#[doc = "      \"properties\": {"]
23909#[doc = "        \"info\": {"]
23910#[doc = "          \"type\": \"object\","]
23911#[doc = "          \"required\": ["]
23912#[doc = "            \"block_hash\","]
23913#[doc = "            \"block_height\","]
23914#[doc = "            \"identifier\""]
23915#[doc = "          ],"]
23916#[doc = "          \"properties\": {"]
23917#[doc = "            \"block_hash\": {"]
23918#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
23919#[doc = "            },"]
23920#[doc = "            \"block_height\": {"]
23921#[doc = "              \"type\": \"integer\","]
23922#[doc = "              \"format\": \"uint64\","]
23923#[doc = "              \"minimum\": 0.0"]
23924#[doc = "            },"]
23925#[doc = "            \"identifier\": {"]
23926#[doc = "              \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
23927#[doc = "            }"]
23928#[doc = "          }"]
23929#[doc = "        },"]
23930#[doc = "        \"name\": {"]
23931#[doc = "          \"type\": \"string\","]
23932#[doc = "          \"enum\": ["]
23933#[doc = "            \"NO_GLOBAL_CONTRACT_CODE\""]
23934#[doc = "          ]"]
23935#[doc = "        }"]
23936#[doc = "      }"]
23937#[doc = "    },"]
23938#[doc = "    {"]
23939#[doc = "      \"type\": \"object\","]
23940#[doc = "      \"required\": ["]
23941#[doc = "        \"info\","]
23942#[doc = "        \"name\""]
23943#[doc = "      ],"]
23944#[doc = "      \"properties\": {"]
23945#[doc = "        \"info\": {"]
23946#[doc = "          \"type\": \"object\","]
23947#[doc = "          \"required\": ["]
23948#[doc = "            \"error_message\""]
23949#[doc = "          ],"]
23950#[doc = "          \"properties\": {"]
23951#[doc = "            \"error_message\": {"]
23952#[doc = "              \"type\": \"string\""]
23953#[doc = "            }"]
23954#[doc = "          }"]
23955#[doc = "        },"]
23956#[doc = "        \"name\": {"]
23957#[doc = "          \"type\": \"string\","]
23958#[doc = "          \"enum\": ["]
23959#[doc = "            \"INTERNAL_ERROR\""]
23960#[doc = "          ]"]
23961#[doc = "        }"]
23962#[doc = "      }"]
23963#[doc = "    }"]
23964#[doc = "  ]"]
23965#[doc = "}"]
23966#[doc = r" ```"]
23967#[doc = r" </details>"]
23968#[derive(
23969    :: serde :: Deserialize,
23970    :: serde :: Serialize,
23971    Clone,
23972    Debug,
23973    thiserror::Error,
23974    strum_macros::Display,
23975)]
23976#[serde(tag = "name", content = "info")]
23977pub enum RpcQueryError {
23978    #[serde(rename = "NO_SYNCED_BLOCKS")]
23979    NoSyncedBlocks,
23980    #[serde(rename = "UNAVAILABLE_SHARD")]
23981    UnavailableShard { requested_shard_id: ShardId },
23982    #[serde(rename = "GARBAGE_COLLECTED_BLOCK")]
23983    GarbageCollectedBlock {
23984        block_hash: CryptoHash,
23985        block_height: u64,
23986    },
23987    #[serde(rename = "UNKNOWN_BLOCK")]
23988    UnknownBlock { block_reference: BlockReference },
23989    #[serde(rename = "INVALID_ACCOUNT")]
23990    InvalidAccount {
23991        block_hash: CryptoHash,
23992        block_height: u64,
23993        requested_account_id: AccountId,
23994    },
23995    #[serde(rename = "UNKNOWN_ACCOUNT")]
23996    UnknownAccount {
23997        block_hash: CryptoHash,
23998        block_height: u64,
23999        requested_account_id: AccountId,
24000    },
24001    #[serde(rename = "NO_CONTRACT_CODE")]
24002    NoContractCode {
24003        block_hash: CryptoHash,
24004        block_height: u64,
24005        contract_account_id: AccountId,
24006    },
24007    #[serde(rename = "TOO_LARGE_CONTRACT_STATE")]
24008    TooLargeContractState {
24009        block_hash: CryptoHash,
24010        block_height: u64,
24011        contract_account_id: AccountId,
24012    },
24013    #[serde(rename = "UNKNOWN_ACCESS_KEY")]
24014    UnknownAccessKey {
24015        block_hash: CryptoHash,
24016        block_height: u64,
24017        public_key: PublicKey,
24018    },
24019    #[serde(rename = "UNKNOWN_GAS_KEY")]
24020    UnknownGasKey {
24021        block_hash: CryptoHash,
24022        block_height: u64,
24023        public_key: PublicKey,
24024    },
24025    #[serde(rename = "CONTRACT_EXECUTION_ERROR")]
24026    ContractExecutionError {
24027        block_hash: CryptoHash,
24028        block_height: u64,
24029        vm_error: ::std::string::String,
24030    },
24031    #[serde(rename = "NO_GLOBAL_CONTRACT_CODE")]
24032    NoGlobalContractCode {
24033        block_hash: CryptoHash,
24034        block_height: u64,
24035        identifier: GlobalContractIdentifier,
24036    },
24037    #[serde(rename = "INTERNAL_ERROR")]
24038    InternalError {
24039        error_message: ::std::string::String,
24040    },
24041}
24042impl ::std::convert::From<&Self> for RpcQueryError {
24043    fn from(value: &RpcQueryError) -> Self {
24044        value.clone()
24045    }
24046}
24047#[doc = "`RpcQueryRequest`"]
24048#[doc = r""]
24049#[doc = r" <details><summary>JSON schema</summary>"]
24050#[doc = r""]
24051#[doc = r" ```json"]
24052#[doc = "{"]
24053#[doc = "  \"title\": \"RpcQueryRequest\","]
24054#[doc = "  \"type\": \"object\","]
24055#[doc = "  \"oneOf\": ["]
24056#[doc = "    {"]
24057#[doc = "      \"title\": \"view_account_by_block_id\","]
24058#[doc = "      \"allOf\": ["]
24059#[doc = "        {"]
24060#[doc = "          \"type\": \"object\","]
24061#[doc = "          \"required\": ["]
24062#[doc = "            \"block_id\""]
24063#[doc = "          ],"]
24064#[doc = "          \"properties\": {"]
24065#[doc = "            \"block_id\": {"]
24066#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24067#[doc = "            }"]
24068#[doc = "          }"]
24069#[doc = "        },"]
24070#[doc = "        {"]
24071#[doc = "          \"type\": \"object\","]
24072#[doc = "          \"required\": ["]
24073#[doc = "            \"account_id\","]
24074#[doc = "            \"request_type\""]
24075#[doc = "          ],"]
24076#[doc = "          \"properties\": {"]
24077#[doc = "            \"account_id\": {"]
24078#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24079#[doc = "            },"]
24080#[doc = "            \"request_type\": {"]
24081#[doc = "              \"type\": \"string\","]
24082#[doc = "              \"enum\": ["]
24083#[doc = "                \"view_account\""]
24084#[doc = "              ]"]
24085#[doc = "            }"]
24086#[doc = "          }"]
24087#[doc = "        }"]
24088#[doc = "      ]"]
24089#[doc = "    },"]
24090#[doc = "    {"]
24091#[doc = "      \"title\": \"view_code_by_block_id\","]
24092#[doc = "      \"allOf\": ["]
24093#[doc = "        {"]
24094#[doc = "          \"type\": \"object\","]
24095#[doc = "          \"required\": ["]
24096#[doc = "            \"block_id\""]
24097#[doc = "          ],"]
24098#[doc = "          \"properties\": {"]
24099#[doc = "            \"block_id\": {"]
24100#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24101#[doc = "            }"]
24102#[doc = "          }"]
24103#[doc = "        },"]
24104#[doc = "        {"]
24105#[doc = "          \"type\": \"object\","]
24106#[doc = "          \"required\": ["]
24107#[doc = "            \"account_id\","]
24108#[doc = "            \"request_type\""]
24109#[doc = "          ],"]
24110#[doc = "          \"properties\": {"]
24111#[doc = "            \"account_id\": {"]
24112#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24113#[doc = "            },"]
24114#[doc = "            \"request_type\": {"]
24115#[doc = "              \"type\": \"string\","]
24116#[doc = "              \"enum\": ["]
24117#[doc = "                \"view_code\""]
24118#[doc = "              ]"]
24119#[doc = "            }"]
24120#[doc = "          }"]
24121#[doc = "        }"]
24122#[doc = "      ]"]
24123#[doc = "    },"]
24124#[doc = "    {"]
24125#[doc = "      \"title\": \"view_state_by_block_id\","]
24126#[doc = "      \"allOf\": ["]
24127#[doc = "        {"]
24128#[doc = "          \"type\": \"object\","]
24129#[doc = "          \"required\": ["]
24130#[doc = "            \"block_id\""]
24131#[doc = "          ],"]
24132#[doc = "          \"properties\": {"]
24133#[doc = "            \"block_id\": {"]
24134#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24135#[doc = "            }"]
24136#[doc = "          }"]
24137#[doc = "        },"]
24138#[doc = "        {"]
24139#[doc = "          \"type\": \"object\","]
24140#[doc = "          \"required\": ["]
24141#[doc = "            \"account_id\","]
24142#[doc = "            \"prefix_base64\","]
24143#[doc = "            \"request_type\""]
24144#[doc = "          ],"]
24145#[doc = "          \"properties\": {"]
24146#[doc = "            \"account_id\": {"]
24147#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24148#[doc = "            },"]
24149#[doc = "            \"include_proof\": {"]
24150#[doc = "              \"type\": \"boolean\""]
24151#[doc = "            },"]
24152#[doc = "            \"prefix_base64\": {"]
24153#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
24154#[doc = "            },"]
24155#[doc = "            \"request_type\": {"]
24156#[doc = "              \"type\": \"string\","]
24157#[doc = "              \"enum\": ["]
24158#[doc = "                \"view_state\""]
24159#[doc = "              ]"]
24160#[doc = "            }"]
24161#[doc = "          }"]
24162#[doc = "        }"]
24163#[doc = "      ]"]
24164#[doc = "    },"]
24165#[doc = "    {"]
24166#[doc = "      \"title\": \"view_access_key_by_block_id\","]
24167#[doc = "      \"allOf\": ["]
24168#[doc = "        {"]
24169#[doc = "          \"type\": \"object\","]
24170#[doc = "          \"required\": ["]
24171#[doc = "            \"block_id\""]
24172#[doc = "          ],"]
24173#[doc = "          \"properties\": {"]
24174#[doc = "            \"block_id\": {"]
24175#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24176#[doc = "            }"]
24177#[doc = "          }"]
24178#[doc = "        },"]
24179#[doc = "        {"]
24180#[doc = "          \"type\": \"object\","]
24181#[doc = "          \"required\": ["]
24182#[doc = "            \"account_id\","]
24183#[doc = "            \"public_key\","]
24184#[doc = "            \"request_type\""]
24185#[doc = "          ],"]
24186#[doc = "          \"properties\": {"]
24187#[doc = "            \"account_id\": {"]
24188#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24189#[doc = "            },"]
24190#[doc = "            \"public_key\": {"]
24191#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
24192#[doc = "            },"]
24193#[doc = "            \"request_type\": {"]
24194#[doc = "              \"type\": \"string\","]
24195#[doc = "              \"enum\": ["]
24196#[doc = "                \"view_access_key\""]
24197#[doc = "              ]"]
24198#[doc = "            }"]
24199#[doc = "          }"]
24200#[doc = "        }"]
24201#[doc = "      ]"]
24202#[doc = "    },"]
24203#[doc = "    {"]
24204#[doc = "      \"title\": \"view_access_key_list_by_block_id\","]
24205#[doc = "      \"allOf\": ["]
24206#[doc = "        {"]
24207#[doc = "          \"type\": \"object\","]
24208#[doc = "          \"required\": ["]
24209#[doc = "            \"block_id\""]
24210#[doc = "          ],"]
24211#[doc = "          \"properties\": {"]
24212#[doc = "            \"block_id\": {"]
24213#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24214#[doc = "            }"]
24215#[doc = "          }"]
24216#[doc = "        },"]
24217#[doc = "        {"]
24218#[doc = "          \"type\": \"object\","]
24219#[doc = "          \"required\": ["]
24220#[doc = "            \"account_id\","]
24221#[doc = "            \"request_type\""]
24222#[doc = "          ],"]
24223#[doc = "          \"properties\": {"]
24224#[doc = "            \"account_id\": {"]
24225#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24226#[doc = "            },"]
24227#[doc = "            \"request_type\": {"]
24228#[doc = "              \"type\": \"string\","]
24229#[doc = "              \"enum\": ["]
24230#[doc = "                \"view_access_key_list\""]
24231#[doc = "              ]"]
24232#[doc = "            }"]
24233#[doc = "          }"]
24234#[doc = "        }"]
24235#[doc = "      ]"]
24236#[doc = "    },"]
24237#[doc = "    {"]
24238#[doc = "      \"title\": \"view_gas_key_by_block_id\","]
24239#[doc = "      \"allOf\": ["]
24240#[doc = "        {"]
24241#[doc = "          \"type\": \"object\","]
24242#[doc = "          \"required\": ["]
24243#[doc = "            \"block_id\""]
24244#[doc = "          ],"]
24245#[doc = "          \"properties\": {"]
24246#[doc = "            \"block_id\": {"]
24247#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24248#[doc = "            }"]
24249#[doc = "          }"]
24250#[doc = "        },"]
24251#[doc = "        {"]
24252#[doc = "          \"type\": \"object\","]
24253#[doc = "          \"required\": ["]
24254#[doc = "            \"account_id\","]
24255#[doc = "            \"public_key\","]
24256#[doc = "            \"request_type\""]
24257#[doc = "          ],"]
24258#[doc = "          \"properties\": {"]
24259#[doc = "            \"account_id\": {"]
24260#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24261#[doc = "            },"]
24262#[doc = "            \"public_key\": {"]
24263#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
24264#[doc = "            },"]
24265#[doc = "            \"request_type\": {"]
24266#[doc = "              \"type\": \"string\","]
24267#[doc = "              \"enum\": ["]
24268#[doc = "                \"view_gas_key\""]
24269#[doc = "              ]"]
24270#[doc = "            }"]
24271#[doc = "          }"]
24272#[doc = "        }"]
24273#[doc = "      ]"]
24274#[doc = "    },"]
24275#[doc = "    {"]
24276#[doc = "      \"title\": \"view_gas_key_list_by_block_id\","]
24277#[doc = "      \"allOf\": ["]
24278#[doc = "        {"]
24279#[doc = "          \"type\": \"object\","]
24280#[doc = "          \"required\": ["]
24281#[doc = "            \"block_id\""]
24282#[doc = "          ],"]
24283#[doc = "          \"properties\": {"]
24284#[doc = "            \"block_id\": {"]
24285#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24286#[doc = "            }"]
24287#[doc = "          }"]
24288#[doc = "        },"]
24289#[doc = "        {"]
24290#[doc = "          \"type\": \"object\","]
24291#[doc = "          \"required\": ["]
24292#[doc = "            \"account_id\","]
24293#[doc = "            \"request_type\""]
24294#[doc = "          ],"]
24295#[doc = "          \"properties\": {"]
24296#[doc = "            \"account_id\": {"]
24297#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24298#[doc = "            },"]
24299#[doc = "            \"request_type\": {"]
24300#[doc = "              \"type\": \"string\","]
24301#[doc = "              \"enum\": ["]
24302#[doc = "                \"view_gas_key_list\""]
24303#[doc = "              ]"]
24304#[doc = "            }"]
24305#[doc = "          }"]
24306#[doc = "        }"]
24307#[doc = "      ]"]
24308#[doc = "    },"]
24309#[doc = "    {"]
24310#[doc = "      \"title\": \"call_function_by_block_id\","]
24311#[doc = "      \"allOf\": ["]
24312#[doc = "        {"]
24313#[doc = "          \"type\": \"object\","]
24314#[doc = "          \"required\": ["]
24315#[doc = "            \"block_id\""]
24316#[doc = "          ],"]
24317#[doc = "          \"properties\": {"]
24318#[doc = "            \"block_id\": {"]
24319#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24320#[doc = "            }"]
24321#[doc = "          }"]
24322#[doc = "        },"]
24323#[doc = "        {"]
24324#[doc = "          \"type\": \"object\","]
24325#[doc = "          \"required\": ["]
24326#[doc = "            \"account_id\","]
24327#[doc = "            \"args_base64\","]
24328#[doc = "            \"method_name\","]
24329#[doc = "            \"request_type\""]
24330#[doc = "          ],"]
24331#[doc = "          \"properties\": {"]
24332#[doc = "            \"account_id\": {"]
24333#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24334#[doc = "            },"]
24335#[doc = "            \"args_base64\": {"]
24336#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
24337#[doc = "            },"]
24338#[doc = "            \"method_name\": {"]
24339#[doc = "              \"type\": \"string\""]
24340#[doc = "            },"]
24341#[doc = "            \"request_type\": {"]
24342#[doc = "              \"type\": \"string\","]
24343#[doc = "              \"enum\": ["]
24344#[doc = "                \"call_function\""]
24345#[doc = "              ]"]
24346#[doc = "            }"]
24347#[doc = "          }"]
24348#[doc = "        }"]
24349#[doc = "      ]"]
24350#[doc = "    },"]
24351#[doc = "    {"]
24352#[doc = "      \"title\": \"view_global_contract_code_by_block_id\","]
24353#[doc = "      \"allOf\": ["]
24354#[doc = "        {"]
24355#[doc = "          \"type\": \"object\","]
24356#[doc = "          \"required\": ["]
24357#[doc = "            \"block_id\""]
24358#[doc = "          ],"]
24359#[doc = "          \"properties\": {"]
24360#[doc = "            \"block_id\": {"]
24361#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24362#[doc = "            }"]
24363#[doc = "          }"]
24364#[doc = "        },"]
24365#[doc = "        {"]
24366#[doc = "          \"type\": \"object\","]
24367#[doc = "          \"required\": ["]
24368#[doc = "            \"code_hash\","]
24369#[doc = "            \"request_type\""]
24370#[doc = "          ],"]
24371#[doc = "          \"properties\": {"]
24372#[doc = "            \"code_hash\": {"]
24373#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
24374#[doc = "            },"]
24375#[doc = "            \"request_type\": {"]
24376#[doc = "              \"type\": \"string\","]
24377#[doc = "              \"enum\": ["]
24378#[doc = "                \"view_global_contract_code\""]
24379#[doc = "              ]"]
24380#[doc = "            }"]
24381#[doc = "          }"]
24382#[doc = "        }"]
24383#[doc = "      ]"]
24384#[doc = "    },"]
24385#[doc = "    {"]
24386#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_block_id\","]
24387#[doc = "      \"allOf\": ["]
24388#[doc = "        {"]
24389#[doc = "          \"type\": \"object\","]
24390#[doc = "          \"required\": ["]
24391#[doc = "            \"block_id\""]
24392#[doc = "          ],"]
24393#[doc = "          \"properties\": {"]
24394#[doc = "            \"block_id\": {"]
24395#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
24396#[doc = "            }"]
24397#[doc = "          }"]
24398#[doc = "        },"]
24399#[doc = "        {"]
24400#[doc = "          \"type\": \"object\","]
24401#[doc = "          \"required\": ["]
24402#[doc = "            \"account_id\","]
24403#[doc = "            \"request_type\""]
24404#[doc = "          ],"]
24405#[doc = "          \"properties\": {"]
24406#[doc = "            \"account_id\": {"]
24407#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24408#[doc = "            },"]
24409#[doc = "            \"request_type\": {"]
24410#[doc = "              \"type\": \"string\","]
24411#[doc = "              \"enum\": ["]
24412#[doc = "                \"view_global_contract_code_by_account_id\""]
24413#[doc = "              ]"]
24414#[doc = "            }"]
24415#[doc = "          }"]
24416#[doc = "        }"]
24417#[doc = "      ]"]
24418#[doc = "    },"]
24419#[doc = "    {"]
24420#[doc = "      \"title\": \"view_account_by_finality\","]
24421#[doc = "      \"allOf\": ["]
24422#[doc = "        {"]
24423#[doc = "          \"type\": \"object\","]
24424#[doc = "          \"required\": ["]
24425#[doc = "            \"finality\""]
24426#[doc = "          ],"]
24427#[doc = "          \"properties\": {"]
24428#[doc = "            \"finality\": {"]
24429#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24430#[doc = "            }"]
24431#[doc = "          }"]
24432#[doc = "        },"]
24433#[doc = "        {"]
24434#[doc = "          \"type\": \"object\","]
24435#[doc = "          \"required\": ["]
24436#[doc = "            \"account_id\","]
24437#[doc = "            \"request_type\""]
24438#[doc = "          ],"]
24439#[doc = "          \"properties\": {"]
24440#[doc = "            \"account_id\": {"]
24441#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24442#[doc = "            },"]
24443#[doc = "            \"request_type\": {"]
24444#[doc = "              \"type\": \"string\","]
24445#[doc = "              \"enum\": ["]
24446#[doc = "                \"view_account\""]
24447#[doc = "              ]"]
24448#[doc = "            }"]
24449#[doc = "          }"]
24450#[doc = "        }"]
24451#[doc = "      ]"]
24452#[doc = "    },"]
24453#[doc = "    {"]
24454#[doc = "      \"title\": \"view_code_by_finality\","]
24455#[doc = "      \"allOf\": ["]
24456#[doc = "        {"]
24457#[doc = "          \"type\": \"object\","]
24458#[doc = "          \"required\": ["]
24459#[doc = "            \"finality\""]
24460#[doc = "          ],"]
24461#[doc = "          \"properties\": {"]
24462#[doc = "            \"finality\": {"]
24463#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24464#[doc = "            }"]
24465#[doc = "          }"]
24466#[doc = "        },"]
24467#[doc = "        {"]
24468#[doc = "          \"type\": \"object\","]
24469#[doc = "          \"required\": ["]
24470#[doc = "            \"account_id\","]
24471#[doc = "            \"request_type\""]
24472#[doc = "          ],"]
24473#[doc = "          \"properties\": {"]
24474#[doc = "            \"account_id\": {"]
24475#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24476#[doc = "            },"]
24477#[doc = "            \"request_type\": {"]
24478#[doc = "              \"type\": \"string\","]
24479#[doc = "              \"enum\": ["]
24480#[doc = "                \"view_code\""]
24481#[doc = "              ]"]
24482#[doc = "            }"]
24483#[doc = "          }"]
24484#[doc = "        }"]
24485#[doc = "      ]"]
24486#[doc = "    },"]
24487#[doc = "    {"]
24488#[doc = "      \"title\": \"view_state_by_finality\","]
24489#[doc = "      \"allOf\": ["]
24490#[doc = "        {"]
24491#[doc = "          \"type\": \"object\","]
24492#[doc = "          \"required\": ["]
24493#[doc = "            \"finality\""]
24494#[doc = "          ],"]
24495#[doc = "          \"properties\": {"]
24496#[doc = "            \"finality\": {"]
24497#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24498#[doc = "            }"]
24499#[doc = "          }"]
24500#[doc = "        },"]
24501#[doc = "        {"]
24502#[doc = "          \"type\": \"object\","]
24503#[doc = "          \"required\": ["]
24504#[doc = "            \"account_id\","]
24505#[doc = "            \"prefix_base64\","]
24506#[doc = "            \"request_type\""]
24507#[doc = "          ],"]
24508#[doc = "          \"properties\": {"]
24509#[doc = "            \"account_id\": {"]
24510#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24511#[doc = "            },"]
24512#[doc = "            \"include_proof\": {"]
24513#[doc = "              \"type\": \"boolean\""]
24514#[doc = "            },"]
24515#[doc = "            \"prefix_base64\": {"]
24516#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
24517#[doc = "            },"]
24518#[doc = "            \"request_type\": {"]
24519#[doc = "              \"type\": \"string\","]
24520#[doc = "              \"enum\": ["]
24521#[doc = "                \"view_state\""]
24522#[doc = "              ]"]
24523#[doc = "            }"]
24524#[doc = "          }"]
24525#[doc = "        }"]
24526#[doc = "      ]"]
24527#[doc = "    },"]
24528#[doc = "    {"]
24529#[doc = "      \"title\": \"view_access_key_by_finality\","]
24530#[doc = "      \"allOf\": ["]
24531#[doc = "        {"]
24532#[doc = "          \"type\": \"object\","]
24533#[doc = "          \"required\": ["]
24534#[doc = "            \"finality\""]
24535#[doc = "          ],"]
24536#[doc = "          \"properties\": {"]
24537#[doc = "            \"finality\": {"]
24538#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24539#[doc = "            }"]
24540#[doc = "          }"]
24541#[doc = "        },"]
24542#[doc = "        {"]
24543#[doc = "          \"type\": \"object\","]
24544#[doc = "          \"required\": ["]
24545#[doc = "            \"account_id\","]
24546#[doc = "            \"public_key\","]
24547#[doc = "            \"request_type\""]
24548#[doc = "          ],"]
24549#[doc = "          \"properties\": {"]
24550#[doc = "            \"account_id\": {"]
24551#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24552#[doc = "            },"]
24553#[doc = "            \"public_key\": {"]
24554#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
24555#[doc = "            },"]
24556#[doc = "            \"request_type\": {"]
24557#[doc = "              \"type\": \"string\","]
24558#[doc = "              \"enum\": ["]
24559#[doc = "                \"view_access_key\""]
24560#[doc = "              ]"]
24561#[doc = "            }"]
24562#[doc = "          }"]
24563#[doc = "        }"]
24564#[doc = "      ]"]
24565#[doc = "    },"]
24566#[doc = "    {"]
24567#[doc = "      \"title\": \"view_access_key_list_by_finality\","]
24568#[doc = "      \"allOf\": ["]
24569#[doc = "        {"]
24570#[doc = "          \"type\": \"object\","]
24571#[doc = "          \"required\": ["]
24572#[doc = "            \"finality\""]
24573#[doc = "          ],"]
24574#[doc = "          \"properties\": {"]
24575#[doc = "            \"finality\": {"]
24576#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24577#[doc = "            }"]
24578#[doc = "          }"]
24579#[doc = "        },"]
24580#[doc = "        {"]
24581#[doc = "          \"type\": \"object\","]
24582#[doc = "          \"required\": ["]
24583#[doc = "            \"account_id\","]
24584#[doc = "            \"request_type\""]
24585#[doc = "          ],"]
24586#[doc = "          \"properties\": {"]
24587#[doc = "            \"account_id\": {"]
24588#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24589#[doc = "            },"]
24590#[doc = "            \"request_type\": {"]
24591#[doc = "              \"type\": \"string\","]
24592#[doc = "              \"enum\": ["]
24593#[doc = "                \"view_access_key_list\""]
24594#[doc = "              ]"]
24595#[doc = "            }"]
24596#[doc = "          }"]
24597#[doc = "        }"]
24598#[doc = "      ]"]
24599#[doc = "    },"]
24600#[doc = "    {"]
24601#[doc = "      \"title\": \"view_gas_key_by_finality\","]
24602#[doc = "      \"allOf\": ["]
24603#[doc = "        {"]
24604#[doc = "          \"type\": \"object\","]
24605#[doc = "          \"required\": ["]
24606#[doc = "            \"finality\""]
24607#[doc = "          ],"]
24608#[doc = "          \"properties\": {"]
24609#[doc = "            \"finality\": {"]
24610#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24611#[doc = "            }"]
24612#[doc = "          }"]
24613#[doc = "        },"]
24614#[doc = "        {"]
24615#[doc = "          \"type\": \"object\","]
24616#[doc = "          \"required\": ["]
24617#[doc = "            \"account_id\","]
24618#[doc = "            \"public_key\","]
24619#[doc = "            \"request_type\""]
24620#[doc = "          ],"]
24621#[doc = "          \"properties\": {"]
24622#[doc = "            \"account_id\": {"]
24623#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24624#[doc = "            },"]
24625#[doc = "            \"public_key\": {"]
24626#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
24627#[doc = "            },"]
24628#[doc = "            \"request_type\": {"]
24629#[doc = "              \"type\": \"string\","]
24630#[doc = "              \"enum\": ["]
24631#[doc = "                \"view_gas_key\""]
24632#[doc = "              ]"]
24633#[doc = "            }"]
24634#[doc = "          }"]
24635#[doc = "        }"]
24636#[doc = "      ]"]
24637#[doc = "    },"]
24638#[doc = "    {"]
24639#[doc = "      \"title\": \"view_gas_key_list_by_finality\","]
24640#[doc = "      \"allOf\": ["]
24641#[doc = "        {"]
24642#[doc = "          \"type\": \"object\","]
24643#[doc = "          \"required\": ["]
24644#[doc = "            \"finality\""]
24645#[doc = "          ],"]
24646#[doc = "          \"properties\": {"]
24647#[doc = "            \"finality\": {"]
24648#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24649#[doc = "            }"]
24650#[doc = "          }"]
24651#[doc = "        },"]
24652#[doc = "        {"]
24653#[doc = "          \"type\": \"object\","]
24654#[doc = "          \"required\": ["]
24655#[doc = "            \"account_id\","]
24656#[doc = "            \"request_type\""]
24657#[doc = "          ],"]
24658#[doc = "          \"properties\": {"]
24659#[doc = "            \"account_id\": {"]
24660#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24661#[doc = "            },"]
24662#[doc = "            \"request_type\": {"]
24663#[doc = "              \"type\": \"string\","]
24664#[doc = "              \"enum\": ["]
24665#[doc = "                \"view_gas_key_list\""]
24666#[doc = "              ]"]
24667#[doc = "            }"]
24668#[doc = "          }"]
24669#[doc = "        }"]
24670#[doc = "      ]"]
24671#[doc = "    },"]
24672#[doc = "    {"]
24673#[doc = "      \"title\": \"call_function_by_finality\","]
24674#[doc = "      \"allOf\": ["]
24675#[doc = "        {"]
24676#[doc = "          \"type\": \"object\","]
24677#[doc = "          \"required\": ["]
24678#[doc = "            \"finality\""]
24679#[doc = "          ],"]
24680#[doc = "          \"properties\": {"]
24681#[doc = "            \"finality\": {"]
24682#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24683#[doc = "            }"]
24684#[doc = "          }"]
24685#[doc = "        },"]
24686#[doc = "        {"]
24687#[doc = "          \"type\": \"object\","]
24688#[doc = "          \"required\": ["]
24689#[doc = "            \"account_id\","]
24690#[doc = "            \"args_base64\","]
24691#[doc = "            \"method_name\","]
24692#[doc = "            \"request_type\""]
24693#[doc = "          ],"]
24694#[doc = "          \"properties\": {"]
24695#[doc = "            \"account_id\": {"]
24696#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24697#[doc = "            },"]
24698#[doc = "            \"args_base64\": {"]
24699#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
24700#[doc = "            },"]
24701#[doc = "            \"method_name\": {"]
24702#[doc = "              \"type\": \"string\""]
24703#[doc = "            },"]
24704#[doc = "            \"request_type\": {"]
24705#[doc = "              \"type\": \"string\","]
24706#[doc = "              \"enum\": ["]
24707#[doc = "                \"call_function\""]
24708#[doc = "              ]"]
24709#[doc = "            }"]
24710#[doc = "          }"]
24711#[doc = "        }"]
24712#[doc = "      ]"]
24713#[doc = "    },"]
24714#[doc = "    {"]
24715#[doc = "      \"title\": \"view_global_contract_code_by_finality\","]
24716#[doc = "      \"allOf\": ["]
24717#[doc = "        {"]
24718#[doc = "          \"type\": \"object\","]
24719#[doc = "          \"required\": ["]
24720#[doc = "            \"finality\""]
24721#[doc = "          ],"]
24722#[doc = "          \"properties\": {"]
24723#[doc = "            \"finality\": {"]
24724#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24725#[doc = "            }"]
24726#[doc = "          }"]
24727#[doc = "        },"]
24728#[doc = "        {"]
24729#[doc = "          \"type\": \"object\","]
24730#[doc = "          \"required\": ["]
24731#[doc = "            \"code_hash\","]
24732#[doc = "            \"request_type\""]
24733#[doc = "          ],"]
24734#[doc = "          \"properties\": {"]
24735#[doc = "            \"code_hash\": {"]
24736#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
24737#[doc = "            },"]
24738#[doc = "            \"request_type\": {"]
24739#[doc = "              \"type\": \"string\","]
24740#[doc = "              \"enum\": ["]
24741#[doc = "                \"view_global_contract_code\""]
24742#[doc = "              ]"]
24743#[doc = "            }"]
24744#[doc = "          }"]
24745#[doc = "        }"]
24746#[doc = "      ]"]
24747#[doc = "    },"]
24748#[doc = "    {"]
24749#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_finality\","]
24750#[doc = "      \"allOf\": ["]
24751#[doc = "        {"]
24752#[doc = "          \"type\": \"object\","]
24753#[doc = "          \"required\": ["]
24754#[doc = "            \"finality\""]
24755#[doc = "          ],"]
24756#[doc = "          \"properties\": {"]
24757#[doc = "            \"finality\": {"]
24758#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
24759#[doc = "            }"]
24760#[doc = "          }"]
24761#[doc = "        },"]
24762#[doc = "        {"]
24763#[doc = "          \"type\": \"object\","]
24764#[doc = "          \"required\": ["]
24765#[doc = "            \"account_id\","]
24766#[doc = "            \"request_type\""]
24767#[doc = "          ],"]
24768#[doc = "          \"properties\": {"]
24769#[doc = "            \"account_id\": {"]
24770#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24771#[doc = "            },"]
24772#[doc = "            \"request_type\": {"]
24773#[doc = "              \"type\": \"string\","]
24774#[doc = "              \"enum\": ["]
24775#[doc = "                \"view_global_contract_code_by_account_id\""]
24776#[doc = "              ]"]
24777#[doc = "            }"]
24778#[doc = "          }"]
24779#[doc = "        }"]
24780#[doc = "      ]"]
24781#[doc = "    },"]
24782#[doc = "    {"]
24783#[doc = "      \"title\": \"view_account_by_sync_checkpoint\","]
24784#[doc = "      \"allOf\": ["]
24785#[doc = "        {"]
24786#[doc = "          \"type\": \"object\","]
24787#[doc = "          \"required\": ["]
24788#[doc = "            \"sync_checkpoint\""]
24789#[doc = "          ],"]
24790#[doc = "          \"properties\": {"]
24791#[doc = "            \"sync_checkpoint\": {"]
24792#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24793#[doc = "            }"]
24794#[doc = "          }"]
24795#[doc = "        },"]
24796#[doc = "        {"]
24797#[doc = "          \"type\": \"object\","]
24798#[doc = "          \"required\": ["]
24799#[doc = "            \"account_id\","]
24800#[doc = "            \"request_type\""]
24801#[doc = "          ],"]
24802#[doc = "          \"properties\": {"]
24803#[doc = "            \"account_id\": {"]
24804#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24805#[doc = "            },"]
24806#[doc = "            \"request_type\": {"]
24807#[doc = "              \"type\": \"string\","]
24808#[doc = "              \"enum\": ["]
24809#[doc = "                \"view_account\""]
24810#[doc = "              ]"]
24811#[doc = "            }"]
24812#[doc = "          }"]
24813#[doc = "        }"]
24814#[doc = "      ]"]
24815#[doc = "    },"]
24816#[doc = "    {"]
24817#[doc = "      \"title\": \"view_code_by_sync_checkpoint\","]
24818#[doc = "      \"allOf\": ["]
24819#[doc = "        {"]
24820#[doc = "          \"type\": \"object\","]
24821#[doc = "          \"required\": ["]
24822#[doc = "            \"sync_checkpoint\""]
24823#[doc = "          ],"]
24824#[doc = "          \"properties\": {"]
24825#[doc = "            \"sync_checkpoint\": {"]
24826#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24827#[doc = "            }"]
24828#[doc = "          }"]
24829#[doc = "        },"]
24830#[doc = "        {"]
24831#[doc = "          \"type\": \"object\","]
24832#[doc = "          \"required\": ["]
24833#[doc = "            \"account_id\","]
24834#[doc = "            \"request_type\""]
24835#[doc = "          ],"]
24836#[doc = "          \"properties\": {"]
24837#[doc = "            \"account_id\": {"]
24838#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24839#[doc = "            },"]
24840#[doc = "            \"request_type\": {"]
24841#[doc = "              \"type\": \"string\","]
24842#[doc = "              \"enum\": ["]
24843#[doc = "                \"view_code\""]
24844#[doc = "              ]"]
24845#[doc = "            }"]
24846#[doc = "          }"]
24847#[doc = "        }"]
24848#[doc = "      ]"]
24849#[doc = "    },"]
24850#[doc = "    {"]
24851#[doc = "      \"title\": \"view_state_by_sync_checkpoint\","]
24852#[doc = "      \"allOf\": ["]
24853#[doc = "        {"]
24854#[doc = "          \"type\": \"object\","]
24855#[doc = "          \"required\": ["]
24856#[doc = "            \"sync_checkpoint\""]
24857#[doc = "          ],"]
24858#[doc = "          \"properties\": {"]
24859#[doc = "            \"sync_checkpoint\": {"]
24860#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24861#[doc = "            }"]
24862#[doc = "          }"]
24863#[doc = "        },"]
24864#[doc = "        {"]
24865#[doc = "          \"type\": \"object\","]
24866#[doc = "          \"required\": ["]
24867#[doc = "            \"account_id\","]
24868#[doc = "            \"prefix_base64\","]
24869#[doc = "            \"request_type\""]
24870#[doc = "          ],"]
24871#[doc = "          \"properties\": {"]
24872#[doc = "            \"account_id\": {"]
24873#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24874#[doc = "            },"]
24875#[doc = "            \"include_proof\": {"]
24876#[doc = "              \"type\": \"boolean\""]
24877#[doc = "            },"]
24878#[doc = "            \"prefix_base64\": {"]
24879#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
24880#[doc = "            },"]
24881#[doc = "            \"request_type\": {"]
24882#[doc = "              \"type\": \"string\","]
24883#[doc = "              \"enum\": ["]
24884#[doc = "                \"view_state\""]
24885#[doc = "              ]"]
24886#[doc = "            }"]
24887#[doc = "          }"]
24888#[doc = "        }"]
24889#[doc = "      ]"]
24890#[doc = "    },"]
24891#[doc = "    {"]
24892#[doc = "      \"title\": \"view_access_key_by_sync_checkpoint\","]
24893#[doc = "      \"allOf\": ["]
24894#[doc = "        {"]
24895#[doc = "          \"type\": \"object\","]
24896#[doc = "          \"required\": ["]
24897#[doc = "            \"sync_checkpoint\""]
24898#[doc = "          ],"]
24899#[doc = "          \"properties\": {"]
24900#[doc = "            \"sync_checkpoint\": {"]
24901#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24902#[doc = "            }"]
24903#[doc = "          }"]
24904#[doc = "        },"]
24905#[doc = "        {"]
24906#[doc = "          \"type\": \"object\","]
24907#[doc = "          \"required\": ["]
24908#[doc = "            \"account_id\","]
24909#[doc = "            \"public_key\","]
24910#[doc = "            \"request_type\""]
24911#[doc = "          ],"]
24912#[doc = "          \"properties\": {"]
24913#[doc = "            \"account_id\": {"]
24914#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24915#[doc = "            },"]
24916#[doc = "            \"public_key\": {"]
24917#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
24918#[doc = "            },"]
24919#[doc = "            \"request_type\": {"]
24920#[doc = "              \"type\": \"string\","]
24921#[doc = "              \"enum\": ["]
24922#[doc = "                \"view_access_key\""]
24923#[doc = "              ]"]
24924#[doc = "            }"]
24925#[doc = "          }"]
24926#[doc = "        }"]
24927#[doc = "      ]"]
24928#[doc = "    },"]
24929#[doc = "    {"]
24930#[doc = "      \"title\": \"view_access_key_list_by_sync_checkpoint\","]
24931#[doc = "      \"allOf\": ["]
24932#[doc = "        {"]
24933#[doc = "          \"type\": \"object\","]
24934#[doc = "          \"required\": ["]
24935#[doc = "            \"sync_checkpoint\""]
24936#[doc = "          ],"]
24937#[doc = "          \"properties\": {"]
24938#[doc = "            \"sync_checkpoint\": {"]
24939#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24940#[doc = "            }"]
24941#[doc = "          }"]
24942#[doc = "        },"]
24943#[doc = "        {"]
24944#[doc = "          \"type\": \"object\","]
24945#[doc = "          \"required\": ["]
24946#[doc = "            \"account_id\","]
24947#[doc = "            \"request_type\""]
24948#[doc = "          ],"]
24949#[doc = "          \"properties\": {"]
24950#[doc = "            \"account_id\": {"]
24951#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24952#[doc = "            },"]
24953#[doc = "            \"request_type\": {"]
24954#[doc = "              \"type\": \"string\","]
24955#[doc = "              \"enum\": ["]
24956#[doc = "                \"view_access_key_list\""]
24957#[doc = "              ]"]
24958#[doc = "            }"]
24959#[doc = "          }"]
24960#[doc = "        }"]
24961#[doc = "      ]"]
24962#[doc = "    },"]
24963#[doc = "    {"]
24964#[doc = "      \"title\": \"view_gas_key_by_sync_checkpoint\","]
24965#[doc = "      \"allOf\": ["]
24966#[doc = "        {"]
24967#[doc = "          \"type\": \"object\","]
24968#[doc = "          \"required\": ["]
24969#[doc = "            \"sync_checkpoint\""]
24970#[doc = "          ],"]
24971#[doc = "          \"properties\": {"]
24972#[doc = "            \"sync_checkpoint\": {"]
24973#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24974#[doc = "            }"]
24975#[doc = "          }"]
24976#[doc = "        },"]
24977#[doc = "        {"]
24978#[doc = "          \"type\": \"object\","]
24979#[doc = "          \"required\": ["]
24980#[doc = "            \"account_id\","]
24981#[doc = "            \"public_key\","]
24982#[doc = "            \"request_type\""]
24983#[doc = "          ],"]
24984#[doc = "          \"properties\": {"]
24985#[doc = "            \"account_id\": {"]
24986#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
24987#[doc = "            },"]
24988#[doc = "            \"public_key\": {"]
24989#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
24990#[doc = "            },"]
24991#[doc = "            \"request_type\": {"]
24992#[doc = "              \"type\": \"string\","]
24993#[doc = "              \"enum\": ["]
24994#[doc = "                \"view_gas_key\""]
24995#[doc = "              ]"]
24996#[doc = "            }"]
24997#[doc = "          }"]
24998#[doc = "        }"]
24999#[doc = "      ]"]
25000#[doc = "    },"]
25001#[doc = "    {"]
25002#[doc = "      \"title\": \"view_gas_key_list_by_sync_checkpoint\","]
25003#[doc = "      \"allOf\": ["]
25004#[doc = "        {"]
25005#[doc = "          \"type\": \"object\","]
25006#[doc = "          \"required\": ["]
25007#[doc = "            \"sync_checkpoint\""]
25008#[doc = "          ],"]
25009#[doc = "          \"properties\": {"]
25010#[doc = "            \"sync_checkpoint\": {"]
25011#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25012#[doc = "            }"]
25013#[doc = "          }"]
25014#[doc = "        },"]
25015#[doc = "        {"]
25016#[doc = "          \"type\": \"object\","]
25017#[doc = "          \"required\": ["]
25018#[doc = "            \"account_id\","]
25019#[doc = "            \"request_type\""]
25020#[doc = "          ],"]
25021#[doc = "          \"properties\": {"]
25022#[doc = "            \"account_id\": {"]
25023#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25024#[doc = "            },"]
25025#[doc = "            \"request_type\": {"]
25026#[doc = "              \"type\": \"string\","]
25027#[doc = "              \"enum\": ["]
25028#[doc = "                \"view_gas_key_list\""]
25029#[doc = "              ]"]
25030#[doc = "            }"]
25031#[doc = "          }"]
25032#[doc = "        }"]
25033#[doc = "      ]"]
25034#[doc = "    },"]
25035#[doc = "    {"]
25036#[doc = "      \"title\": \"call_function_by_sync_checkpoint\","]
25037#[doc = "      \"allOf\": ["]
25038#[doc = "        {"]
25039#[doc = "          \"type\": \"object\","]
25040#[doc = "          \"required\": ["]
25041#[doc = "            \"sync_checkpoint\""]
25042#[doc = "          ],"]
25043#[doc = "          \"properties\": {"]
25044#[doc = "            \"sync_checkpoint\": {"]
25045#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25046#[doc = "            }"]
25047#[doc = "          }"]
25048#[doc = "        },"]
25049#[doc = "        {"]
25050#[doc = "          \"type\": \"object\","]
25051#[doc = "          \"required\": ["]
25052#[doc = "            \"account_id\","]
25053#[doc = "            \"args_base64\","]
25054#[doc = "            \"method_name\","]
25055#[doc = "            \"request_type\""]
25056#[doc = "          ],"]
25057#[doc = "          \"properties\": {"]
25058#[doc = "            \"account_id\": {"]
25059#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25060#[doc = "            },"]
25061#[doc = "            \"args_base64\": {"]
25062#[doc = "              \"$ref\": \"#/components/schemas/FunctionArgs\""]
25063#[doc = "            },"]
25064#[doc = "            \"method_name\": {"]
25065#[doc = "              \"type\": \"string\""]
25066#[doc = "            },"]
25067#[doc = "            \"request_type\": {"]
25068#[doc = "              \"type\": \"string\","]
25069#[doc = "              \"enum\": ["]
25070#[doc = "                \"call_function\""]
25071#[doc = "              ]"]
25072#[doc = "            }"]
25073#[doc = "          }"]
25074#[doc = "        }"]
25075#[doc = "      ]"]
25076#[doc = "    },"]
25077#[doc = "    {"]
25078#[doc = "      \"title\": \"view_global_contract_code_by_sync_checkpoint\","]
25079#[doc = "      \"allOf\": ["]
25080#[doc = "        {"]
25081#[doc = "          \"type\": \"object\","]
25082#[doc = "          \"required\": ["]
25083#[doc = "            \"sync_checkpoint\""]
25084#[doc = "          ],"]
25085#[doc = "          \"properties\": {"]
25086#[doc = "            \"sync_checkpoint\": {"]
25087#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25088#[doc = "            }"]
25089#[doc = "          }"]
25090#[doc = "        },"]
25091#[doc = "        {"]
25092#[doc = "          \"type\": \"object\","]
25093#[doc = "          \"required\": ["]
25094#[doc = "            \"code_hash\","]
25095#[doc = "            \"request_type\""]
25096#[doc = "          ],"]
25097#[doc = "          \"properties\": {"]
25098#[doc = "            \"code_hash\": {"]
25099#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
25100#[doc = "            },"]
25101#[doc = "            \"request_type\": {"]
25102#[doc = "              \"type\": \"string\","]
25103#[doc = "              \"enum\": ["]
25104#[doc = "                \"view_global_contract_code\""]
25105#[doc = "              ]"]
25106#[doc = "            }"]
25107#[doc = "          }"]
25108#[doc = "        }"]
25109#[doc = "      ]"]
25110#[doc = "    },"]
25111#[doc = "    {"]
25112#[doc = "      \"title\": \"view_global_contract_code_by_account_id_by_sync_checkpoint\","]
25113#[doc = "      \"allOf\": ["]
25114#[doc = "        {"]
25115#[doc = "          \"type\": \"object\","]
25116#[doc = "          \"required\": ["]
25117#[doc = "            \"sync_checkpoint\""]
25118#[doc = "          ],"]
25119#[doc = "          \"properties\": {"]
25120#[doc = "            \"sync_checkpoint\": {"]
25121#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
25122#[doc = "            }"]
25123#[doc = "          }"]
25124#[doc = "        },"]
25125#[doc = "        {"]
25126#[doc = "          \"type\": \"object\","]
25127#[doc = "          \"required\": ["]
25128#[doc = "            \"account_id\","]
25129#[doc = "            \"request_type\""]
25130#[doc = "          ],"]
25131#[doc = "          \"properties\": {"]
25132#[doc = "            \"account_id\": {"]
25133#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
25134#[doc = "            },"]
25135#[doc = "            \"request_type\": {"]
25136#[doc = "              \"type\": \"string\","]
25137#[doc = "              \"enum\": ["]
25138#[doc = "                \"view_global_contract_code_by_account_id\""]
25139#[doc = "              ]"]
25140#[doc = "            }"]
25141#[doc = "          }"]
25142#[doc = "        }"]
25143#[doc = "      ]"]
25144#[doc = "    }"]
25145#[doc = "  ]"]
25146#[doc = "}"]
25147#[doc = r" ```"]
25148#[doc = r" </details>"]
25149#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25150#[serde(untagged)]
25151pub enum RpcQueryRequest {
25152    ViewAccountByBlockId {
25153        account_id: AccountId,
25154        block_id: BlockId,
25155        request_type: ViewAccountByBlockIdRequestType,
25156    },
25157    ViewCodeByBlockId {
25158        account_id: AccountId,
25159        block_id: BlockId,
25160        request_type: ViewCodeByBlockIdRequestType,
25161    },
25162    ViewStateByBlockId {
25163        account_id: AccountId,
25164        block_id: BlockId,
25165        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25166        include_proof: ::std::option::Option<bool>,
25167        prefix_base64: StoreKey,
25168        request_type: ViewStateByBlockIdRequestType,
25169    },
25170    ViewAccessKeyByBlockId {
25171        account_id: AccountId,
25172        block_id: BlockId,
25173        public_key: PublicKey,
25174        request_type: ViewAccessKeyByBlockIdRequestType,
25175    },
25176    ViewAccessKeyListByBlockId {
25177        account_id: AccountId,
25178        block_id: BlockId,
25179        request_type: ViewAccessKeyListByBlockIdRequestType,
25180    },
25181    ViewGasKeyByBlockId {
25182        account_id: AccountId,
25183        block_id: BlockId,
25184        public_key: PublicKey,
25185        request_type: ViewGasKeyByBlockIdRequestType,
25186    },
25187    ViewGasKeyListByBlockId {
25188        account_id: AccountId,
25189        block_id: BlockId,
25190        request_type: ViewGasKeyListByBlockIdRequestType,
25191    },
25192    CallFunctionByBlockId {
25193        account_id: AccountId,
25194        args_base64: FunctionArgs,
25195        block_id: BlockId,
25196        method_name: ::std::string::String,
25197        request_type: CallFunctionByBlockIdRequestType,
25198    },
25199    ViewGlobalContractCodeByBlockId {
25200        block_id: BlockId,
25201        code_hash: CryptoHash,
25202        request_type: ViewGlobalContractCodeByBlockIdRequestType,
25203    },
25204    ViewGlobalContractCodeByAccountIdByBlockId {
25205        account_id: AccountId,
25206        block_id: BlockId,
25207        request_type: ViewGlobalContractCodeByAccountIdByBlockIdRequestType,
25208    },
25209    ViewAccountByFinality {
25210        account_id: AccountId,
25211        finality: Finality,
25212        request_type: ViewAccountByFinalityRequestType,
25213    },
25214    ViewCodeByFinality {
25215        account_id: AccountId,
25216        finality: Finality,
25217        request_type: ViewCodeByFinalityRequestType,
25218    },
25219    ViewStateByFinality {
25220        account_id: AccountId,
25221        finality: Finality,
25222        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25223        include_proof: ::std::option::Option<bool>,
25224        prefix_base64: StoreKey,
25225        request_type: ViewStateByFinalityRequestType,
25226    },
25227    ViewAccessKeyByFinality {
25228        account_id: AccountId,
25229        finality: Finality,
25230        public_key: PublicKey,
25231        request_type: ViewAccessKeyByFinalityRequestType,
25232    },
25233    ViewAccessKeyListByFinality {
25234        account_id: AccountId,
25235        finality: Finality,
25236        request_type: ViewAccessKeyListByFinalityRequestType,
25237    },
25238    ViewGasKeyByFinality {
25239        account_id: AccountId,
25240        finality: Finality,
25241        public_key: PublicKey,
25242        request_type: ViewGasKeyByFinalityRequestType,
25243    },
25244    ViewGasKeyListByFinality {
25245        account_id: AccountId,
25246        finality: Finality,
25247        request_type: ViewGasKeyListByFinalityRequestType,
25248    },
25249    CallFunctionByFinality {
25250        account_id: AccountId,
25251        args_base64: FunctionArgs,
25252        finality: Finality,
25253        method_name: ::std::string::String,
25254        request_type: CallFunctionByFinalityRequestType,
25255    },
25256    ViewGlobalContractCodeByFinality {
25257        code_hash: CryptoHash,
25258        finality: Finality,
25259        request_type: ViewGlobalContractCodeByFinalityRequestType,
25260    },
25261    ViewGlobalContractCodeByAccountIdByFinality {
25262        account_id: AccountId,
25263        finality: Finality,
25264        request_type: ViewGlobalContractCodeByAccountIdByFinalityRequestType,
25265    },
25266    ViewAccountBySyncCheckpoint {
25267        account_id: AccountId,
25268        request_type: ViewAccountBySyncCheckpointRequestType,
25269        sync_checkpoint: SyncCheckpoint,
25270    },
25271    ViewCodeBySyncCheckpoint {
25272        account_id: AccountId,
25273        request_type: ViewCodeBySyncCheckpointRequestType,
25274        sync_checkpoint: SyncCheckpoint,
25275    },
25276    ViewStateBySyncCheckpoint {
25277        account_id: AccountId,
25278        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25279        include_proof: ::std::option::Option<bool>,
25280        prefix_base64: StoreKey,
25281        request_type: ViewStateBySyncCheckpointRequestType,
25282        sync_checkpoint: SyncCheckpoint,
25283    },
25284    ViewAccessKeyBySyncCheckpoint {
25285        account_id: AccountId,
25286        public_key: PublicKey,
25287        request_type: ViewAccessKeyBySyncCheckpointRequestType,
25288        sync_checkpoint: SyncCheckpoint,
25289    },
25290    ViewAccessKeyListBySyncCheckpoint {
25291        account_id: AccountId,
25292        request_type: ViewAccessKeyListBySyncCheckpointRequestType,
25293        sync_checkpoint: SyncCheckpoint,
25294    },
25295    ViewGasKeyBySyncCheckpoint {
25296        account_id: AccountId,
25297        public_key: PublicKey,
25298        request_type: ViewGasKeyBySyncCheckpointRequestType,
25299        sync_checkpoint: SyncCheckpoint,
25300    },
25301    ViewGasKeyListBySyncCheckpoint {
25302        account_id: AccountId,
25303        request_type: ViewGasKeyListBySyncCheckpointRequestType,
25304        sync_checkpoint: SyncCheckpoint,
25305    },
25306    CallFunctionBySyncCheckpoint {
25307        account_id: AccountId,
25308        args_base64: FunctionArgs,
25309        method_name: ::std::string::String,
25310        request_type: CallFunctionBySyncCheckpointRequestType,
25311        sync_checkpoint: SyncCheckpoint,
25312    },
25313    ViewGlobalContractCodeBySyncCheckpoint {
25314        code_hash: CryptoHash,
25315        request_type: ViewGlobalContractCodeBySyncCheckpointRequestType,
25316        sync_checkpoint: SyncCheckpoint,
25317    },
25318    ViewGlobalContractCodeByAccountIdBySyncCheckpoint {
25319        account_id: AccountId,
25320        request_type: ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType,
25321        sync_checkpoint: SyncCheckpoint,
25322    },
25323}
25324impl ::std::convert::From<&Self> for RpcQueryRequest {
25325    fn from(value: &RpcQueryRequest) -> Self {
25326        value.clone()
25327    }
25328}
25329#[doc = "`RpcQueryResponse`"]
25330#[doc = r""]
25331#[doc = r" <details><summary>JSON schema</summary>"]
25332#[doc = r""]
25333#[doc = r" ```json"]
25334#[doc = "{"]
25335#[doc = "  \"type\": \"object\","]
25336#[doc = "  \"anyOf\": ["]
25337#[doc = "    {"]
25338#[doc = "      \"$ref\": \"#/components/schemas/AccountView\""]
25339#[doc = "    },"]
25340#[doc = "    {"]
25341#[doc = "      \"$ref\": \"#/components/schemas/ContractCodeView\""]
25342#[doc = "    },"]
25343#[doc = "    {"]
25344#[doc = "      \"$ref\": \"#/components/schemas/ViewStateResult\""]
25345#[doc = "    },"]
25346#[doc = "    {"]
25347#[doc = "      \"$ref\": \"#/components/schemas/CallResult\""]
25348#[doc = "    },"]
25349#[doc = "    {"]
25350#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
25351#[doc = "    },"]
25352#[doc = "    {"]
25353#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyList\""]
25354#[doc = "    },"]
25355#[doc = "    {"]
25356#[doc = "      \"$ref\": \"#/components/schemas/GasKeyView\""]
25357#[doc = "    },"]
25358#[doc = "    {"]
25359#[doc = "      \"$ref\": \"#/components/schemas/GasKeyList\""]
25360#[doc = "    }"]
25361#[doc = "  ],"]
25362#[doc = "  \"required\": ["]
25363#[doc = "    \"block_hash\","]
25364#[doc = "    \"block_height\""]
25365#[doc = "  ],"]
25366#[doc = "  \"properties\": {"]
25367#[doc = "    \"block_hash\": {"]
25368#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
25369#[doc = "    },"]
25370#[doc = "    \"block_height\": {"]
25371#[doc = "      \"type\": \"integer\","]
25372#[doc = "      \"format\": \"uint64\","]
25373#[doc = "      \"minimum\": 0.0"]
25374#[doc = "    }"]
25375#[doc = "  }"]
25376#[doc = "}"]
25377#[doc = r" ```"]
25378#[doc = r" </details>"]
25379#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25380#[serde(untagged)]
25381pub enum RpcQueryResponse {
25382    Variant0 {
25383        amount: NearToken,
25384        block_hash: CryptoHash,
25385        block_height: u64,
25386        code_hash: CryptoHash,
25387        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25388        global_contract_account_id: ::std::option::Option<AccountId>,
25389        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25390        global_contract_hash: ::std::option::Option<CryptoHash>,
25391        locked: NearToken,
25392        #[doc = "TODO(2271): deprecated."]
25393        #[serde(default)]
25394        storage_paid_at: u64,
25395        storage_usage: u64,
25396    },
25397    Variant1 {
25398        block_hash: CryptoHash,
25399        block_height: u64,
25400        code_base64: ::std::string::String,
25401        hash: CryptoHash,
25402    },
25403    Variant2 {
25404        block_hash: CryptoHash,
25405        block_height: u64,
25406        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
25407        proof: ::std::vec::Vec<::std::string::String>,
25408        values: ::std::vec::Vec<StateItem>,
25409    },
25410    Variant3 {
25411        block_hash: CryptoHash,
25412        block_height: u64,
25413        logs: ::std::vec::Vec<::std::string::String>,
25414        result: ::std::vec::Vec<u8>,
25415    },
25416    Variant4 {
25417        block_hash: CryptoHash,
25418        block_height: u64,
25419        nonce: u64,
25420        permission: AccessKeyPermissionView,
25421    },
25422    Variant5 {
25423        block_hash: CryptoHash,
25424        block_height: u64,
25425        keys: ::std::vec::Vec<AccessKeyInfoView>,
25426    },
25427    Variant6 {
25428        balance: NearToken,
25429        block_hash: CryptoHash,
25430        block_height: u64,
25431        nonces: ::std::vec::Vec<u64>,
25432        num_nonces: u32,
25433        permission: AccessKeyPermissionView,
25434    },
25435    Variant7 {
25436        block_hash: CryptoHash,
25437        block_height: u64,
25438        keys: ::std::vec::Vec<GasKeyInfoView>,
25439    },
25440}
25441impl ::std::convert::From<&Self> for RpcQueryResponse {
25442    fn from(value: &RpcQueryResponse) -> Self {
25443        value.clone()
25444    }
25445}
25446#[doc = "`RpcReceiptError`"]
25447#[doc = r""]
25448#[doc = r" <details><summary>JSON schema</summary>"]
25449#[doc = r""]
25450#[doc = r" ```json"]
25451#[doc = "{"]
25452#[doc = "  \"oneOf\": ["]
25453#[doc = "    {"]
25454#[doc = "      \"type\": \"object\","]
25455#[doc = "      \"required\": ["]
25456#[doc = "        \"info\","]
25457#[doc = "        \"name\""]
25458#[doc = "      ],"]
25459#[doc = "      \"properties\": {"]
25460#[doc = "        \"info\": {"]
25461#[doc = "          \"type\": \"object\","]
25462#[doc = "          \"required\": ["]
25463#[doc = "            \"error_message\""]
25464#[doc = "          ],"]
25465#[doc = "          \"properties\": {"]
25466#[doc = "            \"error_message\": {"]
25467#[doc = "              \"type\": \"string\""]
25468#[doc = "            }"]
25469#[doc = "          }"]
25470#[doc = "        },"]
25471#[doc = "        \"name\": {"]
25472#[doc = "          \"type\": \"string\","]
25473#[doc = "          \"enum\": ["]
25474#[doc = "            \"INTERNAL_ERROR\""]
25475#[doc = "          ]"]
25476#[doc = "        }"]
25477#[doc = "      }"]
25478#[doc = "    },"]
25479#[doc = "    {"]
25480#[doc = "      \"type\": \"object\","]
25481#[doc = "      \"required\": ["]
25482#[doc = "        \"info\","]
25483#[doc = "        \"name\""]
25484#[doc = "      ],"]
25485#[doc = "      \"properties\": {"]
25486#[doc = "        \"info\": {"]
25487#[doc = "          \"type\": \"object\","]
25488#[doc = "          \"required\": ["]
25489#[doc = "            \"receipt_id\""]
25490#[doc = "          ],"]
25491#[doc = "          \"properties\": {"]
25492#[doc = "            \"receipt_id\": {"]
25493#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
25494#[doc = "            }"]
25495#[doc = "          }"]
25496#[doc = "        },"]
25497#[doc = "        \"name\": {"]
25498#[doc = "          \"type\": \"string\","]
25499#[doc = "          \"enum\": ["]
25500#[doc = "            \"UNKNOWN_RECEIPT\""]
25501#[doc = "          ]"]
25502#[doc = "        }"]
25503#[doc = "      }"]
25504#[doc = "    }"]
25505#[doc = "  ]"]
25506#[doc = "}"]
25507#[doc = r" ```"]
25508#[doc = r" </details>"]
25509#[derive(
25510    :: serde :: Deserialize,
25511    :: serde :: Serialize,
25512    Clone,
25513    Debug,
25514    thiserror::Error,
25515    strum_macros::Display,
25516)]
25517#[serde(tag = "name", content = "info")]
25518pub enum RpcReceiptError {
25519    #[serde(rename = "INTERNAL_ERROR")]
25520    InternalError {
25521        error_message: ::std::string::String,
25522    },
25523    #[serde(rename = "UNKNOWN_RECEIPT")]
25524    UnknownReceipt { receipt_id: CryptoHash },
25525}
25526impl ::std::convert::From<&Self> for RpcReceiptError {
25527    fn from(value: &RpcReceiptError) -> Self {
25528        value.clone()
25529    }
25530}
25531#[doc = "`RpcReceiptRequest`"]
25532#[doc = r""]
25533#[doc = r" <details><summary>JSON schema</summary>"]
25534#[doc = r""]
25535#[doc = r" ```json"]
25536#[doc = "{"]
25537#[doc = "  \"title\": \"RpcReceiptRequest\","]
25538#[doc = "  \"type\": \"object\","]
25539#[doc = "  \"required\": ["]
25540#[doc = "    \"receipt_id\""]
25541#[doc = "  ],"]
25542#[doc = "  \"properties\": {"]
25543#[doc = "    \"receipt_id\": {"]
25544#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
25545#[doc = "    }"]
25546#[doc = "  }"]
25547#[doc = "}"]
25548#[doc = r" ```"]
25549#[doc = r" </details>"]
25550#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25551pub struct RpcReceiptRequest {
25552    pub receipt_id: CryptoHash,
25553}
25554impl ::std::convert::From<&RpcReceiptRequest> for RpcReceiptRequest {
25555    fn from(value: &RpcReceiptRequest) -> Self {
25556        value.clone()
25557    }
25558}
25559#[doc = "`RpcReceiptResponse`"]
25560#[doc = r""]
25561#[doc = r" <details><summary>JSON schema</summary>"]
25562#[doc = r""]
25563#[doc = r" ```json"]
25564#[doc = "{"]
25565#[doc = "  \"type\": \"object\","]
25566#[doc = "  \"required\": ["]
25567#[doc = "    \"predecessor_id\","]
25568#[doc = "    \"receipt\","]
25569#[doc = "    \"receipt_id\","]
25570#[doc = "    \"receiver_id\""]
25571#[doc = "  ],"]
25572#[doc = "  \"properties\": {"]
25573#[doc = "    \"predecessor_id\": {"]
25574#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
25575#[doc = "    },"]
25576#[doc = "    \"priority\": {"]
25577#[doc = "      \"default\": 0,"]
25578#[doc = "      \"type\": \"integer\","]
25579#[doc = "      \"format\": \"uint64\","]
25580#[doc = "      \"minimum\": 0.0"]
25581#[doc = "    },"]
25582#[doc = "    \"receipt\": {"]
25583#[doc = "      \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
25584#[doc = "    },"]
25585#[doc = "    \"receipt_id\": {"]
25586#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
25587#[doc = "    },"]
25588#[doc = "    \"receiver_id\": {"]
25589#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
25590#[doc = "    }"]
25591#[doc = "  }"]
25592#[doc = "}"]
25593#[doc = r" ```"]
25594#[doc = r" </details>"]
25595#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25596pub struct RpcReceiptResponse {
25597    pub predecessor_id: AccountId,
25598    #[serde(default)]
25599    pub priority: u64,
25600    pub receipt: ReceiptEnumView,
25601    pub receipt_id: CryptoHash,
25602    pub receiver_id: AccountId,
25603}
25604impl ::std::convert::From<&RpcReceiptResponse> for RpcReceiptResponse {
25605    fn from(value: &RpcReceiptResponse) -> Self {
25606        value.clone()
25607    }
25608}
25609#[doc = "`RpcRequestValidationErrorKind`"]
25610#[doc = r""]
25611#[doc = r" <details><summary>JSON schema</summary>"]
25612#[doc = r""]
25613#[doc = r" ```json"]
25614#[doc = "{"]
25615#[doc = "  \"oneOf\": ["]
25616#[doc = "    {"]
25617#[doc = "      \"type\": \"object\","]
25618#[doc = "      \"required\": ["]
25619#[doc = "        \"info\","]
25620#[doc = "        \"name\""]
25621#[doc = "      ],"]
25622#[doc = "      \"properties\": {"]
25623#[doc = "        \"info\": {"]
25624#[doc = "          \"type\": \"object\","]
25625#[doc = "          \"required\": ["]
25626#[doc = "            \"method_name\""]
25627#[doc = "          ],"]
25628#[doc = "          \"properties\": {"]
25629#[doc = "            \"method_name\": {"]
25630#[doc = "              \"type\": \"string\""]
25631#[doc = "            }"]
25632#[doc = "          }"]
25633#[doc = "        },"]
25634#[doc = "        \"name\": {"]
25635#[doc = "          \"type\": \"string\","]
25636#[doc = "          \"enum\": ["]
25637#[doc = "            \"METHOD_NOT_FOUND\""]
25638#[doc = "          ]"]
25639#[doc = "        }"]
25640#[doc = "      }"]
25641#[doc = "    },"]
25642#[doc = "    {"]
25643#[doc = "      \"type\": \"object\","]
25644#[doc = "      \"required\": ["]
25645#[doc = "        \"info\","]
25646#[doc = "        \"name\""]
25647#[doc = "      ],"]
25648#[doc = "      \"properties\": {"]
25649#[doc = "        \"info\": {"]
25650#[doc = "          \"type\": \"object\","]
25651#[doc = "          \"required\": ["]
25652#[doc = "            \"error_message\""]
25653#[doc = "          ],"]
25654#[doc = "          \"properties\": {"]
25655#[doc = "            \"error_message\": {"]
25656#[doc = "              \"type\": \"string\""]
25657#[doc = "            }"]
25658#[doc = "          }"]
25659#[doc = "        },"]
25660#[doc = "        \"name\": {"]
25661#[doc = "          \"type\": \"string\","]
25662#[doc = "          \"enum\": ["]
25663#[doc = "            \"PARSE_ERROR\""]
25664#[doc = "          ]"]
25665#[doc = "        }"]
25666#[doc = "      }"]
25667#[doc = "    }"]
25668#[doc = "  ]"]
25669#[doc = "}"]
25670#[doc = r" ```"]
25671#[doc = r" </details>"]
25672#[derive(
25673    :: serde :: Deserialize,
25674    :: serde :: Serialize,
25675    Clone,
25676    Debug,
25677    thiserror::Error,
25678    strum_macros::Display,
25679)]
25680#[serde(tag = "name", content = "info")]
25681pub enum RpcRequestValidationErrorKind {
25682    #[serde(rename = "METHOD_NOT_FOUND")]
25683    MethodNotFound { method_name: ::std::string::String },
25684    #[serde(rename = "PARSE_ERROR")]
25685    ParseError {
25686        error_message: ::std::string::String,
25687    },
25688}
25689impl ::std::convert::From<&Self> for RpcRequestValidationErrorKind {
25690    fn from(value: &RpcRequestValidationErrorKind) -> Self {
25691        value.clone()
25692    }
25693}
25694#[doc = "`RpcSendTransactionRequest`"]
25695#[doc = r""]
25696#[doc = r" <details><summary>JSON schema</summary>"]
25697#[doc = r""]
25698#[doc = r" ```json"]
25699#[doc = "{"]
25700#[doc = "  \"title\": \"RpcSendTransactionRequest\","]
25701#[doc = "  \"type\": \"object\","]
25702#[doc = "  \"required\": ["]
25703#[doc = "    \"signed_tx_base64\""]
25704#[doc = "  ],"]
25705#[doc = "  \"properties\": {"]
25706#[doc = "    \"signed_tx_base64\": {"]
25707#[doc = "      \"$ref\": \"#/components/schemas/SignedTransaction\""]
25708#[doc = "    },"]
25709#[doc = "    \"wait_until\": {"]
25710#[doc = "      \"default\": \"EXECUTED_OPTIMISTIC\","]
25711#[doc = "      \"allOf\": ["]
25712#[doc = "        {"]
25713#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
25714#[doc = "        }"]
25715#[doc = "      ]"]
25716#[doc = "    }"]
25717#[doc = "  }"]
25718#[doc = "}"]
25719#[doc = r" ```"]
25720#[doc = r" </details>"]
25721#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25722pub struct RpcSendTransactionRequest {
25723    pub signed_tx_base64: SignedTransaction,
25724    #[serde(default = "defaults::rpc_send_transaction_request_wait_until")]
25725    pub wait_until: TxExecutionStatus,
25726}
25727impl ::std::convert::From<&RpcSendTransactionRequest> for RpcSendTransactionRequest {
25728    fn from(value: &RpcSendTransactionRequest) -> Self {
25729        value.clone()
25730    }
25731}
25732#[doc = "`RpcSplitStorageInfoError`"]
25733#[doc = r""]
25734#[doc = r" <details><summary>JSON schema</summary>"]
25735#[doc = r""]
25736#[doc = r" ```json"]
25737#[doc = "{"]
25738#[doc = "  \"oneOf\": ["]
25739#[doc = "    {"]
25740#[doc = "      \"type\": \"object\","]
25741#[doc = "      \"required\": ["]
25742#[doc = "        \"info\","]
25743#[doc = "        \"name\""]
25744#[doc = "      ],"]
25745#[doc = "      \"properties\": {"]
25746#[doc = "        \"info\": {"]
25747#[doc = "          \"type\": \"object\","]
25748#[doc = "          \"required\": ["]
25749#[doc = "            \"error_message\""]
25750#[doc = "          ],"]
25751#[doc = "          \"properties\": {"]
25752#[doc = "            \"error_message\": {"]
25753#[doc = "              \"type\": \"string\""]
25754#[doc = "            }"]
25755#[doc = "          }"]
25756#[doc = "        },"]
25757#[doc = "        \"name\": {"]
25758#[doc = "          \"type\": \"string\","]
25759#[doc = "          \"enum\": ["]
25760#[doc = "            \"INTERNAL_ERROR\""]
25761#[doc = "          ]"]
25762#[doc = "        }"]
25763#[doc = "      }"]
25764#[doc = "    }"]
25765#[doc = "  ]"]
25766#[doc = "}"]
25767#[doc = r" ```"]
25768#[doc = r" </details>"]
25769#[derive(
25770    :: serde :: Deserialize,
25771    :: serde :: Serialize,
25772    Clone,
25773    Debug,
25774    thiserror::Error,
25775    strum_macros::Display,
25776)]
25777#[serde(tag = "name", content = "info")]
25778pub enum RpcSplitStorageInfoError {
25779    #[serde(rename = "INTERNAL_ERROR")]
25780    InternalError {
25781        error_message: ::std::string::String,
25782    },
25783}
25784impl ::std::convert::From<&Self> for RpcSplitStorageInfoError {
25785    fn from(value: &RpcSplitStorageInfoError) -> Self {
25786        value.clone()
25787    }
25788}
25789#[doc = "`RpcSplitStorageInfoRequest`"]
25790#[doc = r""]
25791#[doc = r" <details><summary>JSON schema</summary>"]
25792#[doc = r""]
25793#[doc = r" ```json"]
25794#[doc = "{"]
25795#[doc = "  \"title\": \"RpcSplitStorageInfoRequest\","]
25796#[doc = "  \"type\": \"object\""]
25797#[doc = "}"]
25798#[doc = r" ```"]
25799#[doc = r" </details>"]
25800#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25801#[serde(transparent)]
25802pub struct RpcSplitStorageInfoRequest(
25803    pub ::serde_json::Map<::std::string::String, ::serde_json::Value>,
25804);
25805impl ::std::ops::Deref for RpcSplitStorageInfoRequest {
25806    type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
25807    fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
25808        &self.0
25809    }
25810}
25811impl ::std::convert::From<RpcSplitStorageInfoRequest>
25812    for ::serde_json::Map<::std::string::String, ::serde_json::Value>
25813{
25814    fn from(value: RpcSplitStorageInfoRequest) -> Self {
25815        value.0
25816    }
25817}
25818impl ::std::convert::From<&RpcSplitStorageInfoRequest> for RpcSplitStorageInfoRequest {
25819    fn from(value: &RpcSplitStorageInfoRequest) -> Self {
25820        value.clone()
25821    }
25822}
25823impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
25824    for RpcSplitStorageInfoRequest
25825{
25826    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
25827        Self(value)
25828    }
25829}
25830#[doc = "Contains the split storage information."]
25831#[doc = r""]
25832#[doc = r" <details><summary>JSON schema</summary>"]
25833#[doc = r""]
25834#[doc = r" ```json"]
25835#[doc = "{"]
25836#[doc = "  \"description\": \"Contains the split storage information.\","]
25837#[doc = "  \"type\": \"object\","]
25838#[doc = "  \"properties\": {"]
25839#[doc = "    \"cold_head_height\": {"]
25840#[doc = "      \"type\": ["]
25841#[doc = "        \"integer\","]
25842#[doc = "        \"null\""]
25843#[doc = "      ],"]
25844#[doc = "      \"format\": \"uint64\","]
25845#[doc = "      \"minimum\": 0.0"]
25846#[doc = "    },"]
25847#[doc = "    \"final_head_height\": {"]
25848#[doc = "      \"type\": ["]
25849#[doc = "        \"integer\","]
25850#[doc = "        \"null\""]
25851#[doc = "      ],"]
25852#[doc = "      \"format\": \"uint64\","]
25853#[doc = "      \"minimum\": 0.0"]
25854#[doc = "    },"]
25855#[doc = "    \"head_height\": {"]
25856#[doc = "      \"type\": ["]
25857#[doc = "        \"integer\","]
25858#[doc = "        \"null\""]
25859#[doc = "      ],"]
25860#[doc = "      \"format\": \"uint64\","]
25861#[doc = "      \"minimum\": 0.0"]
25862#[doc = "    },"]
25863#[doc = "    \"hot_db_kind\": {"]
25864#[doc = "      \"type\": ["]
25865#[doc = "        \"string\","]
25866#[doc = "        \"null\""]
25867#[doc = "      ]"]
25868#[doc = "    }"]
25869#[doc = "  }"]
25870#[doc = "}"]
25871#[doc = r" ```"]
25872#[doc = r" </details>"]
25873#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25874pub struct RpcSplitStorageInfoResponse {
25875    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25876    pub cold_head_height: ::std::option::Option<u64>,
25877    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25878    pub final_head_height: ::std::option::Option<u64>,
25879    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25880    pub head_height: ::std::option::Option<u64>,
25881    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25882    pub hot_db_kind: ::std::option::Option<::std::string::String>,
25883}
25884impl ::std::convert::From<&RpcSplitStorageInfoResponse> for RpcSplitStorageInfoResponse {
25885    fn from(value: &RpcSplitStorageInfoResponse) -> Self {
25886        value.clone()
25887    }
25888}
25889impl ::std::default::Default for RpcSplitStorageInfoResponse {
25890    fn default() -> Self {
25891        Self {
25892            cold_head_height: Default::default(),
25893            final_head_height: Default::default(),
25894            head_height: Default::default(),
25895            hot_db_kind: Default::default(),
25896        }
25897    }
25898}
25899#[doc = "`RpcStateChangesError`"]
25900#[doc = r""]
25901#[doc = r" <details><summary>JSON schema</summary>"]
25902#[doc = r""]
25903#[doc = r" ```json"]
25904#[doc = "{"]
25905#[doc = "  \"oneOf\": ["]
25906#[doc = "    {"]
25907#[doc = "      \"type\": \"object\","]
25908#[doc = "      \"required\": ["]
25909#[doc = "        \"info\","]
25910#[doc = "        \"name\""]
25911#[doc = "      ],"]
25912#[doc = "      \"properties\": {"]
25913#[doc = "        \"info\": {"]
25914#[doc = "          \"type\": \"object\""]
25915#[doc = "        },"]
25916#[doc = "        \"name\": {"]
25917#[doc = "          \"type\": \"string\","]
25918#[doc = "          \"enum\": ["]
25919#[doc = "            \"UNKNOWN_BLOCK\""]
25920#[doc = "          ]"]
25921#[doc = "        }"]
25922#[doc = "      }"]
25923#[doc = "    },"]
25924#[doc = "    {"]
25925#[doc = "      \"type\": \"object\","]
25926#[doc = "      \"required\": ["]
25927#[doc = "        \"name\""]
25928#[doc = "      ],"]
25929#[doc = "      \"properties\": {"]
25930#[doc = "        \"name\": {"]
25931#[doc = "          \"type\": \"string\","]
25932#[doc = "          \"enum\": ["]
25933#[doc = "            \"NOT_SYNCED_YET\""]
25934#[doc = "          ]"]
25935#[doc = "        }"]
25936#[doc = "      }"]
25937#[doc = "    },"]
25938#[doc = "    {"]
25939#[doc = "      \"type\": \"object\","]
25940#[doc = "      \"required\": ["]
25941#[doc = "        \"info\","]
25942#[doc = "        \"name\""]
25943#[doc = "      ],"]
25944#[doc = "      \"properties\": {"]
25945#[doc = "        \"info\": {"]
25946#[doc = "          \"type\": \"object\","]
25947#[doc = "          \"required\": ["]
25948#[doc = "            \"error_message\""]
25949#[doc = "          ],"]
25950#[doc = "          \"properties\": {"]
25951#[doc = "            \"error_message\": {"]
25952#[doc = "              \"type\": \"string\""]
25953#[doc = "            }"]
25954#[doc = "          }"]
25955#[doc = "        },"]
25956#[doc = "        \"name\": {"]
25957#[doc = "          \"type\": \"string\","]
25958#[doc = "          \"enum\": ["]
25959#[doc = "            \"INTERNAL_ERROR\""]
25960#[doc = "          ]"]
25961#[doc = "        }"]
25962#[doc = "      }"]
25963#[doc = "    }"]
25964#[doc = "  ]"]
25965#[doc = "}"]
25966#[doc = r" ```"]
25967#[doc = r" </details>"]
25968#[derive(
25969    :: serde :: Deserialize,
25970    :: serde :: Serialize,
25971    Clone,
25972    Debug,
25973    thiserror::Error,
25974    strum_macros::Display,
25975)]
25976#[serde(tag = "name", content = "info")]
25977pub enum RpcStateChangesError {
25978    #[serde(rename = "UNKNOWN_BLOCK")]
25979    UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
25980    #[serde(rename = "NOT_SYNCED_YET")]
25981    NotSyncedYet,
25982    #[serde(rename = "INTERNAL_ERROR")]
25983    InternalError {
25984        error_message: ::std::string::String,
25985    },
25986}
25987impl ::std::convert::From<&Self> for RpcStateChangesError {
25988    fn from(value: &RpcStateChangesError) -> Self {
25989        value.clone()
25990    }
25991}
25992impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
25993    for RpcStateChangesError
25994{
25995    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
25996        Self::UnknownBlock(value)
25997    }
25998}
25999#[doc = "It is a [serializable view] of [`StateChangesRequest`].\n\n[serializable view]: ./index.html\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html"]
26000#[doc = r""]
26001#[doc = r" <details><summary>JSON schema</summary>"]
26002#[doc = r""]
26003#[doc = r" ```json"]
26004#[doc = "{"]
26005#[doc = "  \"title\": \"RpcStateChangesInBlockByTypeRequest\","]
26006#[doc = "  \"description\": \"It is a [serializable view] of [`StateChangesRequest`].\\n\\n[serializable view]: ./index.html\\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html\","]
26007#[doc = "  \"type\": \"object\","]
26008#[doc = "  \"oneOf\": ["]
26009#[doc = "    {"]
26010#[doc = "      \"title\": \"account_changes_by_block_id\","]
26011#[doc = "      \"allOf\": ["]
26012#[doc = "        {"]
26013#[doc = "          \"type\": \"object\","]
26014#[doc = "          \"required\": ["]
26015#[doc = "            \"block_id\""]
26016#[doc = "          ],"]
26017#[doc = "          \"properties\": {"]
26018#[doc = "            \"block_id\": {"]
26019#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
26020#[doc = "            }"]
26021#[doc = "          }"]
26022#[doc = "        },"]
26023#[doc = "        {"]
26024#[doc = "          \"type\": \"object\","]
26025#[doc = "          \"required\": ["]
26026#[doc = "            \"account_ids\","]
26027#[doc = "            \"changes_type\""]
26028#[doc = "          ],"]
26029#[doc = "          \"properties\": {"]
26030#[doc = "            \"account_ids\": {"]
26031#[doc = "              \"type\": \"array\","]
26032#[doc = "              \"items\": {"]
26033#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26034#[doc = "              }"]
26035#[doc = "            },"]
26036#[doc = "            \"changes_type\": {"]
26037#[doc = "              \"type\": \"string\","]
26038#[doc = "              \"enum\": ["]
26039#[doc = "                \"account_changes\""]
26040#[doc = "              ]"]
26041#[doc = "            }"]
26042#[doc = "          }"]
26043#[doc = "        }"]
26044#[doc = "      ]"]
26045#[doc = "    },"]
26046#[doc = "    {"]
26047#[doc = "      \"title\": \"single_access_key_changes_by_block_id\","]
26048#[doc = "      \"allOf\": ["]
26049#[doc = "        {"]
26050#[doc = "          \"type\": \"object\","]
26051#[doc = "          \"required\": ["]
26052#[doc = "            \"block_id\""]
26053#[doc = "          ],"]
26054#[doc = "          \"properties\": {"]
26055#[doc = "            \"block_id\": {"]
26056#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
26057#[doc = "            }"]
26058#[doc = "          }"]
26059#[doc = "        },"]
26060#[doc = "        {"]
26061#[doc = "          \"type\": \"object\","]
26062#[doc = "          \"required\": ["]
26063#[doc = "            \"changes_type\","]
26064#[doc = "            \"keys\""]
26065#[doc = "          ],"]
26066#[doc = "          \"properties\": {"]
26067#[doc = "            \"changes_type\": {"]
26068#[doc = "              \"type\": \"string\","]
26069#[doc = "              \"enum\": ["]
26070#[doc = "                \"single_access_key_changes\""]
26071#[doc = "              ]"]
26072#[doc = "            },"]
26073#[doc = "            \"keys\": {"]
26074#[doc = "              \"type\": \"array\","]
26075#[doc = "              \"items\": {"]
26076#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26077#[doc = "              }"]
26078#[doc = "            }"]
26079#[doc = "          }"]
26080#[doc = "        }"]
26081#[doc = "      ]"]
26082#[doc = "    },"]
26083#[doc = "    {"]
26084#[doc = "      \"title\": \"single_gas_key_changes_by_block_id\","]
26085#[doc = "      \"allOf\": ["]
26086#[doc = "        {"]
26087#[doc = "          \"type\": \"object\","]
26088#[doc = "          \"required\": ["]
26089#[doc = "            \"block_id\""]
26090#[doc = "          ],"]
26091#[doc = "          \"properties\": {"]
26092#[doc = "            \"block_id\": {"]
26093#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
26094#[doc = "            }"]
26095#[doc = "          }"]
26096#[doc = "        },"]
26097#[doc = "        {"]
26098#[doc = "          \"type\": \"object\","]
26099#[doc = "          \"required\": ["]
26100#[doc = "            \"changes_type\","]
26101#[doc = "            \"keys\""]
26102#[doc = "          ],"]
26103#[doc = "          \"properties\": {"]
26104#[doc = "            \"changes_type\": {"]
26105#[doc = "              \"type\": \"string\","]
26106#[doc = "              \"enum\": ["]
26107#[doc = "                \"single_gas_key_changes\""]
26108#[doc = "              ]"]
26109#[doc = "            },"]
26110#[doc = "            \"keys\": {"]
26111#[doc = "              \"type\": \"array\","]
26112#[doc = "              \"items\": {"]
26113#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26114#[doc = "              }"]
26115#[doc = "            }"]
26116#[doc = "          }"]
26117#[doc = "        }"]
26118#[doc = "      ]"]
26119#[doc = "    },"]
26120#[doc = "    {"]
26121#[doc = "      \"title\": \"all_access_key_changes_by_block_id\","]
26122#[doc = "      \"allOf\": ["]
26123#[doc = "        {"]
26124#[doc = "          \"type\": \"object\","]
26125#[doc = "          \"required\": ["]
26126#[doc = "            \"block_id\""]
26127#[doc = "          ],"]
26128#[doc = "          \"properties\": {"]
26129#[doc = "            \"block_id\": {"]
26130#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
26131#[doc = "            }"]
26132#[doc = "          }"]
26133#[doc = "        },"]
26134#[doc = "        {"]
26135#[doc = "          \"type\": \"object\","]
26136#[doc = "          \"required\": ["]
26137#[doc = "            \"account_ids\","]
26138#[doc = "            \"changes_type\""]
26139#[doc = "          ],"]
26140#[doc = "          \"properties\": {"]
26141#[doc = "            \"account_ids\": {"]
26142#[doc = "              \"type\": \"array\","]
26143#[doc = "              \"items\": {"]
26144#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26145#[doc = "              }"]
26146#[doc = "            },"]
26147#[doc = "            \"changes_type\": {"]
26148#[doc = "              \"type\": \"string\","]
26149#[doc = "              \"enum\": ["]
26150#[doc = "                \"all_access_key_changes\""]
26151#[doc = "              ]"]
26152#[doc = "            }"]
26153#[doc = "          }"]
26154#[doc = "        }"]
26155#[doc = "      ]"]
26156#[doc = "    },"]
26157#[doc = "    {"]
26158#[doc = "      \"title\": \"all_gas_key_changes_by_block_id\","]
26159#[doc = "      \"allOf\": ["]
26160#[doc = "        {"]
26161#[doc = "          \"type\": \"object\","]
26162#[doc = "          \"required\": ["]
26163#[doc = "            \"block_id\""]
26164#[doc = "          ],"]
26165#[doc = "          \"properties\": {"]
26166#[doc = "            \"block_id\": {"]
26167#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
26168#[doc = "            }"]
26169#[doc = "          }"]
26170#[doc = "        },"]
26171#[doc = "        {"]
26172#[doc = "          \"type\": \"object\","]
26173#[doc = "          \"required\": ["]
26174#[doc = "            \"account_ids\","]
26175#[doc = "            \"changes_type\""]
26176#[doc = "          ],"]
26177#[doc = "          \"properties\": {"]
26178#[doc = "            \"account_ids\": {"]
26179#[doc = "              \"type\": \"array\","]
26180#[doc = "              \"items\": {"]
26181#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26182#[doc = "              }"]
26183#[doc = "            },"]
26184#[doc = "            \"changes_type\": {"]
26185#[doc = "              \"type\": \"string\","]
26186#[doc = "              \"enum\": ["]
26187#[doc = "                \"all_gas_key_changes\""]
26188#[doc = "              ]"]
26189#[doc = "            }"]
26190#[doc = "          }"]
26191#[doc = "        }"]
26192#[doc = "      ]"]
26193#[doc = "    },"]
26194#[doc = "    {"]
26195#[doc = "      \"title\": \"contract_code_changes_by_block_id\","]
26196#[doc = "      \"allOf\": ["]
26197#[doc = "        {"]
26198#[doc = "          \"type\": \"object\","]
26199#[doc = "          \"required\": ["]
26200#[doc = "            \"block_id\""]
26201#[doc = "          ],"]
26202#[doc = "          \"properties\": {"]
26203#[doc = "            \"block_id\": {"]
26204#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
26205#[doc = "            }"]
26206#[doc = "          }"]
26207#[doc = "        },"]
26208#[doc = "        {"]
26209#[doc = "          \"type\": \"object\","]
26210#[doc = "          \"required\": ["]
26211#[doc = "            \"account_ids\","]
26212#[doc = "            \"changes_type\""]
26213#[doc = "          ],"]
26214#[doc = "          \"properties\": {"]
26215#[doc = "            \"account_ids\": {"]
26216#[doc = "              \"type\": \"array\","]
26217#[doc = "              \"items\": {"]
26218#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26219#[doc = "              }"]
26220#[doc = "            },"]
26221#[doc = "            \"changes_type\": {"]
26222#[doc = "              \"type\": \"string\","]
26223#[doc = "              \"enum\": ["]
26224#[doc = "                \"contract_code_changes\""]
26225#[doc = "              ]"]
26226#[doc = "            }"]
26227#[doc = "          }"]
26228#[doc = "        }"]
26229#[doc = "      ]"]
26230#[doc = "    },"]
26231#[doc = "    {"]
26232#[doc = "      \"title\": \"data_changes_by_block_id\","]
26233#[doc = "      \"allOf\": ["]
26234#[doc = "        {"]
26235#[doc = "          \"type\": \"object\","]
26236#[doc = "          \"required\": ["]
26237#[doc = "            \"block_id\""]
26238#[doc = "          ],"]
26239#[doc = "          \"properties\": {"]
26240#[doc = "            \"block_id\": {"]
26241#[doc = "              \"$ref\": \"#/components/schemas/BlockId\""]
26242#[doc = "            }"]
26243#[doc = "          }"]
26244#[doc = "        },"]
26245#[doc = "        {"]
26246#[doc = "          \"type\": \"object\","]
26247#[doc = "          \"required\": ["]
26248#[doc = "            \"account_ids\","]
26249#[doc = "            \"changes_type\","]
26250#[doc = "            \"key_prefix_base64\""]
26251#[doc = "          ],"]
26252#[doc = "          \"properties\": {"]
26253#[doc = "            \"account_ids\": {"]
26254#[doc = "              \"type\": \"array\","]
26255#[doc = "              \"items\": {"]
26256#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26257#[doc = "              }"]
26258#[doc = "            },"]
26259#[doc = "            \"changes_type\": {"]
26260#[doc = "              \"type\": \"string\","]
26261#[doc = "              \"enum\": ["]
26262#[doc = "                \"data_changes\""]
26263#[doc = "              ]"]
26264#[doc = "            },"]
26265#[doc = "            \"key_prefix_base64\": {"]
26266#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
26267#[doc = "            }"]
26268#[doc = "          }"]
26269#[doc = "        }"]
26270#[doc = "      ]"]
26271#[doc = "    },"]
26272#[doc = "    {"]
26273#[doc = "      \"title\": \"account_changes_by_finality\","]
26274#[doc = "      \"allOf\": ["]
26275#[doc = "        {"]
26276#[doc = "          \"type\": \"object\","]
26277#[doc = "          \"required\": ["]
26278#[doc = "            \"finality\""]
26279#[doc = "          ],"]
26280#[doc = "          \"properties\": {"]
26281#[doc = "            \"finality\": {"]
26282#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
26283#[doc = "            }"]
26284#[doc = "          }"]
26285#[doc = "        },"]
26286#[doc = "        {"]
26287#[doc = "          \"type\": \"object\","]
26288#[doc = "          \"required\": ["]
26289#[doc = "            \"account_ids\","]
26290#[doc = "            \"changes_type\""]
26291#[doc = "          ],"]
26292#[doc = "          \"properties\": {"]
26293#[doc = "            \"account_ids\": {"]
26294#[doc = "              \"type\": \"array\","]
26295#[doc = "              \"items\": {"]
26296#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26297#[doc = "              }"]
26298#[doc = "            },"]
26299#[doc = "            \"changes_type\": {"]
26300#[doc = "              \"type\": \"string\","]
26301#[doc = "              \"enum\": ["]
26302#[doc = "                \"account_changes\""]
26303#[doc = "              ]"]
26304#[doc = "            }"]
26305#[doc = "          }"]
26306#[doc = "        }"]
26307#[doc = "      ]"]
26308#[doc = "    },"]
26309#[doc = "    {"]
26310#[doc = "      \"title\": \"single_access_key_changes_by_finality\","]
26311#[doc = "      \"allOf\": ["]
26312#[doc = "        {"]
26313#[doc = "          \"type\": \"object\","]
26314#[doc = "          \"required\": ["]
26315#[doc = "            \"finality\""]
26316#[doc = "          ],"]
26317#[doc = "          \"properties\": {"]
26318#[doc = "            \"finality\": {"]
26319#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
26320#[doc = "            }"]
26321#[doc = "          }"]
26322#[doc = "        },"]
26323#[doc = "        {"]
26324#[doc = "          \"type\": \"object\","]
26325#[doc = "          \"required\": ["]
26326#[doc = "            \"changes_type\","]
26327#[doc = "            \"keys\""]
26328#[doc = "          ],"]
26329#[doc = "          \"properties\": {"]
26330#[doc = "            \"changes_type\": {"]
26331#[doc = "              \"type\": \"string\","]
26332#[doc = "              \"enum\": ["]
26333#[doc = "                \"single_access_key_changes\""]
26334#[doc = "              ]"]
26335#[doc = "            },"]
26336#[doc = "            \"keys\": {"]
26337#[doc = "              \"type\": \"array\","]
26338#[doc = "              \"items\": {"]
26339#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26340#[doc = "              }"]
26341#[doc = "            }"]
26342#[doc = "          }"]
26343#[doc = "        }"]
26344#[doc = "      ]"]
26345#[doc = "    },"]
26346#[doc = "    {"]
26347#[doc = "      \"title\": \"single_gas_key_changes_by_finality\","]
26348#[doc = "      \"allOf\": ["]
26349#[doc = "        {"]
26350#[doc = "          \"type\": \"object\","]
26351#[doc = "          \"required\": ["]
26352#[doc = "            \"finality\""]
26353#[doc = "          ],"]
26354#[doc = "          \"properties\": {"]
26355#[doc = "            \"finality\": {"]
26356#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
26357#[doc = "            }"]
26358#[doc = "          }"]
26359#[doc = "        },"]
26360#[doc = "        {"]
26361#[doc = "          \"type\": \"object\","]
26362#[doc = "          \"required\": ["]
26363#[doc = "            \"changes_type\","]
26364#[doc = "            \"keys\""]
26365#[doc = "          ],"]
26366#[doc = "          \"properties\": {"]
26367#[doc = "            \"changes_type\": {"]
26368#[doc = "              \"type\": \"string\","]
26369#[doc = "              \"enum\": ["]
26370#[doc = "                \"single_gas_key_changes\""]
26371#[doc = "              ]"]
26372#[doc = "            },"]
26373#[doc = "            \"keys\": {"]
26374#[doc = "              \"type\": \"array\","]
26375#[doc = "              \"items\": {"]
26376#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26377#[doc = "              }"]
26378#[doc = "            }"]
26379#[doc = "          }"]
26380#[doc = "        }"]
26381#[doc = "      ]"]
26382#[doc = "    },"]
26383#[doc = "    {"]
26384#[doc = "      \"title\": \"all_access_key_changes_by_finality\","]
26385#[doc = "      \"allOf\": ["]
26386#[doc = "        {"]
26387#[doc = "          \"type\": \"object\","]
26388#[doc = "          \"required\": ["]
26389#[doc = "            \"finality\""]
26390#[doc = "          ],"]
26391#[doc = "          \"properties\": {"]
26392#[doc = "            \"finality\": {"]
26393#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
26394#[doc = "            }"]
26395#[doc = "          }"]
26396#[doc = "        },"]
26397#[doc = "        {"]
26398#[doc = "          \"type\": \"object\","]
26399#[doc = "          \"required\": ["]
26400#[doc = "            \"account_ids\","]
26401#[doc = "            \"changes_type\""]
26402#[doc = "          ],"]
26403#[doc = "          \"properties\": {"]
26404#[doc = "            \"account_ids\": {"]
26405#[doc = "              \"type\": \"array\","]
26406#[doc = "              \"items\": {"]
26407#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26408#[doc = "              }"]
26409#[doc = "            },"]
26410#[doc = "            \"changes_type\": {"]
26411#[doc = "              \"type\": \"string\","]
26412#[doc = "              \"enum\": ["]
26413#[doc = "                \"all_access_key_changes\""]
26414#[doc = "              ]"]
26415#[doc = "            }"]
26416#[doc = "          }"]
26417#[doc = "        }"]
26418#[doc = "      ]"]
26419#[doc = "    },"]
26420#[doc = "    {"]
26421#[doc = "      \"title\": \"all_gas_key_changes_by_finality\","]
26422#[doc = "      \"allOf\": ["]
26423#[doc = "        {"]
26424#[doc = "          \"type\": \"object\","]
26425#[doc = "          \"required\": ["]
26426#[doc = "            \"finality\""]
26427#[doc = "          ],"]
26428#[doc = "          \"properties\": {"]
26429#[doc = "            \"finality\": {"]
26430#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
26431#[doc = "            }"]
26432#[doc = "          }"]
26433#[doc = "        },"]
26434#[doc = "        {"]
26435#[doc = "          \"type\": \"object\","]
26436#[doc = "          \"required\": ["]
26437#[doc = "            \"account_ids\","]
26438#[doc = "            \"changes_type\""]
26439#[doc = "          ],"]
26440#[doc = "          \"properties\": {"]
26441#[doc = "            \"account_ids\": {"]
26442#[doc = "              \"type\": \"array\","]
26443#[doc = "              \"items\": {"]
26444#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26445#[doc = "              }"]
26446#[doc = "            },"]
26447#[doc = "            \"changes_type\": {"]
26448#[doc = "              \"type\": \"string\","]
26449#[doc = "              \"enum\": ["]
26450#[doc = "                \"all_gas_key_changes\""]
26451#[doc = "              ]"]
26452#[doc = "            }"]
26453#[doc = "          }"]
26454#[doc = "        }"]
26455#[doc = "      ]"]
26456#[doc = "    },"]
26457#[doc = "    {"]
26458#[doc = "      \"title\": \"contract_code_changes_by_finality\","]
26459#[doc = "      \"allOf\": ["]
26460#[doc = "        {"]
26461#[doc = "          \"type\": \"object\","]
26462#[doc = "          \"required\": ["]
26463#[doc = "            \"finality\""]
26464#[doc = "          ],"]
26465#[doc = "          \"properties\": {"]
26466#[doc = "            \"finality\": {"]
26467#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
26468#[doc = "            }"]
26469#[doc = "          }"]
26470#[doc = "        },"]
26471#[doc = "        {"]
26472#[doc = "          \"type\": \"object\","]
26473#[doc = "          \"required\": ["]
26474#[doc = "            \"account_ids\","]
26475#[doc = "            \"changes_type\""]
26476#[doc = "          ],"]
26477#[doc = "          \"properties\": {"]
26478#[doc = "            \"account_ids\": {"]
26479#[doc = "              \"type\": \"array\","]
26480#[doc = "              \"items\": {"]
26481#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26482#[doc = "              }"]
26483#[doc = "            },"]
26484#[doc = "            \"changes_type\": {"]
26485#[doc = "              \"type\": \"string\","]
26486#[doc = "              \"enum\": ["]
26487#[doc = "                \"contract_code_changes\""]
26488#[doc = "              ]"]
26489#[doc = "            }"]
26490#[doc = "          }"]
26491#[doc = "        }"]
26492#[doc = "      ]"]
26493#[doc = "    },"]
26494#[doc = "    {"]
26495#[doc = "      \"title\": \"data_changes_by_finality\","]
26496#[doc = "      \"allOf\": ["]
26497#[doc = "        {"]
26498#[doc = "          \"type\": \"object\","]
26499#[doc = "          \"required\": ["]
26500#[doc = "            \"finality\""]
26501#[doc = "          ],"]
26502#[doc = "          \"properties\": {"]
26503#[doc = "            \"finality\": {"]
26504#[doc = "              \"$ref\": \"#/components/schemas/Finality\""]
26505#[doc = "            }"]
26506#[doc = "          }"]
26507#[doc = "        },"]
26508#[doc = "        {"]
26509#[doc = "          \"type\": \"object\","]
26510#[doc = "          \"required\": ["]
26511#[doc = "            \"account_ids\","]
26512#[doc = "            \"changes_type\","]
26513#[doc = "            \"key_prefix_base64\""]
26514#[doc = "          ],"]
26515#[doc = "          \"properties\": {"]
26516#[doc = "            \"account_ids\": {"]
26517#[doc = "              \"type\": \"array\","]
26518#[doc = "              \"items\": {"]
26519#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26520#[doc = "              }"]
26521#[doc = "            },"]
26522#[doc = "            \"changes_type\": {"]
26523#[doc = "              \"type\": \"string\","]
26524#[doc = "              \"enum\": ["]
26525#[doc = "                \"data_changes\""]
26526#[doc = "              ]"]
26527#[doc = "            },"]
26528#[doc = "            \"key_prefix_base64\": {"]
26529#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
26530#[doc = "            }"]
26531#[doc = "          }"]
26532#[doc = "        }"]
26533#[doc = "      ]"]
26534#[doc = "    },"]
26535#[doc = "    {"]
26536#[doc = "      \"title\": \"account_changes_by_sync_checkpoint\","]
26537#[doc = "      \"allOf\": ["]
26538#[doc = "        {"]
26539#[doc = "          \"type\": \"object\","]
26540#[doc = "          \"required\": ["]
26541#[doc = "            \"sync_checkpoint\""]
26542#[doc = "          ],"]
26543#[doc = "          \"properties\": {"]
26544#[doc = "            \"sync_checkpoint\": {"]
26545#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26546#[doc = "            }"]
26547#[doc = "          }"]
26548#[doc = "        },"]
26549#[doc = "        {"]
26550#[doc = "          \"type\": \"object\","]
26551#[doc = "          \"required\": ["]
26552#[doc = "            \"account_ids\","]
26553#[doc = "            \"changes_type\""]
26554#[doc = "          ],"]
26555#[doc = "          \"properties\": {"]
26556#[doc = "            \"account_ids\": {"]
26557#[doc = "              \"type\": \"array\","]
26558#[doc = "              \"items\": {"]
26559#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26560#[doc = "              }"]
26561#[doc = "            },"]
26562#[doc = "            \"changes_type\": {"]
26563#[doc = "              \"type\": \"string\","]
26564#[doc = "              \"enum\": ["]
26565#[doc = "                \"account_changes\""]
26566#[doc = "              ]"]
26567#[doc = "            }"]
26568#[doc = "          }"]
26569#[doc = "        }"]
26570#[doc = "      ]"]
26571#[doc = "    },"]
26572#[doc = "    {"]
26573#[doc = "      \"title\": \"single_access_key_changes_by_sync_checkpoint\","]
26574#[doc = "      \"allOf\": ["]
26575#[doc = "        {"]
26576#[doc = "          \"type\": \"object\","]
26577#[doc = "          \"required\": ["]
26578#[doc = "            \"sync_checkpoint\""]
26579#[doc = "          ],"]
26580#[doc = "          \"properties\": {"]
26581#[doc = "            \"sync_checkpoint\": {"]
26582#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26583#[doc = "            }"]
26584#[doc = "          }"]
26585#[doc = "        },"]
26586#[doc = "        {"]
26587#[doc = "          \"type\": \"object\","]
26588#[doc = "          \"required\": ["]
26589#[doc = "            \"changes_type\","]
26590#[doc = "            \"keys\""]
26591#[doc = "          ],"]
26592#[doc = "          \"properties\": {"]
26593#[doc = "            \"changes_type\": {"]
26594#[doc = "              \"type\": \"string\","]
26595#[doc = "              \"enum\": ["]
26596#[doc = "                \"single_access_key_changes\""]
26597#[doc = "              ]"]
26598#[doc = "            },"]
26599#[doc = "            \"keys\": {"]
26600#[doc = "              \"type\": \"array\","]
26601#[doc = "              \"items\": {"]
26602#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26603#[doc = "              }"]
26604#[doc = "            }"]
26605#[doc = "          }"]
26606#[doc = "        }"]
26607#[doc = "      ]"]
26608#[doc = "    },"]
26609#[doc = "    {"]
26610#[doc = "      \"title\": \"single_gas_key_changes_by_sync_checkpoint\","]
26611#[doc = "      \"allOf\": ["]
26612#[doc = "        {"]
26613#[doc = "          \"type\": \"object\","]
26614#[doc = "          \"required\": ["]
26615#[doc = "            \"sync_checkpoint\""]
26616#[doc = "          ],"]
26617#[doc = "          \"properties\": {"]
26618#[doc = "            \"sync_checkpoint\": {"]
26619#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26620#[doc = "            }"]
26621#[doc = "          }"]
26622#[doc = "        },"]
26623#[doc = "        {"]
26624#[doc = "          \"type\": \"object\","]
26625#[doc = "          \"required\": ["]
26626#[doc = "            \"changes_type\","]
26627#[doc = "            \"keys\""]
26628#[doc = "          ],"]
26629#[doc = "          \"properties\": {"]
26630#[doc = "            \"changes_type\": {"]
26631#[doc = "              \"type\": \"string\","]
26632#[doc = "              \"enum\": ["]
26633#[doc = "                \"single_gas_key_changes\""]
26634#[doc = "              ]"]
26635#[doc = "            },"]
26636#[doc = "            \"keys\": {"]
26637#[doc = "              \"type\": \"array\","]
26638#[doc = "              \"items\": {"]
26639#[doc = "                \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26640#[doc = "              }"]
26641#[doc = "            }"]
26642#[doc = "          }"]
26643#[doc = "        }"]
26644#[doc = "      ]"]
26645#[doc = "    },"]
26646#[doc = "    {"]
26647#[doc = "      \"title\": \"all_access_key_changes_by_sync_checkpoint\","]
26648#[doc = "      \"allOf\": ["]
26649#[doc = "        {"]
26650#[doc = "          \"type\": \"object\","]
26651#[doc = "          \"required\": ["]
26652#[doc = "            \"sync_checkpoint\""]
26653#[doc = "          ],"]
26654#[doc = "          \"properties\": {"]
26655#[doc = "            \"sync_checkpoint\": {"]
26656#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26657#[doc = "            }"]
26658#[doc = "          }"]
26659#[doc = "        },"]
26660#[doc = "        {"]
26661#[doc = "          \"type\": \"object\","]
26662#[doc = "          \"required\": ["]
26663#[doc = "            \"account_ids\","]
26664#[doc = "            \"changes_type\""]
26665#[doc = "          ],"]
26666#[doc = "          \"properties\": {"]
26667#[doc = "            \"account_ids\": {"]
26668#[doc = "              \"type\": \"array\","]
26669#[doc = "              \"items\": {"]
26670#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26671#[doc = "              }"]
26672#[doc = "            },"]
26673#[doc = "            \"changes_type\": {"]
26674#[doc = "              \"type\": \"string\","]
26675#[doc = "              \"enum\": ["]
26676#[doc = "                \"all_access_key_changes\""]
26677#[doc = "              ]"]
26678#[doc = "            }"]
26679#[doc = "          }"]
26680#[doc = "        }"]
26681#[doc = "      ]"]
26682#[doc = "    },"]
26683#[doc = "    {"]
26684#[doc = "      \"title\": \"all_gas_key_changes_by_sync_checkpoint\","]
26685#[doc = "      \"allOf\": ["]
26686#[doc = "        {"]
26687#[doc = "          \"type\": \"object\","]
26688#[doc = "          \"required\": ["]
26689#[doc = "            \"sync_checkpoint\""]
26690#[doc = "          ],"]
26691#[doc = "          \"properties\": {"]
26692#[doc = "            \"sync_checkpoint\": {"]
26693#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26694#[doc = "            }"]
26695#[doc = "          }"]
26696#[doc = "        },"]
26697#[doc = "        {"]
26698#[doc = "          \"type\": \"object\","]
26699#[doc = "          \"required\": ["]
26700#[doc = "            \"account_ids\","]
26701#[doc = "            \"changes_type\""]
26702#[doc = "          ],"]
26703#[doc = "          \"properties\": {"]
26704#[doc = "            \"account_ids\": {"]
26705#[doc = "              \"type\": \"array\","]
26706#[doc = "              \"items\": {"]
26707#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26708#[doc = "              }"]
26709#[doc = "            },"]
26710#[doc = "            \"changes_type\": {"]
26711#[doc = "              \"type\": \"string\","]
26712#[doc = "              \"enum\": ["]
26713#[doc = "                \"all_gas_key_changes\""]
26714#[doc = "              ]"]
26715#[doc = "            }"]
26716#[doc = "          }"]
26717#[doc = "        }"]
26718#[doc = "      ]"]
26719#[doc = "    },"]
26720#[doc = "    {"]
26721#[doc = "      \"title\": \"contract_code_changes_by_sync_checkpoint\","]
26722#[doc = "      \"allOf\": ["]
26723#[doc = "        {"]
26724#[doc = "          \"type\": \"object\","]
26725#[doc = "          \"required\": ["]
26726#[doc = "            \"sync_checkpoint\""]
26727#[doc = "          ],"]
26728#[doc = "          \"properties\": {"]
26729#[doc = "            \"sync_checkpoint\": {"]
26730#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26731#[doc = "            }"]
26732#[doc = "          }"]
26733#[doc = "        },"]
26734#[doc = "        {"]
26735#[doc = "          \"type\": \"object\","]
26736#[doc = "          \"required\": ["]
26737#[doc = "            \"account_ids\","]
26738#[doc = "            \"changes_type\""]
26739#[doc = "          ],"]
26740#[doc = "          \"properties\": {"]
26741#[doc = "            \"account_ids\": {"]
26742#[doc = "              \"type\": \"array\","]
26743#[doc = "              \"items\": {"]
26744#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26745#[doc = "              }"]
26746#[doc = "            },"]
26747#[doc = "            \"changes_type\": {"]
26748#[doc = "              \"type\": \"string\","]
26749#[doc = "              \"enum\": ["]
26750#[doc = "                \"contract_code_changes\""]
26751#[doc = "              ]"]
26752#[doc = "            }"]
26753#[doc = "          }"]
26754#[doc = "        }"]
26755#[doc = "      ]"]
26756#[doc = "    },"]
26757#[doc = "    {"]
26758#[doc = "      \"title\": \"data_changes_by_sync_checkpoint\","]
26759#[doc = "      \"allOf\": ["]
26760#[doc = "        {"]
26761#[doc = "          \"type\": \"object\","]
26762#[doc = "          \"required\": ["]
26763#[doc = "            \"sync_checkpoint\""]
26764#[doc = "          ],"]
26765#[doc = "          \"properties\": {"]
26766#[doc = "            \"sync_checkpoint\": {"]
26767#[doc = "              \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26768#[doc = "            }"]
26769#[doc = "          }"]
26770#[doc = "        },"]
26771#[doc = "        {"]
26772#[doc = "          \"type\": \"object\","]
26773#[doc = "          \"required\": ["]
26774#[doc = "            \"account_ids\","]
26775#[doc = "            \"changes_type\","]
26776#[doc = "            \"key_prefix_base64\""]
26777#[doc = "          ],"]
26778#[doc = "          \"properties\": {"]
26779#[doc = "            \"account_ids\": {"]
26780#[doc = "              \"type\": \"array\","]
26781#[doc = "              \"items\": {"]
26782#[doc = "                \"$ref\": \"#/components/schemas/AccountId\""]
26783#[doc = "              }"]
26784#[doc = "            },"]
26785#[doc = "            \"changes_type\": {"]
26786#[doc = "              \"type\": \"string\","]
26787#[doc = "              \"enum\": ["]
26788#[doc = "                \"data_changes\""]
26789#[doc = "              ]"]
26790#[doc = "            },"]
26791#[doc = "            \"key_prefix_base64\": {"]
26792#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
26793#[doc = "            }"]
26794#[doc = "          }"]
26795#[doc = "        }"]
26796#[doc = "      ]"]
26797#[doc = "    }"]
26798#[doc = "  ]"]
26799#[doc = "}"]
26800#[doc = r" ```"]
26801#[doc = r" </details>"]
26802#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26803#[serde(untagged)]
26804pub enum RpcStateChangesInBlockByTypeRequest {
26805    AccountChangesByBlockId {
26806        account_ids: ::std::vec::Vec<AccountId>,
26807        block_id: BlockId,
26808        changes_type: AccountChangesByBlockIdChangesType,
26809    },
26810    SingleAccessKeyChangesByBlockId {
26811        block_id: BlockId,
26812        changes_type: SingleAccessKeyChangesByBlockIdChangesType,
26813        keys: ::std::vec::Vec<AccountWithPublicKey>,
26814    },
26815    SingleGasKeyChangesByBlockId {
26816        block_id: BlockId,
26817        changes_type: SingleGasKeyChangesByBlockIdChangesType,
26818        keys: ::std::vec::Vec<AccountWithPublicKey>,
26819    },
26820    AllAccessKeyChangesByBlockId {
26821        account_ids: ::std::vec::Vec<AccountId>,
26822        block_id: BlockId,
26823        changes_type: AllAccessKeyChangesByBlockIdChangesType,
26824    },
26825    AllGasKeyChangesByBlockId {
26826        account_ids: ::std::vec::Vec<AccountId>,
26827        block_id: BlockId,
26828        changes_type: AllGasKeyChangesByBlockIdChangesType,
26829    },
26830    ContractCodeChangesByBlockId {
26831        account_ids: ::std::vec::Vec<AccountId>,
26832        block_id: BlockId,
26833        changes_type: ContractCodeChangesByBlockIdChangesType,
26834    },
26835    DataChangesByBlockId {
26836        account_ids: ::std::vec::Vec<AccountId>,
26837        block_id: BlockId,
26838        changes_type: DataChangesByBlockIdChangesType,
26839        key_prefix_base64: StoreKey,
26840    },
26841    AccountChangesByFinality {
26842        account_ids: ::std::vec::Vec<AccountId>,
26843        changes_type: AccountChangesByFinalityChangesType,
26844        finality: Finality,
26845    },
26846    SingleAccessKeyChangesByFinality {
26847        changes_type: SingleAccessKeyChangesByFinalityChangesType,
26848        finality: Finality,
26849        keys: ::std::vec::Vec<AccountWithPublicKey>,
26850    },
26851    SingleGasKeyChangesByFinality {
26852        changes_type: SingleGasKeyChangesByFinalityChangesType,
26853        finality: Finality,
26854        keys: ::std::vec::Vec<AccountWithPublicKey>,
26855    },
26856    AllAccessKeyChangesByFinality {
26857        account_ids: ::std::vec::Vec<AccountId>,
26858        changes_type: AllAccessKeyChangesByFinalityChangesType,
26859        finality: Finality,
26860    },
26861    AllGasKeyChangesByFinality {
26862        account_ids: ::std::vec::Vec<AccountId>,
26863        changes_type: AllGasKeyChangesByFinalityChangesType,
26864        finality: Finality,
26865    },
26866    ContractCodeChangesByFinality {
26867        account_ids: ::std::vec::Vec<AccountId>,
26868        changes_type: ContractCodeChangesByFinalityChangesType,
26869        finality: Finality,
26870    },
26871    DataChangesByFinality {
26872        account_ids: ::std::vec::Vec<AccountId>,
26873        changes_type: DataChangesByFinalityChangesType,
26874        finality: Finality,
26875        key_prefix_base64: StoreKey,
26876    },
26877    AccountChangesBySyncCheckpoint {
26878        account_ids: ::std::vec::Vec<AccountId>,
26879        changes_type: AccountChangesBySyncCheckpointChangesType,
26880        sync_checkpoint: SyncCheckpoint,
26881    },
26882    SingleAccessKeyChangesBySyncCheckpoint {
26883        changes_type: SingleAccessKeyChangesBySyncCheckpointChangesType,
26884        keys: ::std::vec::Vec<AccountWithPublicKey>,
26885        sync_checkpoint: SyncCheckpoint,
26886    },
26887    SingleGasKeyChangesBySyncCheckpoint {
26888        changes_type: SingleGasKeyChangesBySyncCheckpointChangesType,
26889        keys: ::std::vec::Vec<AccountWithPublicKey>,
26890        sync_checkpoint: SyncCheckpoint,
26891    },
26892    AllAccessKeyChangesBySyncCheckpoint {
26893        account_ids: ::std::vec::Vec<AccountId>,
26894        changes_type: AllAccessKeyChangesBySyncCheckpointChangesType,
26895        sync_checkpoint: SyncCheckpoint,
26896    },
26897    AllGasKeyChangesBySyncCheckpoint {
26898        account_ids: ::std::vec::Vec<AccountId>,
26899        changes_type: AllGasKeyChangesBySyncCheckpointChangesType,
26900        sync_checkpoint: SyncCheckpoint,
26901    },
26902    ContractCodeChangesBySyncCheckpoint {
26903        account_ids: ::std::vec::Vec<AccountId>,
26904        changes_type: ContractCodeChangesBySyncCheckpointChangesType,
26905        sync_checkpoint: SyncCheckpoint,
26906    },
26907    DataChangesBySyncCheckpoint {
26908        account_ids: ::std::vec::Vec<AccountId>,
26909        changes_type: DataChangesBySyncCheckpointChangesType,
26910        key_prefix_base64: StoreKey,
26911        sync_checkpoint: SyncCheckpoint,
26912    },
26913}
26914impl ::std::convert::From<&Self> for RpcStateChangesInBlockByTypeRequest {
26915    fn from(value: &RpcStateChangesInBlockByTypeRequest) -> Self {
26916        value.clone()
26917    }
26918}
26919#[doc = "`RpcStateChangesInBlockByTypeResponse`"]
26920#[doc = r""]
26921#[doc = r" <details><summary>JSON schema</summary>"]
26922#[doc = r""]
26923#[doc = r" ```json"]
26924#[doc = "{"]
26925#[doc = "  \"type\": \"object\","]
26926#[doc = "  \"required\": ["]
26927#[doc = "    \"block_hash\","]
26928#[doc = "    \"changes\""]
26929#[doc = "  ],"]
26930#[doc = "  \"properties\": {"]
26931#[doc = "    \"block_hash\": {"]
26932#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
26933#[doc = "    },"]
26934#[doc = "    \"changes\": {"]
26935#[doc = "      \"type\": \"array\","]
26936#[doc = "      \"items\": {"]
26937#[doc = "        \"$ref\": \"#/components/schemas/StateChangeKindView\""]
26938#[doc = "      }"]
26939#[doc = "    }"]
26940#[doc = "  }"]
26941#[doc = "}"]
26942#[doc = r" ```"]
26943#[doc = r" </details>"]
26944#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26945pub struct RpcStateChangesInBlockByTypeResponse {
26946    pub block_hash: CryptoHash,
26947    pub changes: ::std::vec::Vec<StateChangeKindView>,
26948}
26949impl ::std::convert::From<&RpcStateChangesInBlockByTypeResponse>
26950    for RpcStateChangesInBlockByTypeResponse
26951{
26952    fn from(value: &RpcStateChangesInBlockByTypeResponse) -> Self {
26953        value.clone()
26954    }
26955}
26956#[doc = "`RpcStateChangesInBlockRequest`"]
26957#[doc = r""]
26958#[doc = r" <details><summary>JSON schema</summary>"]
26959#[doc = r""]
26960#[doc = r" ```json"]
26961#[doc = "{"]
26962#[doc = "  \"title\": \"RpcStateChangesInBlockRequest\","]
26963#[doc = "  \"type\": \"object\","]
26964#[doc = "  \"oneOf\": ["]
26965#[doc = "    {"]
26966#[doc = "      \"type\": \"object\","]
26967#[doc = "      \"required\": ["]
26968#[doc = "        \"block_id\""]
26969#[doc = "      ],"]
26970#[doc = "      \"properties\": {"]
26971#[doc = "        \"block_id\": {"]
26972#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
26973#[doc = "        }"]
26974#[doc = "      }"]
26975#[doc = "    },"]
26976#[doc = "    {"]
26977#[doc = "      \"type\": \"object\","]
26978#[doc = "      \"required\": ["]
26979#[doc = "        \"finality\""]
26980#[doc = "      ],"]
26981#[doc = "      \"properties\": {"]
26982#[doc = "        \"finality\": {"]
26983#[doc = "          \"$ref\": \"#/components/schemas/Finality\""]
26984#[doc = "        }"]
26985#[doc = "      }"]
26986#[doc = "    },"]
26987#[doc = "    {"]
26988#[doc = "      \"type\": \"object\","]
26989#[doc = "      \"required\": ["]
26990#[doc = "        \"sync_checkpoint\""]
26991#[doc = "      ],"]
26992#[doc = "      \"properties\": {"]
26993#[doc = "        \"sync_checkpoint\": {"]
26994#[doc = "          \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26995#[doc = "        }"]
26996#[doc = "      }"]
26997#[doc = "    }"]
26998#[doc = "  ]"]
26999#[doc = "}"]
27000#[doc = r" ```"]
27001#[doc = r" </details>"]
27002#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27003pub enum RpcStateChangesInBlockRequest {
27004    #[serde(rename = "block_id")]
27005    BlockId(BlockId),
27006    #[serde(rename = "finality")]
27007    Finality(Finality),
27008    #[serde(rename = "sync_checkpoint")]
27009    SyncCheckpoint(SyncCheckpoint),
27010}
27011impl ::std::convert::From<&Self> for RpcStateChangesInBlockRequest {
27012    fn from(value: &RpcStateChangesInBlockRequest) -> Self {
27013        value.clone()
27014    }
27015}
27016impl ::std::convert::From<BlockId> for RpcStateChangesInBlockRequest {
27017    fn from(value: BlockId) -> Self {
27018        Self::BlockId(value)
27019    }
27020}
27021impl ::std::convert::From<Finality> for RpcStateChangesInBlockRequest {
27022    fn from(value: Finality) -> Self {
27023        Self::Finality(value)
27024    }
27025}
27026impl ::std::convert::From<SyncCheckpoint> for RpcStateChangesInBlockRequest {
27027    fn from(value: SyncCheckpoint) -> Self {
27028        Self::SyncCheckpoint(value)
27029    }
27030}
27031#[doc = "`RpcStateChangesInBlockResponse`"]
27032#[doc = r""]
27033#[doc = r" <details><summary>JSON schema</summary>"]
27034#[doc = r""]
27035#[doc = r" ```json"]
27036#[doc = "{"]
27037#[doc = "  \"type\": \"object\","]
27038#[doc = "  \"required\": ["]
27039#[doc = "    \"block_hash\","]
27040#[doc = "    \"changes\""]
27041#[doc = "  ],"]
27042#[doc = "  \"properties\": {"]
27043#[doc = "    \"block_hash\": {"]
27044#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
27045#[doc = "    },"]
27046#[doc = "    \"changes\": {"]
27047#[doc = "      \"type\": \"array\","]
27048#[doc = "      \"items\": {"]
27049#[doc = "        \"$ref\": \"#/components/schemas/StateChangeWithCauseView\""]
27050#[doc = "      }"]
27051#[doc = "    }"]
27052#[doc = "  }"]
27053#[doc = "}"]
27054#[doc = r" ```"]
27055#[doc = r" </details>"]
27056#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27057pub struct RpcStateChangesInBlockResponse {
27058    pub block_hash: CryptoHash,
27059    pub changes: ::std::vec::Vec<StateChangeWithCauseView>,
27060}
27061impl ::std::convert::From<&RpcStateChangesInBlockResponse> for RpcStateChangesInBlockResponse {
27062    fn from(value: &RpcStateChangesInBlockResponse) -> Self {
27063        value.clone()
27064    }
27065}
27066#[doc = "`RpcStatusError`"]
27067#[doc = r""]
27068#[doc = r" <details><summary>JSON schema</summary>"]
27069#[doc = r""]
27070#[doc = r" ```json"]
27071#[doc = "{"]
27072#[doc = "  \"oneOf\": ["]
27073#[doc = "    {"]
27074#[doc = "      \"type\": \"object\","]
27075#[doc = "      \"required\": ["]
27076#[doc = "        \"name\""]
27077#[doc = "      ],"]
27078#[doc = "      \"properties\": {"]
27079#[doc = "        \"name\": {"]
27080#[doc = "          \"type\": \"string\","]
27081#[doc = "          \"enum\": ["]
27082#[doc = "            \"NODE_IS_SYNCING\""]
27083#[doc = "          ]"]
27084#[doc = "        }"]
27085#[doc = "      }"]
27086#[doc = "    },"]
27087#[doc = "    {"]
27088#[doc = "      \"type\": \"object\","]
27089#[doc = "      \"required\": ["]
27090#[doc = "        \"info\","]
27091#[doc = "        \"name\""]
27092#[doc = "      ],"]
27093#[doc = "      \"properties\": {"]
27094#[doc = "        \"info\": {"]
27095#[doc = "          \"type\": \"object\","]
27096#[doc = "          \"required\": ["]
27097#[doc = "            \"elapsed\""]
27098#[doc = "          ],"]
27099#[doc = "          \"properties\": {"]
27100#[doc = "            \"elapsed\": {"]
27101#[doc = "              \"type\": \"array\","]
27102#[doc = "              \"items\": {"]
27103#[doc = "                \"type\": \"integer\","]
27104#[doc = "                \"format\": \"uint64\","]
27105#[doc = "                \"minimum\": 0.0"]
27106#[doc = "              },"]
27107#[doc = "              \"maxItems\": 2,"]
27108#[doc = "              \"minItems\": 2"]
27109#[doc = "            }"]
27110#[doc = "          }"]
27111#[doc = "        },"]
27112#[doc = "        \"name\": {"]
27113#[doc = "          \"type\": \"string\","]
27114#[doc = "          \"enum\": ["]
27115#[doc = "            \"NO_NEW_BLOCKS\""]
27116#[doc = "          ]"]
27117#[doc = "        }"]
27118#[doc = "      }"]
27119#[doc = "    },"]
27120#[doc = "    {"]
27121#[doc = "      \"type\": \"object\","]
27122#[doc = "      \"required\": ["]
27123#[doc = "        \"info\","]
27124#[doc = "        \"name\""]
27125#[doc = "      ],"]
27126#[doc = "      \"properties\": {"]
27127#[doc = "        \"info\": {"]
27128#[doc = "          \"type\": \"object\","]
27129#[doc = "          \"required\": ["]
27130#[doc = "            \"epoch_id\""]
27131#[doc = "          ],"]
27132#[doc = "          \"properties\": {"]
27133#[doc = "            \"epoch_id\": {"]
27134#[doc = "              \"$ref\": \"#/components/schemas/EpochId\""]
27135#[doc = "            }"]
27136#[doc = "          }"]
27137#[doc = "        },"]
27138#[doc = "        \"name\": {"]
27139#[doc = "          \"type\": \"string\","]
27140#[doc = "          \"enum\": ["]
27141#[doc = "            \"EPOCH_OUT_OF_BOUNDS\""]
27142#[doc = "          ]"]
27143#[doc = "        }"]
27144#[doc = "      }"]
27145#[doc = "    },"]
27146#[doc = "    {"]
27147#[doc = "      \"type\": \"object\","]
27148#[doc = "      \"required\": ["]
27149#[doc = "        \"info\","]
27150#[doc = "        \"name\""]
27151#[doc = "      ],"]
27152#[doc = "      \"properties\": {"]
27153#[doc = "        \"info\": {"]
27154#[doc = "          \"type\": \"object\","]
27155#[doc = "          \"required\": ["]
27156#[doc = "            \"error_message\""]
27157#[doc = "          ],"]
27158#[doc = "          \"properties\": {"]
27159#[doc = "            \"error_message\": {"]
27160#[doc = "              \"type\": \"string\""]
27161#[doc = "            }"]
27162#[doc = "          }"]
27163#[doc = "        },"]
27164#[doc = "        \"name\": {"]
27165#[doc = "          \"type\": \"string\","]
27166#[doc = "          \"enum\": ["]
27167#[doc = "            \"INTERNAL_ERROR\""]
27168#[doc = "          ]"]
27169#[doc = "        }"]
27170#[doc = "      }"]
27171#[doc = "    }"]
27172#[doc = "  ]"]
27173#[doc = "}"]
27174#[doc = r" ```"]
27175#[doc = r" </details>"]
27176#[derive(
27177    :: serde :: Deserialize,
27178    :: serde :: Serialize,
27179    Clone,
27180    Debug,
27181    thiserror::Error,
27182    strum_macros::Display,
27183)]
27184#[serde(tag = "name", content = "info")]
27185pub enum RpcStatusError {
27186    #[serde(rename = "NODE_IS_SYNCING")]
27187    NodeIsSyncing,
27188    #[serde(rename = "NO_NEW_BLOCKS")]
27189    NoNewBlocks { elapsed: [u64; 2usize] },
27190    #[serde(rename = "EPOCH_OUT_OF_BOUNDS")]
27191    EpochOutOfBounds { epoch_id: EpochId },
27192    #[serde(rename = "INTERNAL_ERROR")]
27193    InternalError {
27194        error_message: ::std::string::String,
27195    },
27196}
27197impl ::std::convert::From<&Self> for RpcStatusError {
27198    fn from(value: &RpcStatusError) -> Self {
27199        value.clone()
27200    }
27201}
27202#[doc = "`RpcStatusRequest`"]
27203#[doc = r""]
27204#[doc = r" <details><summary>JSON schema</summary>"]
27205#[doc = r""]
27206#[doc = r" ```json"]
27207#[doc = "{"]
27208#[doc = "  \"title\": \"RpcStatusRequest\","]
27209#[doc = "  \"type\": \"null\""]
27210#[doc = "}"]
27211#[doc = r" ```"]
27212#[doc = r" </details>"]
27213#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27214#[serde(transparent)]
27215pub struct RpcStatusRequest(pub ());
27216impl ::std::ops::Deref for RpcStatusRequest {
27217    type Target = ();
27218    fn deref(&self) -> &() {
27219        &self.0
27220    }
27221}
27222impl ::std::convert::From<RpcStatusRequest> for () {
27223    fn from(value: RpcStatusRequest) -> Self {
27224        value.0
27225    }
27226}
27227impl ::std::convert::From<&RpcStatusRequest> for RpcStatusRequest {
27228    fn from(value: &RpcStatusRequest) -> Self {
27229        value.clone()
27230    }
27231}
27232impl ::std::convert::From<()> for RpcStatusRequest {
27233    fn from(value: ()) -> Self {
27234        Self(value)
27235    }
27236}
27237#[doc = "`RpcStatusResponse`"]
27238#[doc = r""]
27239#[doc = r" <details><summary>JSON schema</summary>"]
27240#[doc = r""]
27241#[doc = r" ```json"]
27242#[doc = "{"]
27243#[doc = "  \"type\": \"object\","]
27244#[doc = "  \"required\": ["]
27245#[doc = "    \"chain_id\","]
27246#[doc = "    \"genesis_hash\","]
27247#[doc = "    \"latest_protocol_version\","]
27248#[doc = "    \"node_public_key\","]
27249#[doc = "    \"protocol_version\","]
27250#[doc = "    \"sync_info\","]
27251#[doc = "    \"uptime_sec\","]
27252#[doc = "    \"validators\","]
27253#[doc = "    \"version\""]
27254#[doc = "  ],"]
27255#[doc = "  \"properties\": {"]
27256#[doc = "    \"chain_id\": {"]
27257#[doc = "      \"description\": \"Unique chain id.\","]
27258#[doc = "      \"type\": \"string\""]
27259#[doc = "    },"]
27260#[doc = "    \"detailed_debug_status\": {"]
27261#[doc = "      \"description\": \"Information about last blocks, network, epoch and chain & chunk info.\","]
27262#[doc = "      \"anyOf\": ["]
27263#[doc = "        {"]
27264#[doc = "          \"$ref\": \"#/components/schemas/DetailedDebugStatus\""]
27265#[doc = "        },"]
27266#[doc = "        {"]
27267#[doc = "          \"type\": \"null\""]
27268#[doc = "        }"]
27269#[doc = "      ]"]
27270#[doc = "    },"]
27271#[doc = "    \"genesis_hash\": {"]
27272#[doc = "      \"description\": \"Genesis hash of the chain.\","]
27273#[doc = "      \"allOf\": ["]
27274#[doc = "        {"]
27275#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
27276#[doc = "        }"]
27277#[doc = "      ]"]
27278#[doc = "    },"]
27279#[doc = "    \"latest_protocol_version\": {"]
27280#[doc = "      \"description\": \"Latest protocol version that this client supports.\","]
27281#[doc = "      \"type\": \"integer\","]
27282#[doc = "      \"format\": \"uint32\","]
27283#[doc = "      \"minimum\": 0.0"]
27284#[doc = "    },"]
27285#[doc = "    \"node_key\": {"]
27286#[doc = "      \"description\": \"Deprecated; same as `validator_public_key` which you should use instead.\","]
27287#[doc = "      \"anyOf\": ["]
27288#[doc = "        {"]
27289#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
27290#[doc = "        },"]
27291#[doc = "        {"]
27292#[doc = "          \"type\": \"null\""]
27293#[doc = "        }"]
27294#[doc = "      ]"]
27295#[doc = "    },"]
27296#[doc = "    \"node_public_key\": {"]
27297#[doc = "      \"description\": \"Public key of the node.\","]
27298#[doc = "      \"allOf\": ["]
27299#[doc = "        {"]
27300#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
27301#[doc = "        }"]
27302#[doc = "      ]"]
27303#[doc = "    },"]
27304#[doc = "    \"protocol_version\": {"]
27305#[doc = "      \"description\": \"Currently active protocol version.\","]
27306#[doc = "      \"type\": \"integer\","]
27307#[doc = "      \"format\": \"uint32\","]
27308#[doc = "      \"minimum\": 0.0"]
27309#[doc = "    },"]
27310#[doc = "    \"rpc_addr\": {"]
27311#[doc = "      \"description\": \"Address for RPC server.  None if node doesn't have RPC endpoint enabled.\","]
27312#[doc = "      \"type\": ["]
27313#[doc = "        \"string\","]
27314#[doc = "        \"null\""]
27315#[doc = "      ]"]
27316#[doc = "    },"]
27317#[doc = "    \"sync_info\": {"]
27318#[doc = "      \"description\": \"Sync status of the node.\","]
27319#[doc = "      \"allOf\": ["]
27320#[doc = "        {"]
27321#[doc = "          \"$ref\": \"#/components/schemas/StatusSyncInfo\""]
27322#[doc = "        }"]
27323#[doc = "      ]"]
27324#[doc = "    },"]
27325#[doc = "    \"uptime_sec\": {"]
27326#[doc = "      \"description\": \"Uptime of the node.\","]
27327#[doc = "      \"type\": \"integer\","]
27328#[doc = "      \"format\": \"int64\""]
27329#[doc = "    },"]
27330#[doc = "    \"validator_account_id\": {"]
27331#[doc = "      \"description\": \"Validator id of the node\","]
27332#[doc = "      \"anyOf\": ["]
27333#[doc = "        {"]
27334#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
27335#[doc = "        },"]
27336#[doc = "        {"]
27337#[doc = "          \"type\": \"null\""]
27338#[doc = "        }"]
27339#[doc = "      ]"]
27340#[doc = "    },"]
27341#[doc = "    \"validator_public_key\": {"]
27342#[doc = "      \"description\": \"Public key of the validator.\","]
27343#[doc = "      \"anyOf\": ["]
27344#[doc = "        {"]
27345#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
27346#[doc = "        },"]
27347#[doc = "        {"]
27348#[doc = "          \"type\": \"null\""]
27349#[doc = "        }"]
27350#[doc = "      ]"]
27351#[doc = "    },"]
27352#[doc = "    \"validators\": {"]
27353#[doc = "      \"description\": \"Current epoch validators.\","]
27354#[doc = "      \"type\": \"array\","]
27355#[doc = "      \"items\": {"]
27356#[doc = "        \"$ref\": \"#/components/schemas/ValidatorInfo\""]
27357#[doc = "      }"]
27358#[doc = "    },"]
27359#[doc = "    \"version\": {"]
27360#[doc = "      \"description\": \"Binary version.\","]
27361#[doc = "      \"allOf\": ["]
27362#[doc = "        {"]
27363#[doc = "          \"$ref\": \"#/components/schemas/Version\""]
27364#[doc = "        }"]
27365#[doc = "      ]"]
27366#[doc = "    }"]
27367#[doc = "  }"]
27368#[doc = "}"]
27369#[doc = r" ```"]
27370#[doc = r" </details>"]
27371#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27372pub struct RpcStatusResponse {
27373    #[doc = "Unique chain id."]
27374    pub chain_id: ::std::string::String,
27375    #[doc = "Information about last blocks, network, epoch and chain & chunk info."]
27376    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27377    pub detailed_debug_status: ::std::option::Option<DetailedDebugStatus>,
27378    #[doc = "Genesis hash of the chain."]
27379    pub genesis_hash: CryptoHash,
27380    #[doc = "Latest protocol version that this client supports."]
27381    pub latest_protocol_version: u32,
27382    #[doc = "Deprecated; same as `validator_public_key` which you should use instead."]
27383    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27384    pub node_key: ::std::option::Option<PublicKey>,
27385    #[doc = "Public key of the node."]
27386    pub node_public_key: PublicKey,
27387    #[doc = "Currently active protocol version."]
27388    pub protocol_version: u32,
27389    #[doc = "Address for RPC server.  None if node doesn't have RPC endpoint enabled."]
27390    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27391    pub rpc_addr: ::std::option::Option<::std::string::String>,
27392    #[doc = "Sync status of the node."]
27393    pub sync_info: StatusSyncInfo,
27394    #[doc = "Uptime of the node."]
27395    pub uptime_sec: i64,
27396    #[doc = "Validator id of the node"]
27397    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27398    pub validator_account_id: ::std::option::Option<AccountId>,
27399    #[doc = "Public key of the validator."]
27400    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27401    pub validator_public_key: ::std::option::Option<PublicKey>,
27402    #[doc = "Current epoch validators."]
27403    pub validators: ::std::vec::Vec<ValidatorInfo>,
27404    #[doc = "Binary version."]
27405    pub version: Version,
27406}
27407impl ::std::convert::From<&RpcStatusResponse> for RpcStatusResponse {
27408    fn from(value: &RpcStatusResponse) -> Self {
27409        value.clone()
27410    }
27411}
27412#[doc = "`RpcTransactionError`"]
27413#[doc = r""]
27414#[doc = r" <details><summary>JSON schema</summary>"]
27415#[doc = r""]
27416#[doc = r" ```json"]
27417#[doc = "{"]
27418#[doc = "  \"oneOf\": ["]
27419#[doc = "    {"]
27420#[doc = "      \"type\": \"object\","]
27421#[doc = "      \"required\": ["]
27422#[doc = "        \"info\","]
27423#[doc = "        \"name\""]
27424#[doc = "      ],"]
27425#[doc = "      \"properties\": {"]
27426#[doc = "        \"info\": {"]
27427#[doc = "          \"type\": \"object\""]
27428#[doc = "        },"]
27429#[doc = "        \"name\": {"]
27430#[doc = "          \"type\": \"string\","]
27431#[doc = "          \"enum\": ["]
27432#[doc = "            \"INVALID_TRANSACTION\""]
27433#[doc = "          ]"]
27434#[doc = "        }"]
27435#[doc = "      }"]
27436#[doc = "    },"]
27437#[doc = "    {"]
27438#[doc = "      \"type\": \"object\","]
27439#[doc = "      \"required\": ["]
27440#[doc = "        \"name\""]
27441#[doc = "      ],"]
27442#[doc = "      \"properties\": {"]
27443#[doc = "        \"name\": {"]
27444#[doc = "          \"type\": \"string\","]
27445#[doc = "          \"enum\": ["]
27446#[doc = "            \"DOES_NOT_TRACK_SHARD\""]
27447#[doc = "          ]"]
27448#[doc = "        }"]
27449#[doc = "      }"]
27450#[doc = "    },"]
27451#[doc = "    {"]
27452#[doc = "      \"type\": \"object\","]
27453#[doc = "      \"required\": ["]
27454#[doc = "        \"info\","]
27455#[doc = "        \"name\""]
27456#[doc = "      ],"]
27457#[doc = "      \"properties\": {"]
27458#[doc = "        \"info\": {"]
27459#[doc = "          \"type\": \"object\","]
27460#[doc = "          \"required\": ["]
27461#[doc = "            \"transaction_hash\""]
27462#[doc = "          ],"]
27463#[doc = "          \"properties\": {"]
27464#[doc = "            \"transaction_hash\": {"]
27465#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
27466#[doc = "            }"]
27467#[doc = "          }"]
27468#[doc = "        },"]
27469#[doc = "        \"name\": {"]
27470#[doc = "          \"type\": \"string\","]
27471#[doc = "          \"enum\": ["]
27472#[doc = "            \"REQUEST_ROUTED\""]
27473#[doc = "          ]"]
27474#[doc = "        }"]
27475#[doc = "      }"]
27476#[doc = "    },"]
27477#[doc = "    {"]
27478#[doc = "      \"type\": \"object\","]
27479#[doc = "      \"required\": ["]
27480#[doc = "        \"info\","]
27481#[doc = "        \"name\""]
27482#[doc = "      ],"]
27483#[doc = "      \"properties\": {"]
27484#[doc = "        \"info\": {"]
27485#[doc = "          \"type\": \"object\","]
27486#[doc = "          \"required\": ["]
27487#[doc = "            \"requested_transaction_hash\""]
27488#[doc = "          ],"]
27489#[doc = "          \"properties\": {"]
27490#[doc = "            \"requested_transaction_hash\": {"]
27491#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
27492#[doc = "            }"]
27493#[doc = "          }"]
27494#[doc = "        },"]
27495#[doc = "        \"name\": {"]
27496#[doc = "          \"type\": \"string\","]
27497#[doc = "          \"enum\": ["]
27498#[doc = "            \"UNKNOWN_TRANSACTION\""]
27499#[doc = "          ]"]
27500#[doc = "        }"]
27501#[doc = "      }"]
27502#[doc = "    },"]
27503#[doc = "    {"]
27504#[doc = "      \"type\": \"object\","]
27505#[doc = "      \"required\": ["]
27506#[doc = "        \"info\","]
27507#[doc = "        \"name\""]
27508#[doc = "      ],"]
27509#[doc = "      \"properties\": {"]
27510#[doc = "        \"info\": {"]
27511#[doc = "          \"type\": \"object\","]
27512#[doc = "          \"required\": ["]
27513#[doc = "            \"debug_info\""]
27514#[doc = "          ],"]
27515#[doc = "          \"properties\": {"]
27516#[doc = "            \"debug_info\": {"]
27517#[doc = "              \"type\": \"string\""]
27518#[doc = "            }"]
27519#[doc = "          }"]
27520#[doc = "        },"]
27521#[doc = "        \"name\": {"]
27522#[doc = "          \"type\": \"string\","]
27523#[doc = "          \"enum\": ["]
27524#[doc = "            \"INTERNAL_ERROR\""]
27525#[doc = "          ]"]
27526#[doc = "        }"]
27527#[doc = "      }"]
27528#[doc = "    },"]
27529#[doc = "    {"]
27530#[doc = "      \"type\": \"object\","]
27531#[doc = "      \"required\": ["]
27532#[doc = "        \"name\""]
27533#[doc = "      ],"]
27534#[doc = "      \"properties\": {"]
27535#[doc = "        \"name\": {"]
27536#[doc = "          \"type\": \"string\","]
27537#[doc = "          \"enum\": ["]
27538#[doc = "            \"TIMEOUT_ERROR\""]
27539#[doc = "          ]"]
27540#[doc = "        }"]
27541#[doc = "      }"]
27542#[doc = "    }"]
27543#[doc = "  ]"]
27544#[doc = "}"]
27545#[doc = r" ```"]
27546#[doc = r" </details>"]
27547#[derive(
27548    :: serde :: Deserialize,
27549    :: serde :: Serialize,
27550    Clone,
27551    Debug,
27552    thiserror::Error,
27553    strum_macros::Display,
27554)]
27555#[serde(tag = "name", content = "info")]
27556pub enum RpcTransactionError {
27557    #[serde(rename = "INVALID_TRANSACTION")]
27558    InvalidTransaction(::serde_json::Map<::std::string::String, ::serde_json::Value>),
27559    #[serde(rename = "DOES_NOT_TRACK_SHARD")]
27560    DoesNotTrackShard,
27561    #[serde(rename = "REQUEST_ROUTED")]
27562    RequestRouted { transaction_hash: CryptoHash },
27563    #[serde(rename = "UNKNOWN_TRANSACTION")]
27564    UnknownTransaction {
27565        requested_transaction_hash: CryptoHash,
27566    },
27567    #[serde(rename = "INTERNAL_ERROR")]
27568    InternalError { debug_info: ::std::string::String },
27569    #[serde(rename = "TIMEOUT_ERROR")]
27570    TimeoutError,
27571}
27572impl ::std::convert::From<&Self> for RpcTransactionError {
27573    fn from(value: &RpcTransactionError) -> Self {
27574        value.clone()
27575    }
27576}
27577impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
27578    for RpcTransactionError
27579{
27580    fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
27581        Self::InvalidTransaction(value)
27582    }
27583}
27584#[doc = "`RpcTransactionResponse`"]
27585#[doc = r""]
27586#[doc = r" <details><summary>JSON schema</summary>"]
27587#[doc = r""]
27588#[doc = r" ```json"]
27589#[doc = "{"]
27590#[doc = "  \"type\": \"object\","]
27591#[doc = "  \"anyOf\": ["]
27592#[doc = "    {"]
27593#[doc = "      \"$ref\": \"#/components/schemas/FinalExecutionOutcomeWithReceiptView\""]
27594#[doc = "    },"]
27595#[doc = "    {"]
27596#[doc = "      \"$ref\": \"#/components/schemas/FinalExecutionOutcomeView\""]
27597#[doc = "    }"]
27598#[doc = "  ],"]
27599#[doc = "  \"required\": ["]
27600#[doc = "    \"final_execution_status\""]
27601#[doc = "  ],"]
27602#[doc = "  \"properties\": {"]
27603#[doc = "    \"final_execution_status\": {"]
27604#[doc = "      \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
27605#[doc = "    }"]
27606#[doc = "  }"]
27607#[doc = "}"]
27608#[doc = r" ```"]
27609#[doc = r" </details>"]
27610#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27611#[serde(untagged)]
27612pub enum RpcTransactionResponse {
27613    Variant0 {
27614        final_execution_status: TxExecutionStatus,
27615        #[doc = "Receipts generated from the transaction"]
27616        receipts: ::std::vec::Vec<ReceiptView>,
27617        #[doc = "The execution outcome of receipts."]
27618        receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
27619        #[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"]
27620        status: FinalExecutionStatus,
27621        #[doc = "Signed Transaction"]
27622        transaction: SignedTransactionView,
27623        #[doc = "The execution outcome of the signed transaction."]
27624        transaction_outcome: ExecutionOutcomeWithIdView,
27625    },
27626    Variant1 {
27627        final_execution_status: TxExecutionStatus,
27628        #[doc = "The execution outcome of receipts."]
27629        receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
27630        #[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"]
27631        status: FinalExecutionStatus,
27632        #[doc = "Signed Transaction"]
27633        transaction: SignedTransactionView,
27634        #[doc = "The execution outcome of the signed transaction."]
27635        transaction_outcome: ExecutionOutcomeWithIdView,
27636    },
27637}
27638impl ::std::convert::From<&Self> for RpcTransactionResponse {
27639    fn from(value: &RpcTransactionResponse) -> Self {
27640        value.clone()
27641    }
27642}
27643#[doc = "`RpcTransactionStatusRequest`"]
27644#[doc = r""]
27645#[doc = r" <details><summary>JSON schema</summary>"]
27646#[doc = r""]
27647#[doc = r" ```json"]
27648#[doc = "{"]
27649#[doc = "  \"title\": \"RpcTransactionStatusRequest\","]
27650#[doc = "  \"type\": \"object\","]
27651#[doc = "  \"anyOf\": ["]
27652#[doc = "    {"]
27653#[doc = "      \"type\": \"object\","]
27654#[doc = "      \"required\": ["]
27655#[doc = "        \"signed_tx_base64\""]
27656#[doc = "      ],"]
27657#[doc = "      \"properties\": {"]
27658#[doc = "        \"signed_tx_base64\": {"]
27659#[doc = "          \"$ref\": \"#/components/schemas/SignedTransaction\""]
27660#[doc = "        }"]
27661#[doc = "      }"]
27662#[doc = "    },"]
27663#[doc = "    {"]
27664#[doc = "      \"type\": \"object\","]
27665#[doc = "      \"required\": ["]
27666#[doc = "        \"sender_account_id\","]
27667#[doc = "        \"tx_hash\""]
27668#[doc = "      ],"]
27669#[doc = "      \"properties\": {"]
27670#[doc = "        \"sender_account_id\": {"]
27671#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
27672#[doc = "        },"]
27673#[doc = "        \"tx_hash\": {"]
27674#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
27675#[doc = "        }"]
27676#[doc = "      }"]
27677#[doc = "    }"]
27678#[doc = "  ],"]
27679#[doc = "  \"properties\": {"]
27680#[doc = "    \"wait_until\": {"]
27681#[doc = "      \"default\": \"EXECUTED_OPTIMISTIC\","]
27682#[doc = "      \"allOf\": ["]
27683#[doc = "        {"]
27684#[doc = "          \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
27685#[doc = "        }"]
27686#[doc = "      ]"]
27687#[doc = "    }"]
27688#[doc = "  }"]
27689#[doc = "}"]
27690#[doc = r" ```"]
27691#[doc = r" </details>"]
27692#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27693#[serde(untagged)]
27694pub enum RpcTransactionStatusRequest {
27695    Variant0 {
27696        signed_tx_base64: SignedTransaction,
27697        #[serde(default = "defaults::rpc_transaction_status_request_variant0_wait_until")]
27698        wait_until: TxExecutionStatus,
27699    },
27700    Variant1 {
27701        sender_account_id: AccountId,
27702        tx_hash: CryptoHash,
27703        #[serde(default = "defaults::rpc_transaction_status_request_variant1_wait_until")]
27704        wait_until: TxExecutionStatus,
27705    },
27706}
27707impl ::std::convert::From<&Self> for RpcTransactionStatusRequest {
27708    fn from(value: &RpcTransactionStatusRequest) -> Self {
27709        value.clone()
27710    }
27711}
27712#[doc = "`RpcValidatorError`"]
27713#[doc = r""]
27714#[doc = r" <details><summary>JSON schema</summary>"]
27715#[doc = r""]
27716#[doc = r" ```json"]
27717#[doc = "{"]
27718#[doc = "  \"oneOf\": ["]
27719#[doc = "    {"]
27720#[doc = "      \"type\": \"object\","]
27721#[doc = "      \"required\": ["]
27722#[doc = "        \"name\""]
27723#[doc = "      ],"]
27724#[doc = "      \"properties\": {"]
27725#[doc = "        \"name\": {"]
27726#[doc = "          \"type\": \"string\","]
27727#[doc = "          \"enum\": ["]
27728#[doc = "            \"UNKNOWN_EPOCH\""]
27729#[doc = "          ]"]
27730#[doc = "        }"]
27731#[doc = "      }"]
27732#[doc = "    },"]
27733#[doc = "    {"]
27734#[doc = "      \"type\": \"object\","]
27735#[doc = "      \"required\": ["]
27736#[doc = "        \"name\""]
27737#[doc = "      ],"]
27738#[doc = "      \"properties\": {"]
27739#[doc = "        \"name\": {"]
27740#[doc = "          \"type\": \"string\","]
27741#[doc = "          \"enum\": ["]
27742#[doc = "            \"VALIDATOR_INFO_UNAVAILABLE\""]
27743#[doc = "          ]"]
27744#[doc = "        }"]
27745#[doc = "      }"]
27746#[doc = "    },"]
27747#[doc = "    {"]
27748#[doc = "      \"type\": \"object\","]
27749#[doc = "      \"required\": ["]
27750#[doc = "        \"info\","]
27751#[doc = "        \"name\""]
27752#[doc = "      ],"]
27753#[doc = "      \"properties\": {"]
27754#[doc = "        \"info\": {"]
27755#[doc = "          \"type\": \"object\","]
27756#[doc = "          \"required\": ["]
27757#[doc = "            \"error_message\""]
27758#[doc = "          ],"]
27759#[doc = "          \"properties\": {"]
27760#[doc = "            \"error_message\": {"]
27761#[doc = "              \"type\": \"string\""]
27762#[doc = "            }"]
27763#[doc = "          }"]
27764#[doc = "        },"]
27765#[doc = "        \"name\": {"]
27766#[doc = "          \"type\": \"string\","]
27767#[doc = "          \"enum\": ["]
27768#[doc = "            \"INTERNAL_ERROR\""]
27769#[doc = "          ]"]
27770#[doc = "        }"]
27771#[doc = "      }"]
27772#[doc = "    }"]
27773#[doc = "  ]"]
27774#[doc = "}"]
27775#[doc = r" ```"]
27776#[doc = r" </details>"]
27777#[derive(
27778    :: serde :: Deserialize,
27779    :: serde :: Serialize,
27780    Clone,
27781    Debug,
27782    thiserror::Error,
27783    strum_macros::Display,
27784)]
27785#[serde(tag = "name", content = "info")]
27786pub enum RpcValidatorError {
27787    #[serde(rename = "UNKNOWN_EPOCH")]
27788    UnknownEpoch,
27789    #[serde(rename = "VALIDATOR_INFO_UNAVAILABLE")]
27790    ValidatorInfoUnavailable,
27791    #[serde(rename = "INTERNAL_ERROR")]
27792    InternalError {
27793        error_message: ::std::string::String,
27794    },
27795}
27796impl ::std::convert::From<&Self> for RpcValidatorError {
27797    fn from(value: &RpcValidatorError) -> Self {
27798        value.clone()
27799    }
27800}
27801#[doc = "`RpcValidatorRequest`"]
27802#[doc = r""]
27803#[doc = r" <details><summary>JSON schema</summary>"]
27804#[doc = r""]
27805#[doc = r" ```json"]
27806#[doc = "{"]
27807#[doc = "  \"title\": \"RpcValidatorRequest\","]
27808#[doc = "  \"type\": \"object\","]
27809#[doc = "  \"oneOf\": ["]
27810#[doc = "    {"]
27811#[doc = "      \"type\": \"string\","]
27812#[doc = "      \"enum\": ["]
27813#[doc = "        \"latest\""]
27814#[doc = "      ]"]
27815#[doc = "    },"]
27816#[doc = "    {"]
27817#[doc = "      \"type\": \"object\","]
27818#[doc = "      \"required\": ["]
27819#[doc = "        \"epoch_id\""]
27820#[doc = "      ],"]
27821#[doc = "      \"properties\": {"]
27822#[doc = "        \"epoch_id\": {"]
27823#[doc = "          \"$ref\": \"#/components/schemas/EpochId\""]
27824#[doc = "        }"]
27825#[doc = "      }"]
27826#[doc = "    },"]
27827#[doc = "    {"]
27828#[doc = "      \"type\": \"object\","]
27829#[doc = "      \"required\": ["]
27830#[doc = "        \"block_id\""]
27831#[doc = "      ],"]
27832#[doc = "      \"properties\": {"]
27833#[doc = "        \"block_id\": {"]
27834#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
27835#[doc = "        }"]
27836#[doc = "      }"]
27837#[doc = "    }"]
27838#[doc = "  ]"]
27839#[doc = "}"]
27840#[doc = r" ```"]
27841#[doc = r" </details>"]
27842#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27843pub enum RpcValidatorRequest {
27844    #[serde(rename = "latest")]
27845    Latest,
27846    #[serde(rename = "epoch_id")]
27847    EpochId(EpochId),
27848    #[serde(rename = "block_id")]
27849    BlockId(BlockId),
27850}
27851impl ::std::convert::From<&Self> for RpcValidatorRequest {
27852    fn from(value: &RpcValidatorRequest) -> Self {
27853        value.clone()
27854    }
27855}
27856impl ::std::convert::From<EpochId> for RpcValidatorRequest {
27857    fn from(value: EpochId) -> Self {
27858        Self::EpochId(value)
27859    }
27860}
27861impl ::std::convert::From<BlockId> for RpcValidatorRequest {
27862    fn from(value: BlockId) -> Self {
27863        Self::BlockId(value)
27864    }
27865}
27866#[doc = "Information about this epoch validators and next epoch validators"]
27867#[doc = r""]
27868#[doc = r" <details><summary>JSON schema</summary>"]
27869#[doc = r""]
27870#[doc = r" ```json"]
27871#[doc = "{"]
27872#[doc = "  \"description\": \"Information about this epoch validators and next epoch validators\","]
27873#[doc = "  \"type\": \"object\","]
27874#[doc = "  \"required\": ["]
27875#[doc = "    \"current_fishermen\","]
27876#[doc = "    \"current_proposals\","]
27877#[doc = "    \"current_validators\","]
27878#[doc = "    \"epoch_height\","]
27879#[doc = "    \"epoch_start_height\","]
27880#[doc = "    \"next_fishermen\","]
27881#[doc = "    \"next_validators\","]
27882#[doc = "    \"prev_epoch_kickout\""]
27883#[doc = "  ],"]
27884#[doc = "  \"properties\": {"]
27885#[doc = "    \"current_fishermen\": {"]
27886#[doc = "      \"description\": \"Fishermen for the current epoch\","]
27887#[doc = "      \"type\": \"array\","]
27888#[doc = "      \"items\": {"]
27889#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
27890#[doc = "      }"]
27891#[doc = "    },"]
27892#[doc = "    \"current_proposals\": {"]
27893#[doc = "      \"description\": \"Proposals in the current epoch\","]
27894#[doc = "      \"type\": \"array\","]
27895#[doc = "      \"items\": {"]
27896#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
27897#[doc = "      }"]
27898#[doc = "    },"]
27899#[doc = "    \"current_validators\": {"]
27900#[doc = "      \"description\": \"Validators for the current epoch\","]
27901#[doc = "      \"type\": \"array\","]
27902#[doc = "      \"items\": {"]
27903#[doc = "        \"$ref\": \"#/components/schemas/CurrentEpochValidatorInfo\""]
27904#[doc = "      }"]
27905#[doc = "    },"]
27906#[doc = "    \"epoch_height\": {"]
27907#[doc = "      \"description\": \"Epoch height\","]
27908#[doc = "      \"type\": \"integer\","]
27909#[doc = "      \"format\": \"uint64\","]
27910#[doc = "      \"minimum\": 0.0"]
27911#[doc = "    },"]
27912#[doc = "    \"epoch_start_height\": {"]
27913#[doc = "      \"description\": \"Epoch start block height\","]
27914#[doc = "      \"type\": \"integer\","]
27915#[doc = "      \"format\": \"uint64\","]
27916#[doc = "      \"minimum\": 0.0"]
27917#[doc = "    },"]
27918#[doc = "    \"next_fishermen\": {"]
27919#[doc = "      \"description\": \"Fishermen for the next epoch\","]
27920#[doc = "      \"type\": \"array\","]
27921#[doc = "      \"items\": {"]
27922#[doc = "        \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
27923#[doc = "      }"]
27924#[doc = "    },"]
27925#[doc = "    \"next_validators\": {"]
27926#[doc = "      \"description\": \"Validators for the next epoch\","]
27927#[doc = "      \"type\": \"array\","]
27928#[doc = "      \"items\": {"]
27929#[doc = "        \"$ref\": \"#/components/schemas/NextEpochValidatorInfo\""]
27930#[doc = "      }"]
27931#[doc = "    },"]
27932#[doc = "    \"prev_epoch_kickout\": {"]
27933#[doc = "      \"description\": \"Kickout in the previous epoch\","]
27934#[doc = "      \"type\": \"array\","]
27935#[doc = "      \"items\": {"]
27936#[doc = "        \"$ref\": \"#/components/schemas/ValidatorKickoutView\""]
27937#[doc = "      }"]
27938#[doc = "    }"]
27939#[doc = "  }"]
27940#[doc = "}"]
27941#[doc = r" ```"]
27942#[doc = r" </details>"]
27943#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27944pub struct RpcValidatorResponse {
27945    #[doc = "Fishermen for the current epoch"]
27946    pub current_fishermen: ::std::vec::Vec<ValidatorStakeView>,
27947    #[doc = "Proposals in the current epoch"]
27948    pub current_proposals: ::std::vec::Vec<ValidatorStakeView>,
27949    #[doc = "Validators for the current epoch"]
27950    pub current_validators: ::std::vec::Vec<CurrentEpochValidatorInfo>,
27951    #[doc = "Epoch height"]
27952    pub epoch_height: u64,
27953    #[doc = "Epoch start block height"]
27954    pub epoch_start_height: u64,
27955    #[doc = "Fishermen for the next epoch"]
27956    pub next_fishermen: ::std::vec::Vec<ValidatorStakeView>,
27957    #[doc = "Validators for the next epoch"]
27958    pub next_validators: ::std::vec::Vec<NextEpochValidatorInfo>,
27959    #[doc = "Kickout in the previous epoch"]
27960    pub prev_epoch_kickout: ::std::vec::Vec<ValidatorKickoutView>,
27961}
27962impl ::std::convert::From<&RpcValidatorResponse> for RpcValidatorResponse {
27963    fn from(value: &RpcValidatorResponse) -> Self {
27964        value.clone()
27965    }
27966}
27967#[doc = "`RpcValidatorsOrderedRequest`"]
27968#[doc = r""]
27969#[doc = r" <details><summary>JSON schema</summary>"]
27970#[doc = r""]
27971#[doc = r" ```json"]
27972#[doc = "{"]
27973#[doc = "  \"title\": \"RpcValidatorsOrderedRequest\","]
27974#[doc = "  \"type\": \"object\","]
27975#[doc = "  \"properties\": {"]
27976#[doc = "    \"block_id\": {"]
27977#[doc = "      \"anyOf\": ["]
27978#[doc = "        {"]
27979#[doc = "          \"$ref\": \"#/components/schemas/BlockId\""]
27980#[doc = "        },"]
27981#[doc = "        {"]
27982#[doc = "          \"type\": \"null\""]
27983#[doc = "        }"]
27984#[doc = "      ]"]
27985#[doc = "    }"]
27986#[doc = "  }"]
27987#[doc = "}"]
27988#[doc = r" ```"]
27989#[doc = r" </details>"]
27990#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27991pub struct RpcValidatorsOrderedRequest {
27992    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27993    pub block_id: ::std::option::Option<BlockId>,
27994}
27995impl ::std::convert::From<&RpcValidatorsOrderedRequest> for RpcValidatorsOrderedRequest {
27996    fn from(value: &RpcValidatorsOrderedRequest) -> Self {
27997        value.clone()
27998    }
27999}
28000impl ::std::default::Default for RpcValidatorsOrderedRequest {
28001    fn default() -> Self {
28002        Self {
28003            block_id: Default::default(),
28004        }
28005    }
28006}
28007#[doc = "View that preserves JSON format of the runtime config."]
28008#[doc = r""]
28009#[doc = r" <details><summary>JSON schema</summary>"]
28010#[doc = r""]
28011#[doc = r" ```json"]
28012#[doc = "{"]
28013#[doc = "  \"description\": \"View that preserves JSON format of the runtime config.\","]
28014#[doc = "  \"type\": \"object\","]
28015#[doc = "  \"properties\": {"]
28016#[doc = "    \"account_creation_config\": {"]
28017#[doc = "      \"description\": \"Config that defines rules for account creation.\","]
28018#[doc = "      \"allOf\": ["]
28019#[doc = "        {"]
28020#[doc = "          \"$ref\": \"#/components/schemas/AccountCreationConfigView\""]
28021#[doc = "        }"]
28022#[doc = "      ]"]
28023#[doc = "    },"]
28024#[doc = "    \"congestion_control_config\": {"]
28025#[doc = "      \"description\": \"The configuration for congestion control.\","]
28026#[doc = "      \"allOf\": ["]
28027#[doc = "        {"]
28028#[doc = "          \"$ref\": \"#/components/schemas/CongestionControlConfigView\""]
28029#[doc = "        }"]
28030#[doc = "      ]"]
28031#[doc = "    },"]
28032#[doc = "    \"dynamic_resharding_config\": {"]
28033#[doc = "      \"description\": \"Configuration for dynamic resharding feature.\","]
28034#[doc = "      \"default\": {"]
28035#[doc = "        \"max_number_of_shards\": 999999999999999,"]
28036#[doc = "        \"memory_usage_threshold\": 999999999999999,"]
28037#[doc = "        \"min_child_memory_usage\": 999999999999999,"]
28038#[doc = "        \"min_epochs_between_resharding\": 999999999999999"]
28039#[doc = "      },"]
28040#[doc = "      \"allOf\": ["]
28041#[doc = "        {"]
28042#[doc = "          \"$ref\": \"#/components/schemas/DynamicReshardingConfigView\""]
28043#[doc = "        }"]
28044#[doc = "      ]"]
28045#[doc = "    },"]
28046#[doc = "    \"storage_amount_per_byte\": {"]
28047#[doc = "      \"description\": \"Amount of yN per byte required to have on the account.  See\\n<https://nomicon.io/Economics/Economics.html#state-stake> for details.\","]
28048#[doc = "      \"allOf\": ["]
28049#[doc = "        {"]
28050#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
28051#[doc = "        }"]
28052#[doc = "      ]"]
28053#[doc = "    },"]
28054#[doc = "    \"transaction_costs\": {"]
28055#[doc = "      \"description\": \"Costs of different actions that need to be performed when sending and\\nprocessing transaction and receipts.\","]
28056#[doc = "      \"allOf\": ["]
28057#[doc = "        {"]
28058#[doc = "          \"$ref\": \"#/components/schemas/RuntimeFeesConfigView\""]
28059#[doc = "        }"]
28060#[doc = "      ]"]
28061#[doc = "    },"]
28062#[doc = "    \"wasm_config\": {"]
28063#[doc = "      \"description\": \"Config of wasm operations.\","]
28064#[doc = "      \"allOf\": ["]
28065#[doc = "        {"]
28066#[doc = "          \"$ref\": \"#/components/schemas/VMConfigView\""]
28067#[doc = "        }"]
28068#[doc = "      ]"]
28069#[doc = "    },"]
28070#[doc = "    \"witness_config\": {"]
28071#[doc = "      \"description\": \"Configuration specific to ChunkStateWitness.\","]
28072#[doc = "      \"allOf\": ["]
28073#[doc = "        {"]
28074#[doc = "          \"$ref\": \"#/components/schemas/WitnessConfigView\""]
28075#[doc = "        }"]
28076#[doc = "      ]"]
28077#[doc = "    }"]
28078#[doc = "  }"]
28079#[doc = "}"]
28080#[doc = r" ```"]
28081#[doc = r" </details>"]
28082#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28083pub struct RuntimeConfigView {
28084    #[doc = "Config that defines rules for account creation."]
28085    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28086    pub account_creation_config: ::std::option::Option<AccountCreationConfigView>,
28087    #[doc = "The configuration for congestion control."]
28088    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28089    pub congestion_control_config: ::std::option::Option<CongestionControlConfigView>,
28090    #[doc = "Configuration for dynamic resharding feature."]
28091    #[serde(default = "defaults::runtime_config_view_dynamic_resharding_config")]
28092    pub dynamic_resharding_config: DynamicReshardingConfigView,
28093    #[doc = "Amount of yN per byte required to have on the account.  See\n<https://nomicon.io/Economics/Economics.html#state-stake> for details."]
28094    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28095    pub storage_amount_per_byte: ::std::option::Option<NearToken>,
28096    #[doc = "Costs of different actions that need to be performed when sending and\nprocessing transaction and receipts."]
28097    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28098    pub transaction_costs: ::std::option::Option<RuntimeFeesConfigView>,
28099    #[doc = "Config of wasm operations."]
28100    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28101    pub wasm_config: ::std::option::Option<VmConfigView>,
28102    #[doc = "Configuration specific to ChunkStateWitness."]
28103    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28104    pub witness_config: ::std::option::Option<WitnessConfigView>,
28105}
28106impl ::std::convert::From<&RuntimeConfigView> for RuntimeConfigView {
28107    fn from(value: &RuntimeConfigView) -> Self {
28108        value.clone()
28109    }
28110}
28111impl ::std::default::Default for RuntimeConfigView {
28112    fn default() -> Self {
28113        Self {
28114            account_creation_config: Default::default(),
28115            congestion_control_config: Default::default(),
28116            dynamic_resharding_config: defaults::runtime_config_view_dynamic_resharding_config(),
28117            storage_amount_per_byte: Default::default(),
28118            transaction_costs: Default::default(),
28119            wasm_config: Default::default(),
28120            witness_config: Default::default(),
28121        }
28122    }
28123}
28124#[doc = "Describes different fees for the runtime"]
28125#[doc = r""]
28126#[doc = r" <details><summary>JSON schema</summary>"]
28127#[doc = r""]
28128#[doc = r" ```json"]
28129#[doc = "{"]
28130#[doc = "  \"description\": \"Describes different fees for the runtime\","]
28131#[doc = "  \"type\": \"object\","]
28132#[doc = "  \"properties\": {"]
28133#[doc = "    \"action_creation_config\": {"]
28134#[doc = "      \"description\": \"Describes the cost of creating a certain action, `Action`. Includes all variants.\","]
28135#[doc = "      \"allOf\": ["]
28136#[doc = "        {"]
28137#[doc = "          \"$ref\": \"#/components/schemas/ActionCreationConfigView\""]
28138#[doc = "        }"]
28139#[doc = "      ]"]
28140#[doc = "    },"]
28141#[doc = "    \"action_receipt_creation_config\": {"]
28142#[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.\","]
28143#[doc = "      \"allOf\": ["]
28144#[doc = "        {"]
28145#[doc = "          \"$ref\": \"#/components/schemas/Fee\""]
28146#[doc = "        }"]
28147#[doc = "      ]"]
28148#[doc = "    },"]
28149#[doc = "    \"burnt_gas_reward\": {"]
28150#[doc = "      \"description\": \"Fraction of the burnt gas to reward to the contract account for execution.\","]
28151#[doc = "      \"type\": \"array\","]
28152#[doc = "      \"items\": {"]
28153#[doc = "        \"type\": \"integer\","]
28154#[doc = "        \"format\": \"int32\""]
28155#[doc = "      },"]
28156#[doc = "      \"maxItems\": 2,"]
28157#[doc = "      \"minItems\": 2"]
28158#[doc = "    },"]
28159#[doc = "    \"data_receipt_creation_config\": {"]
28160#[doc = "      \"description\": \"Describes the cost of creating a data receipt, `DataReceipt`.\","]
28161#[doc = "      \"allOf\": ["]
28162#[doc = "        {"]
28163#[doc = "          \"$ref\": \"#/components/schemas/DataReceiptCreationConfigView\""]
28164#[doc = "        }"]
28165#[doc = "      ]"]
28166#[doc = "    },"]
28167#[doc = "    \"pessimistic_gas_price_inflation_ratio\": {"]
28168#[doc = "      \"description\": \"Pessimistic gas price inflation ratio.\","]
28169#[doc = "      \"type\": \"array\","]
28170#[doc = "      \"items\": {"]
28171#[doc = "        \"type\": \"integer\","]
28172#[doc = "        \"format\": \"int32\""]
28173#[doc = "      },"]
28174#[doc = "      \"maxItems\": 2,"]
28175#[doc = "      \"minItems\": 2"]
28176#[doc = "    },"]
28177#[doc = "    \"storage_usage_config\": {"]
28178#[doc = "      \"description\": \"Describes fees for storage.\","]
28179#[doc = "      \"allOf\": ["]
28180#[doc = "        {"]
28181#[doc = "          \"$ref\": \"#/components/schemas/StorageUsageConfigView\""]
28182#[doc = "        }"]
28183#[doc = "      ]"]
28184#[doc = "    }"]
28185#[doc = "  }"]
28186#[doc = "}"]
28187#[doc = r" ```"]
28188#[doc = r" </details>"]
28189#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28190pub struct RuntimeFeesConfigView {
28191    #[doc = "Describes the cost of creating a certain action, `Action`. Includes all variants."]
28192    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28193    pub action_creation_config: ::std::option::Option<ActionCreationConfigView>,
28194    #[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."]
28195    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28196    pub action_receipt_creation_config: ::std::option::Option<Fee>,
28197    #[doc = "Fraction of the burnt gas to reward to the contract account for execution."]
28198    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28199    pub burnt_gas_reward: ::std::option::Option<[i32; 2usize]>,
28200    #[doc = "Describes the cost of creating a data receipt, `DataReceipt`."]
28201    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28202    pub data_receipt_creation_config: ::std::option::Option<DataReceiptCreationConfigView>,
28203    #[doc = "Pessimistic gas price inflation ratio."]
28204    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28205    pub pessimistic_gas_price_inflation_ratio: ::std::option::Option<[i32; 2usize]>,
28206    #[doc = "Describes fees for storage."]
28207    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28208    pub storage_usage_config: ::std::option::Option<StorageUsageConfigView>,
28209}
28210impl ::std::convert::From<&RuntimeFeesConfigView> for RuntimeFeesConfigView {
28211    fn from(value: &RuntimeFeesConfigView) -> Self {
28212        value.clone()
28213    }
28214}
28215impl ::std::default::Default for RuntimeFeesConfigView {
28216    fn default() -> Self {
28217        Self {
28218            action_creation_config: Default::default(),
28219            action_receipt_creation_config: Default::default(),
28220            burnt_gas_reward: Default::default(),
28221            data_receipt_creation_config: Default::default(),
28222            pessimistic_gas_price_inflation_ratio: Default::default(),
28223            storage_usage_config: Default::default(),
28224        }
28225    }
28226}
28227#[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."]
28228#[doc = r""]
28229#[doc = r" <details><summary>JSON schema</summary>"]
28230#[doc = r""]
28231#[doc = r" ```json"]
28232#[doc = "{"]
28233#[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.\","]
28234#[doc = "  \"type\": \"integer\","]
28235#[doc = "  \"format\": \"uint64\","]
28236#[doc = "  \"minimum\": 0.0"]
28237#[doc = "}"]
28238#[doc = r" ```"]
28239#[doc = r" </details>"]
28240#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28241#[serde(transparent)]
28242pub struct ShardId(pub u64);
28243impl ::std::ops::Deref for ShardId {
28244    type Target = u64;
28245    fn deref(&self) -> &u64 {
28246        &self.0
28247    }
28248}
28249impl ::std::convert::From<ShardId> for u64 {
28250    fn from(value: ShardId) -> Self {
28251        value.0
28252    }
28253}
28254impl ::std::convert::From<&ShardId> for ShardId {
28255    fn from(value: &ShardId) -> Self {
28256        value.clone()
28257    }
28258}
28259impl ::std::convert::From<u64> for ShardId {
28260    fn from(value: u64) -> Self {
28261        Self(value)
28262    }
28263}
28264impl ::std::str::FromStr for ShardId {
28265    type Err = <u64 as ::std::str::FromStr>::Err;
28266    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
28267        Ok(Self(value.parse()?))
28268    }
28269}
28270impl ::std::convert::TryFrom<&str> for ShardId {
28271    type Error = <u64 as ::std::str::FromStr>::Err;
28272    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
28273        value.parse()
28274    }
28275}
28276impl ::std::convert::TryFrom<&String> for ShardId {
28277    type Error = <u64 as ::std::str::FromStr>::Err;
28278    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
28279        value.parse()
28280    }
28281}
28282impl ::std::convert::TryFrom<String> for ShardId {
28283    type Error = <u64 as ::std::str::FromStr>::Err;
28284    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
28285        value.parse()
28286    }
28287}
28288impl ::std::fmt::Display for ShardId {
28289    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28290        self.0.fmt(f)
28291    }
28292}
28293#[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."]
28294#[doc = r""]
28295#[doc = r" <details><summary>JSON schema</summary>"]
28296#[doc = r""]
28297#[doc = r" ```json"]
28298#[doc = "{"]
28299#[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.\","]
28300#[doc = "  \"oneOf\": ["]
28301#[doc = "    {"]
28302#[doc = "      \"type\": \"object\","]
28303#[doc = "      \"required\": ["]
28304#[doc = "        \"V0\""]
28305#[doc = "      ],"]
28306#[doc = "      \"properties\": {"]
28307#[doc = "        \"V0\": {"]
28308#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV0\""]
28309#[doc = "        }"]
28310#[doc = "      },"]
28311#[doc = "      \"additionalProperties\": false"]
28312#[doc = "    },"]
28313#[doc = "    {"]
28314#[doc = "      \"type\": \"object\","]
28315#[doc = "      \"required\": ["]
28316#[doc = "        \"V1\""]
28317#[doc = "      ],"]
28318#[doc = "      \"properties\": {"]
28319#[doc = "        \"V1\": {"]
28320#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV1\""]
28321#[doc = "        }"]
28322#[doc = "      },"]
28323#[doc = "      \"additionalProperties\": false"]
28324#[doc = "    },"]
28325#[doc = "    {"]
28326#[doc = "      \"type\": \"object\","]
28327#[doc = "      \"required\": ["]
28328#[doc = "        \"V2\""]
28329#[doc = "      ],"]
28330#[doc = "      \"properties\": {"]
28331#[doc = "        \"V2\": {"]
28332#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV2\""]
28333#[doc = "        }"]
28334#[doc = "      },"]
28335#[doc = "      \"additionalProperties\": false"]
28336#[doc = "    },"]
28337#[doc = "    {"]
28338#[doc = "      \"type\": \"object\","]
28339#[doc = "      \"required\": ["]
28340#[doc = "        \"V3\""]
28341#[doc = "      ],"]
28342#[doc = "      \"properties\": {"]
28343#[doc = "        \"V3\": {"]
28344#[doc = "          \"$ref\": \"#/components/schemas/ShardLayoutV3\""]
28345#[doc = "        }"]
28346#[doc = "      },"]
28347#[doc = "      \"additionalProperties\": false"]
28348#[doc = "    }"]
28349#[doc = "  ]"]
28350#[doc = "}"]
28351#[doc = r" ```"]
28352#[doc = r" </details>"]
28353#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28354pub enum ShardLayout {
28355    V0(ShardLayoutV0),
28356    V1(ShardLayoutV1),
28357    V2(ShardLayoutV2),
28358    V3(ShardLayoutV3),
28359}
28360impl ::std::convert::From<&Self> for ShardLayout {
28361    fn from(value: &ShardLayout) -> Self {
28362        value.clone()
28363    }
28364}
28365impl ::std::convert::From<ShardLayoutV0> for ShardLayout {
28366    fn from(value: ShardLayoutV0) -> Self {
28367        Self::V0(value)
28368    }
28369}
28370impl ::std::convert::From<ShardLayoutV1> for ShardLayout {
28371    fn from(value: ShardLayoutV1) -> Self {
28372        Self::V1(value)
28373    }
28374}
28375impl ::std::convert::From<ShardLayoutV2> for ShardLayout {
28376    fn from(value: ShardLayoutV2) -> Self {
28377        Self::V2(value)
28378    }
28379}
28380impl ::std::convert::From<ShardLayoutV3> for ShardLayout {
28381    fn from(value: ShardLayoutV3) -> Self {
28382        Self::V3(value)
28383    }
28384}
28385#[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."]
28386#[doc = r""]
28387#[doc = r" <details><summary>JSON schema</summary>"]
28388#[doc = r""]
28389#[doc = r" ```json"]
28390#[doc = "{"]
28391#[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.\","]
28392#[doc = "  \"type\": \"object\","]
28393#[doc = "  \"required\": ["]
28394#[doc = "    \"num_shards\","]
28395#[doc = "    \"version\""]
28396#[doc = "  ],"]
28397#[doc = "  \"properties\": {"]
28398#[doc = "    \"num_shards\": {"]
28399#[doc = "      \"description\": \"Map accounts evenly across all shards\","]
28400#[doc = "      \"type\": \"integer\","]
28401#[doc = "      \"format\": \"uint64\","]
28402#[doc = "      \"minimum\": 0.0"]
28403#[doc = "    },"]
28404#[doc = "    \"version\": {"]
28405#[doc = "      \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
28406#[doc = "      \"type\": \"integer\","]
28407#[doc = "      \"format\": \"uint32\","]
28408#[doc = "      \"minimum\": 0.0"]
28409#[doc = "    }"]
28410#[doc = "  }"]
28411#[doc = "}"]
28412#[doc = r" ```"]
28413#[doc = r" </details>"]
28414#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28415pub struct ShardLayoutV0 {
28416    #[doc = "Map accounts evenly across all shards"]
28417    pub num_shards: u64,
28418    #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
28419    pub version: u32,
28420}
28421impl ::std::convert::From<&ShardLayoutV0> for ShardLayoutV0 {
28422    fn from(value: &ShardLayoutV0) -> Self {
28423        value.clone()
28424    }
28425}
28426#[doc = "`ShardLayoutV1`"]
28427#[doc = r""]
28428#[doc = r" <details><summary>JSON schema</summary>"]
28429#[doc = r""]
28430#[doc = r" ```json"]
28431#[doc = "{"]
28432#[doc = "  \"type\": \"object\","]
28433#[doc = "  \"required\": ["]
28434#[doc = "    \"boundary_accounts\","]
28435#[doc = "    \"version\""]
28436#[doc = "  ],"]
28437#[doc = "  \"properties\": {"]
28438#[doc = "    \"boundary_accounts\": {"]
28439#[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.\","]
28440#[doc = "      \"type\": \"array\","]
28441#[doc = "      \"items\": {"]
28442#[doc = "        \"$ref\": \"#/components/schemas/AccountId\""]
28443#[doc = "      }"]
28444#[doc = "    },"]
28445#[doc = "    \"shards_split_map\": {"]
28446#[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\","]
28447#[doc = "      \"type\": ["]
28448#[doc = "        \"array\","]
28449#[doc = "        \"null\""]
28450#[doc = "      ],"]
28451#[doc = "      \"items\": {"]
28452#[doc = "        \"type\": \"array\","]
28453#[doc = "        \"items\": {"]
28454#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
28455#[doc = "        }"]
28456#[doc = "      }"]
28457#[doc = "    },"]
28458#[doc = "    \"to_parent_shard_map\": {"]
28459#[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\","]
28460#[doc = "      \"type\": ["]
28461#[doc = "        \"array\","]
28462#[doc = "        \"null\""]
28463#[doc = "      ],"]
28464#[doc = "      \"items\": {"]
28465#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
28466#[doc = "      }"]
28467#[doc = "    },"]
28468#[doc = "    \"version\": {"]
28469#[doc = "      \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
28470#[doc = "      \"type\": \"integer\","]
28471#[doc = "      \"format\": \"uint32\","]
28472#[doc = "      \"minimum\": 0.0"]
28473#[doc = "    }"]
28474#[doc = "  }"]
28475#[doc = "}"]
28476#[doc = r" ```"]
28477#[doc = r" </details>"]
28478#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28479pub struct ShardLayoutV1 {
28480    #[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."]
28481    pub boundary_accounts: ::std::vec::Vec<AccountId>,
28482    #[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"]
28483    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28484    pub shards_split_map: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<ShardId>>>,
28485    #[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"]
28486    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28487    pub to_parent_shard_map: ::std::option::Option<::std::vec::Vec<ShardId>>,
28488    #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
28489    pub version: u32,
28490}
28491impl ::std::convert::From<&ShardLayoutV1> for ShardLayoutV1 {
28492    fn from(value: &ShardLayoutV1) -> Self {
28493        value.clone()
28494    }
28495}
28496#[doc = "Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\nserde serialization."]
28497#[doc = r""]
28498#[doc = r" <details><summary>JSON schema</summary>"]
28499#[doc = r""]
28500#[doc = r" ```json"]
28501#[doc = "{"]
28502#[doc = "  \"description\": \"Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\\nserde serialization.\","]
28503#[doc = "  \"type\": \"object\","]
28504#[doc = "  \"required\": ["]
28505#[doc = "    \"boundary_accounts\","]
28506#[doc = "    \"id_to_index_map\","]
28507#[doc = "    \"index_to_id_map\","]
28508#[doc = "    \"shard_ids\","]
28509#[doc = "    \"version\""]
28510#[doc = "  ],"]
28511#[doc = "  \"properties\": {"]
28512#[doc = "    \"boundary_accounts\": {"]
28513#[doc = "      \"type\": \"array\","]
28514#[doc = "      \"items\": {"]
28515#[doc = "        \"$ref\": \"#/components/schemas/AccountId\""]
28516#[doc = "      }"]
28517#[doc = "    },"]
28518#[doc = "    \"id_to_index_map\": {"]
28519#[doc = "      \"type\": \"object\","]
28520#[doc = "      \"additionalProperties\": {"]
28521#[doc = "        \"type\": \"integer\","]
28522#[doc = "        \"format\": \"uint\","]
28523#[doc = "        \"minimum\": 0.0"]
28524#[doc = "      }"]
28525#[doc = "    },"]
28526#[doc = "    \"index_to_id_map\": {"]
28527#[doc = "      \"type\": \"object\","]
28528#[doc = "      \"additionalProperties\": {"]
28529#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
28530#[doc = "      }"]
28531#[doc = "    },"]
28532#[doc = "    \"shard_ids\": {"]
28533#[doc = "      \"type\": \"array\","]
28534#[doc = "      \"items\": {"]
28535#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
28536#[doc = "      }"]
28537#[doc = "    },"]
28538#[doc = "    \"shards_parent_map\": {"]
28539#[doc = "      \"type\": ["]
28540#[doc = "        \"object\","]
28541#[doc = "        \"null\""]
28542#[doc = "      ],"]
28543#[doc = "      \"additionalProperties\": {"]
28544#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
28545#[doc = "      }"]
28546#[doc = "    },"]
28547#[doc = "    \"shards_split_map\": {"]
28548#[doc = "      \"type\": ["]
28549#[doc = "        \"object\","]
28550#[doc = "        \"null\""]
28551#[doc = "      ],"]
28552#[doc = "      \"additionalProperties\": {"]
28553#[doc = "        \"type\": \"array\","]
28554#[doc = "        \"items\": {"]
28555#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
28556#[doc = "        }"]
28557#[doc = "      }"]
28558#[doc = "    },"]
28559#[doc = "    \"version\": {"]
28560#[doc = "      \"type\": \"integer\","]
28561#[doc = "      \"format\": \"uint32\","]
28562#[doc = "      \"minimum\": 0.0"]
28563#[doc = "    }"]
28564#[doc = "  }"]
28565#[doc = "}"]
28566#[doc = r" ```"]
28567#[doc = r" </details>"]
28568#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28569pub struct ShardLayoutV2 {
28570    pub boundary_accounts: ::std::vec::Vec<AccountId>,
28571    pub id_to_index_map: ::std::collections::HashMap<::std::string::String, u32>,
28572    pub index_to_id_map: ::std::collections::HashMap<::std::string::String, ShardId>,
28573    pub shard_ids: ::std::vec::Vec<ShardId>,
28574    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28575    pub shards_parent_map:
28576        ::std::option::Option<::std::collections::HashMap<::std::string::String, ShardId>>,
28577    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28578    pub shards_split_map: ::std::option::Option<
28579        ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<ShardId>>,
28580    >,
28581    pub version: u32,
28582}
28583impl ::std::convert::From<&ShardLayoutV2> for ShardLayoutV2 {
28584    fn from(value: &ShardLayoutV2) -> Self {
28585        value.clone()
28586    }
28587}
28588#[doc = "Counterpart to `ShardLayoutV3` composed of maps with string keys to aid\nserde serialization."]
28589#[doc = r""]
28590#[doc = r" <details><summary>JSON schema</summary>"]
28591#[doc = r""]
28592#[doc = r" ```json"]
28593#[doc = "{"]
28594#[doc = "  \"description\": \"Counterpart to `ShardLayoutV3` composed of maps with string keys to aid\\nserde serialization.\","]
28595#[doc = "  \"type\": \"object\","]
28596#[doc = "  \"required\": ["]
28597#[doc = "    \"boundary_accounts\","]
28598#[doc = "    \"id_to_index_map\","]
28599#[doc = "    \"last_split\","]
28600#[doc = "    \"shard_ids\","]
28601#[doc = "    \"shards_split_map\""]
28602#[doc = "  ],"]
28603#[doc = "  \"properties\": {"]
28604#[doc = "    \"boundary_accounts\": {"]
28605#[doc = "      \"type\": \"array\","]
28606#[doc = "      \"items\": {"]
28607#[doc = "        \"$ref\": \"#/components/schemas/AccountId\""]
28608#[doc = "      }"]
28609#[doc = "    },"]
28610#[doc = "    \"id_to_index_map\": {"]
28611#[doc = "      \"type\": \"object\","]
28612#[doc = "      \"additionalProperties\": {"]
28613#[doc = "        \"type\": \"integer\","]
28614#[doc = "        \"format\": \"uint\","]
28615#[doc = "        \"minimum\": 0.0"]
28616#[doc = "      }"]
28617#[doc = "    },"]
28618#[doc = "    \"last_split\": {"]
28619#[doc = "      \"$ref\": \"#/components/schemas/ShardId\""]
28620#[doc = "    },"]
28621#[doc = "    \"shard_ids\": {"]
28622#[doc = "      \"type\": \"array\","]
28623#[doc = "      \"items\": {"]
28624#[doc = "        \"$ref\": \"#/components/schemas/ShardId\""]
28625#[doc = "      }"]
28626#[doc = "    },"]
28627#[doc = "    \"shards_split_map\": {"]
28628#[doc = "      \"type\": \"object\","]
28629#[doc = "      \"additionalProperties\": {"]
28630#[doc = "        \"type\": \"array\","]
28631#[doc = "        \"items\": {"]
28632#[doc = "          \"$ref\": \"#/components/schemas/ShardId\""]
28633#[doc = "        }"]
28634#[doc = "      }"]
28635#[doc = "    }"]
28636#[doc = "  }"]
28637#[doc = "}"]
28638#[doc = r" ```"]
28639#[doc = r" </details>"]
28640#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28641pub struct ShardLayoutV3 {
28642    pub boundary_accounts: ::std::vec::Vec<AccountId>,
28643    pub id_to_index_map: ::std::collections::HashMap<::std::string::String, u32>,
28644    pub last_split: ShardId,
28645    pub shard_ids: ::std::vec::Vec<ShardId>,
28646    pub shards_split_map:
28647        ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<ShardId>>,
28648}
28649impl ::std::convert::From<&ShardLayoutV3> for ShardLayoutV3 {
28650    fn from(value: &ShardLayoutV3) -> Self {
28651        value.clone()
28652    }
28653}
28654#[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`)"]
28655#[doc = r""]
28656#[doc = r" <details><summary>JSON schema</summary>"]
28657#[doc = r""]
28658#[doc = r" ```json"]
28659#[doc = "{"]
28660#[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`)\","]
28661#[doc = "  \"type\": \"object\","]
28662#[doc = "  \"required\": ["]
28663#[doc = "    \"shard_id\","]
28664#[doc = "    \"version\""]
28665#[doc = "  ],"]
28666#[doc = "  \"properties\": {"]
28667#[doc = "    \"shard_id\": {"]
28668#[doc = "      \"type\": \"integer\","]
28669#[doc = "      \"format\": \"uint32\","]
28670#[doc = "      \"minimum\": 0.0"]
28671#[doc = "    },"]
28672#[doc = "    \"version\": {"]
28673#[doc = "      \"type\": \"integer\","]
28674#[doc = "      \"format\": \"uint32\","]
28675#[doc = "      \"minimum\": 0.0"]
28676#[doc = "    }"]
28677#[doc = "  }"]
28678#[doc = "}"]
28679#[doc = r" ```"]
28680#[doc = r" </details>"]
28681#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28682pub struct ShardUId {
28683    pub shard_id: u32,
28684    pub version: u32,
28685}
28686impl ::std::convert::From<&ShardUId> for ShardUId {
28687    fn from(value: &ShardUId) -> Self {
28688        value.clone()
28689    }
28690}
28691#[doc = "`Signature`"]
28692#[doc = r""]
28693#[doc = r" <details><summary>JSON schema</summary>"]
28694#[doc = r""]
28695#[doc = r" ```json"]
28696#[doc = "{"]
28697#[doc = "  \"type\": \"string\""]
28698#[doc = "}"]
28699#[doc = r" ```"]
28700#[doc = r" </details>"]
28701#[derive(
28702    :: serde :: Deserialize,
28703    :: serde :: Serialize,
28704    Clone,
28705    Debug,
28706    Eq,
28707    Hash,
28708    Ord,
28709    PartialEq,
28710    PartialOrd,
28711)]
28712#[serde(transparent)]
28713pub struct Signature(pub ::std::string::String);
28714impl ::std::ops::Deref for Signature {
28715    type Target = ::std::string::String;
28716    fn deref(&self) -> &::std::string::String {
28717        &self.0
28718    }
28719}
28720impl ::std::convert::From<Signature> for ::std::string::String {
28721    fn from(value: Signature) -> Self {
28722        value.0
28723    }
28724}
28725impl ::std::convert::From<&Signature> for Signature {
28726    fn from(value: &Signature) -> Self {
28727        value.clone()
28728    }
28729}
28730impl ::std::convert::From<::std::string::String> for Signature {
28731    fn from(value: ::std::string::String) -> Self {
28732        Self(value)
28733    }
28734}
28735impl ::std::str::FromStr for Signature {
28736    type Err = ::std::convert::Infallible;
28737    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
28738        Ok(Self(value.to_string()))
28739    }
28740}
28741impl ::std::fmt::Display for Signature {
28742    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28743        self.0.fmt(f)
28744    }
28745}
28746#[doc = "`SignedDelegateAction`"]
28747#[doc = r""]
28748#[doc = r" <details><summary>JSON schema</summary>"]
28749#[doc = r""]
28750#[doc = r" ```json"]
28751#[doc = "{"]
28752#[doc = "  \"type\": \"object\","]
28753#[doc = "  \"required\": ["]
28754#[doc = "    \"delegate_action\","]
28755#[doc = "    \"signature\""]
28756#[doc = "  ],"]
28757#[doc = "  \"properties\": {"]
28758#[doc = "    \"delegate_action\": {"]
28759#[doc = "      \"$ref\": \"#/components/schemas/DelegateAction\""]
28760#[doc = "    },"]
28761#[doc = "    \"signature\": {"]
28762#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
28763#[doc = "    }"]
28764#[doc = "  }"]
28765#[doc = "}"]
28766#[doc = r" ```"]
28767#[doc = r" </details>"]
28768#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28769pub struct SignedDelegateAction {
28770    pub delegate_action: DelegateAction,
28771    pub signature: Signature,
28772}
28773impl ::std::convert::From<&SignedDelegateAction> for SignedDelegateAction {
28774    fn from(value: &SignedDelegateAction) -> Self {
28775        value.clone()
28776    }
28777}
28778#[doc = "`SignedTransaction`"]
28779#[doc = r""]
28780#[doc = r" <details><summary>JSON schema</summary>"]
28781#[doc = r""]
28782#[doc = r" ```json"]
28783#[doc = "{"]
28784#[doc = "  \"type\": \"string\","]
28785#[doc = "  \"format\": \"byte\""]
28786#[doc = "}"]
28787#[doc = r" ```"]
28788#[doc = r" </details>"]
28789#[derive(
28790    :: serde :: Deserialize,
28791    :: serde :: Serialize,
28792    Clone,
28793    Debug,
28794    Eq,
28795    Hash,
28796    Ord,
28797    PartialEq,
28798    PartialOrd,
28799)]
28800#[serde(transparent)]
28801pub struct SignedTransaction(pub ::std::string::String);
28802impl ::std::ops::Deref for SignedTransaction {
28803    type Target = ::std::string::String;
28804    fn deref(&self) -> &::std::string::String {
28805        &self.0
28806    }
28807}
28808impl ::std::convert::From<SignedTransaction> for ::std::string::String {
28809    fn from(value: SignedTransaction) -> Self {
28810        value.0
28811    }
28812}
28813impl ::std::convert::From<&SignedTransaction> for SignedTransaction {
28814    fn from(value: &SignedTransaction) -> Self {
28815        value.clone()
28816    }
28817}
28818impl ::std::convert::From<::std::string::String> for SignedTransaction {
28819    fn from(value: ::std::string::String) -> Self {
28820        Self(value)
28821    }
28822}
28823impl ::std::str::FromStr for SignedTransaction {
28824    type Err = ::std::convert::Infallible;
28825    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
28826        Ok(Self(value.to_string()))
28827    }
28828}
28829impl ::std::fmt::Display for SignedTransaction {
28830    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28831        self.0.fmt(f)
28832    }
28833}
28834#[doc = "`SignedTransactionView`"]
28835#[doc = r""]
28836#[doc = r" <details><summary>JSON schema</summary>"]
28837#[doc = r""]
28838#[doc = r" ```json"]
28839#[doc = "{"]
28840#[doc = "  \"type\": \"object\","]
28841#[doc = "  \"required\": ["]
28842#[doc = "    \"actions\","]
28843#[doc = "    \"hash\","]
28844#[doc = "    \"nonce\","]
28845#[doc = "    \"public_key\","]
28846#[doc = "    \"receiver_id\","]
28847#[doc = "    \"signature\","]
28848#[doc = "    \"signer_id\""]
28849#[doc = "  ],"]
28850#[doc = "  \"properties\": {"]
28851#[doc = "    \"actions\": {"]
28852#[doc = "      \"type\": \"array\","]
28853#[doc = "      \"items\": {"]
28854#[doc = "        \"$ref\": \"#/components/schemas/ActionView\""]
28855#[doc = "      }"]
28856#[doc = "    },"]
28857#[doc = "    \"hash\": {"]
28858#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
28859#[doc = "    },"]
28860#[doc = "    \"nonce\": {"]
28861#[doc = "      \"type\": \"integer\","]
28862#[doc = "      \"format\": \"uint64\","]
28863#[doc = "      \"minimum\": 0.0"]
28864#[doc = "    },"]
28865#[doc = "    \"priority_fee\": {"]
28866#[doc = "      \"default\": 0,"]
28867#[doc = "      \"type\": \"integer\","]
28868#[doc = "      \"format\": \"uint64\","]
28869#[doc = "      \"minimum\": 0.0"]
28870#[doc = "    },"]
28871#[doc = "    \"public_key\": {"]
28872#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
28873#[doc = "    },"]
28874#[doc = "    \"receiver_id\": {"]
28875#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
28876#[doc = "    },"]
28877#[doc = "    \"signature\": {"]
28878#[doc = "      \"$ref\": \"#/components/schemas/Signature\""]
28879#[doc = "    },"]
28880#[doc = "    \"signer_id\": {"]
28881#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
28882#[doc = "    }"]
28883#[doc = "  }"]
28884#[doc = "}"]
28885#[doc = r" ```"]
28886#[doc = r" </details>"]
28887#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28888pub struct SignedTransactionView {
28889    pub actions: ::std::vec::Vec<ActionView>,
28890    pub hash: CryptoHash,
28891    pub nonce: u64,
28892    #[serde(default)]
28893    pub priority_fee: u64,
28894    pub public_key: PublicKey,
28895    pub receiver_id: AccountId,
28896    pub signature: Signature,
28897    pub signer_id: AccountId,
28898}
28899impl ::std::convert::From<&SignedTransactionView> for SignedTransactionView {
28900    fn from(value: &SignedTransactionView) -> Self {
28901        value.clone()
28902    }
28903}
28904#[doc = "`SingleAccessKeyChangesByBlockIdChangesType`"]
28905#[doc = r""]
28906#[doc = r" <details><summary>JSON schema</summary>"]
28907#[doc = r""]
28908#[doc = r" ```json"]
28909#[doc = "{"]
28910#[doc = "  \"type\": \"string\","]
28911#[doc = "  \"enum\": ["]
28912#[doc = "    \"single_access_key_changes\""]
28913#[doc = "  ]"]
28914#[doc = "}"]
28915#[doc = r" ```"]
28916#[doc = r" </details>"]
28917#[derive(
28918    :: serde :: Deserialize,
28919    :: serde :: Serialize,
28920    Clone,
28921    Copy,
28922    Debug,
28923    Eq,
28924    Hash,
28925    Ord,
28926    PartialEq,
28927    PartialOrd,
28928)]
28929pub enum SingleAccessKeyChangesByBlockIdChangesType {
28930    #[serde(rename = "single_access_key_changes")]
28931    SingleAccessKeyChanges,
28932}
28933impl ::std::convert::From<&Self> for SingleAccessKeyChangesByBlockIdChangesType {
28934    fn from(value: &SingleAccessKeyChangesByBlockIdChangesType) -> Self {
28935        value.clone()
28936    }
28937}
28938impl ::std::fmt::Display for SingleAccessKeyChangesByBlockIdChangesType {
28939    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28940        match *self {
28941            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
28942        }
28943    }
28944}
28945impl ::std::str::FromStr for SingleAccessKeyChangesByBlockIdChangesType {
28946    type Err = self::error::ConversionError;
28947    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28948        match value {
28949            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
28950            _ => Err("invalid value".into()),
28951        }
28952    }
28953}
28954impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByBlockIdChangesType {
28955    type Error = self::error::ConversionError;
28956    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28957        value.parse()
28958    }
28959}
28960impl ::std::convert::TryFrom<&::std::string::String>
28961    for SingleAccessKeyChangesByBlockIdChangesType
28962{
28963    type Error = self::error::ConversionError;
28964    fn try_from(
28965        value: &::std::string::String,
28966    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28967        value.parse()
28968    }
28969}
28970impl ::std::convert::TryFrom<::std::string::String> for SingleAccessKeyChangesByBlockIdChangesType {
28971    type Error = self::error::ConversionError;
28972    fn try_from(
28973        value: ::std::string::String,
28974    ) -> ::std::result::Result<Self, self::error::ConversionError> {
28975        value.parse()
28976    }
28977}
28978#[doc = "`SingleAccessKeyChangesByFinalityChangesType`"]
28979#[doc = r""]
28980#[doc = r" <details><summary>JSON schema</summary>"]
28981#[doc = r""]
28982#[doc = r" ```json"]
28983#[doc = "{"]
28984#[doc = "  \"type\": \"string\","]
28985#[doc = "  \"enum\": ["]
28986#[doc = "    \"single_access_key_changes\""]
28987#[doc = "  ]"]
28988#[doc = "}"]
28989#[doc = r" ```"]
28990#[doc = r" </details>"]
28991#[derive(
28992    :: serde :: Deserialize,
28993    :: serde :: Serialize,
28994    Clone,
28995    Copy,
28996    Debug,
28997    Eq,
28998    Hash,
28999    Ord,
29000    PartialEq,
29001    PartialOrd,
29002)]
29003pub enum SingleAccessKeyChangesByFinalityChangesType {
29004    #[serde(rename = "single_access_key_changes")]
29005    SingleAccessKeyChanges,
29006}
29007impl ::std::convert::From<&Self> for SingleAccessKeyChangesByFinalityChangesType {
29008    fn from(value: &SingleAccessKeyChangesByFinalityChangesType) -> Self {
29009        value.clone()
29010    }
29011}
29012impl ::std::fmt::Display for SingleAccessKeyChangesByFinalityChangesType {
29013    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29014        match *self {
29015            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
29016        }
29017    }
29018}
29019impl ::std::str::FromStr for SingleAccessKeyChangesByFinalityChangesType {
29020    type Err = self::error::ConversionError;
29021    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29022        match value {
29023            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
29024            _ => Err("invalid value".into()),
29025        }
29026    }
29027}
29028impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByFinalityChangesType {
29029    type Error = self::error::ConversionError;
29030    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29031        value.parse()
29032    }
29033}
29034impl ::std::convert::TryFrom<&::std::string::String>
29035    for SingleAccessKeyChangesByFinalityChangesType
29036{
29037    type Error = self::error::ConversionError;
29038    fn try_from(
29039        value: &::std::string::String,
29040    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29041        value.parse()
29042    }
29043}
29044impl ::std::convert::TryFrom<::std::string::String>
29045    for SingleAccessKeyChangesByFinalityChangesType
29046{
29047    type Error = self::error::ConversionError;
29048    fn try_from(
29049        value: ::std::string::String,
29050    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29051        value.parse()
29052    }
29053}
29054#[doc = "`SingleAccessKeyChangesBySyncCheckpointChangesType`"]
29055#[doc = r""]
29056#[doc = r" <details><summary>JSON schema</summary>"]
29057#[doc = r""]
29058#[doc = r" ```json"]
29059#[doc = "{"]
29060#[doc = "  \"type\": \"string\","]
29061#[doc = "  \"enum\": ["]
29062#[doc = "    \"single_access_key_changes\""]
29063#[doc = "  ]"]
29064#[doc = "}"]
29065#[doc = r" ```"]
29066#[doc = r" </details>"]
29067#[derive(
29068    :: serde :: Deserialize,
29069    :: serde :: Serialize,
29070    Clone,
29071    Copy,
29072    Debug,
29073    Eq,
29074    Hash,
29075    Ord,
29076    PartialEq,
29077    PartialOrd,
29078)]
29079pub enum SingleAccessKeyChangesBySyncCheckpointChangesType {
29080    #[serde(rename = "single_access_key_changes")]
29081    SingleAccessKeyChanges,
29082}
29083impl ::std::convert::From<&Self> for SingleAccessKeyChangesBySyncCheckpointChangesType {
29084    fn from(value: &SingleAccessKeyChangesBySyncCheckpointChangesType) -> Self {
29085        value.clone()
29086    }
29087}
29088impl ::std::fmt::Display for SingleAccessKeyChangesBySyncCheckpointChangesType {
29089    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29090        match *self {
29091            Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
29092        }
29093    }
29094}
29095impl ::std::str::FromStr for SingleAccessKeyChangesBySyncCheckpointChangesType {
29096    type Err = self::error::ConversionError;
29097    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29098        match value {
29099            "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
29100            _ => Err("invalid value".into()),
29101        }
29102    }
29103}
29104impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesBySyncCheckpointChangesType {
29105    type Error = self::error::ConversionError;
29106    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29107        value.parse()
29108    }
29109}
29110impl ::std::convert::TryFrom<&::std::string::String>
29111    for SingleAccessKeyChangesBySyncCheckpointChangesType
29112{
29113    type Error = self::error::ConversionError;
29114    fn try_from(
29115        value: &::std::string::String,
29116    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29117        value.parse()
29118    }
29119}
29120impl ::std::convert::TryFrom<::std::string::String>
29121    for SingleAccessKeyChangesBySyncCheckpointChangesType
29122{
29123    type Error = self::error::ConversionError;
29124    fn try_from(
29125        value: ::std::string::String,
29126    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29127        value.parse()
29128    }
29129}
29130#[doc = "`SingleGasKeyChangesByBlockIdChangesType`"]
29131#[doc = r""]
29132#[doc = r" <details><summary>JSON schema</summary>"]
29133#[doc = r""]
29134#[doc = r" ```json"]
29135#[doc = "{"]
29136#[doc = "  \"type\": \"string\","]
29137#[doc = "  \"enum\": ["]
29138#[doc = "    \"single_gas_key_changes\""]
29139#[doc = "  ]"]
29140#[doc = "}"]
29141#[doc = r" ```"]
29142#[doc = r" </details>"]
29143#[derive(
29144    :: serde :: Deserialize,
29145    :: serde :: Serialize,
29146    Clone,
29147    Copy,
29148    Debug,
29149    Eq,
29150    Hash,
29151    Ord,
29152    PartialEq,
29153    PartialOrd,
29154)]
29155pub enum SingleGasKeyChangesByBlockIdChangesType {
29156    #[serde(rename = "single_gas_key_changes")]
29157    SingleGasKeyChanges,
29158}
29159impl ::std::convert::From<&Self> for SingleGasKeyChangesByBlockIdChangesType {
29160    fn from(value: &SingleGasKeyChangesByBlockIdChangesType) -> Self {
29161        value.clone()
29162    }
29163}
29164impl ::std::fmt::Display for SingleGasKeyChangesByBlockIdChangesType {
29165    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29166        match *self {
29167            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
29168        }
29169    }
29170}
29171impl ::std::str::FromStr for SingleGasKeyChangesByBlockIdChangesType {
29172    type Err = self::error::ConversionError;
29173    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29174        match value {
29175            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
29176            _ => Err("invalid value".into()),
29177        }
29178    }
29179}
29180impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByBlockIdChangesType {
29181    type Error = self::error::ConversionError;
29182    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29183        value.parse()
29184    }
29185}
29186impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
29187    type Error = self::error::ConversionError;
29188    fn try_from(
29189        value: &::std::string::String,
29190    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29191        value.parse()
29192    }
29193}
29194impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
29195    type Error = self::error::ConversionError;
29196    fn try_from(
29197        value: ::std::string::String,
29198    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29199        value.parse()
29200    }
29201}
29202#[doc = "`SingleGasKeyChangesByFinalityChangesType`"]
29203#[doc = r""]
29204#[doc = r" <details><summary>JSON schema</summary>"]
29205#[doc = r""]
29206#[doc = r" ```json"]
29207#[doc = "{"]
29208#[doc = "  \"type\": \"string\","]
29209#[doc = "  \"enum\": ["]
29210#[doc = "    \"single_gas_key_changes\""]
29211#[doc = "  ]"]
29212#[doc = "}"]
29213#[doc = r" ```"]
29214#[doc = r" </details>"]
29215#[derive(
29216    :: serde :: Deserialize,
29217    :: serde :: Serialize,
29218    Clone,
29219    Copy,
29220    Debug,
29221    Eq,
29222    Hash,
29223    Ord,
29224    PartialEq,
29225    PartialOrd,
29226)]
29227pub enum SingleGasKeyChangesByFinalityChangesType {
29228    #[serde(rename = "single_gas_key_changes")]
29229    SingleGasKeyChanges,
29230}
29231impl ::std::convert::From<&Self> for SingleGasKeyChangesByFinalityChangesType {
29232    fn from(value: &SingleGasKeyChangesByFinalityChangesType) -> Self {
29233        value.clone()
29234    }
29235}
29236impl ::std::fmt::Display for SingleGasKeyChangesByFinalityChangesType {
29237    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29238        match *self {
29239            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
29240        }
29241    }
29242}
29243impl ::std::str::FromStr for SingleGasKeyChangesByFinalityChangesType {
29244    type Err = self::error::ConversionError;
29245    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29246        match value {
29247            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
29248            _ => Err("invalid value".into()),
29249        }
29250    }
29251}
29252impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByFinalityChangesType {
29253    type Error = self::error::ConversionError;
29254    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29255        value.parse()
29256    }
29257}
29258impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
29259    type Error = self::error::ConversionError;
29260    fn try_from(
29261        value: &::std::string::String,
29262    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29263        value.parse()
29264    }
29265}
29266impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
29267    type Error = self::error::ConversionError;
29268    fn try_from(
29269        value: ::std::string::String,
29270    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29271        value.parse()
29272    }
29273}
29274#[doc = "`SingleGasKeyChangesBySyncCheckpointChangesType`"]
29275#[doc = r""]
29276#[doc = r" <details><summary>JSON schema</summary>"]
29277#[doc = r""]
29278#[doc = r" ```json"]
29279#[doc = "{"]
29280#[doc = "  \"type\": \"string\","]
29281#[doc = "  \"enum\": ["]
29282#[doc = "    \"single_gas_key_changes\""]
29283#[doc = "  ]"]
29284#[doc = "}"]
29285#[doc = r" ```"]
29286#[doc = r" </details>"]
29287#[derive(
29288    :: serde :: Deserialize,
29289    :: serde :: Serialize,
29290    Clone,
29291    Copy,
29292    Debug,
29293    Eq,
29294    Hash,
29295    Ord,
29296    PartialEq,
29297    PartialOrd,
29298)]
29299pub enum SingleGasKeyChangesBySyncCheckpointChangesType {
29300    #[serde(rename = "single_gas_key_changes")]
29301    SingleGasKeyChanges,
29302}
29303impl ::std::convert::From<&Self> for SingleGasKeyChangesBySyncCheckpointChangesType {
29304    fn from(value: &SingleGasKeyChangesBySyncCheckpointChangesType) -> Self {
29305        value.clone()
29306    }
29307}
29308impl ::std::fmt::Display for SingleGasKeyChangesBySyncCheckpointChangesType {
29309    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29310        match *self {
29311            Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
29312        }
29313    }
29314}
29315impl ::std::str::FromStr for SingleGasKeyChangesBySyncCheckpointChangesType {
29316    type Err = self::error::ConversionError;
29317    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29318        match value {
29319            "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
29320            _ => Err("invalid value".into()),
29321        }
29322    }
29323}
29324impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesBySyncCheckpointChangesType {
29325    type Error = self::error::ConversionError;
29326    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29327        value.parse()
29328    }
29329}
29330impl ::std::convert::TryFrom<&::std::string::String>
29331    for SingleGasKeyChangesBySyncCheckpointChangesType
29332{
29333    type Error = self::error::ConversionError;
29334    fn try_from(
29335        value: &::std::string::String,
29336    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29337        value.parse()
29338    }
29339}
29340impl ::std::convert::TryFrom<::std::string::String>
29341    for SingleGasKeyChangesBySyncCheckpointChangesType
29342{
29343    type Error = self::error::ConversionError;
29344    fn try_from(
29345        value: ::std::string::String,
29346    ) -> ::std::result::Result<Self, self::error::ConversionError> {
29347        value.parse()
29348    }
29349}
29350#[doc = "`SlashedValidator`"]
29351#[doc = r""]
29352#[doc = r" <details><summary>JSON schema</summary>"]
29353#[doc = r""]
29354#[doc = r" ```json"]
29355#[doc = "{"]
29356#[doc = "  \"type\": \"object\","]
29357#[doc = "  \"required\": ["]
29358#[doc = "    \"account_id\","]
29359#[doc = "    \"is_double_sign\""]
29360#[doc = "  ],"]
29361#[doc = "  \"properties\": {"]
29362#[doc = "    \"account_id\": {"]
29363#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
29364#[doc = "    },"]
29365#[doc = "    \"is_double_sign\": {"]
29366#[doc = "      \"type\": \"boolean\""]
29367#[doc = "    }"]
29368#[doc = "  }"]
29369#[doc = "}"]
29370#[doc = r" ```"]
29371#[doc = r" </details>"]
29372#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29373pub struct SlashedValidator {
29374    pub account_id: AccountId,
29375    pub is_double_sign: bool,
29376}
29377impl ::std::convert::From<&SlashedValidator> for SlashedValidator {
29378    fn from(value: &SlashedValidator) -> Self {
29379        value.clone()
29380    }
29381}
29382#[doc = "An action which stakes signer_id tokens and setup's validator public key"]
29383#[doc = r""]
29384#[doc = r" <details><summary>JSON schema</summary>"]
29385#[doc = r""]
29386#[doc = r" ```json"]
29387#[doc = "{"]
29388#[doc = "  \"description\": \"An action which stakes signer_id tokens and setup's validator public key\","]
29389#[doc = "  \"type\": \"object\","]
29390#[doc = "  \"required\": ["]
29391#[doc = "    \"public_key\","]
29392#[doc = "    \"stake\""]
29393#[doc = "  ],"]
29394#[doc = "  \"properties\": {"]
29395#[doc = "    \"public_key\": {"]
29396#[doc = "      \"description\": \"Validator key which will be used to sign transactions on behalf of signer_id\","]
29397#[doc = "      \"allOf\": ["]
29398#[doc = "        {"]
29399#[doc = "          \"$ref\": \"#/components/schemas/PublicKey\""]
29400#[doc = "        }"]
29401#[doc = "      ]"]
29402#[doc = "    },"]
29403#[doc = "    \"stake\": {"]
29404#[doc = "      \"description\": \"Amount of tokens to stake.\","]
29405#[doc = "      \"allOf\": ["]
29406#[doc = "        {"]
29407#[doc = "          \"$ref\": \"#/components/schemas/NearToken\""]
29408#[doc = "        }"]
29409#[doc = "      ]"]
29410#[doc = "    }"]
29411#[doc = "  }"]
29412#[doc = "}"]
29413#[doc = r" ```"]
29414#[doc = r" </details>"]
29415#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29416pub struct StakeAction {
29417    #[doc = "Validator key which will be used to sign transactions on behalf of signer_id"]
29418    pub public_key: PublicKey,
29419    #[doc = "Amount of tokens to stake."]
29420    pub stake: NearToken,
29421}
29422impl ::std::convert::From<&StakeAction> for StakeAction {
29423    fn from(value: &StakeAction) -> Self {
29424        value.clone()
29425    }
29426}
29427#[doc = "See crate::types::StateChangeCause for details."]
29428#[doc = r""]
29429#[doc = r" <details><summary>JSON schema</summary>"]
29430#[doc = r""]
29431#[doc = r" ```json"]
29432#[doc = "{"]
29433#[doc = "  \"description\": \"See crate::types::StateChangeCause for details.\","]
29434#[doc = "  \"oneOf\": ["]
29435#[doc = "    {"]
29436#[doc = "      \"type\": \"object\","]
29437#[doc = "      \"required\": ["]
29438#[doc = "        \"type\""]
29439#[doc = "      ],"]
29440#[doc = "      \"properties\": {"]
29441#[doc = "        \"type\": {"]
29442#[doc = "          \"type\": \"string\","]
29443#[doc = "          \"enum\": ["]
29444#[doc = "            \"not_writable_to_disk\""]
29445#[doc = "          ]"]
29446#[doc = "        }"]
29447#[doc = "      }"]
29448#[doc = "    },"]
29449#[doc = "    {"]
29450#[doc = "      \"type\": \"object\","]
29451#[doc = "      \"required\": ["]
29452#[doc = "        \"type\""]
29453#[doc = "      ],"]
29454#[doc = "      \"properties\": {"]
29455#[doc = "        \"type\": {"]
29456#[doc = "          \"type\": \"string\","]
29457#[doc = "          \"enum\": ["]
29458#[doc = "            \"initial_state\""]
29459#[doc = "          ]"]
29460#[doc = "        }"]
29461#[doc = "      }"]
29462#[doc = "    },"]
29463#[doc = "    {"]
29464#[doc = "      \"type\": \"object\","]
29465#[doc = "      \"required\": ["]
29466#[doc = "        \"tx_hash\","]
29467#[doc = "        \"type\""]
29468#[doc = "      ],"]
29469#[doc = "      \"properties\": {"]
29470#[doc = "        \"tx_hash\": {"]
29471#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
29472#[doc = "        },"]
29473#[doc = "        \"type\": {"]
29474#[doc = "          \"type\": \"string\","]
29475#[doc = "          \"enum\": ["]
29476#[doc = "            \"transaction_processing\""]
29477#[doc = "          ]"]
29478#[doc = "        }"]
29479#[doc = "      }"]
29480#[doc = "    },"]
29481#[doc = "    {"]
29482#[doc = "      \"type\": \"object\","]
29483#[doc = "      \"required\": ["]
29484#[doc = "        \"receipt_hash\","]
29485#[doc = "        \"type\""]
29486#[doc = "      ],"]
29487#[doc = "      \"properties\": {"]
29488#[doc = "        \"receipt_hash\": {"]
29489#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
29490#[doc = "        },"]
29491#[doc = "        \"type\": {"]
29492#[doc = "          \"type\": \"string\","]
29493#[doc = "          \"enum\": ["]
29494#[doc = "            \"action_receipt_processing_started\""]
29495#[doc = "          ]"]
29496#[doc = "        }"]
29497#[doc = "      }"]
29498#[doc = "    },"]
29499#[doc = "    {"]
29500#[doc = "      \"type\": \"object\","]
29501#[doc = "      \"required\": ["]
29502#[doc = "        \"receipt_hash\","]
29503#[doc = "        \"type\""]
29504#[doc = "      ],"]
29505#[doc = "      \"properties\": {"]
29506#[doc = "        \"receipt_hash\": {"]
29507#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
29508#[doc = "        },"]
29509#[doc = "        \"type\": {"]
29510#[doc = "          \"type\": \"string\","]
29511#[doc = "          \"enum\": ["]
29512#[doc = "            \"action_receipt_gas_reward\""]
29513#[doc = "          ]"]
29514#[doc = "        }"]
29515#[doc = "      }"]
29516#[doc = "    },"]
29517#[doc = "    {"]
29518#[doc = "      \"type\": \"object\","]
29519#[doc = "      \"required\": ["]
29520#[doc = "        \"receipt_hash\","]
29521#[doc = "        \"type\""]
29522#[doc = "      ],"]
29523#[doc = "      \"properties\": {"]
29524#[doc = "        \"receipt_hash\": {"]
29525#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
29526#[doc = "        },"]
29527#[doc = "        \"type\": {"]
29528#[doc = "          \"type\": \"string\","]
29529#[doc = "          \"enum\": ["]
29530#[doc = "            \"receipt_processing\""]
29531#[doc = "          ]"]
29532#[doc = "        }"]
29533#[doc = "      }"]
29534#[doc = "    },"]
29535#[doc = "    {"]
29536#[doc = "      \"type\": \"object\","]
29537#[doc = "      \"required\": ["]
29538#[doc = "        \"receipt_hash\","]
29539#[doc = "        \"type\""]
29540#[doc = "      ],"]
29541#[doc = "      \"properties\": {"]
29542#[doc = "        \"receipt_hash\": {"]
29543#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
29544#[doc = "        },"]
29545#[doc = "        \"type\": {"]
29546#[doc = "          \"type\": \"string\","]
29547#[doc = "          \"enum\": ["]
29548#[doc = "            \"postponed_receipt\""]
29549#[doc = "          ]"]
29550#[doc = "        }"]
29551#[doc = "      }"]
29552#[doc = "    },"]
29553#[doc = "    {"]
29554#[doc = "      \"type\": \"object\","]
29555#[doc = "      \"required\": ["]
29556#[doc = "        \"type\""]
29557#[doc = "      ],"]
29558#[doc = "      \"properties\": {"]
29559#[doc = "        \"type\": {"]
29560#[doc = "          \"type\": \"string\","]
29561#[doc = "          \"enum\": ["]
29562#[doc = "            \"updated_delayed_receipts\""]
29563#[doc = "          ]"]
29564#[doc = "        }"]
29565#[doc = "      }"]
29566#[doc = "    },"]
29567#[doc = "    {"]
29568#[doc = "      \"type\": \"object\","]
29569#[doc = "      \"required\": ["]
29570#[doc = "        \"type\""]
29571#[doc = "      ],"]
29572#[doc = "      \"properties\": {"]
29573#[doc = "        \"type\": {"]
29574#[doc = "          \"type\": \"string\","]
29575#[doc = "          \"enum\": ["]
29576#[doc = "            \"validator_accounts_update\""]
29577#[doc = "          ]"]
29578#[doc = "        }"]
29579#[doc = "      }"]
29580#[doc = "    },"]
29581#[doc = "    {"]
29582#[doc = "      \"type\": \"object\","]
29583#[doc = "      \"required\": ["]
29584#[doc = "        \"type\""]
29585#[doc = "      ],"]
29586#[doc = "      \"properties\": {"]
29587#[doc = "        \"type\": {"]
29588#[doc = "          \"type\": \"string\","]
29589#[doc = "          \"enum\": ["]
29590#[doc = "            \"migration\""]
29591#[doc = "          ]"]
29592#[doc = "        }"]
29593#[doc = "      }"]
29594#[doc = "    },"]
29595#[doc = "    {"]
29596#[doc = "      \"type\": \"object\","]
29597#[doc = "      \"required\": ["]
29598#[doc = "        \"type\""]
29599#[doc = "      ],"]
29600#[doc = "      \"properties\": {"]
29601#[doc = "        \"type\": {"]
29602#[doc = "          \"type\": \"string\","]
29603#[doc = "          \"enum\": ["]
29604#[doc = "            \"bandwidth_scheduler_state_update\""]
29605#[doc = "          ]"]
29606#[doc = "        }"]
29607#[doc = "      }"]
29608#[doc = "    }"]
29609#[doc = "  ]"]
29610#[doc = "}"]
29611#[doc = r" ```"]
29612#[doc = r" </details>"]
29613#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29614#[serde(tag = "type")]
29615pub enum StateChangeCauseView {
29616    #[serde(rename = "not_writable_to_disk")]
29617    NotWritableToDisk,
29618    #[serde(rename = "initial_state")]
29619    InitialState,
29620    #[serde(rename = "transaction_processing")]
29621    TransactionProcessing { tx_hash: CryptoHash },
29622    #[serde(rename = "action_receipt_processing_started")]
29623    ActionReceiptProcessingStarted { receipt_hash: CryptoHash },
29624    #[serde(rename = "action_receipt_gas_reward")]
29625    ActionReceiptGasReward { receipt_hash: CryptoHash },
29626    #[serde(rename = "receipt_processing")]
29627    ReceiptProcessing { receipt_hash: CryptoHash },
29628    #[serde(rename = "postponed_receipt")]
29629    PostponedReceipt { receipt_hash: CryptoHash },
29630    #[serde(rename = "updated_delayed_receipts")]
29631    UpdatedDelayedReceipts,
29632    #[serde(rename = "validator_accounts_update")]
29633    ValidatorAccountsUpdate,
29634    #[serde(rename = "migration")]
29635    Migration,
29636    #[serde(rename = "bandwidth_scheduler_state_update")]
29637    BandwidthSchedulerStateUpdate,
29638}
29639impl ::std::convert::From<&Self> for StateChangeCauseView {
29640    fn from(value: &StateChangeCauseView) -> Self {
29641        value.clone()
29642    }
29643}
29644#[doc = "It is a [serializable view] of [`StateChangeKind`].\n\n[serializable view]: ./index.html\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html"]
29645#[doc = r""]
29646#[doc = r" <details><summary>JSON schema</summary>"]
29647#[doc = r""]
29648#[doc = r" ```json"]
29649#[doc = "{"]
29650#[doc = "  \"description\": \"It is a [serializable view] of [`StateChangeKind`].\\n\\n[serializable view]: ./index.html\\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html\","]
29651#[doc = "  \"oneOf\": ["]
29652#[doc = "    {"]
29653#[doc = "      \"type\": \"object\","]
29654#[doc = "      \"required\": ["]
29655#[doc = "        \"account_id\","]
29656#[doc = "        \"type\""]
29657#[doc = "      ],"]
29658#[doc = "      \"properties\": {"]
29659#[doc = "        \"account_id\": {"]
29660#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
29661#[doc = "        },"]
29662#[doc = "        \"type\": {"]
29663#[doc = "          \"type\": \"string\","]
29664#[doc = "          \"enum\": ["]
29665#[doc = "            \"account_touched\""]
29666#[doc = "          ]"]
29667#[doc = "        }"]
29668#[doc = "      }"]
29669#[doc = "    },"]
29670#[doc = "    {"]
29671#[doc = "      \"type\": \"object\","]
29672#[doc = "      \"required\": ["]
29673#[doc = "        \"account_id\","]
29674#[doc = "        \"type\""]
29675#[doc = "      ],"]
29676#[doc = "      \"properties\": {"]
29677#[doc = "        \"account_id\": {"]
29678#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
29679#[doc = "        },"]
29680#[doc = "        \"type\": {"]
29681#[doc = "          \"type\": \"string\","]
29682#[doc = "          \"enum\": ["]
29683#[doc = "            \"access_key_touched\""]
29684#[doc = "          ]"]
29685#[doc = "        }"]
29686#[doc = "      }"]
29687#[doc = "    },"]
29688#[doc = "    {"]
29689#[doc = "      \"type\": \"object\","]
29690#[doc = "      \"required\": ["]
29691#[doc = "        \"account_id\","]
29692#[doc = "        \"type\""]
29693#[doc = "      ],"]
29694#[doc = "      \"properties\": {"]
29695#[doc = "        \"account_id\": {"]
29696#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
29697#[doc = "        },"]
29698#[doc = "        \"type\": {"]
29699#[doc = "          \"type\": \"string\","]
29700#[doc = "          \"enum\": ["]
29701#[doc = "            \"data_touched\""]
29702#[doc = "          ]"]
29703#[doc = "        }"]
29704#[doc = "      }"]
29705#[doc = "    },"]
29706#[doc = "    {"]
29707#[doc = "      \"type\": \"object\","]
29708#[doc = "      \"required\": ["]
29709#[doc = "        \"account_id\","]
29710#[doc = "        \"type\""]
29711#[doc = "      ],"]
29712#[doc = "      \"properties\": {"]
29713#[doc = "        \"account_id\": {"]
29714#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
29715#[doc = "        },"]
29716#[doc = "        \"type\": {"]
29717#[doc = "          \"type\": \"string\","]
29718#[doc = "          \"enum\": ["]
29719#[doc = "            \"contract_code_touched\""]
29720#[doc = "          ]"]
29721#[doc = "        }"]
29722#[doc = "      }"]
29723#[doc = "    }"]
29724#[doc = "  ]"]
29725#[doc = "}"]
29726#[doc = r" ```"]
29727#[doc = r" </details>"]
29728#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29729#[serde(tag = "type", content = "account_id")]
29730pub enum StateChangeKindView {
29731    #[serde(rename = "account_touched")]
29732    AccountTouched(AccountId),
29733    #[serde(rename = "access_key_touched")]
29734    AccessKeyTouched(AccountId),
29735    #[serde(rename = "data_touched")]
29736    DataTouched(AccountId),
29737    #[serde(rename = "contract_code_touched")]
29738    ContractCodeTouched(AccountId),
29739}
29740impl ::std::convert::From<&Self> for StateChangeKindView {
29741    fn from(value: &StateChangeKindView) -> Self {
29742        value.clone()
29743    }
29744}
29745#[doc = "`StateChangeWithCauseView`"]
29746#[doc = r""]
29747#[doc = r" <details><summary>JSON schema</summary>"]
29748#[doc = r""]
29749#[doc = r" ```json"]
29750#[doc = "{"]
29751#[doc = "  \"type\": \"object\","]
29752#[doc = "  \"oneOf\": ["]
29753#[doc = "    {"]
29754#[doc = "      \"type\": \"object\","]
29755#[doc = "      \"required\": ["]
29756#[doc = "        \"change\","]
29757#[doc = "        \"type\""]
29758#[doc = "      ],"]
29759#[doc = "      \"properties\": {"]
29760#[doc = "        \"change\": {"]
29761#[doc = "          \"description\": \"A view of the account\","]
29762#[doc = "          \"type\": \"object\","]
29763#[doc = "          \"required\": ["]
29764#[doc = "            \"account_id\","]
29765#[doc = "            \"amount\","]
29766#[doc = "            \"code_hash\","]
29767#[doc = "            \"locked\","]
29768#[doc = "            \"storage_usage\""]
29769#[doc = "          ],"]
29770#[doc = "          \"properties\": {"]
29771#[doc = "            \"account_id\": {"]
29772#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
29773#[doc = "            },"]
29774#[doc = "            \"amount\": {"]
29775#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
29776#[doc = "            },"]
29777#[doc = "            \"code_hash\": {"]
29778#[doc = "              \"$ref\": \"#/components/schemas/CryptoHash\""]
29779#[doc = "            },"]
29780#[doc = "            \"global_contract_account_id\": {"]
29781#[doc = "              \"anyOf\": ["]
29782#[doc = "                {"]
29783#[doc = "                  \"$ref\": \"#/components/schemas/AccountId\""]
29784#[doc = "                },"]
29785#[doc = "                {"]
29786#[doc = "                  \"type\": \"null\""]
29787#[doc = "                }"]
29788#[doc = "              ]"]
29789#[doc = "            },"]
29790#[doc = "            \"global_contract_hash\": {"]
29791#[doc = "              \"anyOf\": ["]
29792#[doc = "                {"]
29793#[doc = "                  \"$ref\": \"#/components/schemas/CryptoHash\""]
29794#[doc = "                },"]
29795#[doc = "                {"]
29796#[doc = "                  \"type\": \"null\""]
29797#[doc = "                }"]
29798#[doc = "              ]"]
29799#[doc = "            },"]
29800#[doc = "            \"locked\": {"]
29801#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
29802#[doc = "            },"]
29803#[doc = "            \"storage_paid_at\": {"]
29804#[doc = "              \"description\": \"TODO(2271): deprecated.\","]
29805#[doc = "              \"default\": 0,"]
29806#[doc = "              \"type\": \"integer\","]
29807#[doc = "              \"format\": \"uint64\","]
29808#[doc = "              \"minimum\": 0.0"]
29809#[doc = "            },"]
29810#[doc = "            \"storage_usage\": {"]
29811#[doc = "              \"type\": \"integer\","]
29812#[doc = "              \"format\": \"uint64\","]
29813#[doc = "              \"minimum\": 0.0"]
29814#[doc = "            }"]
29815#[doc = "          }"]
29816#[doc = "        },"]
29817#[doc = "        \"type\": {"]
29818#[doc = "          \"type\": \"string\","]
29819#[doc = "          \"enum\": ["]
29820#[doc = "            \"account_update\""]
29821#[doc = "          ]"]
29822#[doc = "        }"]
29823#[doc = "      }"]
29824#[doc = "    },"]
29825#[doc = "    {"]
29826#[doc = "      \"type\": \"object\","]
29827#[doc = "      \"required\": ["]
29828#[doc = "        \"change\","]
29829#[doc = "        \"type\""]
29830#[doc = "      ],"]
29831#[doc = "      \"properties\": {"]
29832#[doc = "        \"change\": {"]
29833#[doc = "          \"type\": \"object\","]
29834#[doc = "          \"required\": ["]
29835#[doc = "            \"account_id\""]
29836#[doc = "          ],"]
29837#[doc = "          \"properties\": {"]
29838#[doc = "            \"account_id\": {"]
29839#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
29840#[doc = "            }"]
29841#[doc = "          }"]
29842#[doc = "        },"]
29843#[doc = "        \"type\": {"]
29844#[doc = "          \"type\": \"string\","]
29845#[doc = "          \"enum\": ["]
29846#[doc = "            \"account_deletion\""]
29847#[doc = "          ]"]
29848#[doc = "        }"]
29849#[doc = "      }"]
29850#[doc = "    },"]
29851#[doc = "    {"]
29852#[doc = "      \"type\": \"object\","]
29853#[doc = "      \"required\": ["]
29854#[doc = "        \"change\","]
29855#[doc = "        \"type\""]
29856#[doc = "      ],"]
29857#[doc = "      \"properties\": {"]
29858#[doc = "        \"change\": {"]
29859#[doc = "          \"type\": \"object\","]
29860#[doc = "          \"required\": ["]
29861#[doc = "            \"access_key\","]
29862#[doc = "            \"account_id\","]
29863#[doc = "            \"public_key\""]
29864#[doc = "          ],"]
29865#[doc = "          \"properties\": {"]
29866#[doc = "            \"access_key\": {"]
29867#[doc = "              \"$ref\": \"#/components/schemas/AccessKeyView\""]
29868#[doc = "            },"]
29869#[doc = "            \"account_id\": {"]
29870#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
29871#[doc = "            },"]
29872#[doc = "            \"public_key\": {"]
29873#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
29874#[doc = "            }"]
29875#[doc = "          }"]
29876#[doc = "        },"]
29877#[doc = "        \"type\": {"]
29878#[doc = "          \"type\": \"string\","]
29879#[doc = "          \"enum\": ["]
29880#[doc = "            \"access_key_update\""]
29881#[doc = "          ]"]
29882#[doc = "        }"]
29883#[doc = "      }"]
29884#[doc = "    },"]
29885#[doc = "    {"]
29886#[doc = "      \"type\": \"object\","]
29887#[doc = "      \"required\": ["]
29888#[doc = "        \"change\","]
29889#[doc = "        \"type\""]
29890#[doc = "      ],"]
29891#[doc = "      \"properties\": {"]
29892#[doc = "        \"change\": {"]
29893#[doc = "          \"type\": \"object\","]
29894#[doc = "          \"required\": ["]
29895#[doc = "            \"account_id\","]
29896#[doc = "            \"public_key\""]
29897#[doc = "          ],"]
29898#[doc = "          \"properties\": {"]
29899#[doc = "            \"account_id\": {"]
29900#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
29901#[doc = "            },"]
29902#[doc = "            \"public_key\": {"]
29903#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
29904#[doc = "            }"]
29905#[doc = "          }"]
29906#[doc = "        },"]
29907#[doc = "        \"type\": {"]
29908#[doc = "          \"type\": \"string\","]
29909#[doc = "          \"enum\": ["]
29910#[doc = "            \"access_key_deletion\""]
29911#[doc = "          ]"]
29912#[doc = "        }"]
29913#[doc = "      }"]
29914#[doc = "    },"]
29915#[doc = "    {"]
29916#[doc = "      \"type\": \"object\","]
29917#[doc = "      \"required\": ["]
29918#[doc = "        \"change\","]
29919#[doc = "        \"type\""]
29920#[doc = "      ],"]
29921#[doc = "      \"properties\": {"]
29922#[doc = "        \"change\": {"]
29923#[doc = "          \"type\": \"object\","]
29924#[doc = "          \"required\": ["]
29925#[doc = "            \"account_id\","]
29926#[doc = "            \"gas_key\","]
29927#[doc = "            \"public_key\""]
29928#[doc = "          ],"]
29929#[doc = "          \"properties\": {"]
29930#[doc = "            \"account_id\": {"]
29931#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
29932#[doc = "            },"]
29933#[doc = "            \"gas_key\": {"]
29934#[doc = "              \"$ref\": \"#/components/schemas/GasKey\""]
29935#[doc = "            },"]
29936#[doc = "            \"public_key\": {"]
29937#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
29938#[doc = "            }"]
29939#[doc = "          }"]
29940#[doc = "        },"]
29941#[doc = "        \"type\": {"]
29942#[doc = "          \"type\": \"string\","]
29943#[doc = "          \"enum\": ["]
29944#[doc = "            \"gas_key_update\""]
29945#[doc = "          ]"]
29946#[doc = "        }"]
29947#[doc = "      }"]
29948#[doc = "    },"]
29949#[doc = "    {"]
29950#[doc = "      \"type\": \"object\","]
29951#[doc = "      \"required\": ["]
29952#[doc = "        \"change\","]
29953#[doc = "        \"type\""]
29954#[doc = "      ],"]
29955#[doc = "      \"properties\": {"]
29956#[doc = "        \"change\": {"]
29957#[doc = "          \"type\": \"object\","]
29958#[doc = "          \"required\": ["]
29959#[doc = "            \"account_id\","]
29960#[doc = "            \"index\","]
29961#[doc = "            \"nonce\","]
29962#[doc = "            \"public_key\""]
29963#[doc = "          ],"]
29964#[doc = "          \"properties\": {"]
29965#[doc = "            \"account_id\": {"]
29966#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
29967#[doc = "            },"]
29968#[doc = "            \"index\": {"]
29969#[doc = "              \"type\": \"integer\","]
29970#[doc = "              \"format\": \"uint32\","]
29971#[doc = "              \"minimum\": 0.0"]
29972#[doc = "            },"]
29973#[doc = "            \"nonce\": {"]
29974#[doc = "              \"type\": \"integer\","]
29975#[doc = "              \"format\": \"uint64\","]
29976#[doc = "              \"minimum\": 0.0"]
29977#[doc = "            },"]
29978#[doc = "            \"public_key\": {"]
29979#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
29980#[doc = "            }"]
29981#[doc = "          }"]
29982#[doc = "        },"]
29983#[doc = "        \"type\": {"]
29984#[doc = "          \"type\": \"string\","]
29985#[doc = "          \"enum\": ["]
29986#[doc = "            \"gas_key_nonce_update\""]
29987#[doc = "          ]"]
29988#[doc = "        }"]
29989#[doc = "      }"]
29990#[doc = "    },"]
29991#[doc = "    {"]
29992#[doc = "      \"type\": \"object\","]
29993#[doc = "      \"required\": ["]
29994#[doc = "        \"change\","]
29995#[doc = "        \"type\""]
29996#[doc = "      ],"]
29997#[doc = "      \"properties\": {"]
29998#[doc = "        \"change\": {"]
29999#[doc = "          \"type\": \"object\","]
30000#[doc = "          \"required\": ["]
30001#[doc = "            \"account_id\","]
30002#[doc = "            \"public_key\""]
30003#[doc = "          ],"]
30004#[doc = "          \"properties\": {"]
30005#[doc = "            \"account_id\": {"]
30006#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
30007#[doc = "            },"]
30008#[doc = "            \"public_key\": {"]
30009#[doc = "              \"$ref\": \"#/components/schemas/PublicKey\""]
30010#[doc = "            }"]
30011#[doc = "          }"]
30012#[doc = "        },"]
30013#[doc = "        \"type\": {"]
30014#[doc = "          \"type\": \"string\","]
30015#[doc = "          \"enum\": ["]
30016#[doc = "            \"gas_key_deletion\""]
30017#[doc = "          ]"]
30018#[doc = "        }"]
30019#[doc = "      }"]
30020#[doc = "    },"]
30021#[doc = "    {"]
30022#[doc = "      \"type\": \"object\","]
30023#[doc = "      \"required\": ["]
30024#[doc = "        \"change\","]
30025#[doc = "        \"type\""]
30026#[doc = "      ],"]
30027#[doc = "      \"properties\": {"]
30028#[doc = "        \"change\": {"]
30029#[doc = "          \"type\": \"object\","]
30030#[doc = "          \"required\": ["]
30031#[doc = "            \"account_id\","]
30032#[doc = "            \"key_base64\","]
30033#[doc = "            \"value_base64\""]
30034#[doc = "          ],"]
30035#[doc = "          \"properties\": {"]
30036#[doc = "            \"account_id\": {"]
30037#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
30038#[doc = "            },"]
30039#[doc = "            \"key_base64\": {"]
30040#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
30041#[doc = "            },"]
30042#[doc = "            \"value_base64\": {"]
30043#[doc = "              \"$ref\": \"#/components/schemas/StoreValue\""]
30044#[doc = "            }"]
30045#[doc = "          }"]
30046#[doc = "        },"]
30047#[doc = "        \"type\": {"]
30048#[doc = "          \"type\": \"string\","]
30049#[doc = "          \"enum\": ["]
30050#[doc = "            \"data_update\""]
30051#[doc = "          ]"]
30052#[doc = "        }"]
30053#[doc = "      }"]
30054#[doc = "    },"]
30055#[doc = "    {"]
30056#[doc = "      \"type\": \"object\","]
30057#[doc = "      \"required\": ["]
30058#[doc = "        \"change\","]
30059#[doc = "        \"type\""]
30060#[doc = "      ],"]
30061#[doc = "      \"properties\": {"]
30062#[doc = "        \"change\": {"]
30063#[doc = "          \"type\": \"object\","]
30064#[doc = "          \"required\": ["]
30065#[doc = "            \"account_id\","]
30066#[doc = "            \"key_base64\""]
30067#[doc = "          ],"]
30068#[doc = "          \"properties\": {"]
30069#[doc = "            \"account_id\": {"]
30070#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
30071#[doc = "            },"]
30072#[doc = "            \"key_base64\": {"]
30073#[doc = "              \"$ref\": \"#/components/schemas/StoreKey\""]
30074#[doc = "            }"]
30075#[doc = "          }"]
30076#[doc = "        },"]
30077#[doc = "        \"type\": {"]
30078#[doc = "          \"type\": \"string\","]
30079#[doc = "          \"enum\": ["]
30080#[doc = "            \"data_deletion\""]
30081#[doc = "          ]"]
30082#[doc = "        }"]
30083#[doc = "      }"]
30084#[doc = "    },"]
30085#[doc = "    {"]
30086#[doc = "      \"type\": \"object\","]
30087#[doc = "      \"required\": ["]
30088#[doc = "        \"change\","]
30089#[doc = "        \"type\""]
30090#[doc = "      ],"]
30091#[doc = "      \"properties\": {"]
30092#[doc = "        \"change\": {"]
30093#[doc = "          \"type\": \"object\","]
30094#[doc = "          \"required\": ["]
30095#[doc = "            \"account_id\","]
30096#[doc = "            \"code_base64\""]
30097#[doc = "          ],"]
30098#[doc = "          \"properties\": {"]
30099#[doc = "            \"account_id\": {"]
30100#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
30101#[doc = "            },"]
30102#[doc = "            \"code_base64\": {"]
30103#[doc = "              \"type\": \"string\""]
30104#[doc = "            }"]
30105#[doc = "          }"]
30106#[doc = "        },"]
30107#[doc = "        \"type\": {"]
30108#[doc = "          \"type\": \"string\","]
30109#[doc = "          \"enum\": ["]
30110#[doc = "            \"contract_code_update\""]
30111#[doc = "          ]"]
30112#[doc = "        }"]
30113#[doc = "      }"]
30114#[doc = "    },"]
30115#[doc = "    {"]
30116#[doc = "      \"type\": \"object\","]
30117#[doc = "      \"required\": ["]
30118#[doc = "        \"change\","]
30119#[doc = "        \"type\""]
30120#[doc = "      ],"]
30121#[doc = "      \"properties\": {"]
30122#[doc = "        \"change\": {"]
30123#[doc = "          \"type\": \"object\","]
30124#[doc = "          \"required\": ["]
30125#[doc = "            \"account_id\""]
30126#[doc = "          ],"]
30127#[doc = "          \"properties\": {"]
30128#[doc = "            \"account_id\": {"]
30129#[doc = "              \"$ref\": \"#/components/schemas/AccountId\""]
30130#[doc = "            }"]
30131#[doc = "          }"]
30132#[doc = "        },"]
30133#[doc = "        \"type\": {"]
30134#[doc = "          \"type\": \"string\","]
30135#[doc = "          \"enum\": ["]
30136#[doc = "            \"contract_code_deletion\""]
30137#[doc = "          ]"]
30138#[doc = "        }"]
30139#[doc = "      }"]
30140#[doc = "    }"]
30141#[doc = "  ],"]
30142#[doc = "  \"required\": ["]
30143#[doc = "    \"cause\""]
30144#[doc = "  ],"]
30145#[doc = "  \"properties\": {"]
30146#[doc = "    \"cause\": {"]
30147#[doc = "      \"$ref\": \"#/components/schemas/StateChangeCauseView\""]
30148#[doc = "    }"]
30149#[doc = "  }"]
30150#[doc = "}"]
30151#[doc = r" ```"]
30152#[doc = r" </details>"]
30153#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30154#[serde(untagged)]
30155pub enum StateChangeWithCauseView {
30156    Variant0 {
30157        cause: StateChangeCauseView,
30158        change: StateChangeWithCauseViewVariant0Change,
30159        #[serde(rename = "type")]
30160        type_: StateChangeWithCauseViewVariant0Type,
30161    },
30162    Variant1 {
30163        cause: StateChangeCauseView,
30164        change: StateChangeWithCauseViewVariant1Change,
30165        #[serde(rename = "type")]
30166        type_: StateChangeWithCauseViewVariant1Type,
30167    },
30168    Variant2 {
30169        cause: StateChangeCauseView,
30170        change: StateChangeWithCauseViewVariant2Change,
30171        #[serde(rename = "type")]
30172        type_: StateChangeWithCauseViewVariant2Type,
30173    },
30174    Variant3 {
30175        cause: StateChangeCauseView,
30176        change: StateChangeWithCauseViewVariant3Change,
30177        #[serde(rename = "type")]
30178        type_: StateChangeWithCauseViewVariant3Type,
30179    },
30180    Variant4 {
30181        cause: StateChangeCauseView,
30182        change: StateChangeWithCauseViewVariant4Change,
30183        #[serde(rename = "type")]
30184        type_: StateChangeWithCauseViewVariant4Type,
30185    },
30186    Variant5 {
30187        cause: StateChangeCauseView,
30188        change: StateChangeWithCauseViewVariant5Change,
30189        #[serde(rename = "type")]
30190        type_: StateChangeWithCauseViewVariant5Type,
30191    },
30192    Variant6 {
30193        cause: StateChangeCauseView,
30194        change: StateChangeWithCauseViewVariant6Change,
30195        #[serde(rename = "type")]
30196        type_: StateChangeWithCauseViewVariant6Type,
30197    },
30198    Variant7 {
30199        cause: StateChangeCauseView,
30200        change: StateChangeWithCauseViewVariant7Change,
30201        #[serde(rename = "type")]
30202        type_: StateChangeWithCauseViewVariant7Type,
30203    },
30204    Variant8 {
30205        cause: StateChangeCauseView,
30206        change: StateChangeWithCauseViewVariant8Change,
30207        #[serde(rename = "type")]
30208        type_: StateChangeWithCauseViewVariant8Type,
30209    },
30210    Variant9 {
30211        cause: StateChangeCauseView,
30212        change: StateChangeWithCauseViewVariant9Change,
30213        #[serde(rename = "type")]
30214        type_: StateChangeWithCauseViewVariant9Type,
30215    },
30216    Variant10 {
30217        cause: StateChangeCauseView,
30218        change: StateChangeWithCauseViewVariant10Change,
30219        #[serde(rename = "type")]
30220        type_: StateChangeWithCauseViewVariant10Type,
30221    },
30222}
30223impl ::std::convert::From<&Self> for StateChangeWithCauseView {
30224    fn from(value: &StateChangeWithCauseView) -> Self {
30225        value.clone()
30226    }
30227}
30228#[doc = "A view of the account"]
30229#[doc = r""]
30230#[doc = r" <details><summary>JSON schema</summary>"]
30231#[doc = r""]
30232#[doc = r" ```json"]
30233#[doc = "{"]
30234#[doc = "  \"description\": \"A view of the account\","]
30235#[doc = "  \"type\": \"object\","]
30236#[doc = "  \"required\": ["]
30237#[doc = "    \"account_id\","]
30238#[doc = "    \"amount\","]
30239#[doc = "    \"code_hash\","]
30240#[doc = "    \"locked\","]
30241#[doc = "    \"storage_usage\""]
30242#[doc = "  ],"]
30243#[doc = "  \"properties\": {"]
30244#[doc = "    \"access_key\": false,"]
30245#[doc = "    \"account_id\": {"]
30246#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
30247#[doc = "    },"]
30248#[doc = "    \"amount\": {"]
30249#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
30250#[doc = "    },"]
30251#[doc = "    \"code_base64\": false,"]
30252#[doc = "    \"code_hash\": {"]
30253#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
30254#[doc = "    },"]
30255#[doc = "    \"gas_key\": false,"]
30256#[doc = "    \"global_contract_account_id\": {"]
30257#[doc = "      \"anyOf\": ["]
30258#[doc = "        {"]
30259#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
30260#[doc = "        },"]
30261#[doc = "        {"]
30262#[doc = "          \"type\": \"null\""]
30263#[doc = "        }"]
30264#[doc = "      ]"]
30265#[doc = "    },"]
30266#[doc = "    \"global_contract_hash\": {"]
30267#[doc = "      \"anyOf\": ["]
30268#[doc = "        {"]
30269#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
30270#[doc = "        },"]
30271#[doc = "        {"]
30272#[doc = "          \"type\": \"null\""]
30273#[doc = "        }"]
30274#[doc = "      ]"]
30275#[doc = "    },"]
30276#[doc = "    \"index\": false,"]
30277#[doc = "    \"key_base64\": false,"]
30278#[doc = "    \"locked\": {"]
30279#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
30280#[doc = "    },"]
30281#[doc = "    \"nonce\": false,"]
30282#[doc = "    \"public_key\": false,"]
30283#[doc = "    \"storage_paid_at\": {"]
30284#[doc = "      \"description\": \"TODO(2271): deprecated.\","]
30285#[doc = "      \"default\": 0,"]
30286#[doc = "      \"type\": \"integer\","]
30287#[doc = "      \"format\": \"uint64\","]
30288#[doc = "      \"minimum\": 0.0"]
30289#[doc = "    },"]
30290#[doc = "    \"storage_usage\": {"]
30291#[doc = "      \"type\": \"integer\","]
30292#[doc = "      \"format\": \"uint64\","]
30293#[doc = "      \"minimum\": 0.0"]
30294#[doc = "    },"]
30295#[doc = "    \"value_base64\": false"]
30296#[doc = "  }"]
30297#[doc = "}"]
30298#[doc = r" ```"]
30299#[doc = r" </details>"]
30300#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30301pub struct StateChangeWithCauseViewVariant0Change {
30302    pub account_id: AccountId,
30303    pub amount: NearToken,
30304    pub code_hash: CryptoHash,
30305    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30306    pub global_contract_account_id: ::std::option::Option<AccountId>,
30307    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
30308    pub global_contract_hash: ::std::option::Option<CryptoHash>,
30309    pub locked: NearToken,
30310    #[doc = "TODO(2271): deprecated."]
30311    #[serde(default)]
30312    pub storage_paid_at: u64,
30313    pub storage_usage: u64,
30314}
30315impl ::std::convert::From<&StateChangeWithCauseViewVariant0Change>
30316    for StateChangeWithCauseViewVariant0Change
30317{
30318    fn from(value: &StateChangeWithCauseViewVariant0Change) -> Self {
30319        value.clone()
30320    }
30321}
30322#[doc = "`StateChangeWithCauseViewVariant0Type`"]
30323#[doc = r""]
30324#[doc = r" <details><summary>JSON schema</summary>"]
30325#[doc = r""]
30326#[doc = r" ```json"]
30327#[doc = "{"]
30328#[doc = "  \"type\": \"string\","]
30329#[doc = "  \"enum\": ["]
30330#[doc = "    \"account_update\""]
30331#[doc = "  ]"]
30332#[doc = "}"]
30333#[doc = r" ```"]
30334#[doc = r" </details>"]
30335#[derive(
30336    :: serde :: Deserialize,
30337    :: serde :: Serialize,
30338    Clone,
30339    Copy,
30340    Debug,
30341    Eq,
30342    Hash,
30343    Ord,
30344    PartialEq,
30345    PartialOrd,
30346)]
30347pub enum StateChangeWithCauseViewVariant0Type {
30348    #[serde(rename = "account_update")]
30349    AccountUpdate,
30350}
30351impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant0Type {
30352    fn from(value: &StateChangeWithCauseViewVariant0Type) -> Self {
30353        value.clone()
30354    }
30355}
30356impl ::std::fmt::Display for StateChangeWithCauseViewVariant0Type {
30357    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30358        match *self {
30359            Self::AccountUpdate => f.write_str("account_update"),
30360        }
30361    }
30362}
30363impl ::std::str::FromStr for StateChangeWithCauseViewVariant0Type {
30364    type Err = self::error::ConversionError;
30365    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30366        match value {
30367            "account_update" => Ok(Self::AccountUpdate),
30368            _ => Err("invalid value".into()),
30369        }
30370    }
30371}
30372impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant0Type {
30373    type Error = self::error::ConversionError;
30374    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30375        value.parse()
30376    }
30377}
30378impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant0Type {
30379    type Error = self::error::ConversionError;
30380    fn try_from(
30381        value: &::std::string::String,
30382    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30383        value.parse()
30384    }
30385}
30386impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant0Type {
30387    type Error = self::error::ConversionError;
30388    fn try_from(
30389        value: ::std::string::String,
30390    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30391        value.parse()
30392    }
30393}
30394#[doc = "`StateChangeWithCauseViewVariant10Change`"]
30395#[doc = r""]
30396#[doc = r" <details><summary>JSON schema</summary>"]
30397#[doc = r""]
30398#[doc = r" ```json"]
30399#[doc = "{"]
30400#[doc = "  \"type\": \"object\","]
30401#[doc = "  \"required\": ["]
30402#[doc = "    \"account_id\""]
30403#[doc = "  ],"]
30404#[doc = "  \"properties\": {"]
30405#[doc = "    \"access_key\": false,"]
30406#[doc = "    \"account_id\": {"]
30407#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
30408#[doc = "    },"]
30409#[doc = "    \"amount\": false,"]
30410#[doc = "    \"code_base64\": false,"]
30411#[doc = "    \"code_hash\": false,"]
30412#[doc = "    \"gas_key\": false,"]
30413#[doc = "    \"global_contract_account_id\": false,"]
30414#[doc = "    \"global_contract_hash\": false,"]
30415#[doc = "    \"index\": false,"]
30416#[doc = "    \"key_base64\": false,"]
30417#[doc = "    \"locked\": false,"]
30418#[doc = "    \"nonce\": false,"]
30419#[doc = "    \"public_key\": false,"]
30420#[doc = "    \"storage_paid_at\": false,"]
30421#[doc = "    \"storage_usage\": false,"]
30422#[doc = "    \"value_base64\": false"]
30423#[doc = "  }"]
30424#[doc = "}"]
30425#[doc = r" ```"]
30426#[doc = r" </details>"]
30427#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30428pub struct StateChangeWithCauseViewVariant10Change {
30429    pub account_id: AccountId,
30430}
30431impl ::std::convert::From<&StateChangeWithCauseViewVariant10Change>
30432    for StateChangeWithCauseViewVariant10Change
30433{
30434    fn from(value: &StateChangeWithCauseViewVariant10Change) -> Self {
30435        value.clone()
30436    }
30437}
30438#[doc = "`StateChangeWithCauseViewVariant10Type`"]
30439#[doc = r""]
30440#[doc = r" <details><summary>JSON schema</summary>"]
30441#[doc = r""]
30442#[doc = r" ```json"]
30443#[doc = "{"]
30444#[doc = "  \"type\": \"string\","]
30445#[doc = "  \"enum\": ["]
30446#[doc = "    \"contract_code_deletion\""]
30447#[doc = "  ]"]
30448#[doc = "}"]
30449#[doc = r" ```"]
30450#[doc = r" </details>"]
30451#[derive(
30452    :: serde :: Deserialize,
30453    :: serde :: Serialize,
30454    Clone,
30455    Copy,
30456    Debug,
30457    Eq,
30458    Hash,
30459    Ord,
30460    PartialEq,
30461    PartialOrd,
30462)]
30463pub enum StateChangeWithCauseViewVariant10Type {
30464    #[serde(rename = "contract_code_deletion")]
30465    ContractCodeDeletion,
30466}
30467impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant10Type {
30468    fn from(value: &StateChangeWithCauseViewVariant10Type) -> Self {
30469        value.clone()
30470    }
30471}
30472impl ::std::fmt::Display for StateChangeWithCauseViewVariant10Type {
30473    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30474        match *self {
30475            Self::ContractCodeDeletion => f.write_str("contract_code_deletion"),
30476        }
30477    }
30478}
30479impl ::std::str::FromStr for StateChangeWithCauseViewVariant10Type {
30480    type Err = self::error::ConversionError;
30481    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30482        match value {
30483            "contract_code_deletion" => Ok(Self::ContractCodeDeletion),
30484            _ => Err("invalid value".into()),
30485        }
30486    }
30487}
30488impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant10Type {
30489    type Error = self::error::ConversionError;
30490    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30491        value.parse()
30492    }
30493}
30494impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant10Type {
30495    type Error = self::error::ConversionError;
30496    fn try_from(
30497        value: &::std::string::String,
30498    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30499        value.parse()
30500    }
30501}
30502impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant10Type {
30503    type Error = self::error::ConversionError;
30504    fn try_from(
30505        value: ::std::string::String,
30506    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30507        value.parse()
30508    }
30509}
30510#[doc = "`StateChangeWithCauseViewVariant1Change`"]
30511#[doc = r""]
30512#[doc = r" <details><summary>JSON schema</summary>"]
30513#[doc = r""]
30514#[doc = r" ```json"]
30515#[doc = "{"]
30516#[doc = "  \"type\": \"object\","]
30517#[doc = "  \"required\": ["]
30518#[doc = "    \"account_id\""]
30519#[doc = "  ],"]
30520#[doc = "  \"properties\": {"]
30521#[doc = "    \"access_key\": false,"]
30522#[doc = "    \"account_id\": {"]
30523#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
30524#[doc = "    },"]
30525#[doc = "    \"amount\": false,"]
30526#[doc = "    \"code_base64\": false,"]
30527#[doc = "    \"code_hash\": false,"]
30528#[doc = "    \"gas_key\": false,"]
30529#[doc = "    \"global_contract_account_id\": false,"]
30530#[doc = "    \"global_contract_hash\": false,"]
30531#[doc = "    \"index\": false,"]
30532#[doc = "    \"key_base64\": false,"]
30533#[doc = "    \"locked\": false,"]
30534#[doc = "    \"nonce\": false,"]
30535#[doc = "    \"public_key\": false,"]
30536#[doc = "    \"storage_paid_at\": false,"]
30537#[doc = "    \"storage_usage\": false,"]
30538#[doc = "    \"value_base64\": false"]
30539#[doc = "  }"]
30540#[doc = "}"]
30541#[doc = r" ```"]
30542#[doc = r" </details>"]
30543#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30544pub struct StateChangeWithCauseViewVariant1Change {
30545    pub account_id: AccountId,
30546}
30547impl ::std::convert::From<&StateChangeWithCauseViewVariant1Change>
30548    for StateChangeWithCauseViewVariant1Change
30549{
30550    fn from(value: &StateChangeWithCauseViewVariant1Change) -> Self {
30551        value.clone()
30552    }
30553}
30554#[doc = "`StateChangeWithCauseViewVariant1Type`"]
30555#[doc = r""]
30556#[doc = r" <details><summary>JSON schema</summary>"]
30557#[doc = r""]
30558#[doc = r" ```json"]
30559#[doc = "{"]
30560#[doc = "  \"type\": \"string\","]
30561#[doc = "  \"enum\": ["]
30562#[doc = "    \"account_deletion\""]
30563#[doc = "  ]"]
30564#[doc = "}"]
30565#[doc = r" ```"]
30566#[doc = r" </details>"]
30567#[derive(
30568    :: serde :: Deserialize,
30569    :: serde :: Serialize,
30570    Clone,
30571    Copy,
30572    Debug,
30573    Eq,
30574    Hash,
30575    Ord,
30576    PartialEq,
30577    PartialOrd,
30578)]
30579pub enum StateChangeWithCauseViewVariant1Type {
30580    #[serde(rename = "account_deletion")]
30581    AccountDeletion,
30582}
30583impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant1Type {
30584    fn from(value: &StateChangeWithCauseViewVariant1Type) -> Self {
30585        value.clone()
30586    }
30587}
30588impl ::std::fmt::Display for StateChangeWithCauseViewVariant1Type {
30589    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30590        match *self {
30591            Self::AccountDeletion => f.write_str("account_deletion"),
30592        }
30593    }
30594}
30595impl ::std::str::FromStr for StateChangeWithCauseViewVariant1Type {
30596    type Err = self::error::ConversionError;
30597    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30598        match value {
30599            "account_deletion" => Ok(Self::AccountDeletion),
30600            _ => Err("invalid value".into()),
30601        }
30602    }
30603}
30604impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant1Type {
30605    type Error = self::error::ConversionError;
30606    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30607        value.parse()
30608    }
30609}
30610impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant1Type {
30611    type Error = self::error::ConversionError;
30612    fn try_from(
30613        value: &::std::string::String,
30614    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30615        value.parse()
30616    }
30617}
30618impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant1Type {
30619    type Error = self::error::ConversionError;
30620    fn try_from(
30621        value: ::std::string::String,
30622    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30623        value.parse()
30624    }
30625}
30626#[doc = "`StateChangeWithCauseViewVariant2Change`"]
30627#[doc = r""]
30628#[doc = r" <details><summary>JSON schema</summary>"]
30629#[doc = r""]
30630#[doc = r" ```json"]
30631#[doc = "{"]
30632#[doc = "  \"type\": \"object\","]
30633#[doc = "  \"required\": ["]
30634#[doc = "    \"access_key\","]
30635#[doc = "    \"account_id\","]
30636#[doc = "    \"public_key\""]
30637#[doc = "  ],"]
30638#[doc = "  \"properties\": {"]
30639#[doc = "    \"access_key\": {"]
30640#[doc = "      \"$ref\": \"#/components/schemas/AccessKeyView\""]
30641#[doc = "    },"]
30642#[doc = "    \"account_id\": {"]
30643#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
30644#[doc = "    },"]
30645#[doc = "    \"amount\": false,"]
30646#[doc = "    \"code_base64\": false,"]
30647#[doc = "    \"code_hash\": false,"]
30648#[doc = "    \"gas_key\": false,"]
30649#[doc = "    \"global_contract_account_id\": false,"]
30650#[doc = "    \"global_contract_hash\": false,"]
30651#[doc = "    \"index\": false,"]
30652#[doc = "    \"key_base64\": false,"]
30653#[doc = "    \"locked\": false,"]
30654#[doc = "    \"nonce\": false,"]
30655#[doc = "    \"public_key\": {"]
30656#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
30657#[doc = "    },"]
30658#[doc = "    \"storage_paid_at\": false,"]
30659#[doc = "    \"storage_usage\": false,"]
30660#[doc = "    \"value_base64\": false"]
30661#[doc = "  }"]
30662#[doc = "}"]
30663#[doc = r" ```"]
30664#[doc = r" </details>"]
30665#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30666pub struct StateChangeWithCauseViewVariant2Change {
30667    pub access_key: AccessKeyView,
30668    pub account_id: AccountId,
30669    pub public_key: PublicKey,
30670}
30671impl ::std::convert::From<&StateChangeWithCauseViewVariant2Change>
30672    for StateChangeWithCauseViewVariant2Change
30673{
30674    fn from(value: &StateChangeWithCauseViewVariant2Change) -> Self {
30675        value.clone()
30676    }
30677}
30678#[doc = "`StateChangeWithCauseViewVariant2Type`"]
30679#[doc = r""]
30680#[doc = r" <details><summary>JSON schema</summary>"]
30681#[doc = r""]
30682#[doc = r" ```json"]
30683#[doc = "{"]
30684#[doc = "  \"type\": \"string\","]
30685#[doc = "  \"enum\": ["]
30686#[doc = "    \"access_key_update\""]
30687#[doc = "  ]"]
30688#[doc = "}"]
30689#[doc = r" ```"]
30690#[doc = r" </details>"]
30691#[derive(
30692    :: serde :: Deserialize,
30693    :: serde :: Serialize,
30694    Clone,
30695    Copy,
30696    Debug,
30697    Eq,
30698    Hash,
30699    Ord,
30700    PartialEq,
30701    PartialOrd,
30702)]
30703pub enum StateChangeWithCauseViewVariant2Type {
30704    #[serde(rename = "access_key_update")]
30705    AccessKeyUpdate,
30706}
30707impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant2Type {
30708    fn from(value: &StateChangeWithCauseViewVariant2Type) -> Self {
30709        value.clone()
30710    }
30711}
30712impl ::std::fmt::Display for StateChangeWithCauseViewVariant2Type {
30713    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30714        match *self {
30715            Self::AccessKeyUpdate => f.write_str("access_key_update"),
30716        }
30717    }
30718}
30719impl ::std::str::FromStr for StateChangeWithCauseViewVariant2Type {
30720    type Err = self::error::ConversionError;
30721    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30722        match value {
30723            "access_key_update" => Ok(Self::AccessKeyUpdate),
30724            _ => Err("invalid value".into()),
30725        }
30726    }
30727}
30728impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant2Type {
30729    type Error = self::error::ConversionError;
30730    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30731        value.parse()
30732    }
30733}
30734impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant2Type {
30735    type Error = self::error::ConversionError;
30736    fn try_from(
30737        value: &::std::string::String,
30738    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30739        value.parse()
30740    }
30741}
30742impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant2Type {
30743    type Error = self::error::ConversionError;
30744    fn try_from(
30745        value: ::std::string::String,
30746    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30747        value.parse()
30748    }
30749}
30750#[doc = "`StateChangeWithCauseViewVariant3Change`"]
30751#[doc = r""]
30752#[doc = r" <details><summary>JSON schema</summary>"]
30753#[doc = r""]
30754#[doc = r" ```json"]
30755#[doc = "{"]
30756#[doc = "  \"type\": \"object\","]
30757#[doc = "  \"required\": ["]
30758#[doc = "    \"account_id\","]
30759#[doc = "    \"public_key\""]
30760#[doc = "  ],"]
30761#[doc = "  \"properties\": {"]
30762#[doc = "    \"access_key\": false,"]
30763#[doc = "    \"account_id\": {"]
30764#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
30765#[doc = "    },"]
30766#[doc = "    \"amount\": false,"]
30767#[doc = "    \"code_base64\": false,"]
30768#[doc = "    \"code_hash\": false,"]
30769#[doc = "    \"gas_key\": false,"]
30770#[doc = "    \"global_contract_account_id\": false,"]
30771#[doc = "    \"global_contract_hash\": false,"]
30772#[doc = "    \"index\": false,"]
30773#[doc = "    \"key_base64\": false,"]
30774#[doc = "    \"locked\": false,"]
30775#[doc = "    \"nonce\": false,"]
30776#[doc = "    \"public_key\": {"]
30777#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
30778#[doc = "    },"]
30779#[doc = "    \"storage_paid_at\": false,"]
30780#[doc = "    \"storage_usage\": false,"]
30781#[doc = "    \"value_base64\": false"]
30782#[doc = "  }"]
30783#[doc = "}"]
30784#[doc = r" ```"]
30785#[doc = r" </details>"]
30786#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30787pub struct StateChangeWithCauseViewVariant3Change {
30788    pub account_id: AccountId,
30789    pub public_key: PublicKey,
30790}
30791impl ::std::convert::From<&StateChangeWithCauseViewVariant3Change>
30792    for StateChangeWithCauseViewVariant3Change
30793{
30794    fn from(value: &StateChangeWithCauseViewVariant3Change) -> Self {
30795        value.clone()
30796    }
30797}
30798#[doc = "`StateChangeWithCauseViewVariant3Type`"]
30799#[doc = r""]
30800#[doc = r" <details><summary>JSON schema</summary>"]
30801#[doc = r""]
30802#[doc = r" ```json"]
30803#[doc = "{"]
30804#[doc = "  \"type\": \"string\","]
30805#[doc = "  \"enum\": ["]
30806#[doc = "    \"access_key_deletion\""]
30807#[doc = "  ]"]
30808#[doc = "}"]
30809#[doc = r" ```"]
30810#[doc = r" </details>"]
30811#[derive(
30812    :: serde :: Deserialize,
30813    :: serde :: Serialize,
30814    Clone,
30815    Copy,
30816    Debug,
30817    Eq,
30818    Hash,
30819    Ord,
30820    PartialEq,
30821    PartialOrd,
30822)]
30823pub enum StateChangeWithCauseViewVariant3Type {
30824    #[serde(rename = "access_key_deletion")]
30825    AccessKeyDeletion,
30826}
30827impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant3Type {
30828    fn from(value: &StateChangeWithCauseViewVariant3Type) -> Self {
30829        value.clone()
30830    }
30831}
30832impl ::std::fmt::Display for StateChangeWithCauseViewVariant3Type {
30833    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30834        match *self {
30835            Self::AccessKeyDeletion => f.write_str("access_key_deletion"),
30836        }
30837    }
30838}
30839impl ::std::str::FromStr for StateChangeWithCauseViewVariant3Type {
30840    type Err = self::error::ConversionError;
30841    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30842        match value {
30843            "access_key_deletion" => Ok(Self::AccessKeyDeletion),
30844            _ => Err("invalid value".into()),
30845        }
30846    }
30847}
30848impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant3Type {
30849    type Error = self::error::ConversionError;
30850    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30851        value.parse()
30852    }
30853}
30854impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant3Type {
30855    type Error = self::error::ConversionError;
30856    fn try_from(
30857        value: &::std::string::String,
30858    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30859        value.parse()
30860    }
30861}
30862impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant3Type {
30863    type Error = self::error::ConversionError;
30864    fn try_from(
30865        value: ::std::string::String,
30866    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30867        value.parse()
30868    }
30869}
30870#[doc = "`StateChangeWithCauseViewVariant4Change`"]
30871#[doc = r""]
30872#[doc = r" <details><summary>JSON schema</summary>"]
30873#[doc = r""]
30874#[doc = r" ```json"]
30875#[doc = "{"]
30876#[doc = "  \"type\": \"object\","]
30877#[doc = "  \"required\": ["]
30878#[doc = "    \"account_id\","]
30879#[doc = "    \"gas_key\","]
30880#[doc = "    \"public_key\""]
30881#[doc = "  ],"]
30882#[doc = "  \"properties\": {"]
30883#[doc = "    \"access_key\": false,"]
30884#[doc = "    \"account_id\": {"]
30885#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
30886#[doc = "    },"]
30887#[doc = "    \"amount\": false,"]
30888#[doc = "    \"code_base64\": false,"]
30889#[doc = "    \"code_hash\": false,"]
30890#[doc = "    \"gas_key\": {"]
30891#[doc = "      \"$ref\": \"#/components/schemas/GasKey\""]
30892#[doc = "    },"]
30893#[doc = "    \"global_contract_account_id\": false,"]
30894#[doc = "    \"global_contract_hash\": false,"]
30895#[doc = "    \"index\": false,"]
30896#[doc = "    \"key_base64\": false,"]
30897#[doc = "    \"locked\": false,"]
30898#[doc = "    \"nonce\": false,"]
30899#[doc = "    \"public_key\": {"]
30900#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
30901#[doc = "    },"]
30902#[doc = "    \"storage_paid_at\": false,"]
30903#[doc = "    \"storage_usage\": false,"]
30904#[doc = "    \"value_base64\": false"]
30905#[doc = "  }"]
30906#[doc = "}"]
30907#[doc = r" ```"]
30908#[doc = r" </details>"]
30909#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30910pub struct StateChangeWithCauseViewVariant4Change {
30911    pub account_id: AccountId,
30912    pub gas_key: GasKey,
30913    pub public_key: PublicKey,
30914}
30915impl ::std::convert::From<&StateChangeWithCauseViewVariant4Change>
30916    for StateChangeWithCauseViewVariant4Change
30917{
30918    fn from(value: &StateChangeWithCauseViewVariant4Change) -> Self {
30919        value.clone()
30920    }
30921}
30922#[doc = "`StateChangeWithCauseViewVariant4Type`"]
30923#[doc = r""]
30924#[doc = r" <details><summary>JSON schema</summary>"]
30925#[doc = r""]
30926#[doc = r" ```json"]
30927#[doc = "{"]
30928#[doc = "  \"type\": \"string\","]
30929#[doc = "  \"enum\": ["]
30930#[doc = "    \"gas_key_update\""]
30931#[doc = "  ]"]
30932#[doc = "}"]
30933#[doc = r" ```"]
30934#[doc = r" </details>"]
30935#[derive(
30936    :: serde :: Deserialize,
30937    :: serde :: Serialize,
30938    Clone,
30939    Copy,
30940    Debug,
30941    Eq,
30942    Hash,
30943    Ord,
30944    PartialEq,
30945    PartialOrd,
30946)]
30947pub enum StateChangeWithCauseViewVariant4Type {
30948    #[serde(rename = "gas_key_update")]
30949    GasKeyUpdate,
30950}
30951impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant4Type {
30952    fn from(value: &StateChangeWithCauseViewVariant4Type) -> Self {
30953        value.clone()
30954    }
30955}
30956impl ::std::fmt::Display for StateChangeWithCauseViewVariant4Type {
30957    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30958        match *self {
30959            Self::GasKeyUpdate => f.write_str("gas_key_update"),
30960        }
30961    }
30962}
30963impl ::std::str::FromStr for StateChangeWithCauseViewVariant4Type {
30964    type Err = self::error::ConversionError;
30965    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30966        match value {
30967            "gas_key_update" => Ok(Self::GasKeyUpdate),
30968            _ => Err("invalid value".into()),
30969        }
30970    }
30971}
30972impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant4Type {
30973    type Error = self::error::ConversionError;
30974    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30975        value.parse()
30976    }
30977}
30978impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant4Type {
30979    type Error = self::error::ConversionError;
30980    fn try_from(
30981        value: &::std::string::String,
30982    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30983        value.parse()
30984    }
30985}
30986impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant4Type {
30987    type Error = self::error::ConversionError;
30988    fn try_from(
30989        value: ::std::string::String,
30990    ) -> ::std::result::Result<Self, self::error::ConversionError> {
30991        value.parse()
30992    }
30993}
30994#[doc = "`StateChangeWithCauseViewVariant5Change`"]
30995#[doc = r""]
30996#[doc = r" <details><summary>JSON schema</summary>"]
30997#[doc = r""]
30998#[doc = r" ```json"]
30999#[doc = "{"]
31000#[doc = "  \"type\": \"object\","]
31001#[doc = "  \"required\": ["]
31002#[doc = "    \"account_id\","]
31003#[doc = "    \"index\","]
31004#[doc = "    \"nonce\","]
31005#[doc = "    \"public_key\""]
31006#[doc = "  ],"]
31007#[doc = "  \"properties\": {"]
31008#[doc = "    \"access_key\": false,"]
31009#[doc = "    \"account_id\": {"]
31010#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31011#[doc = "    },"]
31012#[doc = "    \"amount\": false,"]
31013#[doc = "    \"code_base64\": false,"]
31014#[doc = "    \"code_hash\": false,"]
31015#[doc = "    \"gas_key\": false,"]
31016#[doc = "    \"global_contract_account_id\": false,"]
31017#[doc = "    \"global_contract_hash\": false,"]
31018#[doc = "    \"index\": {"]
31019#[doc = "      \"type\": \"integer\","]
31020#[doc = "      \"format\": \"uint32\","]
31021#[doc = "      \"minimum\": 0.0"]
31022#[doc = "    },"]
31023#[doc = "    \"key_base64\": false,"]
31024#[doc = "    \"locked\": false,"]
31025#[doc = "    \"nonce\": {"]
31026#[doc = "      \"type\": \"integer\","]
31027#[doc = "      \"format\": \"uint64\","]
31028#[doc = "      \"minimum\": 0.0"]
31029#[doc = "    },"]
31030#[doc = "    \"public_key\": {"]
31031#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
31032#[doc = "    },"]
31033#[doc = "    \"storage_paid_at\": false,"]
31034#[doc = "    \"storage_usage\": false,"]
31035#[doc = "    \"value_base64\": false"]
31036#[doc = "  }"]
31037#[doc = "}"]
31038#[doc = r" ```"]
31039#[doc = r" </details>"]
31040#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31041pub struct StateChangeWithCauseViewVariant5Change {
31042    pub account_id: AccountId,
31043    pub index: u32,
31044    pub nonce: u64,
31045    pub public_key: PublicKey,
31046}
31047impl ::std::convert::From<&StateChangeWithCauseViewVariant5Change>
31048    for StateChangeWithCauseViewVariant5Change
31049{
31050    fn from(value: &StateChangeWithCauseViewVariant5Change) -> Self {
31051        value.clone()
31052    }
31053}
31054#[doc = "`StateChangeWithCauseViewVariant5Type`"]
31055#[doc = r""]
31056#[doc = r" <details><summary>JSON schema</summary>"]
31057#[doc = r""]
31058#[doc = r" ```json"]
31059#[doc = "{"]
31060#[doc = "  \"type\": \"string\","]
31061#[doc = "  \"enum\": ["]
31062#[doc = "    \"gas_key_nonce_update\""]
31063#[doc = "  ]"]
31064#[doc = "}"]
31065#[doc = r" ```"]
31066#[doc = r" </details>"]
31067#[derive(
31068    :: serde :: Deserialize,
31069    :: serde :: Serialize,
31070    Clone,
31071    Copy,
31072    Debug,
31073    Eq,
31074    Hash,
31075    Ord,
31076    PartialEq,
31077    PartialOrd,
31078)]
31079pub enum StateChangeWithCauseViewVariant5Type {
31080    #[serde(rename = "gas_key_nonce_update")]
31081    GasKeyNonceUpdate,
31082}
31083impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant5Type {
31084    fn from(value: &StateChangeWithCauseViewVariant5Type) -> Self {
31085        value.clone()
31086    }
31087}
31088impl ::std::fmt::Display for StateChangeWithCauseViewVariant5Type {
31089    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31090        match *self {
31091            Self::GasKeyNonceUpdate => f.write_str("gas_key_nonce_update"),
31092        }
31093    }
31094}
31095impl ::std::str::FromStr for StateChangeWithCauseViewVariant5Type {
31096    type Err = self::error::ConversionError;
31097    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31098        match value {
31099            "gas_key_nonce_update" => Ok(Self::GasKeyNonceUpdate),
31100            _ => Err("invalid value".into()),
31101        }
31102    }
31103}
31104impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant5Type {
31105    type Error = self::error::ConversionError;
31106    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31107        value.parse()
31108    }
31109}
31110impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant5Type {
31111    type Error = self::error::ConversionError;
31112    fn try_from(
31113        value: &::std::string::String,
31114    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31115        value.parse()
31116    }
31117}
31118impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant5Type {
31119    type Error = self::error::ConversionError;
31120    fn try_from(
31121        value: ::std::string::String,
31122    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31123        value.parse()
31124    }
31125}
31126#[doc = "`StateChangeWithCauseViewVariant6Change`"]
31127#[doc = r""]
31128#[doc = r" <details><summary>JSON schema</summary>"]
31129#[doc = r""]
31130#[doc = r" ```json"]
31131#[doc = "{"]
31132#[doc = "  \"type\": \"object\","]
31133#[doc = "  \"required\": ["]
31134#[doc = "    \"account_id\","]
31135#[doc = "    \"public_key\""]
31136#[doc = "  ],"]
31137#[doc = "  \"properties\": {"]
31138#[doc = "    \"access_key\": false,"]
31139#[doc = "    \"account_id\": {"]
31140#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31141#[doc = "    },"]
31142#[doc = "    \"amount\": false,"]
31143#[doc = "    \"code_base64\": false,"]
31144#[doc = "    \"code_hash\": false,"]
31145#[doc = "    \"gas_key\": false,"]
31146#[doc = "    \"global_contract_account_id\": false,"]
31147#[doc = "    \"global_contract_hash\": false,"]
31148#[doc = "    \"index\": false,"]
31149#[doc = "    \"key_base64\": false,"]
31150#[doc = "    \"locked\": false,"]
31151#[doc = "    \"nonce\": false,"]
31152#[doc = "    \"public_key\": {"]
31153#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
31154#[doc = "    },"]
31155#[doc = "    \"storage_paid_at\": false,"]
31156#[doc = "    \"storage_usage\": false,"]
31157#[doc = "    \"value_base64\": false"]
31158#[doc = "  }"]
31159#[doc = "}"]
31160#[doc = r" ```"]
31161#[doc = r" </details>"]
31162#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31163pub struct StateChangeWithCauseViewVariant6Change {
31164    pub account_id: AccountId,
31165    pub public_key: PublicKey,
31166}
31167impl ::std::convert::From<&StateChangeWithCauseViewVariant6Change>
31168    for StateChangeWithCauseViewVariant6Change
31169{
31170    fn from(value: &StateChangeWithCauseViewVariant6Change) -> Self {
31171        value.clone()
31172    }
31173}
31174#[doc = "`StateChangeWithCauseViewVariant6Type`"]
31175#[doc = r""]
31176#[doc = r" <details><summary>JSON schema</summary>"]
31177#[doc = r""]
31178#[doc = r" ```json"]
31179#[doc = "{"]
31180#[doc = "  \"type\": \"string\","]
31181#[doc = "  \"enum\": ["]
31182#[doc = "    \"gas_key_deletion\""]
31183#[doc = "  ]"]
31184#[doc = "}"]
31185#[doc = r" ```"]
31186#[doc = r" </details>"]
31187#[derive(
31188    :: serde :: Deserialize,
31189    :: serde :: Serialize,
31190    Clone,
31191    Copy,
31192    Debug,
31193    Eq,
31194    Hash,
31195    Ord,
31196    PartialEq,
31197    PartialOrd,
31198)]
31199pub enum StateChangeWithCauseViewVariant6Type {
31200    #[serde(rename = "gas_key_deletion")]
31201    GasKeyDeletion,
31202}
31203impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant6Type {
31204    fn from(value: &StateChangeWithCauseViewVariant6Type) -> Self {
31205        value.clone()
31206    }
31207}
31208impl ::std::fmt::Display for StateChangeWithCauseViewVariant6Type {
31209    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31210        match *self {
31211            Self::GasKeyDeletion => f.write_str("gas_key_deletion"),
31212        }
31213    }
31214}
31215impl ::std::str::FromStr for StateChangeWithCauseViewVariant6Type {
31216    type Err = self::error::ConversionError;
31217    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31218        match value {
31219            "gas_key_deletion" => Ok(Self::GasKeyDeletion),
31220            _ => Err("invalid value".into()),
31221        }
31222    }
31223}
31224impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant6Type {
31225    type Error = self::error::ConversionError;
31226    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31227        value.parse()
31228    }
31229}
31230impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant6Type {
31231    type Error = self::error::ConversionError;
31232    fn try_from(
31233        value: &::std::string::String,
31234    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31235        value.parse()
31236    }
31237}
31238impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant6Type {
31239    type Error = self::error::ConversionError;
31240    fn try_from(
31241        value: ::std::string::String,
31242    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31243        value.parse()
31244    }
31245}
31246#[doc = "`StateChangeWithCauseViewVariant7Change`"]
31247#[doc = r""]
31248#[doc = r" <details><summary>JSON schema</summary>"]
31249#[doc = r""]
31250#[doc = r" ```json"]
31251#[doc = "{"]
31252#[doc = "  \"type\": \"object\","]
31253#[doc = "  \"required\": ["]
31254#[doc = "    \"account_id\","]
31255#[doc = "    \"key_base64\","]
31256#[doc = "    \"value_base64\""]
31257#[doc = "  ],"]
31258#[doc = "  \"properties\": {"]
31259#[doc = "    \"access_key\": false,"]
31260#[doc = "    \"account_id\": {"]
31261#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31262#[doc = "    },"]
31263#[doc = "    \"amount\": false,"]
31264#[doc = "    \"code_base64\": false,"]
31265#[doc = "    \"code_hash\": false,"]
31266#[doc = "    \"gas_key\": false,"]
31267#[doc = "    \"global_contract_account_id\": false,"]
31268#[doc = "    \"global_contract_hash\": false,"]
31269#[doc = "    \"index\": false,"]
31270#[doc = "    \"key_base64\": {"]
31271#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
31272#[doc = "    },"]
31273#[doc = "    \"locked\": false,"]
31274#[doc = "    \"nonce\": false,"]
31275#[doc = "    \"public_key\": false,"]
31276#[doc = "    \"storage_paid_at\": false,"]
31277#[doc = "    \"storage_usage\": false,"]
31278#[doc = "    \"value_base64\": {"]
31279#[doc = "      \"$ref\": \"#/components/schemas/StoreValue\""]
31280#[doc = "    }"]
31281#[doc = "  }"]
31282#[doc = "}"]
31283#[doc = r" ```"]
31284#[doc = r" </details>"]
31285#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31286pub struct StateChangeWithCauseViewVariant7Change {
31287    pub account_id: AccountId,
31288    pub key_base64: StoreKey,
31289    pub value_base64: StoreValue,
31290}
31291impl ::std::convert::From<&StateChangeWithCauseViewVariant7Change>
31292    for StateChangeWithCauseViewVariant7Change
31293{
31294    fn from(value: &StateChangeWithCauseViewVariant7Change) -> Self {
31295        value.clone()
31296    }
31297}
31298#[doc = "`StateChangeWithCauseViewVariant7Type`"]
31299#[doc = r""]
31300#[doc = r" <details><summary>JSON schema</summary>"]
31301#[doc = r""]
31302#[doc = r" ```json"]
31303#[doc = "{"]
31304#[doc = "  \"type\": \"string\","]
31305#[doc = "  \"enum\": ["]
31306#[doc = "    \"data_update\""]
31307#[doc = "  ]"]
31308#[doc = "}"]
31309#[doc = r" ```"]
31310#[doc = r" </details>"]
31311#[derive(
31312    :: serde :: Deserialize,
31313    :: serde :: Serialize,
31314    Clone,
31315    Copy,
31316    Debug,
31317    Eq,
31318    Hash,
31319    Ord,
31320    PartialEq,
31321    PartialOrd,
31322)]
31323pub enum StateChangeWithCauseViewVariant7Type {
31324    #[serde(rename = "data_update")]
31325    DataUpdate,
31326}
31327impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant7Type {
31328    fn from(value: &StateChangeWithCauseViewVariant7Type) -> Self {
31329        value.clone()
31330    }
31331}
31332impl ::std::fmt::Display for StateChangeWithCauseViewVariant7Type {
31333    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31334        match *self {
31335            Self::DataUpdate => f.write_str("data_update"),
31336        }
31337    }
31338}
31339impl ::std::str::FromStr for StateChangeWithCauseViewVariant7Type {
31340    type Err = self::error::ConversionError;
31341    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31342        match value {
31343            "data_update" => Ok(Self::DataUpdate),
31344            _ => Err("invalid value".into()),
31345        }
31346    }
31347}
31348impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant7Type {
31349    type Error = self::error::ConversionError;
31350    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31351        value.parse()
31352    }
31353}
31354impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant7Type {
31355    type Error = self::error::ConversionError;
31356    fn try_from(
31357        value: &::std::string::String,
31358    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31359        value.parse()
31360    }
31361}
31362impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant7Type {
31363    type Error = self::error::ConversionError;
31364    fn try_from(
31365        value: ::std::string::String,
31366    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31367        value.parse()
31368    }
31369}
31370#[doc = "`StateChangeWithCauseViewVariant8Change`"]
31371#[doc = r""]
31372#[doc = r" <details><summary>JSON schema</summary>"]
31373#[doc = r""]
31374#[doc = r" ```json"]
31375#[doc = "{"]
31376#[doc = "  \"type\": \"object\","]
31377#[doc = "  \"required\": ["]
31378#[doc = "    \"account_id\","]
31379#[doc = "    \"key_base64\""]
31380#[doc = "  ],"]
31381#[doc = "  \"properties\": {"]
31382#[doc = "    \"access_key\": false,"]
31383#[doc = "    \"account_id\": {"]
31384#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31385#[doc = "    },"]
31386#[doc = "    \"amount\": false,"]
31387#[doc = "    \"code_base64\": false,"]
31388#[doc = "    \"code_hash\": false,"]
31389#[doc = "    \"gas_key\": false,"]
31390#[doc = "    \"global_contract_account_id\": false,"]
31391#[doc = "    \"global_contract_hash\": false,"]
31392#[doc = "    \"index\": false,"]
31393#[doc = "    \"key_base64\": {"]
31394#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
31395#[doc = "    },"]
31396#[doc = "    \"locked\": false,"]
31397#[doc = "    \"nonce\": false,"]
31398#[doc = "    \"public_key\": false,"]
31399#[doc = "    \"storage_paid_at\": false,"]
31400#[doc = "    \"storage_usage\": false,"]
31401#[doc = "    \"value_base64\": false"]
31402#[doc = "  }"]
31403#[doc = "}"]
31404#[doc = r" ```"]
31405#[doc = r" </details>"]
31406#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31407pub struct StateChangeWithCauseViewVariant8Change {
31408    pub account_id: AccountId,
31409    pub key_base64: StoreKey,
31410}
31411impl ::std::convert::From<&StateChangeWithCauseViewVariant8Change>
31412    for StateChangeWithCauseViewVariant8Change
31413{
31414    fn from(value: &StateChangeWithCauseViewVariant8Change) -> Self {
31415        value.clone()
31416    }
31417}
31418#[doc = "`StateChangeWithCauseViewVariant8Type`"]
31419#[doc = r""]
31420#[doc = r" <details><summary>JSON schema</summary>"]
31421#[doc = r""]
31422#[doc = r" ```json"]
31423#[doc = "{"]
31424#[doc = "  \"type\": \"string\","]
31425#[doc = "  \"enum\": ["]
31426#[doc = "    \"data_deletion\""]
31427#[doc = "  ]"]
31428#[doc = "}"]
31429#[doc = r" ```"]
31430#[doc = r" </details>"]
31431#[derive(
31432    :: serde :: Deserialize,
31433    :: serde :: Serialize,
31434    Clone,
31435    Copy,
31436    Debug,
31437    Eq,
31438    Hash,
31439    Ord,
31440    PartialEq,
31441    PartialOrd,
31442)]
31443pub enum StateChangeWithCauseViewVariant8Type {
31444    #[serde(rename = "data_deletion")]
31445    DataDeletion,
31446}
31447impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant8Type {
31448    fn from(value: &StateChangeWithCauseViewVariant8Type) -> Self {
31449        value.clone()
31450    }
31451}
31452impl ::std::fmt::Display for StateChangeWithCauseViewVariant8Type {
31453    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31454        match *self {
31455            Self::DataDeletion => f.write_str("data_deletion"),
31456        }
31457    }
31458}
31459impl ::std::str::FromStr for StateChangeWithCauseViewVariant8Type {
31460    type Err = self::error::ConversionError;
31461    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31462        match value {
31463            "data_deletion" => Ok(Self::DataDeletion),
31464            _ => Err("invalid value".into()),
31465        }
31466    }
31467}
31468impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant8Type {
31469    type Error = self::error::ConversionError;
31470    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31471        value.parse()
31472    }
31473}
31474impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant8Type {
31475    type Error = self::error::ConversionError;
31476    fn try_from(
31477        value: &::std::string::String,
31478    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31479        value.parse()
31480    }
31481}
31482impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant8Type {
31483    type Error = self::error::ConversionError;
31484    fn try_from(
31485        value: ::std::string::String,
31486    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31487        value.parse()
31488    }
31489}
31490#[doc = "`StateChangeWithCauseViewVariant9Change`"]
31491#[doc = r""]
31492#[doc = r" <details><summary>JSON schema</summary>"]
31493#[doc = r""]
31494#[doc = r" ```json"]
31495#[doc = "{"]
31496#[doc = "  \"type\": \"object\","]
31497#[doc = "  \"required\": ["]
31498#[doc = "    \"account_id\","]
31499#[doc = "    \"code_base64\""]
31500#[doc = "  ],"]
31501#[doc = "  \"properties\": {"]
31502#[doc = "    \"access_key\": false,"]
31503#[doc = "    \"account_id\": {"]
31504#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
31505#[doc = "    },"]
31506#[doc = "    \"amount\": false,"]
31507#[doc = "    \"code_base64\": {"]
31508#[doc = "      \"type\": \"string\""]
31509#[doc = "    },"]
31510#[doc = "    \"code_hash\": false,"]
31511#[doc = "    \"gas_key\": false,"]
31512#[doc = "    \"global_contract_account_id\": false,"]
31513#[doc = "    \"global_contract_hash\": false,"]
31514#[doc = "    \"index\": false,"]
31515#[doc = "    \"key_base64\": false,"]
31516#[doc = "    \"locked\": false,"]
31517#[doc = "    \"nonce\": false,"]
31518#[doc = "    \"public_key\": false,"]
31519#[doc = "    \"storage_paid_at\": false,"]
31520#[doc = "    \"storage_usage\": false,"]
31521#[doc = "    \"value_base64\": false"]
31522#[doc = "  }"]
31523#[doc = "}"]
31524#[doc = r" ```"]
31525#[doc = r" </details>"]
31526#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31527pub struct StateChangeWithCauseViewVariant9Change {
31528    pub account_id: AccountId,
31529    pub code_base64: ::std::string::String,
31530}
31531impl ::std::convert::From<&StateChangeWithCauseViewVariant9Change>
31532    for StateChangeWithCauseViewVariant9Change
31533{
31534    fn from(value: &StateChangeWithCauseViewVariant9Change) -> Self {
31535        value.clone()
31536    }
31537}
31538#[doc = "`StateChangeWithCauseViewVariant9Type`"]
31539#[doc = r""]
31540#[doc = r" <details><summary>JSON schema</summary>"]
31541#[doc = r""]
31542#[doc = r" ```json"]
31543#[doc = "{"]
31544#[doc = "  \"type\": \"string\","]
31545#[doc = "  \"enum\": ["]
31546#[doc = "    \"contract_code_update\""]
31547#[doc = "  ]"]
31548#[doc = "}"]
31549#[doc = r" ```"]
31550#[doc = r" </details>"]
31551#[derive(
31552    :: serde :: Deserialize,
31553    :: serde :: Serialize,
31554    Clone,
31555    Copy,
31556    Debug,
31557    Eq,
31558    Hash,
31559    Ord,
31560    PartialEq,
31561    PartialOrd,
31562)]
31563pub enum StateChangeWithCauseViewVariant9Type {
31564    #[serde(rename = "contract_code_update")]
31565    ContractCodeUpdate,
31566}
31567impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant9Type {
31568    fn from(value: &StateChangeWithCauseViewVariant9Type) -> Self {
31569        value.clone()
31570    }
31571}
31572impl ::std::fmt::Display for StateChangeWithCauseViewVariant9Type {
31573    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31574        match *self {
31575            Self::ContractCodeUpdate => f.write_str("contract_code_update"),
31576        }
31577    }
31578}
31579impl ::std::str::FromStr for StateChangeWithCauseViewVariant9Type {
31580    type Err = self::error::ConversionError;
31581    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31582        match value {
31583            "contract_code_update" => Ok(Self::ContractCodeUpdate),
31584            _ => Err("invalid value".into()),
31585        }
31586    }
31587}
31588impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant9Type {
31589    type Error = self::error::ConversionError;
31590    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31591        value.parse()
31592    }
31593}
31594impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant9Type {
31595    type Error = self::error::ConversionError;
31596    fn try_from(
31597        value: &::std::string::String,
31598    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31599        value.parse()
31600    }
31601}
31602impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant9Type {
31603    type Error = self::error::ConversionError;
31604    fn try_from(
31605        value: ::std::string::String,
31606    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31607        value.parse()
31608    }
31609}
31610#[doc = "Item of the state, key and value are serialized in base64 and proof for inclusion of given state item."]
31611#[doc = r""]
31612#[doc = r" <details><summary>JSON schema</summary>"]
31613#[doc = r""]
31614#[doc = r" ```json"]
31615#[doc = "{"]
31616#[doc = "  \"description\": \"Item of the state, key and value are serialized in base64 and proof for inclusion of given state item.\","]
31617#[doc = "  \"type\": \"object\","]
31618#[doc = "  \"required\": ["]
31619#[doc = "    \"key\","]
31620#[doc = "    \"value\""]
31621#[doc = "  ],"]
31622#[doc = "  \"properties\": {"]
31623#[doc = "    \"key\": {"]
31624#[doc = "      \"$ref\": \"#/components/schemas/StoreKey\""]
31625#[doc = "    },"]
31626#[doc = "    \"value\": {"]
31627#[doc = "      \"$ref\": \"#/components/schemas/StoreValue\""]
31628#[doc = "    }"]
31629#[doc = "  }"]
31630#[doc = "}"]
31631#[doc = r" ```"]
31632#[doc = r" </details>"]
31633#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31634pub struct StateItem {
31635    pub key: StoreKey,
31636    pub value: StoreValue,
31637}
31638impl ::std::convert::From<&StateItem> for StateItem {
31639    fn from(value: &StateItem) -> Self {
31640        value.clone()
31641    }
31642}
31643#[doc = "`StateSyncConfig`"]
31644#[doc = r""]
31645#[doc = r" <details><summary>JSON schema</summary>"]
31646#[doc = r""]
31647#[doc = r" ```json"]
31648#[doc = "{"]
31649#[doc = "  \"type\": \"object\","]
31650#[doc = "  \"properties\": {"]
31651#[doc = "    \"concurrency\": {"]
31652#[doc = "      \"$ref\": \"#/components/schemas/SyncConcurrency\""]
31653#[doc = "    },"]
31654#[doc = "    \"dump\": {"]
31655#[doc = "      \"description\": \"`none` value disables state dump to external storage.\","]
31656#[doc = "      \"anyOf\": ["]
31657#[doc = "        {"]
31658#[doc = "          \"$ref\": \"#/components/schemas/DumpConfig\""]
31659#[doc = "        },"]
31660#[doc = "        {"]
31661#[doc = "          \"type\": \"null\""]
31662#[doc = "        }"]
31663#[doc = "      ]"]
31664#[doc = "    },"]
31665#[doc = "    \"parts_compression_lvl\": {"]
31666#[doc = "      \"description\": \"Zstd compression level for state parts.\","]
31667#[doc = "      \"default\": 1,"]
31668#[doc = "      \"type\": \"integer\","]
31669#[doc = "      \"format\": \"int32\""]
31670#[doc = "    },"]
31671#[doc = "    \"sync\": {"]
31672#[doc = "      \"$ref\": \"#/components/schemas/SyncConfig\""]
31673#[doc = "    }"]
31674#[doc = "  }"]
31675#[doc = "}"]
31676#[doc = r" ```"]
31677#[doc = r" </details>"]
31678#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31679pub struct StateSyncConfig {
31680    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31681    pub concurrency: ::std::option::Option<SyncConcurrency>,
31682    #[doc = "`none` value disables state dump to external storage."]
31683    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31684    pub dump: ::std::option::Option<DumpConfig>,
31685    #[doc = "Zstd compression level for state parts."]
31686    #[serde(default = "defaults::default_u64::<i32, 1>")]
31687    pub parts_compression_lvl: i32,
31688    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31689    pub sync: ::std::option::Option<SyncConfig>,
31690}
31691impl ::std::convert::From<&StateSyncConfig> for StateSyncConfig {
31692    fn from(value: &StateSyncConfig) -> Self {
31693        value.clone()
31694    }
31695}
31696impl ::std::default::Default for StateSyncConfig {
31697    fn default() -> Self {
31698        Self {
31699            concurrency: Default::default(),
31700            dump: Default::default(),
31701            parts_compression_lvl: defaults::default_u64::<i32, 1>(),
31702            sync: Default::default(),
31703        }
31704    }
31705}
31706#[doc = "`StatusSyncInfo`"]
31707#[doc = r""]
31708#[doc = r" <details><summary>JSON schema</summary>"]
31709#[doc = r""]
31710#[doc = r" ```json"]
31711#[doc = "{"]
31712#[doc = "  \"type\": \"object\","]
31713#[doc = "  \"required\": ["]
31714#[doc = "    \"latest_block_hash\","]
31715#[doc = "    \"latest_block_height\","]
31716#[doc = "    \"latest_block_time\","]
31717#[doc = "    \"latest_state_root\","]
31718#[doc = "    \"syncing\""]
31719#[doc = "  ],"]
31720#[doc = "  \"properties\": {"]
31721#[doc = "    \"earliest_block_hash\": {"]
31722#[doc = "      \"anyOf\": ["]
31723#[doc = "        {"]
31724#[doc = "          \"$ref\": \"#/components/schemas/CryptoHash\""]
31725#[doc = "        },"]
31726#[doc = "        {"]
31727#[doc = "          \"type\": \"null\""]
31728#[doc = "        }"]
31729#[doc = "      ]"]
31730#[doc = "    },"]
31731#[doc = "    \"earliest_block_height\": {"]
31732#[doc = "      \"type\": ["]
31733#[doc = "        \"integer\","]
31734#[doc = "        \"null\""]
31735#[doc = "      ],"]
31736#[doc = "      \"format\": \"uint64\","]
31737#[doc = "      \"minimum\": 0.0"]
31738#[doc = "    },"]
31739#[doc = "    \"earliest_block_time\": {"]
31740#[doc = "      \"type\": ["]
31741#[doc = "        \"string\","]
31742#[doc = "        \"null\""]
31743#[doc = "      ]"]
31744#[doc = "    },"]
31745#[doc = "    \"epoch_id\": {"]
31746#[doc = "      \"anyOf\": ["]
31747#[doc = "        {"]
31748#[doc = "          \"$ref\": \"#/components/schemas/EpochId\""]
31749#[doc = "        },"]
31750#[doc = "        {"]
31751#[doc = "          \"type\": \"null\""]
31752#[doc = "        }"]
31753#[doc = "      ]"]
31754#[doc = "    },"]
31755#[doc = "    \"epoch_start_height\": {"]
31756#[doc = "      \"type\": ["]
31757#[doc = "        \"integer\","]
31758#[doc = "        \"null\""]
31759#[doc = "      ],"]
31760#[doc = "      \"format\": \"uint64\","]
31761#[doc = "      \"minimum\": 0.0"]
31762#[doc = "    },"]
31763#[doc = "    \"latest_block_hash\": {"]
31764#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
31765#[doc = "    },"]
31766#[doc = "    \"latest_block_height\": {"]
31767#[doc = "      \"type\": \"integer\","]
31768#[doc = "      \"format\": \"uint64\","]
31769#[doc = "      \"minimum\": 0.0"]
31770#[doc = "    },"]
31771#[doc = "    \"latest_block_time\": {"]
31772#[doc = "      \"type\": \"string\""]
31773#[doc = "    },"]
31774#[doc = "    \"latest_state_root\": {"]
31775#[doc = "      \"$ref\": \"#/components/schemas/CryptoHash\""]
31776#[doc = "    },"]
31777#[doc = "    \"syncing\": {"]
31778#[doc = "      \"type\": \"boolean\""]
31779#[doc = "    }"]
31780#[doc = "  }"]
31781#[doc = "}"]
31782#[doc = r" ```"]
31783#[doc = r" </details>"]
31784#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31785pub struct StatusSyncInfo {
31786    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31787    pub earliest_block_hash: ::std::option::Option<CryptoHash>,
31788    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31789    pub earliest_block_height: ::std::option::Option<u64>,
31790    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31791    pub earliest_block_time: ::std::option::Option<::std::string::String>,
31792    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31793    pub epoch_id: ::std::option::Option<EpochId>,
31794    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31795    pub epoch_start_height: ::std::option::Option<u64>,
31796    pub latest_block_hash: CryptoHash,
31797    pub latest_block_height: u64,
31798    pub latest_block_time: ::std::string::String,
31799    pub latest_state_root: CryptoHash,
31800    pub syncing: bool,
31801}
31802impl ::std::convert::From<&StatusSyncInfo> for StatusSyncInfo {
31803    fn from(value: &StatusSyncInfo) -> Self {
31804        value.clone()
31805    }
31806}
31807#[doc = "Errors which may occur during working with trie storages, storing\ntrie values (trie nodes and state values) by their hashes."]
31808#[doc = r""]
31809#[doc = r" <details><summary>JSON schema</summary>"]
31810#[doc = r""]
31811#[doc = r" ```json"]
31812#[doc = "{"]
31813#[doc = "  \"description\": \"Errors which may occur during working with trie storages, storing\\ntrie values (trie nodes and state values) by their hashes.\","]
31814#[doc = "  \"oneOf\": ["]
31815#[doc = "    {"]
31816#[doc = "      \"description\": \"Key-value db internal failure\","]
31817#[doc = "      \"type\": \"string\","]
31818#[doc = "      \"enum\": ["]
31819#[doc = "        \"StorageInternalError\""]
31820#[doc = "      ]"]
31821#[doc = "    },"]
31822#[doc = "    {"]
31823#[doc = "      \"description\": \"Requested trie value by its hash which is missing in storage.\","]
31824#[doc = "      \"type\": \"object\","]
31825#[doc = "      \"required\": ["]
31826#[doc = "        \"MissingTrieValue\""]
31827#[doc = "      ],"]
31828#[doc = "      \"properties\": {"]
31829#[doc = "        \"MissingTrieValue\": {"]
31830#[doc = "          \"$ref\": \"#/components/schemas/MissingTrieValue\""]
31831#[doc = "        }"]
31832#[doc = "      },"]
31833#[doc = "      \"additionalProperties\": false"]
31834#[doc = "    },"]
31835#[doc = "    {"]
31836#[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.\","]
31837#[doc = "      \"type\": \"string\","]
31838#[doc = "      \"enum\": ["]
31839#[doc = "        \"UnexpectedTrieValue\""]
31840#[doc = "      ]"]
31841#[doc = "    },"]
31842#[doc = "    {"]
31843#[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.\","]
31844#[doc = "      \"type\": \"object\","]
31845#[doc = "      \"required\": ["]
31846#[doc = "        \"StorageInconsistentState\""]
31847#[doc = "      ],"]
31848#[doc = "      \"properties\": {"]
31849#[doc = "        \"StorageInconsistentState\": {"]
31850#[doc = "          \"type\": \"string\""]
31851#[doc = "        }"]
31852#[doc = "      },"]
31853#[doc = "      \"additionalProperties\": false"]
31854#[doc = "    },"]
31855#[doc = "    {"]
31856#[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.\","]
31857#[doc = "      \"type\": \"object\","]
31858#[doc = "      \"required\": ["]
31859#[doc = "        \"FlatStorageBlockNotSupported\""]
31860#[doc = "      ],"]
31861#[doc = "      \"properties\": {"]
31862#[doc = "        \"FlatStorageBlockNotSupported\": {"]
31863#[doc = "          \"type\": \"string\""]
31864#[doc = "        }"]
31865#[doc = "      },"]
31866#[doc = "      \"additionalProperties\": false"]
31867#[doc = "    },"]
31868#[doc = "    {"]
31869#[doc = "      \"description\": \"In-memory trie could not be loaded for some reason.\","]
31870#[doc = "      \"type\": \"object\","]
31871#[doc = "      \"required\": ["]
31872#[doc = "        \"MemTrieLoadingError\""]
31873#[doc = "      ],"]
31874#[doc = "      \"properties\": {"]
31875#[doc = "        \"MemTrieLoadingError\": {"]
31876#[doc = "          \"type\": \"string\""]
31877#[doc = "        }"]
31878#[doc = "      },"]
31879#[doc = "      \"additionalProperties\": false"]
31880#[doc = "    }"]
31881#[doc = "  ]"]
31882#[doc = "}"]
31883#[doc = r" ```"]
31884#[doc = r" </details>"]
31885#[derive(
31886    :: serde :: Deserialize,
31887    :: serde :: Serialize,
31888    Clone,
31889    Debug,
31890    thiserror::Error,
31891    strum_macros::Display,
31892)]
31893pub enum StorageError {
31894    #[doc = "Key-value db internal failure"]
31895    StorageInternalError,
31896    #[doc = "Requested trie value by its hash which is missing in storage."]
31897    MissingTrieValue(MissingTrieValue),
31898    #[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."]
31899    UnexpectedTrieValue,
31900    #[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."]
31901    StorageInconsistentState(::std::string::String),
31902    #[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."]
31903    FlatStorageBlockNotSupported(::std::string::String),
31904    #[doc = "In-memory trie could not be loaded for some reason."]
31905    MemTrieLoadingError(::std::string::String),
31906}
31907impl ::std::convert::From<&Self> for StorageError {
31908    fn from(value: &StorageError) -> Self {
31909        value.clone()
31910    }
31911}
31912impl ::std::convert::From<MissingTrieValue> for StorageError {
31913    fn from(value: MissingTrieValue) -> Self {
31914        Self::MissingTrieValue(value)
31915    }
31916}
31917#[doc = "This enum represents if a storage_get call will be performed through flat storage or trie"]
31918#[doc = r""]
31919#[doc = r" <details><summary>JSON schema</summary>"]
31920#[doc = r""]
31921#[doc = r" ```json"]
31922#[doc = "{"]
31923#[doc = "  \"description\": \"This enum represents if a storage_get call will be performed through flat storage or trie\","]
31924#[doc = "  \"type\": \"string\","]
31925#[doc = "  \"enum\": ["]
31926#[doc = "    \"FlatStorage\","]
31927#[doc = "    \"Trie\""]
31928#[doc = "  ]"]
31929#[doc = "}"]
31930#[doc = r" ```"]
31931#[doc = r" </details>"]
31932#[derive(
31933    :: serde :: Deserialize,
31934    :: serde :: Serialize,
31935    Clone,
31936    Copy,
31937    Debug,
31938    Eq,
31939    Hash,
31940    Ord,
31941    PartialEq,
31942    PartialOrd,
31943)]
31944pub enum StorageGetMode {
31945    FlatStorage,
31946    Trie,
31947}
31948impl ::std::convert::From<&Self> for StorageGetMode {
31949    fn from(value: &StorageGetMode) -> Self {
31950        value.clone()
31951    }
31952}
31953impl ::std::fmt::Display for StorageGetMode {
31954    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31955        match *self {
31956            Self::FlatStorage => f.write_str("FlatStorage"),
31957            Self::Trie => f.write_str("Trie"),
31958        }
31959    }
31960}
31961impl ::std::str::FromStr for StorageGetMode {
31962    type Err = self::error::ConversionError;
31963    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31964        match value {
31965            "FlatStorage" => Ok(Self::FlatStorage),
31966            "Trie" => Ok(Self::Trie),
31967            _ => Err("invalid value".into()),
31968        }
31969    }
31970}
31971impl ::std::convert::TryFrom<&str> for StorageGetMode {
31972    type Error = self::error::ConversionError;
31973    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31974        value.parse()
31975    }
31976}
31977impl ::std::convert::TryFrom<&::std::string::String> for StorageGetMode {
31978    type Error = self::error::ConversionError;
31979    fn try_from(
31980        value: &::std::string::String,
31981    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31982        value.parse()
31983    }
31984}
31985impl ::std::convert::TryFrom<::std::string::String> for StorageGetMode {
31986    type Error = self::error::ConversionError;
31987    fn try_from(
31988        value: ::std::string::String,
31989    ) -> ::std::result::Result<Self, self::error::ConversionError> {
31990        value.parse()
31991    }
31992}
31993#[doc = "Describes cost of storage per block"]
31994#[doc = r""]
31995#[doc = r" <details><summary>JSON schema</summary>"]
31996#[doc = r""]
31997#[doc = r" ```json"]
31998#[doc = "{"]
31999#[doc = "  \"description\": \"Describes cost of storage per block\","]
32000#[doc = "  \"type\": \"object\","]
32001#[doc = "  \"properties\": {"]
32002#[doc = "    \"num_bytes_account\": {"]
32003#[doc = "      \"description\": \"Number of bytes for an account record, including rounding up for account id.\","]
32004#[doc = "      \"type\": \"integer\","]
32005#[doc = "      \"format\": \"uint64\","]
32006#[doc = "      \"minimum\": 0.0"]
32007#[doc = "    },"]
32008#[doc = "    \"num_extra_bytes_record\": {"]
32009#[doc = "      \"description\": \"Additional number of bytes for a k/v record\","]
32010#[doc = "      \"type\": \"integer\","]
32011#[doc = "      \"format\": \"uint64\","]
32012#[doc = "      \"minimum\": 0.0"]
32013#[doc = "    }"]
32014#[doc = "  }"]
32015#[doc = "}"]
32016#[doc = r" ```"]
32017#[doc = r" </details>"]
32018#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32019pub struct StorageUsageConfigView {
32020    #[doc = "Number of bytes for an account record, including rounding up for account id."]
32021    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
32022    pub num_bytes_account: ::std::option::Option<u64>,
32023    #[doc = "Additional number of bytes for a k/v record"]
32024    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
32025    pub num_extra_bytes_record: ::std::option::Option<u64>,
32026}
32027impl ::std::convert::From<&StorageUsageConfigView> for StorageUsageConfigView {
32028    fn from(value: &StorageUsageConfigView) -> Self {
32029        value.clone()
32030    }
32031}
32032impl ::std::default::Default for StorageUsageConfigView {
32033    fn default() -> Self {
32034        Self {
32035            num_bytes_account: Default::default(),
32036            num_extra_bytes_record: Default::default(),
32037        }
32038    }
32039}
32040#[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`)."]
32041#[doc = r""]
32042#[doc = r" <details><summary>JSON schema</summary>"]
32043#[doc = r""]
32044#[doc = r" ```json"]
32045#[doc = "{"]
32046#[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`).\","]
32047#[doc = "  \"type\": \"string\","]
32048#[doc = "  \"format\": \"bytes\""]
32049#[doc = "}"]
32050#[doc = r" ```"]
32051#[doc = r" </details>"]
32052#[derive(
32053    :: serde :: Deserialize,
32054    :: serde :: Serialize,
32055    Clone,
32056    Debug,
32057    Eq,
32058    Hash,
32059    Ord,
32060    PartialEq,
32061    PartialOrd,
32062)]
32063#[serde(transparent)]
32064pub struct StoreKey(pub ::std::string::String);
32065impl ::std::ops::Deref for StoreKey {
32066    type Target = ::std::string::String;
32067    fn deref(&self) -> &::std::string::String {
32068        &self.0
32069    }
32070}
32071impl ::std::convert::From<StoreKey> for ::std::string::String {
32072    fn from(value: StoreKey) -> Self {
32073        value.0
32074    }
32075}
32076impl ::std::convert::From<&StoreKey> for StoreKey {
32077    fn from(value: &StoreKey) -> Self {
32078        value.clone()
32079    }
32080}
32081impl ::std::convert::From<::std::string::String> for StoreKey {
32082    fn from(value: ::std::string::String) -> Self {
32083        Self(value)
32084    }
32085}
32086impl ::std::str::FromStr for StoreKey {
32087    type Err = ::std::convert::Infallible;
32088    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
32089        Ok(Self(value.to_string()))
32090    }
32091}
32092impl ::std::fmt::Display for StoreKey {
32093    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32094        self.0.fmt(f)
32095    }
32096}
32097#[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`)."]
32098#[doc = r""]
32099#[doc = r" <details><summary>JSON schema</summary>"]
32100#[doc = r""]
32101#[doc = r" ```json"]
32102#[doc = "{"]
32103#[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`).\","]
32104#[doc = "  \"type\": \"string\","]
32105#[doc = "  \"format\": \"bytes\""]
32106#[doc = "}"]
32107#[doc = r" ```"]
32108#[doc = r" </details>"]
32109#[derive(
32110    :: serde :: Deserialize,
32111    :: serde :: Serialize,
32112    Clone,
32113    Debug,
32114    Eq,
32115    Hash,
32116    Ord,
32117    PartialEq,
32118    PartialOrd,
32119)]
32120#[serde(transparent)]
32121pub struct StoreValue(pub ::std::string::String);
32122impl ::std::ops::Deref for StoreValue {
32123    type Target = ::std::string::String;
32124    fn deref(&self) -> &::std::string::String {
32125        &self.0
32126    }
32127}
32128impl ::std::convert::From<StoreValue> for ::std::string::String {
32129    fn from(value: StoreValue) -> Self {
32130        value.0
32131    }
32132}
32133impl ::std::convert::From<&StoreValue> for StoreValue {
32134    fn from(value: &StoreValue) -> Self {
32135        value.clone()
32136    }
32137}
32138impl ::std::convert::From<::std::string::String> for StoreValue {
32139    fn from(value: ::std::string::String) -> Self {
32140        Self(value)
32141    }
32142}
32143impl ::std::str::FromStr for StoreValue {
32144    type Err = ::std::convert::Infallible;
32145    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
32146        Ok(Self(value.to_string()))
32147    }
32148}
32149impl ::std::fmt::Display for StoreValue {
32150    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32151        self.0.fmt(f)
32152    }
32153}
32154#[doc = "`SyncCheckpoint`"]
32155#[doc = r""]
32156#[doc = r" <details><summary>JSON schema</summary>"]
32157#[doc = r""]
32158#[doc = r" ```json"]
32159#[doc = "{"]
32160#[doc = "  \"type\": \"string\","]
32161#[doc = "  \"enum\": ["]
32162#[doc = "    \"genesis\","]
32163#[doc = "    \"earliest_available\""]
32164#[doc = "  ]"]
32165#[doc = "}"]
32166#[doc = r" ```"]
32167#[doc = r" </details>"]
32168#[derive(
32169    :: serde :: Deserialize,
32170    :: serde :: Serialize,
32171    Clone,
32172    Copy,
32173    Debug,
32174    Eq,
32175    Hash,
32176    Ord,
32177    PartialEq,
32178    PartialOrd,
32179)]
32180pub enum SyncCheckpoint {
32181    #[serde(rename = "genesis")]
32182    Genesis,
32183    #[serde(rename = "earliest_available")]
32184    EarliestAvailable,
32185}
32186impl ::std::convert::From<&Self> for SyncCheckpoint {
32187    fn from(value: &SyncCheckpoint) -> Self {
32188        value.clone()
32189    }
32190}
32191impl ::std::fmt::Display for SyncCheckpoint {
32192    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32193        match *self {
32194            Self::Genesis => f.write_str("genesis"),
32195            Self::EarliestAvailable => f.write_str("earliest_available"),
32196        }
32197    }
32198}
32199impl ::std::str::FromStr for SyncCheckpoint {
32200    type Err = self::error::ConversionError;
32201    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32202        match value {
32203            "genesis" => Ok(Self::Genesis),
32204            "earliest_available" => Ok(Self::EarliestAvailable),
32205            _ => Err("invalid value".into()),
32206        }
32207    }
32208}
32209impl ::std::convert::TryFrom<&str> for SyncCheckpoint {
32210    type Error = self::error::ConversionError;
32211    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32212        value.parse()
32213    }
32214}
32215impl ::std::convert::TryFrom<&::std::string::String> for SyncCheckpoint {
32216    type Error = self::error::ConversionError;
32217    fn try_from(
32218        value: &::std::string::String,
32219    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32220        value.parse()
32221    }
32222}
32223impl ::std::convert::TryFrom<::std::string::String> for SyncCheckpoint {
32224    type Error = self::error::ConversionError;
32225    fn try_from(
32226        value: ::std::string::String,
32227    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32228        value.parse()
32229    }
32230}
32231#[doc = "`SyncConcurrency`"]
32232#[doc = r""]
32233#[doc = r" <details><summary>JSON schema</summary>"]
32234#[doc = r""]
32235#[doc = r" ```json"]
32236#[doc = "{"]
32237#[doc = "  \"type\": \"object\","]
32238#[doc = "  \"properties\": {"]
32239#[doc = "    \"apply\": {"]
32240#[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.\","]
32241#[doc = "      \"type\": \"integer\","]
32242#[doc = "      \"format\": \"uint8\","]
32243#[doc = "      \"maximum\": 255.0,"]
32244#[doc = "      \"minimum\": 0.0"]
32245#[doc = "    },"]
32246#[doc = "    \"apply_during_catchup\": {"]
32247#[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.\","]
32248#[doc = "      \"type\": \"integer\","]
32249#[doc = "      \"format\": \"uint8\","]
32250#[doc = "      \"maximum\": 255.0,"]
32251#[doc = "      \"minimum\": 0.0"]
32252#[doc = "    },"]
32253#[doc = "    \"peer_downloads\": {"]
32254#[doc = "      \"description\": \"Maximum number of outstanding requests for decentralized state sync.\","]
32255#[doc = "      \"type\": \"integer\","]
32256#[doc = "      \"format\": \"uint8\","]
32257#[doc = "      \"maximum\": 255.0,"]
32258#[doc = "      \"minimum\": 0.0"]
32259#[doc = "    },"]
32260#[doc = "    \"per_shard\": {"]
32261#[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.\","]
32262#[doc = "      \"type\": \"integer\","]
32263#[doc = "      \"format\": \"uint8\","]
32264#[doc = "      \"maximum\": 255.0,"]
32265#[doc = "      \"minimum\": 0.0"]
32266#[doc = "    }"]
32267#[doc = "  }"]
32268#[doc = "}"]
32269#[doc = r" ```"]
32270#[doc = r" </details>"]
32271#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32272pub struct SyncConcurrency {
32273    #[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."]
32274    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
32275    pub apply: ::std::option::Option<u8>,
32276    #[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."]
32277    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
32278    pub apply_during_catchup: ::std::option::Option<u8>,
32279    #[doc = "Maximum number of outstanding requests for decentralized state sync."]
32280    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
32281    pub peer_downloads: ::std::option::Option<u8>,
32282    #[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."]
32283    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
32284    pub per_shard: ::std::option::Option<u8>,
32285}
32286impl ::std::convert::From<&SyncConcurrency> for SyncConcurrency {
32287    fn from(value: &SyncConcurrency) -> Self {
32288        value.clone()
32289    }
32290}
32291impl ::std::default::Default for SyncConcurrency {
32292    fn default() -> Self {
32293        Self {
32294            apply: Default::default(),
32295            apply_during_catchup: Default::default(),
32296            peer_downloads: Default::default(),
32297            per_shard: Default::default(),
32298        }
32299    }
32300}
32301#[doc = "Configures how to fetch state parts during state sync."]
32302#[doc = r""]
32303#[doc = r" <details><summary>JSON schema</summary>"]
32304#[doc = r""]
32305#[doc = r" ```json"]
32306#[doc = "{"]
32307#[doc = "  \"description\": \"Configures how to fetch state parts during state sync.\","]
32308#[doc = "  \"oneOf\": ["]
32309#[doc = "    {"]
32310#[doc = "      \"description\": \"Syncs state from the peers without reading anything from external storage.\","]
32311#[doc = "      \"type\": \"string\","]
32312#[doc = "      \"enum\": ["]
32313#[doc = "        \"Peers\""]
32314#[doc = "      ]"]
32315#[doc = "    },"]
32316#[doc = "    {"]
32317#[doc = "      \"description\": \"Expects parts to be available in external storage.\\n\\nUsually as a fallback after some number of attempts to use peers.\","]
32318#[doc = "      \"type\": \"object\","]
32319#[doc = "      \"required\": ["]
32320#[doc = "        \"ExternalStorage\""]
32321#[doc = "      ],"]
32322#[doc = "      \"properties\": {"]
32323#[doc = "        \"ExternalStorage\": {"]
32324#[doc = "          \"$ref\": \"#/components/schemas/ExternalStorageConfig\""]
32325#[doc = "        }"]
32326#[doc = "      },"]
32327#[doc = "      \"additionalProperties\": false"]
32328#[doc = "    }"]
32329#[doc = "  ]"]
32330#[doc = "}"]
32331#[doc = r" ```"]
32332#[doc = r" </details>"]
32333#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32334pub enum SyncConfig {
32335    #[doc = "Syncs state from the peers without reading anything from external storage."]
32336    Peers,
32337    #[doc = "Expects parts to be available in external storage.\n\nUsually as a fallback after some number of attempts to use peers."]
32338    ExternalStorage(ExternalStorageConfig),
32339}
32340impl ::std::convert::From<&Self> for SyncConfig {
32341    fn from(value: &SyncConfig) -> Self {
32342        value.clone()
32343    }
32344}
32345impl ::std::convert::From<ExternalStorageConfig> for SyncConfig {
32346    fn from(value: ExternalStorageConfig) -> Self {
32347        Self::ExternalStorage(value)
32348    }
32349}
32350#[doc = "`Tier1ProxyView`"]
32351#[doc = r""]
32352#[doc = r" <details><summary>JSON schema</summary>"]
32353#[doc = r""]
32354#[doc = r" ```json"]
32355#[doc = "{"]
32356#[doc = "  \"type\": \"object\","]
32357#[doc = "  \"required\": ["]
32358#[doc = "    \"addr\","]
32359#[doc = "    \"peer_id\""]
32360#[doc = "  ],"]
32361#[doc = "  \"properties\": {"]
32362#[doc = "    \"addr\": {"]
32363#[doc = "      \"type\": \"string\""]
32364#[doc = "    },"]
32365#[doc = "    \"peer_id\": {"]
32366#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
32367#[doc = "    }"]
32368#[doc = "  }"]
32369#[doc = "}"]
32370#[doc = r" ```"]
32371#[doc = r" </details>"]
32372#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32373pub struct Tier1ProxyView {
32374    pub addr: ::std::string::String,
32375    pub peer_id: PublicKey,
32376}
32377impl ::std::convert::From<&Tier1ProxyView> for Tier1ProxyView {
32378    fn from(value: &Tier1ProxyView) -> Self {
32379        value.clone()
32380    }
32381}
32382#[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."]
32383#[doc = r""]
32384#[doc = r" <details><summary>JSON schema</summary>"]
32385#[doc = r""]
32386#[doc = r" ```json"]
32387#[doc = "{"]
32388#[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.\","]
32389#[doc = "  \"oneOf\": ["]
32390#[doc = "    {"]
32391#[doc = "      \"description\": \"Tracks no shards (light client).\","]
32392#[doc = "      \"type\": \"string\","]
32393#[doc = "      \"enum\": ["]
32394#[doc = "        \"NoShards\""]
32395#[doc = "      ]"]
32396#[doc = "    },"]
32397#[doc = "    {"]
32398#[doc = "      \"description\": \"Tracks arbitrary shards.\","]
32399#[doc = "      \"type\": \"object\","]
32400#[doc = "      \"required\": ["]
32401#[doc = "        \"Shards\""]
32402#[doc = "      ],"]
32403#[doc = "      \"properties\": {"]
32404#[doc = "        \"Shards\": {"]
32405#[doc = "          \"type\": \"array\","]
32406#[doc = "          \"items\": {"]
32407#[doc = "            \"$ref\": \"#/components/schemas/ShardUId\""]
32408#[doc = "          }"]
32409#[doc = "        }"]
32410#[doc = "      },"]
32411#[doc = "      \"additionalProperties\": false"]
32412#[doc = "    },"]
32413#[doc = "    {"]
32414#[doc = "      \"description\": \"Tracks all shards.\","]
32415#[doc = "      \"type\": \"string\","]
32416#[doc = "      \"enum\": ["]
32417#[doc = "        \"AllShards\""]
32418#[doc = "      ]"]
32419#[doc = "    },"]
32420#[doc = "    {"]
32421#[doc = "      \"description\": \"Tracks shards that are assigned to given validator account.\","]
32422#[doc = "      \"type\": \"object\","]
32423#[doc = "      \"required\": ["]
32424#[doc = "        \"ShadowValidator\""]
32425#[doc = "      ],"]
32426#[doc = "      \"properties\": {"]
32427#[doc = "        \"ShadowValidator\": {"]
32428#[doc = "          \"$ref\": \"#/components/schemas/AccountId\""]
32429#[doc = "        }"]
32430#[doc = "      },"]
32431#[doc = "      \"additionalProperties\": false"]
32432#[doc = "    },"]
32433#[doc = "    {"]
32434#[doc = "      \"description\": \"Rotate between these sets of tracked shards.\\nUsed to simulate the behavior of chunk only producers without staking tokens.\","]
32435#[doc = "      \"type\": \"object\","]
32436#[doc = "      \"required\": ["]
32437#[doc = "        \"Schedule\""]
32438#[doc = "      ],"]
32439#[doc = "      \"properties\": {"]
32440#[doc = "        \"Schedule\": {"]
32441#[doc = "          \"type\": \"array\","]
32442#[doc = "          \"items\": {"]
32443#[doc = "            \"type\": \"array\","]
32444#[doc = "            \"items\": {"]
32445#[doc = "              \"$ref\": \"#/components/schemas/ShardId\""]
32446#[doc = "            }"]
32447#[doc = "          }"]
32448#[doc = "        }"]
32449#[doc = "      },"]
32450#[doc = "      \"additionalProperties\": false"]
32451#[doc = "    },"]
32452#[doc = "    {"]
32453#[doc = "      \"description\": \"Tracks shards that contain one of the given account.\","]
32454#[doc = "      \"type\": \"object\","]
32455#[doc = "      \"required\": ["]
32456#[doc = "        \"Accounts\""]
32457#[doc = "      ],"]
32458#[doc = "      \"properties\": {"]
32459#[doc = "        \"Accounts\": {"]
32460#[doc = "          \"type\": \"array\","]
32461#[doc = "          \"items\": {"]
32462#[doc = "            \"$ref\": \"#/components/schemas/AccountId\""]
32463#[doc = "          }"]
32464#[doc = "        }"]
32465#[doc = "      },"]
32466#[doc = "      \"additionalProperties\": false"]
32467#[doc = "    }"]
32468#[doc = "  ]"]
32469#[doc = "}"]
32470#[doc = r" ```"]
32471#[doc = r" </details>"]
32472#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32473pub enum TrackedShardsConfig {
32474    #[doc = "Tracks no shards (light client)."]
32475    NoShards,
32476    #[doc = "Tracks arbitrary shards."]
32477    Shards(::std::vec::Vec<ShardUId>),
32478    #[doc = "Tracks all shards."]
32479    AllShards,
32480    #[doc = "Tracks shards that are assigned to given validator account."]
32481    ShadowValidator(AccountId),
32482    #[doc = "Rotate between these sets of tracked shards.\nUsed to simulate the behavior of chunk only producers without staking tokens."]
32483    Schedule(::std::vec::Vec<::std::vec::Vec<ShardId>>),
32484    #[doc = "Tracks shards that contain one of the given account."]
32485    Accounts(::std::vec::Vec<AccountId>),
32486}
32487impl ::std::convert::From<&Self> for TrackedShardsConfig {
32488    fn from(value: &TrackedShardsConfig) -> Self {
32489        value.clone()
32490    }
32491}
32492impl ::std::convert::From<::std::vec::Vec<ShardUId>> for TrackedShardsConfig {
32493    fn from(value: ::std::vec::Vec<ShardUId>) -> Self {
32494        Self::Shards(value)
32495    }
32496}
32497impl ::std::convert::From<AccountId> for TrackedShardsConfig {
32498    fn from(value: AccountId) -> Self {
32499        Self::ShadowValidator(value)
32500    }
32501}
32502impl ::std::convert::From<::std::vec::Vec<::std::vec::Vec<ShardId>>> for TrackedShardsConfig {
32503    fn from(value: ::std::vec::Vec<::std::vec::Vec<ShardId>>) -> Self {
32504        Self::Schedule(value)
32505    }
32506}
32507impl ::std::convert::From<::std::vec::Vec<AccountId>> for TrackedShardsConfig {
32508    fn from(value: ::std::vec::Vec<AccountId>) -> Self {
32509        Self::Accounts(value)
32510    }
32511}
32512#[doc = "`TransferAction`"]
32513#[doc = r""]
32514#[doc = r" <details><summary>JSON schema</summary>"]
32515#[doc = r""]
32516#[doc = r" ```json"]
32517#[doc = "{"]
32518#[doc = "  \"type\": \"object\","]
32519#[doc = "  \"required\": ["]
32520#[doc = "    \"deposit\""]
32521#[doc = "  ],"]
32522#[doc = "  \"properties\": {"]
32523#[doc = "    \"deposit\": {"]
32524#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
32525#[doc = "    }"]
32526#[doc = "  }"]
32527#[doc = "}"]
32528#[doc = r" ```"]
32529#[doc = r" </details>"]
32530#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32531pub struct TransferAction {
32532    pub deposit: NearToken,
32533}
32534impl ::std::convert::From<&TransferAction> for TransferAction {
32535    fn from(value: &TransferAction) -> Self {
32536        value.clone()
32537    }
32538}
32539#[doc = "`TransferToGasKeyAction`"]
32540#[doc = r""]
32541#[doc = r" <details><summary>JSON schema</summary>"]
32542#[doc = r""]
32543#[doc = r" ```json"]
32544#[doc = "{"]
32545#[doc = "  \"type\": \"object\","]
32546#[doc = "  \"required\": ["]
32547#[doc = "    \"deposit\","]
32548#[doc = "    \"public_key\""]
32549#[doc = "  ],"]
32550#[doc = "  \"properties\": {"]
32551#[doc = "    \"deposit\": {"]
32552#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
32553#[doc = "    },"]
32554#[doc = "    \"public_key\": {"]
32555#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
32556#[doc = "    }"]
32557#[doc = "  }"]
32558#[doc = "}"]
32559#[doc = r" ```"]
32560#[doc = r" </details>"]
32561#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32562pub struct TransferToGasKeyAction {
32563    pub deposit: NearToken,
32564    pub public_key: PublicKey,
32565}
32566impl ::std::convert::From<&TransferToGasKeyAction> for TransferToGasKeyAction {
32567    fn from(value: &TransferToGasKeyAction) -> Self {
32568        value.clone()
32569    }
32570}
32571#[doc = "Error returned in the ExecutionOutcome in case of failure"]
32572#[doc = r""]
32573#[doc = r" <details><summary>JSON schema</summary>"]
32574#[doc = r""]
32575#[doc = r" ```json"]
32576#[doc = "{"]
32577#[doc = "  \"description\": \"Error returned in the ExecutionOutcome in case of failure\","]
32578#[doc = "  \"oneOf\": ["]
32579#[doc = "    {"]
32580#[doc = "      \"description\": \"An error happened during Action execution\","]
32581#[doc = "      \"type\": \"object\","]
32582#[doc = "      \"required\": ["]
32583#[doc = "        \"ActionError\""]
32584#[doc = "      ],"]
32585#[doc = "      \"properties\": {"]
32586#[doc = "        \"ActionError\": {"]
32587#[doc = "          \"$ref\": \"#/components/schemas/ActionError\""]
32588#[doc = "        }"]
32589#[doc = "      },"]
32590#[doc = "      \"additionalProperties\": false"]
32591#[doc = "    },"]
32592#[doc = "    {"]
32593#[doc = "      \"description\": \"An error happened during Transaction execution\","]
32594#[doc = "      \"type\": \"object\","]
32595#[doc = "      \"required\": ["]
32596#[doc = "        \"InvalidTxError\""]
32597#[doc = "      ],"]
32598#[doc = "      \"properties\": {"]
32599#[doc = "        \"InvalidTxError\": {"]
32600#[doc = "          \"$ref\": \"#/components/schemas/InvalidTxError\""]
32601#[doc = "        }"]
32602#[doc = "      },"]
32603#[doc = "      \"additionalProperties\": false"]
32604#[doc = "    }"]
32605#[doc = "  ]"]
32606#[doc = "}"]
32607#[doc = r" ```"]
32608#[doc = r" </details>"]
32609#[derive(
32610    :: serde :: Deserialize,
32611    :: serde :: Serialize,
32612    Clone,
32613    Debug,
32614    thiserror::Error,
32615    strum_macros::Display,
32616)]
32617pub enum TxExecutionError {
32618    #[doc = "An error happened during Action execution"]
32619    ActionError(ActionError),
32620    #[doc = "An error happened during Transaction execution"]
32621    InvalidTxError(InvalidTxError),
32622}
32623impl ::std::convert::From<&Self> for TxExecutionError {
32624    fn from(value: &TxExecutionError) -> Self {
32625        value.clone()
32626    }
32627}
32628impl ::std::convert::From<ActionError> for TxExecutionError {
32629    fn from(value: ActionError) -> Self {
32630        Self::ActionError(value)
32631    }
32632}
32633impl ::std::convert::From<InvalidTxError> for TxExecutionError {
32634    fn from(value: InvalidTxError) -> Self {
32635        Self::InvalidTxError(value)
32636    }
32637}
32638#[doc = "`TxExecutionStatus`"]
32639#[doc = r""]
32640#[doc = r" <details><summary>JSON schema</summary>"]
32641#[doc = r""]
32642#[doc = r" ```json"]
32643#[doc = "{"]
32644#[doc = "  \"oneOf\": ["]
32645#[doc = "    {"]
32646#[doc = "      \"description\": \"Transaction is waiting to be included into the block\","]
32647#[doc = "      \"type\": \"string\","]
32648#[doc = "      \"enum\": ["]
32649#[doc = "        \"NONE\""]
32650#[doc = "      ]"]
32651#[doc = "    },"]
32652#[doc = "    {"]
32653#[doc = "      \"description\": \"Transaction is included into the block. The block may be not finalized yet\","]
32654#[doc = "      \"type\": \"string\","]
32655#[doc = "      \"enum\": ["]
32656#[doc = "        \"INCLUDED\""]
32657#[doc = "      ]"]
32658#[doc = "    },"]
32659#[doc = "    {"]
32660#[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\","]
32661#[doc = "      \"type\": \"string\","]
32662#[doc = "      \"enum\": ["]
32663#[doc = "        \"EXECUTED_OPTIMISTIC\""]
32664#[doc = "      ]"]
32665#[doc = "    },"]
32666#[doc = "    {"]
32667#[doc = "      \"description\": \"Transaction is included into finalized block\","]
32668#[doc = "      \"type\": \"string\","]
32669#[doc = "      \"enum\": ["]
32670#[doc = "        \"INCLUDED_FINAL\""]
32671#[doc = "      ]"]
32672#[doc = "    },"]
32673#[doc = "    {"]
32674#[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\","]
32675#[doc = "      \"type\": \"string\","]
32676#[doc = "      \"enum\": ["]
32677#[doc = "        \"EXECUTED\""]
32678#[doc = "      ]"]
32679#[doc = "    },"]
32680#[doc = "    {"]
32681#[doc = "      \"description\": \"Transaction is included into finalized block +\\nExecution of all transaction receipts is finalized, including refund receipts\","]
32682#[doc = "      \"type\": \"string\","]
32683#[doc = "      \"enum\": ["]
32684#[doc = "        \"FINAL\""]
32685#[doc = "      ]"]
32686#[doc = "    }"]
32687#[doc = "  ]"]
32688#[doc = "}"]
32689#[doc = r" ```"]
32690#[doc = r" </details>"]
32691#[derive(
32692    :: serde :: Deserialize,
32693    :: serde :: Serialize,
32694    Clone,
32695    Copy,
32696    Debug,
32697    Eq,
32698    Hash,
32699    Ord,
32700    PartialEq,
32701    PartialOrd,
32702)]
32703pub enum TxExecutionStatus {
32704    #[doc = "Transaction is waiting to be included into the block"]
32705    #[serde(rename = "NONE")]
32706    None,
32707    #[doc = "Transaction is included into the block. The block may be not finalized yet"]
32708    #[serde(rename = "INCLUDED")]
32709    Included,
32710    #[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"]
32711    #[serde(rename = "EXECUTED_OPTIMISTIC")]
32712    ExecutedOptimistic,
32713    #[doc = "Transaction is included into finalized block"]
32714    #[serde(rename = "INCLUDED_FINAL")]
32715    IncludedFinal,
32716    #[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"]
32717    #[serde(rename = "EXECUTED")]
32718    Executed,
32719    #[doc = "Transaction is included into finalized block +\nExecution of all transaction receipts is finalized, including refund receipts"]
32720    #[serde(rename = "FINAL")]
32721    Final,
32722}
32723impl ::std::convert::From<&Self> for TxExecutionStatus {
32724    fn from(value: &TxExecutionStatus) -> Self {
32725        value.clone()
32726    }
32727}
32728impl ::std::fmt::Display for TxExecutionStatus {
32729    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32730        match *self {
32731            Self::None => f.write_str("NONE"),
32732            Self::Included => f.write_str("INCLUDED"),
32733            Self::ExecutedOptimistic => f.write_str("EXECUTED_OPTIMISTIC"),
32734            Self::IncludedFinal => f.write_str("INCLUDED_FINAL"),
32735            Self::Executed => f.write_str("EXECUTED"),
32736            Self::Final => f.write_str("FINAL"),
32737        }
32738    }
32739}
32740impl ::std::str::FromStr for TxExecutionStatus {
32741    type Err = self::error::ConversionError;
32742    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32743        match value {
32744            "NONE" => Ok(Self::None),
32745            "INCLUDED" => Ok(Self::Included),
32746            "EXECUTED_OPTIMISTIC" => Ok(Self::ExecutedOptimistic),
32747            "INCLUDED_FINAL" => Ok(Self::IncludedFinal),
32748            "EXECUTED" => Ok(Self::Executed),
32749            "FINAL" => Ok(Self::Final),
32750            _ => Err("invalid value".into()),
32751        }
32752    }
32753}
32754impl ::std::convert::TryFrom<&str> for TxExecutionStatus {
32755    type Error = self::error::ConversionError;
32756    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32757        value.parse()
32758    }
32759}
32760impl ::std::convert::TryFrom<&::std::string::String> for TxExecutionStatus {
32761    type Error = self::error::ConversionError;
32762    fn try_from(
32763        value: &::std::string::String,
32764    ) -> ::std::result::Result<Self, self::error::ConversionError> {
32765        value.parse()
32766    }
32767}
32768impl ::std::convert::TryFrom<::std::string::String> for TxExecutionStatus {
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}
32776#[doc = "Use global contract action"]
32777#[doc = r""]
32778#[doc = r" <details><summary>JSON schema</summary>"]
32779#[doc = r""]
32780#[doc = r" ```json"]
32781#[doc = "{"]
32782#[doc = "  \"description\": \"Use global contract action\","]
32783#[doc = "  \"type\": \"object\","]
32784#[doc = "  \"required\": ["]
32785#[doc = "    \"contract_identifier\""]
32786#[doc = "  ],"]
32787#[doc = "  \"properties\": {"]
32788#[doc = "    \"contract_identifier\": {"]
32789#[doc = "      \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
32790#[doc = "    }"]
32791#[doc = "  }"]
32792#[doc = "}"]
32793#[doc = r" ```"]
32794#[doc = r" </details>"]
32795#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32796pub struct UseGlobalContractAction {
32797    pub contract_identifier: GlobalContractIdentifier,
32798}
32799impl ::std::convert::From<&UseGlobalContractAction> for UseGlobalContractAction {
32800    fn from(value: &UseGlobalContractAction) -> Self {
32801        value.clone()
32802    }
32803}
32804#[doc = "`ValidatorInfo`"]
32805#[doc = r""]
32806#[doc = r" <details><summary>JSON schema</summary>"]
32807#[doc = r""]
32808#[doc = r" ```json"]
32809#[doc = "{"]
32810#[doc = "  \"type\": \"object\","]
32811#[doc = "  \"required\": ["]
32812#[doc = "    \"account_id\""]
32813#[doc = "  ],"]
32814#[doc = "  \"properties\": {"]
32815#[doc = "    \"account_id\": {"]
32816#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
32817#[doc = "    }"]
32818#[doc = "  }"]
32819#[doc = "}"]
32820#[doc = r" ```"]
32821#[doc = r" </details>"]
32822#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32823pub struct ValidatorInfo {
32824    pub account_id: AccountId,
32825}
32826impl ::std::convert::From<&ValidatorInfo> for ValidatorInfo {
32827    fn from(value: &ValidatorInfo) -> Self {
32828        value.clone()
32829    }
32830}
32831#[doc = "Reasons for removing a validator from the validator set."]
32832#[doc = r""]
32833#[doc = r" <details><summary>JSON schema</summary>"]
32834#[doc = r""]
32835#[doc = r" ```json"]
32836#[doc = "{"]
32837#[doc = "  \"description\": \"Reasons for removing a validator from the validator set.\","]
32838#[doc = "  \"oneOf\": ["]
32839#[doc = "    {"]
32840#[doc = "      \"description\": \"Deprecated\","]
32841#[doc = "      \"type\": \"string\","]
32842#[doc = "      \"enum\": ["]
32843#[doc = "        \"_UnusedSlashed\""]
32844#[doc = "      ]"]
32845#[doc = "    },"]
32846#[doc = "    {"]
32847#[doc = "      \"description\": \"Validator didn't produce enough blocks.\","]
32848#[doc = "      \"type\": \"object\","]
32849#[doc = "      \"required\": ["]
32850#[doc = "        \"NotEnoughBlocks\""]
32851#[doc = "      ],"]
32852#[doc = "      \"properties\": {"]
32853#[doc = "        \"NotEnoughBlocks\": {"]
32854#[doc = "          \"type\": \"object\","]
32855#[doc = "          \"required\": ["]
32856#[doc = "            \"expected\","]
32857#[doc = "            \"produced\""]
32858#[doc = "          ],"]
32859#[doc = "          \"properties\": {"]
32860#[doc = "            \"expected\": {"]
32861#[doc = "              \"type\": \"integer\","]
32862#[doc = "              \"format\": \"uint64\","]
32863#[doc = "              \"minimum\": 0.0"]
32864#[doc = "            },"]
32865#[doc = "            \"produced\": {"]
32866#[doc = "              \"type\": \"integer\","]
32867#[doc = "              \"format\": \"uint64\","]
32868#[doc = "              \"minimum\": 0.0"]
32869#[doc = "            }"]
32870#[doc = "          }"]
32871#[doc = "        }"]
32872#[doc = "      },"]
32873#[doc = "      \"additionalProperties\": false"]
32874#[doc = "    },"]
32875#[doc = "    {"]
32876#[doc = "      \"description\": \"Validator didn't produce enough chunks.\","]
32877#[doc = "      \"type\": \"object\","]
32878#[doc = "      \"required\": ["]
32879#[doc = "        \"NotEnoughChunks\""]
32880#[doc = "      ],"]
32881#[doc = "      \"properties\": {"]
32882#[doc = "        \"NotEnoughChunks\": {"]
32883#[doc = "          \"type\": \"object\","]
32884#[doc = "          \"required\": ["]
32885#[doc = "            \"expected\","]
32886#[doc = "            \"produced\""]
32887#[doc = "          ],"]
32888#[doc = "          \"properties\": {"]
32889#[doc = "            \"expected\": {"]
32890#[doc = "              \"type\": \"integer\","]
32891#[doc = "              \"format\": \"uint64\","]
32892#[doc = "              \"minimum\": 0.0"]
32893#[doc = "            },"]
32894#[doc = "            \"produced\": {"]
32895#[doc = "              \"type\": \"integer\","]
32896#[doc = "              \"format\": \"uint64\","]
32897#[doc = "              \"minimum\": 0.0"]
32898#[doc = "            }"]
32899#[doc = "          }"]
32900#[doc = "        }"]
32901#[doc = "      },"]
32902#[doc = "      \"additionalProperties\": false"]
32903#[doc = "    },"]
32904#[doc = "    {"]
32905#[doc = "      \"description\": \"Validator unstaked themselves.\","]
32906#[doc = "      \"type\": \"string\","]
32907#[doc = "      \"enum\": ["]
32908#[doc = "        \"Unstaked\""]
32909#[doc = "      ]"]
32910#[doc = "    },"]
32911#[doc = "    {"]
32912#[doc = "      \"description\": \"Validator stake is now below threshold\","]
32913#[doc = "      \"type\": \"object\","]
32914#[doc = "      \"required\": ["]
32915#[doc = "        \"NotEnoughStake\""]
32916#[doc = "      ],"]
32917#[doc = "      \"properties\": {"]
32918#[doc = "        \"NotEnoughStake\": {"]
32919#[doc = "          \"type\": \"object\","]
32920#[doc = "          \"required\": ["]
32921#[doc = "            \"stake_u128\","]
32922#[doc = "            \"threshold_u128\""]
32923#[doc = "          ],"]
32924#[doc = "          \"properties\": {"]
32925#[doc = "            \"stake_u128\": {"]
32926#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
32927#[doc = "            },"]
32928#[doc = "            \"threshold_u128\": {"]
32929#[doc = "              \"$ref\": \"#/components/schemas/NearToken\""]
32930#[doc = "            }"]
32931#[doc = "          }"]
32932#[doc = "        }"]
32933#[doc = "      },"]
32934#[doc = "      \"additionalProperties\": false"]
32935#[doc = "    },"]
32936#[doc = "    {"]
32937#[doc = "      \"description\": \"Enough stake but is not chosen because of seat limits.\","]
32938#[doc = "      \"type\": \"string\","]
32939#[doc = "      \"enum\": ["]
32940#[doc = "        \"DidNotGetASeat\""]
32941#[doc = "      ]"]
32942#[doc = "    },"]
32943#[doc = "    {"]
32944#[doc = "      \"description\": \"Validator didn't produce enough chunk endorsements.\","]
32945#[doc = "      \"type\": \"object\","]
32946#[doc = "      \"required\": ["]
32947#[doc = "        \"NotEnoughChunkEndorsements\""]
32948#[doc = "      ],"]
32949#[doc = "      \"properties\": {"]
32950#[doc = "        \"NotEnoughChunkEndorsements\": {"]
32951#[doc = "          \"type\": \"object\","]
32952#[doc = "          \"required\": ["]
32953#[doc = "            \"expected\","]
32954#[doc = "            \"produced\""]
32955#[doc = "          ],"]
32956#[doc = "          \"properties\": {"]
32957#[doc = "            \"expected\": {"]
32958#[doc = "              \"type\": \"integer\","]
32959#[doc = "              \"format\": \"uint64\","]
32960#[doc = "              \"minimum\": 0.0"]
32961#[doc = "            },"]
32962#[doc = "            \"produced\": {"]
32963#[doc = "              \"type\": \"integer\","]
32964#[doc = "              \"format\": \"uint64\","]
32965#[doc = "              \"minimum\": 0.0"]
32966#[doc = "            }"]
32967#[doc = "          }"]
32968#[doc = "        }"]
32969#[doc = "      },"]
32970#[doc = "      \"additionalProperties\": false"]
32971#[doc = "    },"]
32972#[doc = "    {"]
32973#[doc = "      \"description\": \"Validator's last block proposal was for a protocol version older than\\nthe network's voted protocol version.\","]
32974#[doc = "      \"type\": \"object\","]
32975#[doc = "      \"required\": ["]
32976#[doc = "        \"ProtocolVersionTooOld\""]
32977#[doc = "      ],"]
32978#[doc = "      \"properties\": {"]
32979#[doc = "        \"ProtocolVersionTooOld\": {"]
32980#[doc = "          \"type\": \"object\","]
32981#[doc = "          \"required\": ["]
32982#[doc = "            \"network_version\","]
32983#[doc = "            \"version\""]
32984#[doc = "          ],"]
32985#[doc = "          \"properties\": {"]
32986#[doc = "            \"network_version\": {"]
32987#[doc = "              \"type\": \"integer\","]
32988#[doc = "              \"format\": \"uint32\","]
32989#[doc = "              \"minimum\": 0.0"]
32990#[doc = "            },"]
32991#[doc = "            \"version\": {"]
32992#[doc = "              \"type\": \"integer\","]
32993#[doc = "              \"format\": \"uint32\","]
32994#[doc = "              \"minimum\": 0.0"]
32995#[doc = "            }"]
32996#[doc = "          }"]
32997#[doc = "        }"]
32998#[doc = "      },"]
32999#[doc = "      \"additionalProperties\": false"]
33000#[doc = "    }"]
33001#[doc = "  ]"]
33002#[doc = "}"]
33003#[doc = r" ```"]
33004#[doc = r" </details>"]
33005#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33006pub enum ValidatorKickoutReason {
33007    #[doc = "Deprecated"]
33008    #[serde(rename = "_UnusedSlashed")]
33009    UnusedSlashed,
33010    #[doc = "Validator didn't produce enough blocks."]
33011    NotEnoughBlocks { expected: u64, produced: u64 },
33012    #[doc = "Validator didn't produce enough chunks."]
33013    NotEnoughChunks { expected: u64, produced: u64 },
33014    #[doc = "Validator unstaked themselves."]
33015    Unstaked,
33016    #[doc = "Validator stake is now below threshold"]
33017    NotEnoughStake {
33018        stake_u128: NearToken,
33019        threshold_u128: NearToken,
33020    },
33021    #[doc = "Enough stake but is not chosen because of seat limits."]
33022    DidNotGetASeat,
33023    #[doc = "Validator didn't produce enough chunk endorsements."]
33024    NotEnoughChunkEndorsements { expected: u64, produced: u64 },
33025    #[doc = "Validator's last block proposal was for a protocol version older than\nthe network's voted protocol version."]
33026    ProtocolVersionTooOld { network_version: u32, version: u32 },
33027}
33028impl ::std::convert::From<&Self> for ValidatorKickoutReason {
33029    fn from(value: &ValidatorKickoutReason) -> Self {
33030        value.clone()
33031    }
33032}
33033#[doc = "`ValidatorKickoutView`"]
33034#[doc = r""]
33035#[doc = r" <details><summary>JSON schema</summary>"]
33036#[doc = r""]
33037#[doc = r" ```json"]
33038#[doc = "{"]
33039#[doc = "  \"type\": \"object\","]
33040#[doc = "  \"required\": ["]
33041#[doc = "    \"account_id\","]
33042#[doc = "    \"reason\""]
33043#[doc = "  ],"]
33044#[doc = "  \"properties\": {"]
33045#[doc = "    \"account_id\": {"]
33046#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
33047#[doc = "    },"]
33048#[doc = "    \"reason\": {"]
33049#[doc = "      \"$ref\": \"#/components/schemas/ValidatorKickoutReason\""]
33050#[doc = "    }"]
33051#[doc = "  }"]
33052#[doc = "}"]
33053#[doc = r" ```"]
33054#[doc = r" </details>"]
33055#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33056pub struct ValidatorKickoutView {
33057    pub account_id: AccountId,
33058    pub reason: ValidatorKickoutReason,
33059}
33060impl ::std::convert::From<&ValidatorKickoutView> for ValidatorKickoutView {
33061    fn from(value: &ValidatorKickoutView) -> Self {
33062        value.clone()
33063    }
33064}
33065#[doc = "`ValidatorStakeView`"]
33066#[doc = r""]
33067#[doc = r" <details><summary>JSON schema</summary>"]
33068#[doc = r""]
33069#[doc = r" ```json"]
33070#[doc = "{"]
33071#[doc = "  \"type\": \"object\","]
33072#[doc = "  \"allOf\": ["]
33073#[doc = "    {"]
33074#[doc = "      \"$ref\": \"#/components/schemas/ValidatorStakeViewV1\""]
33075#[doc = "    }"]
33076#[doc = "  ],"]
33077#[doc = "  \"required\": ["]
33078#[doc = "    \"validator_stake_struct_version\""]
33079#[doc = "  ],"]
33080#[doc = "  \"properties\": {"]
33081#[doc = "    \"validator_stake_struct_version\": {"]
33082#[doc = "      \"type\": \"string\","]
33083#[doc = "      \"enum\": ["]
33084#[doc = "        \"V1\""]
33085#[doc = "      ]"]
33086#[doc = "    }"]
33087#[doc = "  }"]
33088#[doc = "}"]
33089#[doc = r" ```"]
33090#[doc = r" </details>"]
33091#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33092pub struct ValidatorStakeView {
33093    pub account_id: AccountId,
33094    pub public_key: PublicKey,
33095    pub stake: NearToken,
33096    pub validator_stake_struct_version: ValidatorStakeViewValidatorStakeStructVersion,
33097}
33098impl ::std::convert::From<&ValidatorStakeView> for ValidatorStakeView {
33099    fn from(value: &ValidatorStakeView) -> Self {
33100        value.clone()
33101    }
33102}
33103#[doc = "`ValidatorStakeViewV1`"]
33104#[doc = r""]
33105#[doc = r" <details><summary>JSON schema</summary>"]
33106#[doc = r""]
33107#[doc = r" ```json"]
33108#[doc = "{"]
33109#[doc = "  \"type\": \"object\","]
33110#[doc = "  \"required\": ["]
33111#[doc = "    \"account_id\","]
33112#[doc = "    \"public_key\","]
33113#[doc = "    \"stake\""]
33114#[doc = "  ],"]
33115#[doc = "  \"properties\": {"]
33116#[doc = "    \"account_id\": {"]
33117#[doc = "      \"$ref\": \"#/components/schemas/AccountId\""]
33118#[doc = "    },"]
33119#[doc = "    \"public_key\": {"]
33120#[doc = "      \"$ref\": \"#/components/schemas/PublicKey\""]
33121#[doc = "    },"]
33122#[doc = "    \"stake\": {"]
33123#[doc = "      \"$ref\": \"#/components/schemas/NearToken\""]
33124#[doc = "    }"]
33125#[doc = "  }"]
33126#[doc = "}"]
33127#[doc = r" ```"]
33128#[doc = r" </details>"]
33129#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33130pub struct ValidatorStakeViewV1 {
33131    pub account_id: AccountId,
33132    pub public_key: PublicKey,
33133    pub stake: NearToken,
33134}
33135impl ::std::convert::From<&ValidatorStakeViewV1> for ValidatorStakeViewV1 {
33136    fn from(value: &ValidatorStakeViewV1) -> Self {
33137        value.clone()
33138    }
33139}
33140#[doc = "`ValidatorStakeViewValidatorStakeStructVersion`"]
33141#[doc = r""]
33142#[doc = r" <details><summary>JSON schema</summary>"]
33143#[doc = r""]
33144#[doc = r" ```json"]
33145#[doc = "{"]
33146#[doc = "  \"type\": \"string\","]
33147#[doc = "  \"enum\": ["]
33148#[doc = "    \"V1\""]
33149#[doc = "  ]"]
33150#[doc = "}"]
33151#[doc = r" ```"]
33152#[doc = r" </details>"]
33153#[derive(
33154    :: serde :: Deserialize,
33155    :: serde :: Serialize,
33156    Clone,
33157    Copy,
33158    Debug,
33159    Eq,
33160    Hash,
33161    Ord,
33162    PartialEq,
33163    PartialOrd,
33164)]
33165pub enum ValidatorStakeViewValidatorStakeStructVersion {
33166    V1,
33167}
33168impl ::std::convert::From<&Self> for ValidatorStakeViewValidatorStakeStructVersion {
33169    fn from(value: &ValidatorStakeViewValidatorStakeStructVersion) -> Self {
33170        value.clone()
33171    }
33172}
33173impl ::std::fmt::Display for ValidatorStakeViewValidatorStakeStructVersion {
33174    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33175        match *self {
33176            Self::V1 => f.write_str("V1"),
33177        }
33178    }
33179}
33180impl ::std::str::FromStr for ValidatorStakeViewValidatorStakeStructVersion {
33181    type Err = self::error::ConversionError;
33182    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33183        match value {
33184            "V1" => Ok(Self::V1),
33185            _ => Err("invalid value".into()),
33186        }
33187    }
33188}
33189impl ::std::convert::TryFrom<&str> for ValidatorStakeViewValidatorStakeStructVersion {
33190    type Error = self::error::ConversionError;
33191    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33192        value.parse()
33193    }
33194}
33195impl ::std::convert::TryFrom<&::std::string::String>
33196    for ValidatorStakeViewValidatorStakeStructVersion
33197{
33198    type Error = self::error::ConversionError;
33199    fn try_from(
33200        value: &::std::string::String,
33201    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33202        value.parse()
33203    }
33204}
33205impl ::std::convert::TryFrom<::std::string::String>
33206    for ValidatorStakeViewValidatorStakeStructVersion
33207{
33208    type Error = self::error::ConversionError;
33209    fn try_from(
33210        value: ::std::string::String,
33211    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33212        value.parse()
33213    }
33214}
33215#[doc = "Data structure for semver version and github tag or commit."]
33216#[doc = r""]
33217#[doc = r" <details><summary>JSON schema</summary>"]
33218#[doc = r""]
33219#[doc = r" ```json"]
33220#[doc = "{"]
33221#[doc = "  \"description\": \"Data structure for semver version and github tag or commit.\","]
33222#[doc = "  \"type\": \"object\","]
33223#[doc = "  \"required\": ["]
33224#[doc = "    \"build\","]
33225#[doc = "    \"commit\","]
33226#[doc = "    \"version\""]
33227#[doc = "  ],"]
33228#[doc = "  \"properties\": {"]
33229#[doc = "    \"build\": {"]
33230#[doc = "      \"type\": \"string\""]
33231#[doc = "    },"]
33232#[doc = "    \"commit\": {"]
33233#[doc = "      \"type\": \"string\""]
33234#[doc = "    },"]
33235#[doc = "    \"rustc_version\": {"]
33236#[doc = "      \"default\": \"\","]
33237#[doc = "      \"type\": \"string\""]
33238#[doc = "    },"]
33239#[doc = "    \"version\": {"]
33240#[doc = "      \"type\": \"string\""]
33241#[doc = "    }"]
33242#[doc = "  }"]
33243#[doc = "}"]
33244#[doc = r" ```"]
33245#[doc = r" </details>"]
33246#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
33247pub struct Version {
33248    pub build: ::std::string::String,
33249    pub commit: ::std::string::String,
33250    #[serde(default)]
33251    pub rustc_version: ::std::string::String,
33252    pub version: ::std::string::String,
33253}
33254impl ::std::convert::From<&Version> for Version {
33255    fn from(value: &Version) -> Self {
33256        value.clone()
33257    }
33258}
33259#[doc = "`ViewAccessKeyByBlockIdRequestType`"]
33260#[doc = r""]
33261#[doc = r" <details><summary>JSON schema</summary>"]
33262#[doc = r""]
33263#[doc = r" ```json"]
33264#[doc = "{"]
33265#[doc = "  \"type\": \"string\","]
33266#[doc = "  \"enum\": ["]
33267#[doc = "    \"view_access_key\""]
33268#[doc = "  ]"]
33269#[doc = "}"]
33270#[doc = r" ```"]
33271#[doc = r" </details>"]
33272#[derive(
33273    :: serde :: Deserialize,
33274    :: serde :: Serialize,
33275    Clone,
33276    Copy,
33277    Debug,
33278    Eq,
33279    Hash,
33280    Ord,
33281    PartialEq,
33282    PartialOrd,
33283)]
33284pub enum ViewAccessKeyByBlockIdRequestType {
33285    #[serde(rename = "view_access_key")]
33286    ViewAccessKey,
33287}
33288impl ::std::convert::From<&Self> for ViewAccessKeyByBlockIdRequestType {
33289    fn from(value: &ViewAccessKeyByBlockIdRequestType) -> Self {
33290        value.clone()
33291    }
33292}
33293impl ::std::fmt::Display for ViewAccessKeyByBlockIdRequestType {
33294    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33295        match *self {
33296            Self::ViewAccessKey => f.write_str("view_access_key"),
33297        }
33298    }
33299}
33300impl ::std::str::FromStr for ViewAccessKeyByBlockIdRequestType {
33301    type Err = self::error::ConversionError;
33302    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33303        match value {
33304            "view_access_key" => Ok(Self::ViewAccessKey),
33305            _ => Err("invalid value".into()),
33306        }
33307    }
33308}
33309impl ::std::convert::TryFrom<&str> for ViewAccessKeyByBlockIdRequestType {
33310    type Error = self::error::ConversionError;
33311    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33312        value.parse()
33313    }
33314}
33315impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByBlockIdRequestType {
33316    type Error = self::error::ConversionError;
33317    fn try_from(
33318        value: &::std::string::String,
33319    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33320        value.parse()
33321    }
33322}
33323impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByBlockIdRequestType {
33324    type Error = self::error::ConversionError;
33325    fn try_from(
33326        value: ::std::string::String,
33327    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33328        value.parse()
33329    }
33330}
33331#[doc = "`ViewAccessKeyByFinalityRequestType`"]
33332#[doc = r""]
33333#[doc = r" <details><summary>JSON schema</summary>"]
33334#[doc = r""]
33335#[doc = r" ```json"]
33336#[doc = "{"]
33337#[doc = "  \"type\": \"string\","]
33338#[doc = "  \"enum\": ["]
33339#[doc = "    \"view_access_key\""]
33340#[doc = "  ]"]
33341#[doc = "}"]
33342#[doc = r" ```"]
33343#[doc = r" </details>"]
33344#[derive(
33345    :: serde :: Deserialize,
33346    :: serde :: Serialize,
33347    Clone,
33348    Copy,
33349    Debug,
33350    Eq,
33351    Hash,
33352    Ord,
33353    PartialEq,
33354    PartialOrd,
33355)]
33356pub enum ViewAccessKeyByFinalityRequestType {
33357    #[serde(rename = "view_access_key")]
33358    ViewAccessKey,
33359}
33360impl ::std::convert::From<&Self> for ViewAccessKeyByFinalityRequestType {
33361    fn from(value: &ViewAccessKeyByFinalityRequestType) -> Self {
33362        value.clone()
33363    }
33364}
33365impl ::std::fmt::Display for ViewAccessKeyByFinalityRequestType {
33366    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33367        match *self {
33368            Self::ViewAccessKey => f.write_str("view_access_key"),
33369        }
33370    }
33371}
33372impl ::std::str::FromStr for ViewAccessKeyByFinalityRequestType {
33373    type Err = self::error::ConversionError;
33374    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33375        match value {
33376            "view_access_key" => Ok(Self::ViewAccessKey),
33377            _ => Err("invalid value".into()),
33378        }
33379    }
33380}
33381impl ::std::convert::TryFrom<&str> for ViewAccessKeyByFinalityRequestType {
33382    type Error = self::error::ConversionError;
33383    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33384        value.parse()
33385    }
33386}
33387impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByFinalityRequestType {
33388    type Error = self::error::ConversionError;
33389    fn try_from(
33390        value: &::std::string::String,
33391    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33392        value.parse()
33393    }
33394}
33395impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByFinalityRequestType {
33396    type Error = self::error::ConversionError;
33397    fn try_from(
33398        value: ::std::string::String,
33399    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33400        value.parse()
33401    }
33402}
33403#[doc = "`ViewAccessKeyBySyncCheckpointRequestType`"]
33404#[doc = r""]
33405#[doc = r" <details><summary>JSON schema</summary>"]
33406#[doc = r""]
33407#[doc = r" ```json"]
33408#[doc = "{"]
33409#[doc = "  \"type\": \"string\","]
33410#[doc = "  \"enum\": ["]
33411#[doc = "    \"view_access_key\""]
33412#[doc = "  ]"]
33413#[doc = "}"]
33414#[doc = r" ```"]
33415#[doc = r" </details>"]
33416#[derive(
33417    :: serde :: Deserialize,
33418    :: serde :: Serialize,
33419    Clone,
33420    Copy,
33421    Debug,
33422    Eq,
33423    Hash,
33424    Ord,
33425    PartialEq,
33426    PartialOrd,
33427)]
33428pub enum ViewAccessKeyBySyncCheckpointRequestType {
33429    #[serde(rename = "view_access_key")]
33430    ViewAccessKey,
33431}
33432impl ::std::convert::From<&Self> for ViewAccessKeyBySyncCheckpointRequestType {
33433    fn from(value: &ViewAccessKeyBySyncCheckpointRequestType) -> Self {
33434        value.clone()
33435    }
33436}
33437impl ::std::fmt::Display for ViewAccessKeyBySyncCheckpointRequestType {
33438    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33439        match *self {
33440            Self::ViewAccessKey => f.write_str("view_access_key"),
33441        }
33442    }
33443}
33444impl ::std::str::FromStr for ViewAccessKeyBySyncCheckpointRequestType {
33445    type Err = self::error::ConversionError;
33446    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33447        match value {
33448            "view_access_key" => Ok(Self::ViewAccessKey),
33449            _ => Err("invalid value".into()),
33450        }
33451    }
33452}
33453impl ::std::convert::TryFrom<&str> for ViewAccessKeyBySyncCheckpointRequestType {
33454    type Error = self::error::ConversionError;
33455    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33456        value.parse()
33457    }
33458}
33459impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
33460    type Error = self::error::ConversionError;
33461    fn try_from(
33462        value: &::std::string::String,
33463    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33464        value.parse()
33465    }
33466}
33467impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
33468    type Error = self::error::ConversionError;
33469    fn try_from(
33470        value: ::std::string::String,
33471    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33472        value.parse()
33473    }
33474}
33475#[doc = "`ViewAccessKeyListByBlockIdRequestType`"]
33476#[doc = r""]
33477#[doc = r" <details><summary>JSON schema</summary>"]
33478#[doc = r""]
33479#[doc = r" ```json"]
33480#[doc = "{"]
33481#[doc = "  \"type\": \"string\","]
33482#[doc = "  \"enum\": ["]
33483#[doc = "    \"view_access_key_list\""]
33484#[doc = "  ]"]
33485#[doc = "}"]
33486#[doc = r" ```"]
33487#[doc = r" </details>"]
33488#[derive(
33489    :: serde :: Deserialize,
33490    :: serde :: Serialize,
33491    Clone,
33492    Copy,
33493    Debug,
33494    Eq,
33495    Hash,
33496    Ord,
33497    PartialEq,
33498    PartialOrd,
33499)]
33500pub enum ViewAccessKeyListByBlockIdRequestType {
33501    #[serde(rename = "view_access_key_list")]
33502    ViewAccessKeyList,
33503}
33504impl ::std::convert::From<&Self> for ViewAccessKeyListByBlockIdRequestType {
33505    fn from(value: &ViewAccessKeyListByBlockIdRequestType) -> Self {
33506        value.clone()
33507    }
33508}
33509impl ::std::fmt::Display for ViewAccessKeyListByBlockIdRequestType {
33510    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33511        match *self {
33512            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
33513        }
33514    }
33515}
33516impl ::std::str::FromStr for ViewAccessKeyListByBlockIdRequestType {
33517    type Err = self::error::ConversionError;
33518    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33519        match value {
33520            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
33521            _ => Err("invalid value".into()),
33522        }
33523    }
33524}
33525impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByBlockIdRequestType {
33526    type Error = self::error::ConversionError;
33527    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33528        value.parse()
33529    }
33530}
33531impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
33532    type Error = self::error::ConversionError;
33533    fn try_from(
33534        value: &::std::string::String,
33535    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33536        value.parse()
33537    }
33538}
33539impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
33540    type Error = self::error::ConversionError;
33541    fn try_from(
33542        value: ::std::string::String,
33543    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33544        value.parse()
33545    }
33546}
33547#[doc = "`ViewAccessKeyListByFinalityRequestType`"]
33548#[doc = r""]
33549#[doc = r" <details><summary>JSON schema</summary>"]
33550#[doc = r""]
33551#[doc = r" ```json"]
33552#[doc = "{"]
33553#[doc = "  \"type\": \"string\","]
33554#[doc = "  \"enum\": ["]
33555#[doc = "    \"view_access_key_list\""]
33556#[doc = "  ]"]
33557#[doc = "}"]
33558#[doc = r" ```"]
33559#[doc = r" </details>"]
33560#[derive(
33561    :: serde :: Deserialize,
33562    :: serde :: Serialize,
33563    Clone,
33564    Copy,
33565    Debug,
33566    Eq,
33567    Hash,
33568    Ord,
33569    PartialEq,
33570    PartialOrd,
33571)]
33572pub enum ViewAccessKeyListByFinalityRequestType {
33573    #[serde(rename = "view_access_key_list")]
33574    ViewAccessKeyList,
33575}
33576impl ::std::convert::From<&Self> for ViewAccessKeyListByFinalityRequestType {
33577    fn from(value: &ViewAccessKeyListByFinalityRequestType) -> Self {
33578        value.clone()
33579    }
33580}
33581impl ::std::fmt::Display for ViewAccessKeyListByFinalityRequestType {
33582    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33583        match *self {
33584            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
33585        }
33586    }
33587}
33588impl ::std::str::FromStr for ViewAccessKeyListByFinalityRequestType {
33589    type Err = self::error::ConversionError;
33590    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33591        match value {
33592            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
33593            _ => Err("invalid value".into()),
33594        }
33595    }
33596}
33597impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByFinalityRequestType {
33598    type Error = self::error::ConversionError;
33599    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33600        value.parse()
33601    }
33602}
33603impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByFinalityRequestType {
33604    type Error = self::error::ConversionError;
33605    fn try_from(
33606        value: &::std::string::String,
33607    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33608        value.parse()
33609    }
33610}
33611impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByFinalityRequestType {
33612    type Error = self::error::ConversionError;
33613    fn try_from(
33614        value: ::std::string::String,
33615    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33616        value.parse()
33617    }
33618}
33619#[doc = "`ViewAccessKeyListBySyncCheckpointRequestType`"]
33620#[doc = r""]
33621#[doc = r" <details><summary>JSON schema</summary>"]
33622#[doc = r""]
33623#[doc = r" ```json"]
33624#[doc = "{"]
33625#[doc = "  \"type\": \"string\","]
33626#[doc = "  \"enum\": ["]
33627#[doc = "    \"view_access_key_list\""]
33628#[doc = "  ]"]
33629#[doc = "}"]
33630#[doc = r" ```"]
33631#[doc = r" </details>"]
33632#[derive(
33633    :: serde :: Deserialize,
33634    :: serde :: Serialize,
33635    Clone,
33636    Copy,
33637    Debug,
33638    Eq,
33639    Hash,
33640    Ord,
33641    PartialEq,
33642    PartialOrd,
33643)]
33644pub enum ViewAccessKeyListBySyncCheckpointRequestType {
33645    #[serde(rename = "view_access_key_list")]
33646    ViewAccessKeyList,
33647}
33648impl ::std::convert::From<&Self> for ViewAccessKeyListBySyncCheckpointRequestType {
33649    fn from(value: &ViewAccessKeyListBySyncCheckpointRequestType) -> Self {
33650        value.clone()
33651    }
33652}
33653impl ::std::fmt::Display for ViewAccessKeyListBySyncCheckpointRequestType {
33654    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33655        match *self {
33656            Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
33657        }
33658    }
33659}
33660impl ::std::str::FromStr for ViewAccessKeyListBySyncCheckpointRequestType {
33661    type Err = self::error::ConversionError;
33662    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33663        match value {
33664            "view_access_key_list" => Ok(Self::ViewAccessKeyList),
33665            _ => Err("invalid value".into()),
33666        }
33667    }
33668}
33669impl ::std::convert::TryFrom<&str> for ViewAccessKeyListBySyncCheckpointRequestType {
33670    type Error = self::error::ConversionError;
33671    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33672        value.parse()
33673    }
33674}
33675impl ::std::convert::TryFrom<&::std::string::String>
33676    for ViewAccessKeyListBySyncCheckpointRequestType
33677{
33678    type Error = self::error::ConversionError;
33679    fn try_from(
33680        value: &::std::string::String,
33681    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33682        value.parse()
33683    }
33684}
33685impl ::std::convert::TryFrom<::std::string::String>
33686    for ViewAccessKeyListBySyncCheckpointRequestType
33687{
33688    type Error = self::error::ConversionError;
33689    fn try_from(
33690        value: ::std::string::String,
33691    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33692        value.parse()
33693    }
33694}
33695#[doc = "`ViewAccountByBlockIdRequestType`"]
33696#[doc = r""]
33697#[doc = r" <details><summary>JSON schema</summary>"]
33698#[doc = r""]
33699#[doc = r" ```json"]
33700#[doc = "{"]
33701#[doc = "  \"type\": \"string\","]
33702#[doc = "  \"enum\": ["]
33703#[doc = "    \"view_account\""]
33704#[doc = "  ]"]
33705#[doc = "}"]
33706#[doc = r" ```"]
33707#[doc = r" </details>"]
33708#[derive(
33709    :: serde :: Deserialize,
33710    :: serde :: Serialize,
33711    Clone,
33712    Copy,
33713    Debug,
33714    Eq,
33715    Hash,
33716    Ord,
33717    PartialEq,
33718    PartialOrd,
33719)]
33720pub enum ViewAccountByBlockIdRequestType {
33721    #[serde(rename = "view_account")]
33722    ViewAccount,
33723}
33724impl ::std::convert::From<&Self> for ViewAccountByBlockIdRequestType {
33725    fn from(value: &ViewAccountByBlockIdRequestType) -> Self {
33726        value.clone()
33727    }
33728}
33729impl ::std::fmt::Display for ViewAccountByBlockIdRequestType {
33730    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33731        match *self {
33732            Self::ViewAccount => f.write_str("view_account"),
33733        }
33734    }
33735}
33736impl ::std::str::FromStr for ViewAccountByBlockIdRequestType {
33737    type Err = self::error::ConversionError;
33738    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33739        match value {
33740            "view_account" => Ok(Self::ViewAccount),
33741            _ => Err("invalid value".into()),
33742        }
33743    }
33744}
33745impl ::std::convert::TryFrom<&str> for ViewAccountByBlockIdRequestType {
33746    type Error = self::error::ConversionError;
33747    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33748        value.parse()
33749    }
33750}
33751impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByBlockIdRequestType {
33752    type Error = self::error::ConversionError;
33753    fn try_from(
33754        value: &::std::string::String,
33755    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33756        value.parse()
33757    }
33758}
33759impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByBlockIdRequestType {
33760    type Error = self::error::ConversionError;
33761    fn try_from(
33762        value: ::std::string::String,
33763    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33764        value.parse()
33765    }
33766}
33767#[doc = "`ViewAccountByFinalityRequestType`"]
33768#[doc = r""]
33769#[doc = r" <details><summary>JSON schema</summary>"]
33770#[doc = r""]
33771#[doc = r" ```json"]
33772#[doc = "{"]
33773#[doc = "  \"type\": \"string\","]
33774#[doc = "  \"enum\": ["]
33775#[doc = "    \"view_account\""]
33776#[doc = "  ]"]
33777#[doc = "}"]
33778#[doc = r" ```"]
33779#[doc = r" </details>"]
33780#[derive(
33781    :: serde :: Deserialize,
33782    :: serde :: Serialize,
33783    Clone,
33784    Copy,
33785    Debug,
33786    Eq,
33787    Hash,
33788    Ord,
33789    PartialEq,
33790    PartialOrd,
33791)]
33792pub enum ViewAccountByFinalityRequestType {
33793    #[serde(rename = "view_account")]
33794    ViewAccount,
33795}
33796impl ::std::convert::From<&Self> for ViewAccountByFinalityRequestType {
33797    fn from(value: &ViewAccountByFinalityRequestType) -> Self {
33798        value.clone()
33799    }
33800}
33801impl ::std::fmt::Display for ViewAccountByFinalityRequestType {
33802    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33803        match *self {
33804            Self::ViewAccount => f.write_str("view_account"),
33805        }
33806    }
33807}
33808impl ::std::str::FromStr for ViewAccountByFinalityRequestType {
33809    type Err = self::error::ConversionError;
33810    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33811        match value {
33812            "view_account" => Ok(Self::ViewAccount),
33813            _ => Err("invalid value".into()),
33814        }
33815    }
33816}
33817impl ::std::convert::TryFrom<&str> for ViewAccountByFinalityRequestType {
33818    type Error = self::error::ConversionError;
33819    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33820        value.parse()
33821    }
33822}
33823impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByFinalityRequestType {
33824    type Error = self::error::ConversionError;
33825    fn try_from(
33826        value: &::std::string::String,
33827    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33828        value.parse()
33829    }
33830}
33831impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByFinalityRequestType {
33832    type Error = self::error::ConversionError;
33833    fn try_from(
33834        value: ::std::string::String,
33835    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33836        value.parse()
33837    }
33838}
33839#[doc = "`ViewAccountBySyncCheckpointRequestType`"]
33840#[doc = r""]
33841#[doc = r" <details><summary>JSON schema</summary>"]
33842#[doc = r""]
33843#[doc = r" ```json"]
33844#[doc = "{"]
33845#[doc = "  \"type\": \"string\","]
33846#[doc = "  \"enum\": ["]
33847#[doc = "    \"view_account\""]
33848#[doc = "  ]"]
33849#[doc = "}"]
33850#[doc = r" ```"]
33851#[doc = r" </details>"]
33852#[derive(
33853    :: serde :: Deserialize,
33854    :: serde :: Serialize,
33855    Clone,
33856    Copy,
33857    Debug,
33858    Eq,
33859    Hash,
33860    Ord,
33861    PartialEq,
33862    PartialOrd,
33863)]
33864pub enum ViewAccountBySyncCheckpointRequestType {
33865    #[serde(rename = "view_account")]
33866    ViewAccount,
33867}
33868impl ::std::convert::From<&Self> for ViewAccountBySyncCheckpointRequestType {
33869    fn from(value: &ViewAccountBySyncCheckpointRequestType) -> Self {
33870        value.clone()
33871    }
33872}
33873impl ::std::fmt::Display for ViewAccountBySyncCheckpointRequestType {
33874    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33875        match *self {
33876            Self::ViewAccount => f.write_str("view_account"),
33877        }
33878    }
33879}
33880impl ::std::str::FromStr for ViewAccountBySyncCheckpointRequestType {
33881    type Err = self::error::ConversionError;
33882    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33883        match value {
33884            "view_account" => Ok(Self::ViewAccount),
33885            _ => Err("invalid value".into()),
33886        }
33887    }
33888}
33889impl ::std::convert::TryFrom<&str> for ViewAccountBySyncCheckpointRequestType {
33890    type Error = self::error::ConversionError;
33891    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33892        value.parse()
33893    }
33894}
33895impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountBySyncCheckpointRequestType {
33896    type Error = self::error::ConversionError;
33897    fn try_from(
33898        value: &::std::string::String,
33899    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33900        value.parse()
33901    }
33902}
33903impl ::std::convert::TryFrom<::std::string::String> for ViewAccountBySyncCheckpointRequestType {
33904    type Error = self::error::ConversionError;
33905    fn try_from(
33906        value: ::std::string::String,
33907    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33908        value.parse()
33909    }
33910}
33911#[doc = "`ViewCodeByBlockIdRequestType`"]
33912#[doc = r""]
33913#[doc = r" <details><summary>JSON schema</summary>"]
33914#[doc = r""]
33915#[doc = r" ```json"]
33916#[doc = "{"]
33917#[doc = "  \"type\": \"string\","]
33918#[doc = "  \"enum\": ["]
33919#[doc = "    \"view_code\""]
33920#[doc = "  ]"]
33921#[doc = "}"]
33922#[doc = r" ```"]
33923#[doc = r" </details>"]
33924#[derive(
33925    :: serde :: Deserialize,
33926    :: serde :: Serialize,
33927    Clone,
33928    Copy,
33929    Debug,
33930    Eq,
33931    Hash,
33932    Ord,
33933    PartialEq,
33934    PartialOrd,
33935)]
33936pub enum ViewCodeByBlockIdRequestType {
33937    #[serde(rename = "view_code")]
33938    ViewCode,
33939}
33940impl ::std::convert::From<&Self> for ViewCodeByBlockIdRequestType {
33941    fn from(value: &ViewCodeByBlockIdRequestType) -> Self {
33942        value.clone()
33943    }
33944}
33945impl ::std::fmt::Display for ViewCodeByBlockIdRequestType {
33946    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33947        match *self {
33948            Self::ViewCode => f.write_str("view_code"),
33949        }
33950    }
33951}
33952impl ::std::str::FromStr for ViewCodeByBlockIdRequestType {
33953    type Err = self::error::ConversionError;
33954    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33955        match value {
33956            "view_code" => Ok(Self::ViewCode),
33957            _ => Err("invalid value".into()),
33958        }
33959    }
33960}
33961impl ::std::convert::TryFrom<&str> for ViewCodeByBlockIdRequestType {
33962    type Error = self::error::ConversionError;
33963    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33964        value.parse()
33965    }
33966}
33967impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByBlockIdRequestType {
33968    type Error = self::error::ConversionError;
33969    fn try_from(
33970        value: &::std::string::String,
33971    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33972        value.parse()
33973    }
33974}
33975impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByBlockIdRequestType {
33976    type Error = self::error::ConversionError;
33977    fn try_from(
33978        value: ::std::string::String,
33979    ) -> ::std::result::Result<Self, self::error::ConversionError> {
33980        value.parse()
33981    }
33982}
33983#[doc = "`ViewCodeByFinalityRequestType`"]
33984#[doc = r""]
33985#[doc = r" <details><summary>JSON schema</summary>"]
33986#[doc = r""]
33987#[doc = r" ```json"]
33988#[doc = "{"]
33989#[doc = "  \"type\": \"string\","]
33990#[doc = "  \"enum\": ["]
33991#[doc = "    \"view_code\""]
33992#[doc = "  ]"]
33993#[doc = "}"]
33994#[doc = r" ```"]
33995#[doc = r" </details>"]
33996#[derive(
33997    :: serde :: Deserialize,
33998    :: serde :: Serialize,
33999    Clone,
34000    Copy,
34001    Debug,
34002    Eq,
34003    Hash,
34004    Ord,
34005    PartialEq,
34006    PartialOrd,
34007)]
34008pub enum ViewCodeByFinalityRequestType {
34009    #[serde(rename = "view_code")]
34010    ViewCode,
34011}
34012impl ::std::convert::From<&Self> for ViewCodeByFinalityRequestType {
34013    fn from(value: &ViewCodeByFinalityRequestType) -> Self {
34014        value.clone()
34015    }
34016}
34017impl ::std::fmt::Display for ViewCodeByFinalityRequestType {
34018    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34019        match *self {
34020            Self::ViewCode => f.write_str("view_code"),
34021        }
34022    }
34023}
34024impl ::std::str::FromStr for ViewCodeByFinalityRequestType {
34025    type Err = self::error::ConversionError;
34026    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34027        match value {
34028            "view_code" => Ok(Self::ViewCode),
34029            _ => Err("invalid value".into()),
34030        }
34031    }
34032}
34033impl ::std::convert::TryFrom<&str> for ViewCodeByFinalityRequestType {
34034    type Error = self::error::ConversionError;
34035    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34036        value.parse()
34037    }
34038}
34039impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByFinalityRequestType {
34040    type Error = self::error::ConversionError;
34041    fn try_from(
34042        value: &::std::string::String,
34043    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34044        value.parse()
34045    }
34046}
34047impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByFinalityRequestType {
34048    type Error = self::error::ConversionError;
34049    fn try_from(
34050        value: ::std::string::String,
34051    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34052        value.parse()
34053    }
34054}
34055#[doc = "`ViewCodeBySyncCheckpointRequestType`"]
34056#[doc = r""]
34057#[doc = r" <details><summary>JSON schema</summary>"]
34058#[doc = r""]
34059#[doc = r" ```json"]
34060#[doc = "{"]
34061#[doc = "  \"type\": \"string\","]
34062#[doc = "  \"enum\": ["]
34063#[doc = "    \"view_code\""]
34064#[doc = "  ]"]
34065#[doc = "}"]
34066#[doc = r" ```"]
34067#[doc = r" </details>"]
34068#[derive(
34069    :: serde :: Deserialize,
34070    :: serde :: Serialize,
34071    Clone,
34072    Copy,
34073    Debug,
34074    Eq,
34075    Hash,
34076    Ord,
34077    PartialEq,
34078    PartialOrd,
34079)]
34080pub enum ViewCodeBySyncCheckpointRequestType {
34081    #[serde(rename = "view_code")]
34082    ViewCode,
34083}
34084impl ::std::convert::From<&Self> for ViewCodeBySyncCheckpointRequestType {
34085    fn from(value: &ViewCodeBySyncCheckpointRequestType) -> Self {
34086        value.clone()
34087    }
34088}
34089impl ::std::fmt::Display for ViewCodeBySyncCheckpointRequestType {
34090    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34091        match *self {
34092            Self::ViewCode => f.write_str("view_code"),
34093        }
34094    }
34095}
34096impl ::std::str::FromStr for ViewCodeBySyncCheckpointRequestType {
34097    type Err = self::error::ConversionError;
34098    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34099        match value {
34100            "view_code" => Ok(Self::ViewCode),
34101            _ => Err("invalid value".into()),
34102        }
34103    }
34104}
34105impl ::std::convert::TryFrom<&str> for ViewCodeBySyncCheckpointRequestType {
34106    type Error = self::error::ConversionError;
34107    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34108        value.parse()
34109    }
34110}
34111impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeBySyncCheckpointRequestType {
34112    type Error = self::error::ConversionError;
34113    fn try_from(
34114        value: &::std::string::String,
34115    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34116        value.parse()
34117    }
34118}
34119impl ::std::convert::TryFrom<::std::string::String> for ViewCodeBySyncCheckpointRequestType {
34120    type Error = self::error::ConversionError;
34121    fn try_from(
34122        value: ::std::string::String,
34123    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34124        value.parse()
34125    }
34126}
34127#[doc = "`ViewGasKeyByBlockIdRequestType`"]
34128#[doc = r""]
34129#[doc = r" <details><summary>JSON schema</summary>"]
34130#[doc = r""]
34131#[doc = r" ```json"]
34132#[doc = "{"]
34133#[doc = "  \"type\": \"string\","]
34134#[doc = "  \"enum\": ["]
34135#[doc = "    \"view_gas_key\""]
34136#[doc = "  ]"]
34137#[doc = "}"]
34138#[doc = r" ```"]
34139#[doc = r" </details>"]
34140#[derive(
34141    :: serde :: Deserialize,
34142    :: serde :: Serialize,
34143    Clone,
34144    Copy,
34145    Debug,
34146    Eq,
34147    Hash,
34148    Ord,
34149    PartialEq,
34150    PartialOrd,
34151)]
34152pub enum ViewGasKeyByBlockIdRequestType {
34153    #[serde(rename = "view_gas_key")]
34154    ViewGasKey,
34155}
34156impl ::std::convert::From<&Self> for ViewGasKeyByBlockIdRequestType {
34157    fn from(value: &ViewGasKeyByBlockIdRequestType) -> Self {
34158        value.clone()
34159    }
34160}
34161impl ::std::fmt::Display for ViewGasKeyByBlockIdRequestType {
34162    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34163        match *self {
34164            Self::ViewGasKey => f.write_str("view_gas_key"),
34165        }
34166    }
34167}
34168impl ::std::str::FromStr for ViewGasKeyByBlockIdRequestType {
34169    type Err = self::error::ConversionError;
34170    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34171        match value {
34172            "view_gas_key" => Ok(Self::ViewGasKey),
34173            _ => Err("invalid value".into()),
34174        }
34175    }
34176}
34177impl ::std::convert::TryFrom<&str> for ViewGasKeyByBlockIdRequestType {
34178    type Error = self::error::ConversionError;
34179    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34180        value.parse()
34181    }
34182}
34183impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyByBlockIdRequestType {
34184    type Error = self::error::ConversionError;
34185    fn try_from(
34186        value: &::std::string::String,
34187    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34188        value.parse()
34189    }
34190}
34191impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyByBlockIdRequestType {
34192    type Error = self::error::ConversionError;
34193    fn try_from(
34194        value: ::std::string::String,
34195    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34196        value.parse()
34197    }
34198}
34199#[doc = "`ViewGasKeyByFinalityRequestType`"]
34200#[doc = r""]
34201#[doc = r" <details><summary>JSON schema</summary>"]
34202#[doc = r""]
34203#[doc = r" ```json"]
34204#[doc = "{"]
34205#[doc = "  \"type\": \"string\","]
34206#[doc = "  \"enum\": ["]
34207#[doc = "    \"view_gas_key\""]
34208#[doc = "  ]"]
34209#[doc = "}"]
34210#[doc = r" ```"]
34211#[doc = r" </details>"]
34212#[derive(
34213    :: serde :: Deserialize,
34214    :: serde :: Serialize,
34215    Clone,
34216    Copy,
34217    Debug,
34218    Eq,
34219    Hash,
34220    Ord,
34221    PartialEq,
34222    PartialOrd,
34223)]
34224pub enum ViewGasKeyByFinalityRequestType {
34225    #[serde(rename = "view_gas_key")]
34226    ViewGasKey,
34227}
34228impl ::std::convert::From<&Self> for ViewGasKeyByFinalityRequestType {
34229    fn from(value: &ViewGasKeyByFinalityRequestType) -> Self {
34230        value.clone()
34231    }
34232}
34233impl ::std::fmt::Display for ViewGasKeyByFinalityRequestType {
34234    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34235        match *self {
34236            Self::ViewGasKey => f.write_str("view_gas_key"),
34237        }
34238    }
34239}
34240impl ::std::str::FromStr for ViewGasKeyByFinalityRequestType {
34241    type Err = self::error::ConversionError;
34242    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34243        match value {
34244            "view_gas_key" => Ok(Self::ViewGasKey),
34245            _ => Err("invalid value".into()),
34246        }
34247    }
34248}
34249impl ::std::convert::TryFrom<&str> for ViewGasKeyByFinalityRequestType {
34250    type Error = self::error::ConversionError;
34251    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34252        value.parse()
34253    }
34254}
34255impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyByFinalityRequestType {
34256    type Error = self::error::ConversionError;
34257    fn try_from(
34258        value: &::std::string::String,
34259    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34260        value.parse()
34261    }
34262}
34263impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyByFinalityRequestType {
34264    type Error = self::error::ConversionError;
34265    fn try_from(
34266        value: ::std::string::String,
34267    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34268        value.parse()
34269    }
34270}
34271#[doc = "`ViewGasKeyBySyncCheckpointRequestType`"]
34272#[doc = r""]
34273#[doc = r" <details><summary>JSON schema</summary>"]
34274#[doc = r""]
34275#[doc = r" ```json"]
34276#[doc = "{"]
34277#[doc = "  \"type\": \"string\","]
34278#[doc = "  \"enum\": ["]
34279#[doc = "    \"view_gas_key\""]
34280#[doc = "  ]"]
34281#[doc = "}"]
34282#[doc = r" ```"]
34283#[doc = r" </details>"]
34284#[derive(
34285    :: serde :: Deserialize,
34286    :: serde :: Serialize,
34287    Clone,
34288    Copy,
34289    Debug,
34290    Eq,
34291    Hash,
34292    Ord,
34293    PartialEq,
34294    PartialOrd,
34295)]
34296pub enum ViewGasKeyBySyncCheckpointRequestType {
34297    #[serde(rename = "view_gas_key")]
34298    ViewGasKey,
34299}
34300impl ::std::convert::From<&Self> for ViewGasKeyBySyncCheckpointRequestType {
34301    fn from(value: &ViewGasKeyBySyncCheckpointRequestType) -> Self {
34302        value.clone()
34303    }
34304}
34305impl ::std::fmt::Display for ViewGasKeyBySyncCheckpointRequestType {
34306    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34307        match *self {
34308            Self::ViewGasKey => f.write_str("view_gas_key"),
34309        }
34310    }
34311}
34312impl ::std::str::FromStr for ViewGasKeyBySyncCheckpointRequestType {
34313    type Err = self::error::ConversionError;
34314    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34315        match value {
34316            "view_gas_key" => Ok(Self::ViewGasKey),
34317            _ => Err("invalid value".into()),
34318        }
34319    }
34320}
34321impl ::std::convert::TryFrom<&str> for ViewGasKeyBySyncCheckpointRequestType {
34322    type Error = self::error::ConversionError;
34323    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34324        value.parse()
34325    }
34326}
34327impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyBySyncCheckpointRequestType {
34328    type Error = self::error::ConversionError;
34329    fn try_from(
34330        value: &::std::string::String,
34331    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34332        value.parse()
34333    }
34334}
34335impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyBySyncCheckpointRequestType {
34336    type Error = self::error::ConversionError;
34337    fn try_from(
34338        value: ::std::string::String,
34339    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34340        value.parse()
34341    }
34342}
34343#[doc = "`ViewGasKeyListByBlockIdRequestType`"]
34344#[doc = r""]
34345#[doc = r" <details><summary>JSON schema</summary>"]
34346#[doc = r""]
34347#[doc = r" ```json"]
34348#[doc = "{"]
34349#[doc = "  \"type\": \"string\","]
34350#[doc = "  \"enum\": ["]
34351#[doc = "    \"view_gas_key_list\""]
34352#[doc = "  ]"]
34353#[doc = "}"]
34354#[doc = r" ```"]
34355#[doc = r" </details>"]
34356#[derive(
34357    :: serde :: Deserialize,
34358    :: serde :: Serialize,
34359    Clone,
34360    Copy,
34361    Debug,
34362    Eq,
34363    Hash,
34364    Ord,
34365    PartialEq,
34366    PartialOrd,
34367)]
34368pub enum ViewGasKeyListByBlockIdRequestType {
34369    #[serde(rename = "view_gas_key_list")]
34370    ViewGasKeyList,
34371}
34372impl ::std::convert::From<&Self> for ViewGasKeyListByBlockIdRequestType {
34373    fn from(value: &ViewGasKeyListByBlockIdRequestType) -> Self {
34374        value.clone()
34375    }
34376}
34377impl ::std::fmt::Display for ViewGasKeyListByBlockIdRequestType {
34378    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34379        match *self {
34380            Self::ViewGasKeyList => f.write_str("view_gas_key_list"),
34381        }
34382    }
34383}
34384impl ::std::str::FromStr for ViewGasKeyListByBlockIdRequestType {
34385    type Err = self::error::ConversionError;
34386    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34387        match value {
34388            "view_gas_key_list" => Ok(Self::ViewGasKeyList),
34389            _ => Err("invalid value".into()),
34390        }
34391    }
34392}
34393impl ::std::convert::TryFrom<&str> for ViewGasKeyListByBlockIdRequestType {
34394    type Error = self::error::ConversionError;
34395    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34396        value.parse()
34397    }
34398}
34399impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyListByBlockIdRequestType {
34400    type Error = self::error::ConversionError;
34401    fn try_from(
34402        value: &::std::string::String,
34403    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34404        value.parse()
34405    }
34406}
34407impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyListByBlockIdRequestType {
34408    type Error = self::error::ConversionError;
34409    fn try_from(
34410        value: ::std::string::String,
34411    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34412        value.parse()
34413    }
34414}
34415#[doc = "`ViewGasKeyListByFinalityRequestType`"]
34416#[doc = r""]
34417#[doc = r" <details><summary>JSON schema</summary>"]
34418#[doc = r""]
34419#[doc = r" ```json"]
34420#[doc = "{"]
34421#[doc = "  \"type\": \"string\","]
34422#[doc = "  \"enum\": ["]
34423#[doc = "    \"view_gas_key_list\""]
34424#[doc = "  ]"]
34425#[doc = "}"]
34426#[doc = r" ```"]
34427#[doc = r" </details>"]
34428#[derive(
34429    :: serde :: Deserialize,
34430    :: serde :: Serialize,
34431    Clone,
34432    Copy,
34433    Debug,
34434    Eq,
34435    Hash,
34436    Ord,
34437    PartialEq,
34438    PartialOrd,
34439)]
34440pub enum ViewGasKeyListByFinalityRequestType {
34441    #[serde(rename = "view_gas_key_list")]
34442    ViewGasKeyList,
34443}
34444impl ::std::convert::From<&Self> for ViewGasKeyListByFinalityRequestType {
34445    fn from(value: &ViewGasKeyListByFinalityRequestType) -> Self {
34446        value.clone()
34447    }
34448}
34449impl ::std::fmt::Display for ViewGasKeyListByFinalityRequestType {
34450    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34451        match *self {
34452            Self::ViewGasKeyList => f.write_str("view_gas_key_list"),
34453        }
34454    }
34455}
34456impl ::std::str::FromStr for ViewGasKeyListByFinalityRequestType {
34457    type Err = self::error::ConversionError;
34458    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34459        match value {
34460            "view_gas_key_list" => Ok(Self::ViewGasKeyList),
34461            _ => Err("invalid value".into()),
34462        }
34463    }
34464}
34465impl ::std::convert::TryFrom<&str> for ViewGasKeyListByFinalityRequestType {
34466    type Error = self::error::ConversionError;
34467    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34468        value.parse()
34469    }
34470}
34471impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyListByFinalityRequestType {
34472    type Error = self::error::ConversionError;
34473    fn try_from(
34474        value: &::std::string::String,
34475    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34476        value.parse()
34477    }
34478}
34479impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyListByFinalityRequestType {
34480    type Error = self::error::ConversionError;
34481    fn try_from(
34482        value: ::std::string::String,
34483    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34484        value.parse()
34485    }
34486}
34487#[doc = "`ViewGasKeyListBySyncCheckpointRequestType`"]
34488#[doc = r""]
34489#[doc = r" <details><summary>JSON schema</summary>"]
34490#[doc = r""]
34491#[doc = r" ```json"]
34492#[doc = "{"]
34493#[doc = "  \"type\": \"string\","]
34494#[doc = "  \"enum\": ["]
34495#[doc = "    \"view_gas_key_list\""]
34496#[doc = "  ]"]
34497#[doc = "}"]
34498#[doc = r" ```"]
34499#[doc = r" </details>"]
34500#[derive(
34501    :: serde :: Deserialize,
34502    :: serde :: Serialize,
34503    Clone,
34504    Copy,
34505    Debug,
34506    Eq,
34507    Hash,
34508    Ord,
34509    PartialEq,
34510    PartialOrd,
34511)]
34512pub enum ViewGasKeyListBySyncCheckpointRequestType {
34513    #[serde(rename = "view_gas_key_list")]
34514    ViewGasKeyList,
34515}
34516impl ::std::convert::From<&Self> for ViewGasKeyListBySyncCheckpointRequestType {
34517    fn from(value: &ViewGasKeyListBySyncCheckpointRequestType) -> Self {
34518        value.clone()
34519    }
34520}
34521impl ::std::fmt::Display for ViewGasKeyListBySyncCheckpointRequestType {
34522    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34523        match *self {
34524            Self::ViewGasKeyList => f.write_str("view_gas_key_list"),
34525        }
34526    }
34527}
34528impl ::std::str::FromStr for ViewGasKeyListBySyncCheckpointRequestType {
34529    type Err = self::error::ConversionError;
34530    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34531        match value {
34532            "view_gas_key_list" => Ok(Self::ViewGasKeyList),
34533            _ => Err("invalid value".into()),
34534        }
34535    }
34536}
34537impl ::std::convert::TryFrom<&str> for ViewGasKeyListBySyncCheckpointRequestType {
34538    type Error = self::error::ConversionError;
34539    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34540        value.parse()
34541    }
34542}
34543impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyListBySyncCheckpointRequestType {
34544    type Error = self::error::ConversionError;
34545    fn try_from(
34546        value: &::std::string::String,
34547    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34548        value.parse()
34549    }
34550}
34551impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyListBySyncCheckpointRequestType {
34552    type Error = self::error::ConversionError;
34553    fn try_from(
34554        value: ::std::string::String,
34555    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34556        value.parse()
34557    }
34558}
34559#[doc = "`ViewGlobalContractCodeByAccountIdByBlockIdRequestType`"]
34560#[doc = r""]
34561#[doc = r" <details><summary>JSON schema</summary>"]
34562#[doc = r""]
34563#[doc = r" ```json"]
34564#[doc = "{"]
34565#[doc = "  \"type\": \"string\","]
34566#[doc = "  \"enum\": ["]
34567#[doc = "    \"view_global_contract_code_by_account_id\""]
34568#[doc = "  ]"]
34569#[doc = "}"]
34570#[doc = r" ```"]
34571#[doc = r" </details>"]
34572#[derive(
34573    :: serde :: Deserialize,
34574    :: serde :: Serialize,
34575    Clone,
34576    Copy,
34577    Debug,
34578    Eq,
34579    Hash,
34580    Ord,
34581    PartialEq,
34582    PartialOrd,
34583)]
34584pub enum ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34585    #[serde(rename = "view_global_contract_code_by_account_id")]
34586    ViewGlobalContractCodeByAccountId,
34587}
34588impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34589    fn from(value: &ViewGlobalContractCodeByAccountIdByBlockIdRequestType) -> Self {
34590        value.clone()
34591    }
34592}
34593impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34594    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34595        match *self {
34596            Self::ViewGlobalContractCodeByAccountId => {
34597                f.write_str("view_global_contract_code_by_account_id")
34598            }
34599        }
34600    }
34601}
34602impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34603    type Err = self::error::ConversionError;
34604    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34605        match value {
34606            "view_global_contract_code_by_account_id" => {
34607                Ok(Self::ViewGlobalContractCodeByAccountId)
34608            }
34609            _ => Err("invalid value".into()),
34610        }
34611    }
34612}
34613impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34614    type Error = self::error::ConversionError;
34615    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34616        value.parse()
34617    }
34618}
34619impl ::std::convert::TryFrom<&::std::string::String>
34620    for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
34621{
34622    type Error = self::error::ConversionError;
34623    fn try_from(
34624        value: &::std::string::String,
34625    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34626        value.parse()
34627    }
34628}
34629impl ::std::convert::TryFrom<::std::string::String>
34630    for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
34631{
34632    type Error = self::error::ConversionError;
34633    fn try_from(
34634        value: ::std::string::String,
34635    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34636        value.parse()
34637    }
34638}
34639#[doc = "`ViewGlobalContractCodeByAccountIdByFinalityRequestType`"]
34640#[doc = r""]
34641#[doc = r" <details><summary>JSON schema</summary>"]
34642#[doc = r""]
34643#[doc = r" ```json"]
34644#[doc = "{"]
34645#[doc = "  \"type\": \"string\","]
34646#[doc = "  \"enum\": ["]
34647#[doc = "    \"view_global_contract_code_by_account_id\""]
34648#[doc = "  ]"]
34649#[doc = "}"]
34650#[doc = r" ```"]
34651#[doc = r" </details>"]
34652#[derive(
34653    :: serde :: Deserialize,
34654    :: serde :: Serialize,
34655    Clone,
34656    Copy,
34657    Debug,
34658    Eq,
34659    Hash,
34660    Ord,
34661    PartialEq,
34662    PartialOrd,
34663)]
34664pub enum ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34665    #[serde(rename = "view_global_contract_code_by_account_id")]
34666    ViewGlobalContractCodeByAccountId,
34667}
34668impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34669    fn from(value: &ViewGlobalContractCodeByAccountIdByFinalityRequestType) -> Self {
34670        value.clone()
34671    }
34672}
34673impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34674    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34675        match *self {
34676            Self::ViewGlobalContractCodeByAccountId => {
34677                f.write_str("view_global_contract_code_by_account_id")
34678            }
34679        }
34680    }
34681}
34682impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34683    type Err = self::error::ConversionError;
34684    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34685        match value {
34686            "view_global_contract_code_by_account_id" => {
34687                Ok(Self::ViewGlobalContractCodeByAccountId)
34688            }
34689            _ => Err("invalid value".into()),
34690        }
34691    }
34692}
34693impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34694    type Error = self::error::ConversionError;
34695    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34696        value.parse()
34697    }
34698}
34699impl ::std::convert::TryFrom<&::std::string::String>
34700    for ViewGlobalContractCodeByAccountIdByFinalityRequestType
34701{
34702    type Error = self::error::ConversionError;
34703    fn try_from(
34704        value: &::std::string::String,
34705    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34706        value.parse()
34707    }
34708}
34709impl ::std::convert::TryFrom<::std::string::String>
34710    for ViewGlobalContractCodeByAccountIdByFinalityRequestType
34711{
34712    type Error = self::error::ConversionError;
34713    fn try_from(
34714        value: ::std::string::String,
34715    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34716        value.parse()
34717    }
34718}
34719#[doc = "`ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType`"]
34720#[doc = r""]
34721#[doc = r" <details><summary>JSON schema</summary>"]
34722#[doc = r""]
34723#[doc = r" ```json"]
34724#[doc = "{"]
34725#[doc = "  \"type\": \"string\","]
34726#[doc = "  \"enum\": ["]
34727#[doc = "    \"view_global_contract_code_by_account_id\""]
34728#[doc = "  ]"]
34729#[doc = "}"]
34730#[doc = r" ```"]
34731#[doc = r" </details>"]
34732#[derive(
34733    :: serde :: Deserialize,
34734    :: serde :: Serialize,
34735    Clone,
34736    Copy,
34737    Debug,
34738    Eq,
34739    Hash,
34740    Ord,
34741    PartialEq,
34742    PartialOrd,
34743)]
34744pub enum ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34745    #[serde(rename = "view_global_contract_code_by_account_id")]
34746    ViewGlobalContractCodeByAccountId,
34747}
34748impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34749    fn from(value: &ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType) -> Self {
34750        value.clone()
34751    }
34752}
34753impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34754    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34755        match *self {
34756            Self::ViewGlobalContractCodeByAccountId => {
34757                f.write_str("view_global_contract_code_by_account_id")
34758            }
34759        }
34760    }
34761}
34762impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34763    type Err = self::error::ConversionError;
34764    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34765        match value {
34766            "view_global_contract_code_by_account_id" => {
34767                Ok(Self::ViewGlobalContractCodeByAccountId)
34768            }
34769            _ => Err("invalid value".into()),
34770        }
34771    }
34772}
34773impl ::std::convert::TryFrom<&str>
34774    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
34775{
34776    type Error = self::error::ConversionError;
34777    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34778        value.parse()
34779    }
34780}
34781impl ::std::convert::TryFrom<&::std::string::String>
34782    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
34783{
34784    type Error = self::error::ConversionError;
34785    fn try_from(
34786        value: &::std::string::String,
34787    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34788        value.parse()
34789    }
34790}
34791impl ::std::convert::TryFrom<::std::string::String>
34792    for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
34793{
34794    type Error = self::error::ConversionError;
34795    fn try_from(
34796        value: ::std::string::String,
34797    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34798        value.parse()
34799    }
34800}
34801#[doc = "`ViewGlobalContractCodeByBlockIdRequestType`"]
34802#[doc = r""]
34803#[doc = r" <details><summary>JSON schema</summary>"]
34804#[doc = r""]
34805#[doc = r" ```json"]
34806#[doc = "{"]
34807#[doc = "  \"type\": \"string\","]
34808#[doc = "  \"enum\": ["]
34809#[doc = "    \"view_global_contract_code\""]
34810#[doc = "  ]"]
34811#[doc = "}"]
34812#[doc = r" ```"]
34813#[doc = r" </details>"]
34814#[derive(
34815    :: serde :: Deserialize,
34816    :: serde :: Serialize,
34817    Clone,
34818    Copy,
34819    Debug,
34820    Eq,
34821    Hash,
34822    Ord,
34823    PartialEq,
34824    PartialOrd,
34825)]
34826pub enum ViewGlobalContractCodeByBlockIdRequestType {
34827    #[serde(rename = "view_global_contract_code")]
34828    ViewGlobalContractCode,
34829}
34830impl ::std::convert::From<&Self> for ViewGlobalContractCodeByBlockIdRequestType {
34831    fn from(value: &ViewGlobalContractCodeByBlockIdRequestType) -> Self {
34832        value.clone()
34833    }
34834}
34835impl ::std::fmt::Display for ViewGlobalContractCodeByBlockIdRequestType {
34836    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34837        match *self {
34838            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
34839        }
34840    }
34841}
34842impl ::std::str::FromStr for ViewGlobalContractCodeByBlockIdRequestType {
34843    type Err = self::error::ConversionError;
34844    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34845        match value {
34846            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
34847            _ => Err("invalid value".into()),
34848        }
34849    }
34850}
34851impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByBlockIdRequestType {
34852    type Error = self::error::ConversionError;
34853    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34854        value.parse()
34855    }
34856}
34857impl ::std::convert::TryFrom<&::std::string::String>
34858    for ViewGlobalContractCodeByBlockIdRequestType
34859{
34860    type Error = self::error::ConversionError;
34861    fn try_from(
34862        value: &::std::string::String,
34863    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34864        value.parse()
34865    }
34866}
34867impl ::std::convert::TryFrom<::std::string::String> for ViewGlobalContractCodeByBlockIdRequestType {
34868    type Error = self::error::ConversionError;
34869    fn try_from(
34870        value: ::std::string::String,
34871    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34872        value.parse()
34873    }
34874}
34875#[doc = "`ViewGlobalContractCodeByFinalityRequestType`"]
34876#[doc = r""]
34877#[doc = r" <details><summary>JSON schema</summary>"]
34878#[doc = r""]
34879#[doc = r" ```json"]
34880#[doc = "{"]
34881#[doc = "  \"type\": \"string\","]
34882#[doc = "  \"enum\": ["]
34883#[doc = "    \"view_global_contract_code\""]
34884#[doc = "  ]"]
34885#[doc = "}"]
34886#[doc = r" ```"]
34887#[doc = r" </details>"]
34888#[derive(
34889    :: serde :: Deserialize,
34890    :: serde :: Serialize,
34891    Clone,
34892    Copy,
34893    Debug,
34894    Eq,
34895    Hash,
34896    Ord,
34897    PartialEq,
34898    PartialOrd,
34899)]
34900pub enum ViewGlobalContractCodeByFinalityRequestType {
34901    #[serde(rename = "view_global_contract_code")]
34902    ViewGlobalContractCode,
34903}
34904impl ::std::convert::From<&Self> for ViewGlobalContractCodeByFinalityRequestType {
34905    fn from(value: &ViewGlobalContractCodeByFinalityRequestType) -> Self {
34906        value.clone()
34907    }
34908}
34909impl ::std::fmt::Display for ViewGlobalContractCodeByFinalityRequestType {
34910    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34911        match *self {
34912            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
34913        }
34914    }
34915}
34916impl ::std::str::FromStr for ViewGlobalContractCodeByFinalityRequestType {
34917    type Err = self::error::ConversionError;
34918    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34919        match value {
34920            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
34921            _ => Err("invalid value".into()),
34922        }
34923    }
34924}
34925impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByFinalityRequestType {
34926    type Error = self::error::ConversionError;
34927    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34928        value.parse()
34929    }
34930}
34931impl ::std::convert::TryFrom<&::std::string::String>
34932    for ViewGlobalContractCodeByFinalityRequestType
34933{
34934    type Error = self::error::ConversionError;
34935    fn try_from(
34936        value: &::std::string::String,
34937    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34938        value.parse()
34939    }
34940}
34941impl ::std::convert::TryFrom<::std::string::String>
34942    for ViewGlobalContractCodeByFinalityRequestType
34943{
34944    type Error = self::error::ConversionError;
34945    fn try_from(
34946        value: ::std::string::String,
34947    ) -> ::std::result::Result<Self, self::error::ConversionError> {
34948        value.parse()
34949    }
34950}
34951#[doc = "`ViewGlobalContractCodeBySyncCheckpointRequestType`"]
34952#[doc = r""]
34953#[doc = r" <details><summary>JSON schema</summary>"]
34954#[doc = r""]
34955#[doc = r" ```json"]
34956#[doc = "{"]
34957#[doc = "  \"type\": \"string\","]
34958#[doc = "  \"enum\": ["]
34959#[doc = "    \"view_global_contract_code\""]
34960#[doc = "  ]"]
34961#[doc = "}"]
34962#[doc = r" ```"]
34963#[doc = r" </details>"]
34964#[derive(
34965    :: serde :: Deserialize,
34966    :: serde :: Serialize,
34967    Clone,
34968    Copy,
34969    Debug,
34970    Eq,
34971    Hash,
34972    Ord,
34973    PartialEq,
34974    PartialOrd,
34975)]
34976pub enum ViewGlobalContractCodeBySyncCheckpointRequestType {
34977    #[serde(rename = "view_global_contract_code")]
34978    ViewGlobalContractCode,
34979}
34980impl ::std::convert::From<&Self> for ViewGlobalContractCodeBySyncCheckpointRequestType {
34981    fn from(value: &ViewGlobalContractCodeBySyncCheckpointRequestType) -> Self {
34982        value.clone()
34983    }
34984}
34985impl ::std::fmt::Display for ViewGlobalContractCodeBySyncCheckpointRequestType {
34986    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34987        match *self {
34988            Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
34989        }
34990    }
34991}
34992impl ::std::str::FromStr for ViewGlobalContractCodeBySyncCheckpointRequestType {
34993    type Err = self::error::ConversionError;
34994    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34995        match value {
34996            "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
34997            _ => Err("invalid value".into()),
34998        }
34999    }
35000}
35001impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeBySyncCheckpointRequestType {
35002    type Error = self::error::ConversionError;
35003    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35004        value.parse()
35005    }
35006}
35007impl ::std::convert::TryFrom<&::std::string::String>
35008    for ViewGlobalContractCodeBySyncCheckpointRequestType
35009{
35010    type Error = self::error::ConversionError;
35011    fn try_from(
35012        value: &::std::string::String,
35013    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35014        value.parse()
35015    }
35016}
35017impl ::std::convert::TryFrom<::std::string::String>
35018    for ViewGlobalContractCodeBySyncCheckpointRequestType
35019{
35020    type Error = self::error::ConversionError;
35021    fn try_from(
35022        value: ::std::string::String,
35023    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35024        value.parse()
35025    }
35026}
35027#[doc = "`ViewStateByBlockIdRequestType`"]
35028#[doc = r""]
35029#[doc = r" <details><summary>JSON schema</summary>"]
35030#[doc = r""]
35031#[doc = r" ```json"]
35032#[doc = "{"]
35033#[doc = "  \"type\": \"string\","]
35034#[doc = "  \"enum\": ["]
35035#[doc = "    \"view_state\""]
35036#[doc = "  ]"]
35037#[doc = "}"]
35038#[doc = r" ```"]
35039#[doc = r" </details>"]
35040#[derive(
35041    :: serde :: Deserialize,
35042    :: serde :: Serialize,
35043    Clone,
35044    Copy,
35045    Debug,
35046    Eq,
35047    Hash,
35048    Ord,
35049    PartialEq,
35050    PartialOrd,
35051)]
35052pub enum ViewStateByBlockIdRequestType {
35053    #[serde(rename = "view_state")]
35054    ViewState,
35055}
35056impl ::std::convert::From<&Self> for ViewStateByBlockIdRequestType {
35057    fn from(value: &ViewStateByBlockIdRequestType) -> Self {
35058        value.clone()
35059    }
35060}
35061impl ::std::fmt::Display for ViewStateByBlockIdRequestType {
35062    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35063        match *self {
35064            Self::ViewState => f.write_str("view_state"),
35065        }
35066    }
35067}
35068impl ::std::str::FromStr for ViewStateByBlockIdRequestType {
35069    type Err = self::error::ConversionError;
35070    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35071        match value {
35072            "view_state" => Ok(Self::ViewState),
35073            _ => Err("invalid value".into()),
35074        }
35075    }
35076}
35077impl ::std::convert::TryFrom<&str> for ViewStateByBlockIdRequestType {
35078    type Error = self::error::ConversionError;
35079    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35080        value.parse()
35081    }
35082}
35083impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByBlockIdRequestType {
35084    type Error = self::error::ConversionError;
35085    fn try_from(
35086        value: &::std::string::String,
35087    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35088        value.parse()
35089    }
35090}
35091impl ::std::convert::TryFrom<::std::string::String> for ViewStateByBlockIdRequestType {
35092    type Error = self::error::ConversionError;
35093    fn try_from(
35094        value: ::std::string::String,
35095    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35096        value.parse()
35097    }
35098}
35099#[doc = "`ViewStateByFinalityRequestType`"]
35100#[doc = r""]
35101#[doc = r" <details><summary>JSON schema</summary>"]
35102#[doc = r""]
35103#[doc = r" ```json"]
35104#[doc = "{"]
35105#[doc = "  \"type\": \"string\","]
35106#[doc = "  \"enum\": ["]
35107#[doc = "    \"view_state\""]
35108#[doc = "  ]"]
35109#[doc = "}"]
35110#[doc = r" ```"]
35111#[doc = r" </details>"]
35112#[derive(
35113    :: serde :: Deserialize,
35114    :: serde :: Serialize,
35115    Clone,
35116    Copy,
35117    Debug,
35118    Eq,
35119    Hash,
35120    Ord,
35121    PartialEq,
35122    PartialOrd,
35123)]
35124pub enum ViewStateByFinalityRequestType {
35125    #[serde(rename = "view_state")]
35126    ViewState,
35127}
35128impl ::std::convert::From<&Self> for ViewStateByFinalityRequestType {
35129    fn from(value: &ViewStateByFinalityRequestType) -> Self {
35130        value.clone()
35131    }
35132}
35133impl ::std::fmt::Display for ViewStateByFinalityRequestType {
35134    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35135        match *self {
35136            Self::ViewState => f.write_str("view_state"),
35137        }
35138    }
35139}
35140impl ::std::str::FromStr for ViewStateByFinalityRequestType {
35141    type Err = self::error::ConversionError;
35142    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35143        match value {
35144            "view_state" => Ok(Self::ViewState),
35145            _ => Err("invalid value".into()),
35146        }
35147    }
35148}
35149impl ::std::convert::TryFrom<&str> for ViewStateByFinalityRequestType {
35150    type Error = self::error::ConversionError;
35151    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35152        value.parse()
35153    }
35154}
35155impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByFinalityRequestType {
35156    type Error = self::error::ConversionError;
35157    fn try_from(
35158        value: &::std::string::String,
35159    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35160        value.parse()
35161    }
35162}
35163impl ::std::convert::TryFrom<::std::string::String> for ViewStateByFinalityRequestType {
35164    type Error = self::error::ConversionError;
35165    fn try_from(
35166        value: ::std::string::String,
35167    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35168        value.parse()
35169    }
35170}
35171#[doc = "`ViewStateBySyncCheckpointRequestType`"]
35172#[doc = r""]
35173#[doc = r" <details><summary>JSON schema</summary>"]
35174#[doc = r""]
35175#[doc = r" ```json"]
35176#[doc = "{"]
35177#[doc = "  \"type\": \"string\","]
35178#[doc = "  \"enum\": ["]
35179#[doc = "    \"view_state\""]
35180#[doc = "  ]"]
35181#[doc = "}"]
35182#[doc = r" ```"]
35183#[doc = r" </details>"]
35184#[derive(
35185    :: serde :: Deserialize,
35186    :: serde :: Serialize,
35187    Clone,
35188    Copy,
35189    Debug,
35190    Eq,
35191    Hash,
35192    Ord,
35193    PartialEq,
35194    PartialOrd,
35195)]
35196pub enum ViewStateBySyncCheckpointRequestType {
35197    #[serde(rename = "view_state")]
35198    ViewState,
35199}
35200impl ::std::convert::From<&Self> for ViewStateBySyncCheckpointRequestType {
35201    fn from(value: &ViewStateBySyncCheckpointRequestType) -> Self {
35202        value.clone()
35203    }
35204}
35205impl ::std::fmt::Display for ViewStateBySyncCheckpointRequestType {
35206    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35207        match *self {
35208            Self::ViewState => f.write_str("view_state"),
35209        }
35210    }
35211}
35212impl ::std::str::FromStr for ViewStateBySyncCheckpointRequestType {
35213    type Err = self::error::ConversionError;
35214    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35215        match value {
35216            "view_state" => Ok(Self::ViewState),
35217            _ => Err("invalid value".into()),
35218        }
35219    }
35220}
35221impl ::std::convert::TryFrom<&str> for ViewStateBySyncCheckpointRequestType {
35222    type Error = self::error::ConversionError;
35223    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35224        value.parse()
35225    }
35226}
35227impl ::std::convert::TryFrom<&::std::string::String> for ViewStateBySyncCheckpointRequestType {
35228    type Error = self::error::ConversionError;
35229    fn try_from(
35230        value: &::std::string::String,
35231    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35232        value.parse()
35233    }
35234}
35235impl ::std::convert::TryFrom<::std::string::String> for ViewStateBySyncCheckpointRequestType {
35236    type Error = self::error::ConversionError;
35237    fn try_from(
35238        value: ::std::string::String,
35239    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35240        value.parse()
35241    }
35242}
35243#[doc = "Resulting state values for a view state query request"]
35244#[doc = r""]
35245#[doc = r" <details><summary>JSON schema</summary>"]
35246#[doc = r""]
35247#[doc = r" ```json"]
35248#[doc = "{"]
35249#[doc = "  \"description\": \"Resulting state values for a view state query request\","]
35250#[doc = "  \"type\": \"object\","]
35251#[doc = "  \"required\": ["]
35252#[doc = "    \"values\""]
35253#[doc = "  ],"]
35254#[doc = "  \"properties\": {"]
35255#[doc = "    \"proof\": {"]
35256#[doc = "      \"type\": \"array\","]
35257#[doc = "      \"items\": {"]
35258#[doc = "        \"type\": \"string\""]
35259#[doc = "      }"]
35260#[doc = "    },"]
35261#[doc = "    \"values\": {"]
35262#[doc = "      \"type\": \"array\","]
35263#[doc = "      \"items\": {"]
35264#[doc = "        \"$ref\": \"#/components/schemas/StateItem\""]
35265#[doc = "      }"]
35266#[doc = "    }"]
35267#[doc = "  }"]
35268#[doc = "}"]
35269#[doc = r" ```"]
35270#[doc = r" </details>"]
35271#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
35272pub struct ViewStateResult {
35273    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
35274    pub proof: ::std::vec::Vec<::std::string::String>,
35275    pub values: ::std::vec::Vec<StateItem>,
35276}
35277impl ::std::convert::From<&ViewStateResult> for ViewStateResult {
35278    fn from(value: &ViewStateResult) -> Self {
35279        value.clone()
35280    }
35281}
35282#[doc = "`VmConfigView`"]
35283#[doc = r""]
35284#[doc = r" <details><summary>JSON schema</summary>"]
35285#[doc = r""]
35286#[doc = r" ```json"]
35287#[doc = "{"]
35288#[doc = "  \"type\": \"object\","]
35289#[doc = "  \"properties\": {"]
35290#[doc = "    \"deterministic_account_ids\": {"]
35291#[doc = "      \"description\": \"See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids).\","]
35292#[doc = "      \"type\": \"boolean\""]
35293#[doc = "    },"]
35294#[doc = "    \"discard_custom_sections\": {"]
35295#[doc = "      \"description\": \"See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections).\","]
35296#[doc = "      \"type\": \"boolean\""]
35297#[doc = "    },"]
35298#[doc = "    \"eth_implicit_accounts\": {"]
35299#[doc = "      \"description\": \"See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts).\","]
35300#[doc = "      \"type\": \"boolean\""]
35301#[doc = "    },"]
35302#[doc = "    \"ext_costs\": {"]
35303#[doc = "      \"description\": \"Costs for runtime externals\","]
35304#[doc = "      \"allOf\": ["]
35305#[doc = "        {"]
35306#[doc = "          \"$ref\": \"#/components/schemas/ExtCostsConfigView\""]
35307#[doc = "        }"]
35308#[doc = "      ]"]
35309#[doc = "    },"]
35310#[doc = "    \"fix_contract_loading_cost\": {"]
35311#[doc = "      \"description\": \"See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost).\","]
35312#[doc = "      \"type\": \"boolean\""]
35313#[doc = "    },"]
35314#[doc = "    \"global_contract_host_fns\": {"]
35315#[doc = "      \"description\": \"See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns).\","]
35316#[doc = "      \"type\": \"boolean\""]
35317#[doc = "    },"]
35318#[doc = "    \"grow_mem_cost\": {"]
35319#[doc = "      \"description\": \"Gas cost of a growing memory by single page.\","]
35320#[doc = "      \"type\": \"integer\","]
35321#[doc = "      \"format\": \"uint32\","]
35322#[doc = "      \"minimum\": 0.0"]
35323#[doc = "    },"]
35324#[doc = "    \"implicit_account_creation\": {"]
35325#[doc = "      \"description\": \"Deprecated\","]
35326#[doc = "      \"type\": \"boolean\""]
35327#[doc = "    },"]
35328#[doc = "    \"limit_config\": {"]
35329#[doc = "      \"description\": \"Describes limits for VM and Runtime.\\n\\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\\non runtime.\","]
35330#[doc = "      \"allOf\": ["]
35331#[doc = "        {"]
35332#[doc = "          \"$ref\": \"#/components/schemas/LimitConfig\""]
35333#[doc = "        }"]
35334#[doc = "      ]"]
35335#[doc = "    },"]
35336#[doc = "    \"linear_op_base_cost\": {"]
35337#[doc = "      \"description\": \"Base gas cost of a linear operation\","]
35338#[doc = "      \"type\": \"integer\","]
35339#[doc = "      \"format\": \"uint64\","]
35340#[doc = "      \"minimum\": 0.0"]
35341#[doc = "    },"]
35342#[doc = "    \"linear_op_unit_cost\": {"]
35343#[doc = "      \"description\": \"Unit gas cost of a linear operation\","]
35344#[doc = "      \"type\": \"integer\","]
35345#[doc = "      \"format\": \"uint64\","]
35346#[doc = "      \"minimum\": 0.0"]
35347#[doc = "    },"]
35348#[doc = "    \"reftypes_bulk_memory\": {"]
35349#[doc = "      \"description\": \"See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).\","]
35350#[doc = "      \"type\": \"boolean\""]
35351#[doc = "    },"]
35352#[doc = "    \"regular_op_cost\": {"]
35353#[doc = "      \"description\": \"Gas cost of a regular operation.\","]
35354#[doc = "      \"type\": \"integer\","]
35355#[doc = "      \"format\": \"uint32\","]
35356#[doc = "      \"minimum\": 0.0"]
35357#[doc = "    },"]
35358#[doc = "    \"saturating_float_to_int\": {"]
35359#[doc = "      \"description\": \"See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int).\","]
35360#[doc = "      \"type\": \"boolean\""]
35361#[doc = "    },"]
35362#[doc = "    \"storage_get_mode\": {"]
35363#[doc = "      \"description\": \"See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode).\","]
35364#[doc = "      \"allOf\": ["]
35365#[doc = "        {"]
35366#[doc = "          \"$ref\": \"#/components/schemas/StorageGetMode\""]
35367#[doc = "        }"]
35368#[doc = "      ]"]
35369#[doc = "    },"]
35370#[doc = "    \"vm_kind\": {"]
35371#[doc = "      \"description\": \"See [VMConfig::vm_kind](crate::vm::Config::vm_kind).\","]
35372#[doc = "      \"allOf\": ["]
35373#[doc = "        {"]
35374#[doc = "          \"$ref\": \"#/components/schemas/VMKind\""]
35375#[doc = "        }"]
35376#[doc = "      ]"]
35377#[doc = "    }"]
35378#[doc = "  }"]
35379#[doc = "}"]
35380#[doc = r" ```"]
35381#[doc = r" </details>"]
35382#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
35383pub struct VmConfigView {
35384    #[doc = "See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids)."]
35385    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35386    pub deterministic_account_ids: ::std::option::Option<bool>,
35387    #[doc = "See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections)."]
35388    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35389    pub discard_custom_sections: ::std::option::Option<bool>,
35390    #[doc = "See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts)."]
35391    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35392    pub eth_implicit_accounts: ::std::option::Option<bool>,
35393    #[doc = "Costs for runtime externals"]
35394    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35395    pub ext_costs: ::std::option::Option<ExtCostsConfigView>,
35396    #[doc = "See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost)."]
35397    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35398    pub fix_contract_loading_cost: ::std::option::Option<bool>,
35399    #[doc = "See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns)."]
35400    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35401    pub global_contract_host_fns: ::std::option::Option<bool>,
35402    #[doc = "Gas cost of a growing memory by single page."]
35403    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35404    pub grow_mem_cost: ::std::option::Option<u32>,
35405    #[doc = "Deprecated"]
35406    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35407    pub implicit_account_creation: ::std::option::Option<bool>,
35408    #[doc = "Describes limits for VM and Runtime.\n\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\non runtime."]
35409    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35410    pub limit_config: ::std::option::Option<LimitConfig>,
35411    #[doc = "Base gas cost of a linear operation"]
35412    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35413    pub linear_op_base_cost: ::std::option::Option<u64>,
35414    #[doc = "Unit gas cost of a linear operation"]
35415    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35416    pub linear_op_unit_cost: ::std::option::Option<u64>,
35417    #[doc = "See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory)."]
35418    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35419    pub reftypes_bulk_memory: ::std::option::Option<bool>,
35420    #[doc = "Gas cost of a regular operation."]
35421    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35422    pub regular_op_cost: ::std::option::Option<u32>,
35423    #[doc = "See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int)."]
35424    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35425    pub saturating_float_to_int: ::std::option::Option<bool>,
35426    #[doc = "See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode)."]
35427    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35428    pub storage_get_mode: ::std::option::Option<StorageGetMode>,
35429    #[doc = "See [VMConfig::vm_kind](crate::vm::Config::vm_kind)."]
35430    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35431    pub vm_kind: ::std::option::Option<VmKind>,
35432}
35433impl ::std::convert::From<&VmConfigView> for VmConfigView {
35434    fn from(value: &VmConfigView) -> Self {
35435        value.clone()
35436    }
35437}
35438impl ::std::default::Default for VmConfigView {
35439    fn default() -> Self {
35440        Self {
35441            deterministic_account_ids: Default::default(),
35442            discard_custom_sections: Default::default(),
35443            eth_implicit_accounts: Default::default(),
35444            ext_costs: Default::default(),
35445            fix_contract_loading_cost: Default::default(),
35446            global_contract_host_fns: Default::default(),
35447            grow_mem_cost: Default::default(),
35448            implicit_account_creation: Default::default(),
35449            limit_config: Default::default(),
35450            linear_op_base_cost: Default::default(),
35451            linear_op_unit_cost: Default::default(),
35452            reftypes_bulk_memory: Default::default(),
35453            regular_op_cost: Default::default(),
35454            saturating_float_to_int: Default::default(),
35455            storage_get_mode: Default::default(),
35456            vm_kind: Default::default(),
35457        }
35458    }
35459}
35460#[doc = "`VmKind`"]
35461#[doc = r""]
35462#[doc = r" <details><summary>JSON schema</summary>"]
35463#[doc = r""]
35464#[doc = r" ```json"]
35465#[doc = "{"]
35466#[doc = "  \"oneOf\": ["]
35467#[doc = "    {"]
35468#[doc = "      \"description\": \"Wasmer 0.17.x VM. Gone now.\","]
35469#[doc = "      \"type\": \"string\","]
35470#[doc = "      \"enum\": ["]
35471#[doc = "        \"Wasmer0\""]
35472#[doc = "      ]"]
35473#[doc = "    },"]
35474#[doc = "    {"]
35475#[doc = "      \"description\": \"Wasmtime VM.\","]
35476#[doc = "      \"type\": \"string\","]
35477#[doc = "      \"enum\": ["]
35478#[doc = "        \"Wasmtime\""]
35479#[doc = "      ]"]
35480#[doc = "    },"]
35481#[doc = "    {"]
35482#[doc = "      \"description\": \"Wasmer 2.x VM.\","]
35483#[doc = "      \"type\": \"string\","]
35484#[doc = "      \"enum\": ["]
35485#[doc = "        \"Wasmer2\""]
35486#[doc = "      ]"]
35487#[doc = "    },"]
35488#[doc = "    {"]
35489#[doc = "      \"description\": \"NearVM.\","]
35490#[doc = "      \"type\": \"string\","]
35491#[doc = "      \"enum\": ["]
35492#[doc = "        \"NearVm\""]
35493#[doc = "      ]"]
35494#[doc = "    }"]
35495#[doc = "  ]"]
35496#[doc = "}"]
35497#[doc = r" ```"]
35498#[doc = r" </details>"]
35499#[derive(
35500    :: serde :: Deserialize,
35501    :: serde :: Serialize,
35502    Clone,
35503    Copy,
35504    Debug,
35505    Eq,
35506    Hash,
35507    Ord,
35508    PartialEq,
35509    PartialOrd,
35510)]
35511pub enum VmKind {
35512    #[doc = "Wasmer 0.17.x VM. Gone now."]
35513    Wasmer0,
35514    #[doc = "Wasmtime VM."]
35515    Wasmtime,
35516    #[doc = "Wasmer 2.x VM."]
35517    Wasmer2,
35518    #[doc = "NearVM."]
35519    NearVm,
35520}
35521impl ::std::convert::From<&Self> for VmKind {
35522    fn from(value: &VmKind) -> Self {
35523        value.clone()
35524    }
35525}
35526impl ::std::fmt::Display for VmKind {
35527    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35528        match *self {
35529            Self::Wasmer0 => f.write_str("Wasmer0"),
35530            Self::Wasmtime => f.write_str("Wasmtime"),
35531            Self::Wasmer2 => f.write_str("Wasmer2"),
35532            Self::NearVm => f.write_str("NearVm"),
35533        }
35534    }
35535}
35536impl ::std::str::FromStr for VmKind {
35537    type Err = self::error::ConversionError;
35538    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35539        match value {
35540            "Wasmer0" => Ok(Self::Wasmer0),
35541            "Wasmtime" => Ok(Self::Wasmtime),
35542            "Wasmer2" => Ok(Self::Wasmer2),
35543            "NearVm" => Ok(Self::NearVm),
35544            _ => Err("invalid value".into()),
35545        }
35546    }
35547}
35548impl ::std::convert::TryFrom<&str> for VmKind {
35549    type Error = self::error::ConversionError;
35550    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35551        value.parse()
35552    }
35553}
35554impl ::std::convert::TryFrom<&::std::string::String> for VmKind {
35555    type Error = self::error::ConversionError;
35556    fn try_from(
35557        value: &::std::string::String,
35558    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35559        value.parse()
35560    }
35561}
35562impl ::std::convert::TryFrom<::std::string::String> for VmKind {
35563    type Error = self::error::ConversionError;
35564    fn try_from(
35565        value: ::std::string::String,
35566    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35567        value.parse()
35568    }
35569}
35570#[doc = "A kind of a trap happened during execution of a binary"]
35571#[doc = r""]
35572#[doc = r" <details><summary>JSON schema</summary>"]
35573#[doc = r""]
35574#[doc = r" ```json"]
35575#[doc = "{"]
35576#[doc = "  \"description\": \"A kind of a trap happened during execution of a binary\","]
35577#[doc = "  \"oneOf\": ["]
35578#[doc = "    {"]
35579#[doc = "      \"description\": \"An `unreachable` opcode was executed.\","]
35580#[doc = "      \"type\": \"string\","]
35581#[doc = "      \"enum\": ["]
35582#[doc = "        \"Unreachable\""]
35583#[doc = "      ]"]
35584#[doc = "    },"]
35585#[doc = "    {"]
35586#[doc = "      \"description\": \"Call indirect incorrect signature trap.\","]
35587#[doc = "      \"type\": \"string\","]
35588#[doc = "      \"enum\": ["]
35589#[doc = "        \"IncorrectCallIndirectSignature\""]
35590#[doc = "      ]"]
35591#[doc = "    },"]
35592#[doc = "    {"]
35593#[doc = "      \"description\": \"Memory out of bounds trap.\","]
35594#[doc = "      \"type\": \"string\","]
35595#[doc = "      \"enum\": ["]
35596#[doc = "        \"MemoryOutOfBounds\""]
35597#[doc = "      ]"]
35598#[doc = "    },"]
35599#[doc = "    {"]
35600#[doc = "      \"description\": \"Call indirect out of bounds trap.\","]
35601#[doc = "      \"type\": \"string\","]
35602#[doc = "      \"enum\": ["]
35603#[doc = "        \"CallIndirectOOB\""]
35604#[doc = "      ]"]
35605#[doc = "    },"]
35606#[doc = "    {"]
35607#[doc = "      \"description\": \"An arithmetic exception, e.g. divided by zero.\","]
35608#[doc = "      \"type\": \"string\","]
35609#[doc = "      \"enum\": ["]
35610#[doc = "        \"IllegalArithmetic\""]
35611#[doc = "      ]"]
35612#[doc = "    },"]
35613#[doc = "    {"]
35614#[doc = "      \"description\": \"Misaligned atomic access trap.\","]
35615#[doc = "      \"type\": \"string\","]
35616#[doc = "      \"enum\": ["]
35617#[doc = "        \"MisalignedAtomicAccess\""]
35618#[doc = "      ]"]
35619#[doc = "    },"]
35620#[doc = "    {"]
35621#[doc = "      \"description\": \"Indirect call to null.\","]
35622#[doc = "      \"type\": \"string\","]
35623#[doc = "      \"enum\": ["]
35624#[doc = "        \"IndirectCallToNull\""]
35625#[doc = "      ]"]
35626#[doc = "    },"]
35627#[doc = "    {"]
35628#[doc = "      \"description\": \"Stack overflow.\","]
35629#[doc = "      \"type\": \"string\","]
35630#[doc = "      \"enum\": ["]
35631#[doc = "        \"StackOverflow\""]
35632#[doc = "      ]"]
35633#[doc = "    },"]
35634#[doc = "    {"]
35635#[doc = "      \"description\": \"Generic trap.\","]
35636#[doc = "      \"type\": \"string\","]
35637#[doc = "      \"enum\": ["]
35638#[doc = "        \"GenericTrap\""]
35639#[doc = "      ]"]
35640#[doc = "    }"]
35641#[doc = "  ]"]
35642#[doc = "}"]
35643#[doc = r" ```"]
35644#[doc = r" </details>"]
35645#[derive(
35646    :: serde :: Deserialize,
35647    :: serde :: Serialize,
35648    Clone,
35649    Copy,
35650    Debug,
35651    Eq,
35652    Hash,
35653    Ord,
35654    PartialEq,
35655    PartialOrd,
35656)]
35657pub enum WasmTrap {
35658    #[doc = "An `unreachable` opcode was executed."]
35659    Unreachable,
35660    #[doc = "Call indirect incorrect signature trap."]
35661    IncorrectCallIndirectSignature,
35662    #[doc = "Memory out of bounds trap."]
35663    MemoryOutOfBounds,
35664    #[doc = "Call indirect out of bounds trap."]
35665    #[serde(rename = "CallIndirectOOB")]
35666    CallIndirectOob,
35667    #[doc = "An arithmetic exception, e.g. divided by zero."]
35668    IllegalArithmetic,
35669    #[doc = "Misaligned atomic access trap."]
35670    MisalignedAtomicAccess,
35671    #[doc = "Indirect call to null."]
35672    IndirectCallToNull,
35673    #[doc = "Stack overflow."]
35674    StackOverflow,
35675    #[doc = "Generic trap."]
35676    GenericTrap,
35677}
35678impl ::std::convert::From<&Self> for WasmTrap {
35679    fn from(value: &WasmTrap) -> Self {
35680        value.clone()
35681    }
35682}
35683impl ::std::fmt::Display for WasmTrap {
35684    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35685        match *self {
35686            Self::Unreachable => f.write_str("Unreachable"),
35687            Self::IncorrectCallIndirectSignature => f.write_str("IncorrectCallIndirectSignature"),
35688            Self::MemoryOutOfBounds => f.write_str("MemoryOutOfBounds"),
35689            Self::CallIndirectOob => f.write_str("CallIndirectOOB"),
35690            Self::IllegalArithmetic => f.write_str("IllegalArithmetic"),
35691            Self::MisalignedAtomicAccess => f.write_str("MisalignedAtomicAccess"),
35692            Self::IndirectCallToNull => f.write_str("IndirectCallToNull"),
35693            Self::StackOverflow => f.write_str("StackOverflow"),
35694            Self::GenericTrap => f.write_str("GenericTrap"),
35695        }
35696    }
35697}
35698impl ::std::str::FromStr for WasmTrap {
35699    type Err = self::error::ConversionError;
35700    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35701        match value {
35702            "Unreachable" => Ok(Self::Unreachable),
35703            "IncorrectCallIndirectSignature" => Ok(Self::IncorrectCallIndirectSignature),
35704            "MemoryOutOfBounds" => Ok(Self::MemoryOutOfBounds),
35705            "CallIndirectOOB" => Ok(Self::CallIndirectOob),
35706            "IllegalArithmetic" => Ok(Self::IllegalArithmetic),
35707            "MisalignedAtomicAccess" => Ok(Self::MisalignedAtomicAccess),
35708            "IndirectCallToNull" => Ok(Self::IndirectCallToNull),
35709            "StackOverflow" => Ok(Self::StackOverflow),
35710            "GenericTrap" => Ok(Self::GenericTrap),
35711            _ => Err("invalid value".into()),
35712        }
35713    }
35714}
35715impl ::std::convert::TryFrom<&str> for WasmTrap {
35716    type Error = self::error::ConversionError;
35717    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35718        value.parse()
35719    }
35720}
35721impl ::std::convert::TryFrom<&::std::string::String> for WasmTrap {
35722    type Error = self::error::ConversionError;
35723    fn try_from(
35724        value: &::std::string::String,
35725    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35726        value.parse()
35727    }
35728}
35729impl ::std::convert::TryFrom<::std::string::String> for WasmTrap {
35730    type Error = self::error::ConversionError;
35731    fn try_from(
35732        value: ::std::string::String,
35733    ) -> ::std::result::Result<Self, self::error::ConversionError> {
35734        value.parse()
35735    }
35736}
35737#[doc = "Configuration specific to ChunkStateWitness."]
35738#[doc = r""]
35739#[doc = r" <details><summary>JSON schema</summary>"]
35740#[doc = r""]
35741#[doc = r" ```json"]
35742#[doc = "{"]
35743#[doc = "  \"description\": \"Configuration specific to ChunkStateWitness.\","]
35744#[doc = "  \"type\": \"object\","]
35745#[doc = "  \"properties\": {"]
35746#[doc = "    \"combined_transactions_size_limit\": {"]
35747#[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.\","]
35748#[doc = "      \"type\": \"integer\","]
35749#[doc = "      \"format\": \"uint\","]
35750#[doc = "      \"minimum\": 0.0"]
35751#[doc = "    },"]
35752#[doc = "    \"main_storage_proof_size_soft_limit\": {"]
35753#[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.\","]
35754#[doc = "      \"type\": \"integer\","]
35755#[doc = "      \"format\": \"uint64\","]
35756#[doc = "      \"minimum\": 0.0"]
35757#[doc = "    },"]
35758#[doc = "    \"new_transactions_validation_state_size_soft_limit\": {"]
35759#[doc = "      \"description\": \"Soft size limit of storage proof used to validate new transactions in ChunkStateWitness.\","]
35760#[doc = "      \"type\": \"integer\","]
35761#[doc = "      \"format\": \"uint64\","]
35762#[doc = "      \"minimum\": 0.0"]
35763#[doc = "    }"]
35764#[doc = "  }"]
35765#[doc = "}"]
35766#[doc = r" ```"]
35767#[doc = r" </details>"]
35768#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
35769pub struct WitnessConfigView {
35770    #[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."]
35771    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35772    pub combined_transactions_size_limit: ::std::option::Option<u32>,
35773    #[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."]
35774    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35775    pub main_storage_proof_size_soft_limit: ::std::option::Option<u64>,
35776    #[doc = "Soft size limit of storage proof used to validate new transactions in ChunkStateWitness."]
35777    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35778    pub new_transactions_validation_state_size_soft_limit: ::std::option::Option<u64>,
35779}
35780impl ::std::convert::From<&WitnessConfigView> for WitnessConfigView {
35781    fn from(value: &WitnessConfigView) -> Self {
35782        value.clone()
35783    }
35784}
35785impl ::std::default::Default for WitnessConfigView {
35786    fn default() -> Self {
35787        Self {
35788            combined_transactions_size_limit: Default::default(),
35789            main_storage_proof_size_soft_limit: Default::default(),
35790            new_transactions_validation_state_size_soft_limit: Default::default(),
35791        }
35792    }
35793}
35794#[doc = r" Generation of default values for serde."]
35795pub mod defaults {
35796    pub(super) fn default_u64<T, const V: u64>() -> T
35797    where
35798        T: ::std::convert::TryFrom<u64>,
35799        <T as ::std::convert::TryFrom<u64>>::Error: ::std::fmt::Debug,
35800    {
35801        T::try_from(V).unwrap()
35802    }
35803    pub(super) fn block_header_view_rent_paid() -> super::NearToken {
35804        super::NearToken::from_yoctonear(0)
35805    }
35806    pub(super) fn block_header_view_validator_reward() -> super::NearToken {
35807        super::NearToken::from_yoctonear(0)
35808    }
35809    pub(super) fn chunk_header_view_rent_paid() -> super::NearToken {
35810        super::NearToken::from_yoctonear(0)
35811    }
35812    pub(super) fn chunk_header_view_validator_reward() -> super::NearToken {
35813        super::NearToken::from_yoctonear(0)
35814    }
35815    pub(super) fn cloud_archival_writer_config_polling_interval(
35816    ) -> super::DurationAsStdSchemaProvider {
35817        super::DurationAsStdSchemaProvider {
35818            nanos: 0_i32,
35819            secs: 1_i64,
35820        }
35821    }
35822    pub(super) fn execution_outcome_view_metadata() -> super::ExecutionMetadataView {
35823        super::ExecutionMetadataView {
35824            gas_profile: Default::default(),
35825            version: 1_u32,
35826        }
35827    }
35828    pub(super) fn gc_config_gc_step_period() -> super::DurationAsStdSchemaProvider {
35829        super::DurationAsStdSchemaProvider {
35830            nanos: 500000000_i32,
35831            secs: 0_i64,
35832        }
35833    }
35834    pub(super) fn genesis_config_minimum_stake_ratio() -> [i32; 2usize] {
35835        [1_i32, 6250_i32]
35836    }
35837    pub(super) fn genesis_config_online_max_threshold() -> [i32; 2usize] {
35838        [99_i32, 100_i32]
35839    }
35840    pub(super) fn genesis_config_online_min_threshold() -> [i32; 2usize] {
35841        [9_i32, 10_i32]
35842    }
35843    pub(super) fn genesis_config_protocol_upgrade_stake_threshold() -> [i32; 2usize] {
35844        [4_i32, 5_i32]
35845    }
35846    pub(super) fn genesis_config_shard_layout() -> super::ShardLayout {
35847        super::ShardLayout::V2(super::ShardLayoutV2 {
35848            boundary_accounts: vec![],
35849            id_to_index_map: [("0".to_string(), 0_u32)].into_iter().collect(),
35850            index_to_id_map: [("0".to_string(), super::ShardId(0_u64))]
35851                .into_iter()
35852                .collect(),
35853            shard_ids: vec![super::ShardId(0_u64)],
35854            shards_parent_map: Default::default(),
35855            shards_split_map: Default::default(),
35856            version: 0_u32,
35857        })
35858    }
35859    pub(super) fn limit_config_account_id_validity_rules_version(
35860    ) -> super::AccountIdValidityRulesVersion {
35861        super::AccountIdValidityRulesVersion(0_u8)
35862    }
35863    pub(super) fn rpc_send_transaction_request_wait_until() -> super::TxExecutionStatus {
35864        super::TxExecutionStatus::ExecutedOptimistic
35865    }
35866    pub(super) fn rpc_transaction_status_request_variant0_wait_until() -> super::TxExecutionStatus {
35867        super::TxExecutionStatus::ExecutedOptimistic
35868    }
35869    pub(super) fn rpc_transaction_status_request_variant1_wait_until() -> super::TxExecutionStatus {
35870        super::TxExecutionStatus::ExecutedOptimistic
35871    }
35872    pub(super) fn runtime_config_view_dynamic_resharding_config(
35873    ) -> super::DynamicReshardingConfigView {
35874        super::DynamicReshardingConfigView {
35875            max_number_of_shards: 999999999999999_u64,
35876            memory_usage_threshold: 999999999999999_u64,
35877            min_child_memory_usage: 999999999999999_u64,
35878            min_epochs_between_resharding: 999999999999999_u64,
35879        }
35880    }
35881}