1pub use near_account_id::AccountId;
5pub use near_gas::NearGas;
6pub use near_token::NearToken;
7#[allow(unused_imports)]
8use progenitor_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt};
9#[allow(unused_imports)]
10pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
11
12#[doc = r" Error types."]
13pub mod error {
14 #[doc = r" Error from a `TryFrom` or `FromStr` implementation."]
15 pub struct ConversionError(::std::borrow::Cow<'static, str>);
16 impl ::std::error::Error for ConversionError {}
17 impl ::std::fmt::Display for ConversionError {
18 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
19 ::std::fmt::Display::fmt(&self.0, f)
20 }
21 }
22 impl ::std::fmt::Debug for ConversionError {
23 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
24 ::std::fmt::Debug::fmt(&self.0, f)
25 }
26 }
27 impl From<&'static str> for ConversionError {
28 fn from(value: &'static str) -> Self {
29 Self(value.into())
30 }
31 }
32 impl From<String> for ConversionError {
33 fn from(value: String) -> Self {
34 Self(value.into())
35 }
36 }
37}
38#[doc = "Access key provides limited access to an account. Each access key belongs to some account and\nis identified by a unique (within the account) public key. One account may have large number of\naccess keys. Access keys allow to act on behalf of the account by restricting transactions\nthat can be issued.\n`account_id,public_key` is a key in the state"]
39#[doc = r""]
40#[doc = r" <details><summary>JSON schema</summary>"]
41#[doc = r""]
42#[doc = r" ```json"]
43#[doc = "{"]
44#[doc = " \"description\": \"Access key provides limited access to an account. Each access key belongs to some account and\\nis identified by a unique (within the account) public key. One account may have large number of\\naccess keys. Access keys allow to act on behalf of the account by restricting transactions\\nthat can be issued.\\n`account_id,public_key` is a key in the state\","]
45#[doc = " \"type\": \"object\","]
46#[doc = " \"required\": ["]
47#[doc = " \"nonce\","]
48#[doc = " \"permission\""]
49#[doc = " ],"]
50#[doc = " \"properties\": {"]
51#[doc = " \"nonce\": {"]
52#[doc = " \"description\": \"Nonce for this access key, used for tx nonce generation. When access key is created, nonce\\nis set to `(block_height - 1) * 1e6` to avoid tx hash collision on access key re-creation.\\nSee <https://github.com/near/nearcore/issues/3779> for more details.\","]
53#[doc = " \"type\": \"integer\","]
54#[doc = " \"format\": \"uint64\","]
55#[doc = " \"minimum\": 0.0"]
56#[doc = " },"]
57#[doc = " \"permission\": {"]
58#[doc = " \"description\": \"Defines permissions for this access key.\","]
59#[doc = " \"allOf\": ["]
60#[doc = " {"]
61#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
62#[doc = " }"]
63#[doc = " ]"]
64#[doc = " }"]
65#[doc = " }"]
66#[doc = "}"]
67#[doc = r" ```"]
68#[doc = r" </details>"]
69#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
70pub struct AccessKey {
71 #[doc = "Nonce for this access key, used for tx nonce generation. When access key is created, nonce\nis set to `(block_height - 1) * 1e6` to avoid tx hash collision on access key re-creation.\nSee <https://github.com/near/nearcore/issues/3779> for more details."]
72 pub nonce: u64,
73 #[doc = "Defines permissions for this access key."]
74 pub permission: AccessKeyPermission,
75}
76impl ::std::convert::From<&AccessKey> for AccessKey {
77 fn from(value: &AccessKey) -> Self {
78 value.clone()
79 }
80}
81#[doc = "Describes the cost of creating an access key."]
82#[doc = r""]
83#[doc = r" <details><summary>JSON schema</summary>"]
84#[doc = r""]
85#[doc = r" ```json"]
86#[doc = "{"]
87#[doc = " \"description\": \"Describes the cost of creating an access key.\","]
88#[doc = " \"type\": \"object\","]
89#[doc = " \"required\": ["]
90#[doc = " \"full_access_cost\","]
91#[doc = " \"function_call_cost\","]
92#[doc = " \"function_call_cost_per_byte\""]
93#[doc = " ],"]
94#[doc = " \"properties\": {"]
95#[doc = " \"full_access_cost\": {"]
96#[doc = " \"description\": \"Base cost of creating a full access access-key.\","]
97#[doc = " \"allOf\": ["]
98#[doc = " {"]
99#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
100#[doc = " }"]
101#[doc = " ]"]
102#[doc = " },"]
103#[doc = " \"function_call_cost\": {"]
104#[doc = " \"description\": \"Base cost of creating an access-key restricted to specific functions.\","]
105#[doc = " \"allOf\": ["]
106#[doc = " {"]
107#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
108#[doc = " }"]
109#[doc = " ]"]
110#[doc = " },"]
111#[doc = " \"function_call_cost_per_byte\": {"]
112#[doc = " \"description\": \"Cost per byte of method_names of creating a restricted access-key.\","]
113#[doc = " \"allOf\": ["]
114#[doc = " {"]
115#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
116#[doc = " }"]
117#[doc = " ]"]
118#[doc = " }"]
119#[doc = " }"]
120#[doc = "}"]
121#[doc = r" ```"]
122#[doc = r" </details>"]
123#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
124pub struct AccessKeyCreationConfigView {
125 #[doc = "Base cost of creating a full access access-key."]
126 pub full_access_cost: Fee,
127 #[doc = "Base cost of creating an access-key restricted to specific functions."]
128 pub function_call_cost: Fee,
129 #[doc = "Cost per byte of method_names of creating a restricted access-key."]
130 pub function_call_cost_per_byte: Fee,
131}
132impl ::std::convert::From<&AccessKeyCreationConfigView> for AccessKeyCreationConfigView {
133 fn from(value: &AccessKeyCreationConfigView) -> Self {
134 value.clone()
135 }
136}
137#[doc = "Describes information about an access key including the public key."]
138#[doc = r""]
139#[doc = r" <details><summary>JSON schema</summary>"]
140#[doc = r""]
141#[doc = r" ```json"]
142#[doc = "{"]
143#[doc = " \"description\": \"Describes information about an access key including the public key.\","]
144#[doc = " \"type\": \"object\","]
145#[doc = " \"required\": ["]
146#[doc = " \"access_key\","]
147#[doc = " \"public_key\""]
148#[doc = " ],"]
149#[doc = " \"properties\": {"]
150#[doc = " \"access_key\": {"]
151#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
152#[doc = " },"]
153#[doc = " \"public_key\": {"]
154#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
155#[doc = " }"]
156#[doc = " }"]
157#[doc = "}"]
158#[doc = r" ```"]
159#[doc = r" </details>"]
160#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
161pub struct AccessKeyInfoView {
162 pub access_key: AccessKeyView,
163 pub public_key: PublicKey,
164}
165impl ::std::convert::From<&AccessKeyInfoView> for AccessKeyInfoView {
166 fn from(value: &AccessKeyInfoView) -> Self {
167 value.clone()
168 }
169}
170#[doc = "Lists access keys"]
171#[doc = r""]
172#[doc = r" <details><summary>JSON schema</summary>"]
173#[doc = r""]
174#[doc = r" ```json"]
175#[doc = "{"]
176#[doc = " \"description\": \"Lists access keys\","]
177#[doc = " \"type\": \"object\","]
178#[doc = " \"required\": ["]
179#[doc = " \"keys\""]
180#[doc = " ],"]
181#[doc = " \"properties\": {"]
182#[doc = " \"keys\": {"]
183#[doc = " \"type\": \"array\","]
184#[doc = " \"items\": {"]
185#[doc = " \"$ref\": \"#/components/schemas/AccessKeyInfoView\""]
186#[doc = " }"]
187#[doc = " }"]
188#[doc = " }"]
189#[doc = "}"]
190#[doc = r" ```"]
191#[doc = r" </details>"]
192#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
193pub struct AccessKeyList {
194 pub keys: ::std::vec::Vec<AccessKeyInfoView>,
195}
196impl ::std::convert::From<&AccessKeyList> for AccessKeyList {
197 fn from(value: &AccessKeyList) -> Self {
198 value.clone()
199 }
200}
201#[doc = "Defines permissions for AccessKey"]
202#[doc = r""]
203#[doc = r" <details><summary>JSON schema</summary>"]
204#[doc = r""]
205#[doc = r" ```json"]
206#[doc = "{"]
207#[doc = " \"description\": \"Defines permissions for AccessKey\","]
208#[doc = " \"oneOf\": ["]
209#[doc = " {"]
210#[doc = " \"type\": \"object\","]
211#[doc = " \"required\": ["]
212#[doc = " \"FunctionCall\""]
213#[doc = " ],"]
214#[doc = " \"properties\": {"]
215#[doc = " \"FunctionCall\": {"]
216#[doc = " \"$ref\": \"#/components/schemas/FunctionCallPermission\""]
217#[doc = " }"]
218#[doc = " },"]
219#[doc = " \"additionalProperties\": false"]
220#[doc = " },"]
221#[doc = " {"]
222#[doc = " \"description\": \"Grants full access to the account.\\nNOTE: It's used to replace account-level public keys.\","]
223#[doc = " \"type\": \"string\","]
224#[doc = " \"enum\": ["]
225#[doc = " \"FullAccess\""]
226#[doc = " ]"]
227#[doc = " }"]
228#[doc = " ]"]
229#[doc = "}"]
230#[doc = r" ```"]
231#[doc = r" </details>"]
232#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
233pub enum AccessKeyPermission {
234 FunctionCall(FunctionCallPermission),
235 #[doc = "Grants full access to the account.\nNOTE: It's used to replace account-level public keys."]
236 FullAccess,
237}
238impl ::std::convert::From<&Self> for AccessKeyPermission {
239 fn from(value: &AccessKeyPermission) -> Self {
240 value.clone()
241 }
242}
243impl ::std::convert::From<FunctionCallPermission> for AccessKeyPermission {
244 fn from(value: FunctionCallPermission) -> Self {
245 Self::FunctionCall(value)
246 }
247}
248#[doc = "Describes the permission scope for an access key. Whether it is a function call or a full access key."]
249#[doc = r""]
250#[doc = r" <details><summary>JSON schema</summary>"]
251#[doc = r""]
252#[doc = r" ```json"]
253#[doc = "{"]
254#[doc = " \"description\": \"Describes the permission scope for an access key. Whether it is a function call or a full access key.\","]
255#[doc = " \"oneOf\": ["]
256#[doc = " {"]
257#[doc = " \"type\": \"string\","]
258#[doc = " \"enum\": ["]
259#[doc = " \"FullAccess\""]
260#[doc = " ]"]
261#[doc = " },"]
262#[doc = " {"]
263#[doc = " \"type\": \"object\","]
264#[doc = " \"required\": ["]
265#[doc = " \"FunctionCall\""]
266#[doc = " ],"]
267#[doc = " \"properties\": {"]
268#[doc = " \"FunctionCall\": {"]
269#[doc = " \"type\": \"object\","]
270#[doc = " \"required\": ["]
271#[doc = " \"method_names\","]
272#[doc = " \"receiver_id\""]
273#[doc = " ],"]
274#[doc = " \"properties\": {"]
275#[doc = " \"allowance\": {"]
276#[doc = " \"anyOf\": ["]
277#[doc = " {"]
278#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
279#[doc = " },"]
280#[doc = " {"]
281#[doc = " \"type\": \"null\""]
282#[doc = " }"]
283#[doc = " ]"]
284#[doc = " },"]
285#[doc = " \"method_names\": {"]
286#[doc = " \"type\": \"array\","]
287#[doc = " \"items\": {"]
288#[doc = " \"type\": \"string\""]
289#[doc = " }"]
290#[doc = " },"]
291#[doc = " \"receiver_id\": {"]
292#[doc = " \"type\": \"string\""]
293#[doc = " }"]
294#[doc = " }"]
295#[doc = " }"]
296#[doc = " },"]
297#[doc = " \"additionalProperties\": false"]
298#[doc = " }"]
299#[doc = " ]"]
300#[doc = "}"]
301#[doc = r" ```"]
302#[doc = r" </details>"]
303#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
304pub enum AccessKeyPermissionView {
305 FullAccess,
306 FunctionCall {
307 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
308 allowance: ::std::option::Option<NearToken>,
309 method_names: ::std::vec::Vec<::std::string::String>,
310 receiver_id: ::std::string::String,
311 },
312}
313impl ::std::convert::From<&Self> for AccessKeyPermissionView {
314 fn from(value: &AccessKeyPermissionView) -> Self {
315 value.clone()
316 }
317}
318#[doc = "Describes access key permission scope and nonce."]
319#[doc = r""]
320#[doc = r" <details><summary>JSON schema</summary>"]
321#[doc = r""]
322#[doc = r" ```json"]
323#[doc = "{"]
324#[doc = " \"description\": \"Describes access key permission scope and nonce.\","]
325#[doc = " \"type\": \"object\","]
326#[doc = " \"required\": ["]
327#[doc = " \"nonce\","]
328#[doc = " \"permission\""]
329#[doc = " ],"]
330#[doc = " \"properties\": {"]
331#[doc = " \"nonce\": {"]
332#[doc = " \"type\": \"integer\","]
333#[doc = " \"format\": \"uint64\","]
334#[doc = " \"minimum\": 0.0"]
335#[doc = " },"]
336#[doc = " \"permission\": {"]
337#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
338#[doc = " }"]
339#[doc = " }"]
340#[doc = "}"]
341#[doc = r" ```"]
342#[doc = r" </details>"]
343#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
344pub struct AccessKeyView {
345 pub nonce: u64,
346 pub permission: AccessKeyPermissionView,
347}
348impl ::std::convert::From<&AccessKeyView> for AccessKeyView {
349 fn from(value: &AccessKeyView) -> Self {
350 value.clone()
351 }
352}
353#[doc = "`AccountChangesByBlockIdChangesType`"]
354#[doc = r""]
355#[doc = r" <details><summary>JSON schema</summary>"]
356#[doc = r""]
357#[doc = r" ```json"]
358#[doc = "{"]
359#[doc = " \"type\": \"string\","]
360#[doc = " \"enum\": ["]
361#[doc = " \"account_changes\""]
362#[doc = " ]"]
363#[doc = "}"]
364#[doc = r" ```"]
365#[doc = r" </details>"]
366#[derive(
367 :: serde :: Deserialize,
368 :: serde :: Serialize,
369 Clone,
370 Copy,
371 Debug,
372 Eq,
373 Hash,
374 Ord,
375 PartialEq,
376 PartialOrd,
377)]
378pub enum AccountChangesByBlockIdChangesType {
379 #[serde(rename = "account_changes")]
380 AccountChanges,
381}
382impl ::std::convert::From<&Self> for AccountChangesByBlockIdChangesType {
383 fn from(value: &AccountChangesByBlockIdChangesType) -> Self {
384 value.clone()
385 }
386}
387impl ::std::fmt::Display for AccountChangesByBlockIdChangesType {
388 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
389 match *self {
390 Self::AccountChanges => f.write_str("account_changes"),
391 }
392 }
393}
394impl ::std::str::FromStr for AccountChangesByBlockIdChangesType {
395 type Err = self::error::ConversionError;
396 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
397 match value {
398 "account_changes" => Ok(Self::AccountChanges),
399 _ => Err("invalid value".into()),
400 }
401 }
402}
403impl ::std::convert::TryFrom<&str> for AccountChangesByBlockIdChangesType {
404 type Error = self::error::ConversionError;
405 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
406 value.parse()
407 }
408}
409impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByBlockIdChangesType {
410 type Error = self::error::ConversionError;
411 fn try_from(
412 value: &::std::string::String,
413 ) -> ::std::result::Result<Self, self::error::ConversionError> {
414 value.parse()
415 }
416}
417impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByBlockIdChangesType {
418 type Error = self::error::ConversionError;
419 fn try_from(
420 value: ::std::string::String,
421 ) -> ::std::result::Result<Self, self::error::ConversionError> {
422 value.parse()
423 }
424}
425#[doc = "`AccountChangesByFinalityChangesType`"]
426#[doc = r""]
427#[doc = r" <details><summary>JSON schema</summary>"]
428#[doc = r""]
429#[doc = r" ```json"]
430#[doc = "{"]
431#[doc = " \"type\": \"string\","]
432#[doc = " \"enum\": ["]
433#[doc = " \"account_changes\""]
434#[doc = " ]"]
435#[doc = "}"]
436#[doc = r" ```"]
437#[doc = r" </details>"]
438#[derive(
439 :: serde :: Deserialize,
440 :: serde :: Serialize,
441 Clone,
442 Copy,
443 Debug,
444 Eq,
445 Hash,
446 Ord,
447 PartialEq,
448 PartialOrd,
449)]
450pub enum AccountChangesByFinalityChangesType {
451 #[serde(rename = "account_changes")]
452 AccountChanges,
453}
454impl ::std::convert::From<&Self> for AccountChangesByFinalityChangesType {
455 fn from(value: &AccountChangesByFinalityChangesType) -> Self {
456 value.clone()
457 }
458}
459impl ::std::fmt::Display for AccountChangesByFinalityChangesType {
460 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
461 match *self {
462 Self::AccountChanges => f.write_str("account_changes"),
463 }
464 }
465}
466impl ::std::str::FromStr for AccountChangesByFinalityChangesType {
467 type Err = self::error::ConversionError;
468 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
469 match value {
470 "account_changes" => Ok(Self::AccountChanges),
471 _ => Err("invalid value".into()),
472 }
473 }
474}
475impl ::std::convert::TryFrom<&str> for AccountChangesByFinalityChangesType {
476 type Error = self::error::ConversionError;
477 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
478 value.parse()
479 }
480}
481impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByFinalityChangesType {
482 type Error = self::error::ConversionError;
483 fn try_from(
484 value: &::std::string::String,
485 ) -> ::std::result::Result<Self, self::error::ConversionError> {
486 value.parse()
487 }
488}
489impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByFinalityChangesType {
490 type Error = self::error::ConversionError;
491 fn try_from(
492 value: ::std::string::String,
493 ) -> ::std::result::Result<Self, self::error::ConversionError> {
494 value.parse()
495 }
496}
497#[doc = "`AccountChangesBySyncCheckpointChangesType`"]
498#[doc = r""]
499#[doc = r" <details><summary>JSON schema</summary>"]
500#[doc = r""]
501#[doc = r" ```json"]
502#[doc = "{"]
503#[doc = " \"type\": \"string\","]
504#[doc = " \"enum\": ["]
505#[doc = " \"account_changes\""]
506#[doc = " ]"]
507#[doc = "}"]
508#[doc = r" ```"]
509#[doc = r" </details>"]
510#[derive(
511 :: serde :: Deserialize,
512 :: serde :: Serialize,
513 Clone,
514 Copy,
515 Debug,
516 Eq,
517 Hash,
518 Ord,
519 PartialEq,
520 PartialOrd,
521)]
522pub enum AccountChangesBySyncCheckpointChangesType {
523 #[serde(rename = "account_changes")]
524 AccountChanges,
525}
526impl ::std::convert::From<&Self> for AccountChangesBySyncCheckpointChangesType {
527 fn from(value: &AccountChangesBySyncCheckpointChangesType) -> Self {
528 value.clone()
529 }
530}
531impl ::std::fmt::Display for AccountChangesBySyncCheckpointChangesType {
532 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
533 match *self {
534 Self::AccountChanges => f.write_str("account_changes"),
535 }
536 }
537}
538impl ::std::str::FromStr for AccountChangesBySyncCheckpointChangesType {
539 type Err = self::error::ConversionError;
540 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
541 match value {
542 "account_changes" => Ok(Self::AccountChanges),
543 _ => Err("invalid value".into()),
544 }
545 }
546}
547impl ::std::convert::TryFrom<&str> for AccountChangesBySyncCheckpointChangesType {
548 type Error = self::error::ConversionError;
549 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
550 value.parse()
551 }
552}
553impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesBySyncCheckpointChangesType {
554 type Error = self::error::ConversionError;
555 fn try_from(
556 value: &::std::string::String,
557 ) -> ::std::result::Result<Self, self::error::ConversionError> {
558 value.parse()
559 }
560}
561impl ::std::convert::TryFrom<::std::string::String> for AccountChangesBySyncCheckpointChangesType {
562 type Error = self::error::ConversionError;
563 fn try_from(
564 value: ::std::string::String,
565 ) -> ::std::result::Result<Self, self::error::ConversionError> {
566 value.parse()
567 }
568}
569#[doc = "The structure describes configuration for creation of new accounts."]
570#[doc = r""]
571#[doc = r" <details><summary>JSON schema</summary>"]
572#[doc = r""]
573#[doc = r" ```json"]
574#[doc = "{"]
575#[doc = " \"description\": \"The structure describes configuration for creation of new accounts.\","]
576#[doc = " \"type\": \"object\","]
577#[doc = " \"required\": ["]
578#[doc = " \"min_allowed_top_level_account_length\","]
579#[doc = " \"registrar_account_id\""]
580#[doc = " ],"]
581#[doc = " \"properties\": {"]
582#[doc = " \"min_allowed_top_level_account_length\": {"]
583#[doc = " \"description\": \"The minimum length of the top-level account ID that is allowed to be created by any account.\","]
584#[doc = " \"type\": \"integer\","]
585#[doc = " \"format\": \"uint8\","]
586#[doc = " \"maximum\": 255.0,"]
587#[doc = " \"minimum\": 0.0"]
588#[doc = " },"]
589#[doc = " \"registrar_account_id\": {"]
590#[doc = " \"description\": \"The account ID of the account registrar. This account ID allowed to create top-level\\naccounts of any valid length.\","]
591#[doc = " \"allOf\": ["]
592#[doc = " {"]
593#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
594#[doc = " }"]
595#[doc = " ]"]
596#[doc = " }"]
597#[doc = " }"]
598#[doc = "}"]
599#[doc = r" ```"]
600#[doc = r" </details>"]
601#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
602pub struct AccountCreationConfigView {
603 #[doc = "The minimum length of the top-level account ID that is allowed to be created by any account."]
604 pub min_allowed_top_level_account_length: u8,
605 #[doc = "The account ID of the account registrar. This account ID allowed to create top-level\naccounts of any valid length."]
606 pub registrar_account_id: AccountId,
607}
608impl ::std::convert::From<&AccountCreationConfigView> for AccountCreationConfigView {
609 fn from(value: &AccountCreationConfigView) -> Self {
610 value.clone()
611 }
612}
613#[doc = "AccountData is a piece of global state that a validator\nsigns and broadcasts to the network.\n\nIt is essentially the data that a validator wants to share with the network.\nAll the nodes in the network are collecting the account data\nbroadcasted by the validators.\nSince the number of the validators is bounded and their\nidentity is known (and the maximal size of allowed AccountData is bounded)\nthe global state that is distributed in the form of AccountData is bounded\nas well.\nFind more information in the docs [here](https://github.com/near/nearcore/blob/560f7fc8f4b3106e0d5d46050688610b1f104ac6/chain/client/src/client.rs#L2232)"]
614#[doc = r""]
615#[doc = r" <details><summary>JSON schema</summary>"]
616#[doc = r""]
617#[doc = r" ```json"]
618#[doc = "{"]
619#[doc = " \"description\": \"AccountData is a piece of global state that a validator\\nsigns and broadcasts to the network.\\n\\nIt is essentially the data that a validator wants to share with the network.\\nAll the nodes in the network are collecting the account data\\nbroadcasted by the validators.\\nSince the number of the validators is bounded and their\\nidentity is known (and the maximal size of allowed AccountData is bounded)\\nthe global state that is distributed in the form of AccountData is bounded\\nas well.\\nFind more information in the docs [here](https://github.com/near/nearcore/blob/560f7fc8f4b3106e0d5d46050688610b1f104ac6/chain/client/src/client.rs#L2232)\","]
620#[doc = " \"type\": \"object\","]
621#[doc = " \"required\": ["]
622#[doc = " \"account_key\","]
623#[doc = " \"peer_id\","]
624#[doc = " \"proxies\","]
625#[doc = " \"timestamp\""]
626#[doc = " ],"]
627#[doc = " \"properties\": {"]
628#[doc = " \"account_key\": {"]
629#[doc = " \"description\": \"Account key of the validator signing this AccountData.\","]
630#[doc = " \"allOf\": ["]
631#[doc = " {"]
632#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
633#[doc = " }"]
634#[doc = " ]"]
635#[doc = " },"]
636#[doc = " \"peer_id\": {"]
637#[doc = " \"description\": \"ID of the node that handles the account key (aka validator key).\","]
638#[doc = " \"allOf\": ["]
639#[doc = " {"]
640#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
641#[doc = " }"]
642#[doc = " ]"]
643#[doc = " },"]
644#[doc = " \"proxies\": {"]
645#[doc = " \"description\": \"Proxy nodes that are directly connected to the validator node\\n(this list may include the validator node itself).\\nTIER1 nodes should connect to one of the proxies to sent TIER1\\nmessages to the validator.\","]
646#[doc = " \"type\": \"array\","]
647#[doc = " \"items\": {"]
648#[doc = " \"$ref\": \"#/components/schemas/Tier1ProxyView\""]
649#[doc = " }"]
650#[doc = " },"]
651#[doc = " \"timestamp\": {"]
652#[doc = " \"description\": \"UTC timestamp of when the AccountData has been signed.\","]
653#[doc = " \"type\": \"string\""]
654#[doc = " }"]
655#[doc = " }"]
656#[doc = "}"]
657#[doc = r" ```"]
658#[doc = r" </details>"]
659#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
660pub struct AccountDataView {
661 #[doc = "Account key of the validator signing this AccountData."]
662 pub account_key: PublicKey,
663 #[doc = "ID of the node that handles the account key (aka validator key)."]
664 pub peer_id: PublicKey,
665 #[doc = "Proxy nodes that are directly connected to the validator node\n(this list may include the validator node itself).\nTIER1 nodes should connect to one of the proxies to sent TIER1\nmessages to the validator."]
666 pub proxies: ::std::vec::Vec<Tier1ProxyView>,
667 #[doc = "UTC timestamp of when the AccountData has been signed."]
668 pub timestamp: ::std::string::String,
669}
670impl ::std::convert::From<&AccountDataView> for AccountDataView {
671 fn from(value: &AccountDataView) -> Self {
672 value.clone()
673 }
674}
675#[doc = "`AccountIdValidityRulesVersion`"]
676#[doc = r""]
677#[doc = r" <details><summary>JSON schema</summary>"]
678#[doc = r""]
679#[doc = r" ```json"]
680#[doc = "{"]
681#[doc = " \"type\": \"integer\","]
682#[doc = " \"format\": \"uint8\","]
683#[doc = " \"maximum\": 255.0,"]
684#[doc = " \"minimum\": 0.0"]
685#[doc = "}"]
686#[doc = r" ```"]
687#[doc = r" </details>"]
688#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
689#[serde(transparent)]
690pub struct AccountIdValidityRulesVersion(pub u8);
691impl ::std::ops::Deref for AccountIdValidityRulesVersion {
692 type Target = u8;
693 fn deref(&self) -> &u8 {
694 &self.0
695 }
696}
697impl ::std::convert::From<AccountIdValidityRulesVersion> for u8 {
698 fn from(value: AccountIdValidityRulesVersion) -> Self {
699 value.0
700 }
701}
702impl ::std::convert::From<&AccountIdValidityRulesVersion> for AccountIdValidityRulesVersion {
703 fn from(value: &AccountIdValidityRulesVersion) -> Self {
704 value.clone()
705 }
706}
707impl ::std::convert::From<u8> for AccountIdValidityRulesVersion {
708 fn from(value: u8) -> Self {
709 Self(value)
710 }
711}
712impl ::std::str::FromStr for AccountIdValidityRulesVersion {
713 type Err = <u8 as ::std::str::FromStr>::Err;
714 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
715 Ok(Self(value.parse()?))
716 }
717}
718impl ::std::convert::TryFrom<&str> for AccountIdValidityRulesVersion {
719 type Error = <u8 as ::std::str::FromStr>::Err;
720 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
721 value.parse()
722 }
723}
724impl ::std::convert::TryFrom<&String> for AccountIdValidityRulesVersion {
725 type Error = <u8 as ::std::str::FromStr>::Err;
726 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
727 value.parse()
728 }
729}
730impl ::std::convert::TryFrom<String> for AccountIdValidityRulesVersion {
731 type Error = <u8 as ::std::str::FromStr>::Err;
732 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
733 value.parse()
734 }
735}
736impl ::std::fmt::Display for AccountIdValidityRulesVersion {
737 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
738 self.0.fmt(f)
739 }
740}
741#[doc = "Account info for validators"]
742#[doc = r""]
743#[doc = r" <details><summary>JSON schema</summary>"]
744#[doc = r""]
745#[doc = r" ```json"]
746#[doc = "{"]
747#[doc = " \"description\": \"Account info for validators\","]
748#[doc = " \"type\": \"object\","]
749#[doc = " \"required\": ["]
750#[doc = " \"account_id\","]
751#[doc = " \"amount\","]
752#[doc = " \"public_key\""]
753#[doc = " ],"]
754#[doc = " \"properties\": {"]
755#[doc = " \"account_id\": {"]
756#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
757#[doc = " },"]
758#[doc = " \"amount\": {"]
759#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
760#[doc = " },"]
761#[doc = " \"public_key\": {"]
762#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
763#[doc = " }"]
764#[doc = " }"]
765#[doc = "}"]
766#[doc = r" ```"]
767#[doc = r" </details>"]
768#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
769pub struct AccountInfo {
770 pub account_id: AccountId,
771 pub amount: NearToken,
772 pub public_key: PublicKey,
773}
774impl ::std::convert::From<&AccountInfo> for AccountInfo {
775 fn from(value: &AccountInfo) -> Self {
776 value.clone()
777 }
778}
779#[doc = "A view of the account"]
780#[doc = r""]
781#[doc = r" <details><summary>JSON schema</summary>"]
782#[doc = r""]
783#[doc = r" ```json"]
784#[doc = "{"]
785#[doc = " \"description\": \"A view of the account\","]
786#[doc = " \"type\": \"object\","]
787#[doc = " \"required\": ["]
788#[doc = " \"amount\","]
789#[doc = " \"code_hash\","]
790#[doc = " \"locked\","]
791#[doc = " \"storage_usage\""]
792#[doc = " ],"]
793#[doc = " \"properties\": {"]
794#[doc = " \"amount\": {"]
795#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
796#[doc = " },"]
797#[doc = " \"code_hash\": {"]
798#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
799#[doc = " },"]
800#[doc = " \"global_contract_account_id\": {"]
801#[doc = " \"anyOf\": ["]
802#[doc = " {"]
803#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
804#[doc = " },"]
805#[doc = " {"]
806#[doc = " \"type\": \"null\""]
807#[doc = " }"]
808#[doc = " ]"]
809#[doc = " },"]
810#[doc = " \"global_contract_hash\": {"]
811#[doc = " \"anyOf\": ["]
812#[doc = " {"]
813#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
814#[doc = " },"]
815#[doc = " {"]
816#[doc = " \"type\": \"null\""]
817#[doc = " }"]
818#[doc = " ]"]
819#[doc = " },"]
820#[doc = " \"locked\": {"]
821#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
822#[doc = " },"]
823#[doc = " \"storage_paid_at\": {"]
824#[doc = " \"description\": \"TODO(2271): deprecated.\","]
825#[doc = " \"default\": 0,"]
826#[doc = " \"type\": \"integer\","]
827#[doc = " \"format\": \"uint64\","]
828#[doc = " \"minimum\": 0.0"]
829#[doc = " },"]
830#[doc = " \"storage_usage\": {"]
831#[doc = " \"type\": \"integer\","]
832#[doc = " \"format\": \"uint64\","]
833#[doc = " \"minimum\": 0.0"]
834#[doc = " }"]
835#[doc = " }"]
836#[doc = "}"]
837#[doc = r" ```"]
838#[doc = r" </details>"]
839#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
840pub struct AccountView {
841 pub amount: NearToken,
842 pub code_hash: CryptoHash,
843 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
844 pub global_contract_account_id: ::std::option::Option<AccountId>,
845 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
846 pub global_contract_hash: ::std::option::Option<CryptoHash>,
847 pub locked: NearToken,
848 #[doc = "TODO(2271): deprecated."]
849 #[serde(default)]
850 pub storage_paid_at: u64,
851 pub storage_usage: u64,
852}
853impl ::std::convert::From<&AccountView> for AccountView {
854 fn from(value: &AccountView) -> Self {
855 value.clone()
856 }
857}
858#[doc = "Account ID with its public key."]
859#[doc = r""]
860#[doc = r" <details><summary>JSON schema</summary>"]
861#[doc = r""]
862#[doc = r" ```json"]
863#[doc = "{"]
864#[doc = " \"description\": \"Account ID with its public key.\","]
865#[doc = " \"type\": \"object\","]
866#[doc = " \"required\": ["]
867#[doc = " \"account_id\","]
868#[doc = " \"public_key\""]
869#[doc = " ],"]
870#[doc = " \"properties\": {"]
871#[doc = " \"account_id\": {"]
872#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
873#[doc = " },"]
874#[doc = " \"public_key\": {"]
875#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
876#[doc = " }"]
877#[doc = " }"]
878#[doc = "}"]
879#[doc = r" ```"]
880#[doc = r" </details>"]
881#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
882pub struct AccountWithPublicKey {
883 pub account_id: AccountId,
884 pub public_key: PublicKey,
885}
886impl ::std::convert::From<&AccountWithPublicKey> for AccountWithPublicKey {
887 fn from(value: &AccountWithPublicKey) -> Self {
888 value.clone()
889 }
890}
891#[doc = "Describes the cost of creating a specific action, `Action`. Includes all variants."]
892#[doc = r""]
893#[doc = r" <details><summary>JSON schema</summary>"]
894#[doc = r""]
895#[doc = r" ```json"]
896#[doc = "{"]
897#[doc = " \"description\": \"Describes the cost of creating a specific action, `Action`. Includes all variants.\","]
898#[doc = " \"type\": \"object\","]
899#[doc = " \"required\": ["]
900#[doc = " \"add_key_cost\","]
901#[doc = " \"create_account_cost\","]
902#[doc = " \"delegate_cost\","]
903#[doc = " \"delete_account_cost\","]
904#[doc = " \"delete_key_cost\","]
905#[doc = " \"deploy_contract_cost\","]
906#[doc = " \"deploy_contract_cost_per_byte\","]
907#[doc = " \"function_call_cost\","]
908#[doc = " \"function_call_cost_per_byte\","]
909#[doc = " \"stake_cost\","]
910#[doc = " \"transfer_cost\""]
911#[doc = " ],"]
912#[doc = " \"properties\": {"]
913#[doc = " \"add_key_cost\": {"]
914#[doc = " \"description\": \"Base cost of adding a key.\","]
915#[doc = " \"allOf\": ["]
916#[doc = " {"]
917#[doc = " \"$ref\": \"#/components/schemas/AccessKeyCreationConfigView\""]
918#[doc = " }"]
919#[doc = " ]"]
920#[doc = " },"]
921#[doc = " \"create_account_cost\": {"]
922#[doc = " \"description\": \"Base cost of creating an account.\","]
923#[doc = " \"allOf\": ["]
924#[doc = " {"]
925#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
926#[doc = " }"]
927#[doc = " ]"]
928#[doc = " },"]
929#[doc = " \"delegate_cost\": {"]
930#[doc = " \"description\": \"Base cost for processing a delegate action.\\n\\nThis is on top of the costs for the actions inside the delegate action.\","]
931#[doc = " \"allOf\": ["]
932#[doc = " {"]
933#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
934#[doc = " }"]
935#[doc = " ]"]
936#[doc = " },"]
937#[doc = " \"delete_account_cost\": {"]
938#[doc = " \"description\": \"Base cost of deleting an account.\","]
939#[doc = " \"allOf\": ["]
940#[doc = " {"]
941#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
942#[doc = " }"]
943#[doc = " ]"]
944#[doc = " },"]
945#[doc = " \"delete_key_cost\": {"]
946#[doc = " \"description\": \"Base cost of deleting a key.\","]
947#[doc = " \"allOf\": ["]
948#[doc = " {"]
949#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
950#[doc = " }"]
951#[doc = " ]"]
952#[doc = " },"]
953#[doc = " \"deploy_contract_cost\": {"]
954#[doc = " \"description\": \"Base cost of deploying a contract.\","]
955#[doc = " \"allOf\": ["]
956#[doc = " {"]
957#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
958#[doc = " }"]
959#[doc = " ]"]
960#[doc = " },"]
961#[doc = " \"deploy_contract_cost_per_byte\": {"]
962#[doc = " \"description\": \"Cost per byte of deploying a contract.\","]
963#[doc = " \"allOf\": ["]
964#[doc = " {"]
965#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
966#[doc = " }"]
967#[doc = " ]"]
968#[doc = " },"]
969#[doc = " \"function_call_cost\": {"]
970#[doc = " \"description\": \"Base cost of calling a function.\","]
971#[doc = " \"allOf\": ["]
972#[doc = " {"]
973#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
974#[doc = " }"]
975#[doc = " ]"]
976#[doc = " },"]
977#[doc = " \"function_call_cost_per_byte\": {"]
978#[doc = " \"description\": \"Cost per byte of method name and arguments of calling a function.\","]
979#[doc = " \"allOf\": ["]
980#[doc = " {"]
981#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
982#[doc = " }"]
983#[doc = " ]"]
984#[doc = " },"]
985#[doc = " \"stake_cost\": {"]
986#[doc = " \"description\": \"Base cost of staking.\","]
987#[doc = " \"allOf\": ["]
988#[doc = " {"]
989#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
990#[doc = " }"]
991#[doc = " ]"]
992#[doc = " },"]
993#[doc = " \"transfer_cost\": {"]
994#[doc = " \"description\": \"Base cost of making a transfer.\","]
995#[doc = " \"allOf\": ["]
996#[doc = " {"]
997#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
998#[doc = " }"]
999#[doc = " ]"]
1000#[doc = " }"]
1001#[doc = " }"]
1002#[doc = "}"]
1003#[doc = r" ```"]
1004#[doc = r" </details>"]
1005#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1006pub struct ActionCreationConfigView {
1007 #[doc = "Base cost of adding a key."]
1008 pub add_key_cost: AccessKeyCreationConfigView,
1009 #[doc = "Base cost of creating an account."]
1010 pub create_account_cost: Fee,
1011 #[doc = "Base cost for processing a delegate action.\n\nThis is on top of the costs for the actions inside the delegate action."]
1012 pub delegate_cost: Fee,
1013 #[doc = "Base cost of deleting an account."]
1014 pub delete_account_cost: Fee,
1015 #[doc = "Base cost of deleting a key."]
1016 pub delete_key_cost: Fee,
1017 #[doc = "Base cost of deploying a contract."]
1018 pub deploy_contract_cost: Fee,
1019 #[doc = "Cost per byte of deploying a contract."]
1020 pub deploy_contract_cost_per_byte: Fee,
1021 #[doc = "Base cost of calling a function."]
1022 pub function_call_cost: Fee,
1023 #[doc = "Cost per byte of method name and arguments of calling a function."]
1024 pub function_call_cost_per_byte: Fee,
1025 #[doc = "Base cost of staking."]
1026 pub stake_cost: Fee,
1027 #[doc = "Base cost of making a transfer."]
1028 pub transfer_cost: Fee,
1029}
1030impl ::std::convert::From<&ActionCreationConfigView> for ActionCreationConfigView {
1031 fn from(value: &ActionCreationConfigView) -> Self {
1032 value.clone()
1033 }
1034}
1035#[doc = "An error happened during Action execution"]
1036#[doc = r""]
1037#[doc = r" <details><summary>JSON schema</summary>"]
1038#[doc = r""]
1039#[doc = r" ```json"]
1040#[doc = "{"]
1041#[doc = " \"description\": \"An error happened during Action execution\","]
1042#[doc = " \"type\": \"object\","]
1043#[doc = " \"required\": ["]
1044#[doc = " \"kind\""]
1045#[doc = " ],"]
1046#[doc = " \"properties\": {"]
1047#[doc = " \"index\": {"]
1048#[doc = " \"description\": \"Index of the failed action in the transaction.\\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`\","]
1049#[doc = " \"type\": ["]
1050#[doc = " \"integer\","]
1051#[doc = " \"null\""]
1052#[doc = " ],"]
1053#[doc = " \"format\": \"uint64\","]
1054#[doc = " \"minimum\": 0.0"]
1055#[doc = " },"]
1056#[doc = " \"kind\": {"]
1057#[doc = " \"description\": \"The kind of ActionError happened\","]
1058#[doc = " \"allOf\": ["]
1059#[doc = " {"]
1060#[doc = " \"$ref\": \"#/components/schemas/ActionErrorKind\""]
1061#[doc = " }"]
1062#[doc = " ]"]
1063#[doc = " }"]
1064#[doc = " }"]
1065#[doc = "}"]
1066#[doc = r" ```"]
1067#[doc = r" </details>"]
1068#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1069pub struct ActionError {
1070 #[doc = "Index of the failed action in the transaction.\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`"]
1071 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1072 pub index: ::std::option::Option<u64>,
1073 #[doc = "The kind of ActionError happened"]
1074 pub kind: ActionErrorKind,
1075}
1076impl ::std::convert::From<&ActionError> for ActionError {
1077 fn from(value: &ActionError) -> Self {
1078 value.clone()
1079 }
1080}
1081#[doc = "`ActionErrorKind`"]
1082#[doc = r""]
1083#[doc = r" <details><summary>JSON schema</summary>"]
1084#[doc = r""]
1085#[doc = r" ```json"]
1086#[doc = "{"]
1087#[doc = " \"oneOf\": ["]
1088#[doc = " {"]
1089#[doc = " \"description\": \"Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage\","]
1090#[doc = " \"type\": \"object\","]
1091#[doc = " \"required\": ["]
1092#[doc = " \"AccountAlreadyExists\""]
1093#[doc = " ],"]
1094#[doc = " \"properties\": {"]
1095#[doc = " \"AccountAlreadyExists\": {"]
1096#[doc = " \"type\": \"object\","]
1097#[doc = " \"required\": ["]
1098#[doc = " \"account_id\""]
1099#[doc = " ],"]
1100#[doc = " \"properties\": {"]
1101#[doc = " \"account_id\": {"]
1102#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1103#[doc = " }"]
1104#[doc = " }"]
1105#[doc = " }"]
1106#[doc = " },"]
1107#[doc = " \"additionalProperties\": false"]
1108#[doc = " },"]
1109#[doc = " {"]
1110#[doc = " \"description\": \"Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)\","]
1111#[doc = " \"type\": \"object\","]
1112#[doc = " \"required\": ["]
1113#[doc = " \"AccountDoesNotExist\""]
1114#[doc = " ],"]
1115#[doc = " \"properties\": {"]
1116#[doc = " \"AccountDoesNotExist\": {"]
1117#[doc = " \"type\": \"object\","]
1118#[doc = " \"required\": ["]
1119#[doc = " \"account_id\""]
1120#[doc = " ],"]
1121#[doc = " \"properties\": {"]
1122#[doc = " \"account_id\": {"]
1123#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1124#[doc = " }"]
1125#[doc = " }"]
1126#[doc = " }"]
1127#[doc = " },"]
1128#[doc = " \"additionalProperties\": false"]
1129#[doc = " },"]
1130#[doc = " {"]
1131#[doc = " \"description\": \"A top-level account ID can only be created by registrar.\","]
1132#[doc = " \"type\": \"object\","]
1133#[doc = " \"required\": ["]
1134#[doc = " \"CreateAccountOnlyByRegistrar\""]
1135#[doc = " ],"]
1136#[doc = " \"properties\": {"]
1137#[doc = " \"CreateAccountOnlyByRegistrar\": {"]
1138#[doc = " \"type\": \"object\","]
1139#[doc = " \"required\": ["]
1140#[doc = " \"account_id\","]
1141#[doc = " \"predecessor_id\","]
1142#[doc = " \"registrar_account_id\""]
1143#[doc = " ],"]
1144#[doc = " \"properties\": {"]
1145#[doc = " \"account_id\": {"]
1146#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1147#[doc = " },"]
1148#[doc = " \"predecessor_id\": {"]
1149#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1150#[doc = " },"]
1151#[doc = " \"registrar_account_id\": {"]
1152#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1153#[doc = " }"]
1154#[doc = " }"]
1155#[doc = " }"]
1156#[doc = " },"]
1157#[doc = " \"additionalProperties\": false"]
1158#[doc = " },"]
1159#[doc = " {"]
1160#[doc = " \"description\": \"A newly created account must be under a namespace of the creator account\","]
1161#[doc = " \"type\": \"object\","]
1162#[doc = " \"required\": ["]
1163#[doc = " \"CreateAccountNotAllowed\""]
1164#[doc = " ],"]
1165#[doc = " \"properties\": {"]
1166#[doc = " \"CreateAccountNotAllowed\": {"]
1167#[doc = " \"type\": \"object\","]
1168#[doc = " \"required\": ["]
1169#[doc = " \"account_id\","]
1170#[doc = " \"predecessor_id\""]
1171#[doc = " ],"]
1172#[doc = " \"properties\": {"]
1173#[doc = " \"account_id\": {"]
1174#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1175#[doc = " },"]
1176#[doc = " \"predecessor_id\": {"]
1177#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1178#[doc = " }"]
1179#[doc = " }"]
1180#[doc = " }"]
1181#[doc = " },"]
1182#[doc = " \"additionalProperties\": false"]
1183#[doc = " },"]
1184#[doc = " {"]
1185#[doc = " \"description\": \"Administrative actions like `DeployContract`, `Stake`, `AddKey`, `DeleteKey`. can be proceed only if sender=receiver\\nor the first TX action is a `CreateAccount` action\","]
1186#[doc = " \"type\": \"object\","]
1187#[doc = " \"required\": ["]
1188#[doc = " \"ActorNoPermission\""]
1189#[doc = " ],"]
1190#[doc = " \"properties\": {"]
1191#[doc = " \"ActorNoPermission\": {"]
1192#[doc = " \"type\": \"object\","]
1193#[doc = " \"required\": ["]
1194#[doc = " \"account_id\","]
1195#[doc = " \"actor_id\""]
1196#[doc = " ],"]
1197#[doc = " \"properties\": {"]
1198#[doc = " \"account_id\": {"]
1199#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1200#[doc = " },"]
1201#[doc = " \"actor_id\": {"]
1202#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1203#[doc = " }"]
1204#[doc = " }"]
1205#[doc = " }"]
1206#[doc = " },"]
1207#[doc = " \"additionalProperties\": false"]
1208#[doc = " },"]
1209#[doc = " {"]
1210#[doc = " \"description\": \"Account tries to remove an access key that doesn't exist\","]
1211#[doc = " \"type\": \"object\","]
1212#[doc = " \"required\": ["]
1213#[doc = " \"DeleteKeyDoesNotExist\""]
1214#[doc = " ],"]
1215#[doc = " \"properties\": {"]
1216#[doc = " \"DeleteKeyDoesNotExist\": {"]
1217#[doc = " \"type\": \"object\","]
1218#[doc = " \"required\": ["]
1219#[doc = " \"account_id\","]
1220#[doc = " \"public_key\""]
1221#[doc = " ],"]
1222#[doc = " \"properties\": {"]
1223#[doc = " \"account_id\": {"]
1224#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1225#[doc = " },"]
1226#[doc = " \"public_key\": {"]
1227#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1228#[doc = " }"]
1229#[doc = " }"]
1230#[doc = " }"]
1231#[doc = " },"]
1232#[doc = " \"additionalProperties\": false"]
1233#[doc = " },"]
1234#[doc = " {"]
1235#[doc = " \"description\": \"The public key is already used for an existing access key\","]
1236#[doc = " \"type\": \"object\","]
1237#[doc = " \"required\": ["]
1238#[doc = " \"AddKeyAlreadyExists\""]
1239#[doc = " ],"]
1240#[doc = " \"properties\": {"]
1241#[doc = " \"AddKeyAlreadyExists\": {"]
1242#[doc = " \"type\": \"object\","]
1243#[doc = " \"required\": ["]
1244#[doc = " \"account_id\","]
1245#[doc = " \"public_key\""]
1246#[doc = " ],"]
1247#[doc = " \"properties\": {"]
1248#[doc = " \"account_id\": {"]
1249#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1250#[doc = " },"]
1251#[doc = " \"public_key\": {"]
1252#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1253#[doc = " }"]
1254#[doc = " }"]
1255#[doc = " }"]
1256#[doc = " },"]
1257#[doc = " \"additionalProperties\": false"]
1258#[doc = " },"]
1259#[doc = " {"]
1260#[doc = " \"description\": \"Account is staking and can not be deleted\","]
1261#[doc = " \"type\": \"object\","]
1262#[doc = " \"required\": ["]
1263#[doc = " \"DeleteAccountStaking\""]
1264#[doc = " ],"]
1265#[doc = " \"properties\": {"]
1266#[doc = " \"DeleteAccountStaking\": {"]
1267#[doc = " \"type\": \"object\","]
1268#[doc = " \"required\": ["]
1269#[doc = " \"account_id\""]
1270#[doc = " ],"]
1271#[doc = " \"properties\": {"]
1272#[doc = " \"account_id\": {"]
1273#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1274#[doc = " }"]
1275#[doc = " }"]
1276#[doc = " }"]
1277#[doc = " },"]
1278#[doc = " \"additionalProperties\": false"]
1279#[doc = " },"]
1280#[doc = " {"]
1281#[doc = " \"description\": \"ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage.\","]
1282#[doc = " \"type\": \"object\","]
1283#[doc = " \"required\": ["]
1284#[doc = " \"LackBalanceForState\""]
1285#[doc = " ],"]
1286#[doc = " \"properties\": {"]
1287#[doc = " \"LackBalanceForState\": {"]
1288#[doc = " \"type\": \"object\","]
1289#[doc = " \"required\": ["]
1290#[doc = " \"account_id\","]
1291#[doc = " \"amount\""]
1292#[doc = " ],"]
1293#[doc = " \"properties\": {"]
1294#[doc = " \"account_id\": {"]
1295#[doc = " \"description\": \"An account which needs balance\","]
1296#[doc = " \"allOf\": ["]
1297#[doc = " {"]
1298#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1299#[doc = " }"]
1300#[doc = " ]"]
1301#[doc = " },"]
1302#[doc = " \"amount\": {"]
1303#[doc = " \"description\": \"Balance required to complete an action.\","]
1304#[doc = " \"allOf\": ["]
1305#[doc = " {"]
1306#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1307#[doc = " }"]
1308#[doc = " ]"]
1309#[doc = " }"]
1310#[doc = " }"]
1311#[doc = " }"]
1312#[doc = " },"]
1313#[doc = " \"additionalProperties\": false"]
1314#[doc = " },"]
1315#[doc = " {"]
1316#[doc = " \"description\": \"Account is not yet staked, but tries to unstake\","]
1317#[doc = " \"type\": \"object\","]
1318#[doc = " \"required\": ["]
1319#[doc = " \"TriesToUnstake\""]
1320#[doc = " ],"]
1321#[doc = " \"properties\": {"]
1322#[doc = " \"TriesToUnstake\": {"]
1323#[doc = " \"type\": \"object\","]
1324#[doc = " \"required\": ["]
1325#[doc = " \"account_id\""]
1326#[doc = " ],"]
1327#[doc = " \"properties\": {"]
1328#[doc = " \"account_id\": {"]
1329#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1330#[doc = " }"]
1331#[doc = " }"]
1332#[doc = " }"]
1333#[doc = " },"]
1334#[doc = " \"additionalProperties\": false"]
1335#[doc = " },"]
1336#[doc = " {"]
1337#[doc = " \"description\": \"The account doesn't have enough balance to increase the stake.\","]
1338#[doc = " \"type\": \"object\","]
1339#[doc = " \"required\": ["]
1340#[doc = " \"TriesToStake\""]
1341#[doc = " ],"]
1342#[doc = " \"properties\": {"]
1343#[doc = " \"TriesToStake\": {"]
1344#[doc = " \"type\": \"object\","]
1345#[doc = " \"required\": ["]
1346#[doc = " \"account_id\","]
1347#[doc = " \"balance\","]
1348#[doc = " \"locked\","]
1349#[doc = " \"stake\""]
1350#[doc = " ],"]
1351#[doc = " \"properties\": {"]
1352#[doc = " \"account_id\": {"]
1353#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1354#[doc = " },"]
1355#[doc = " \"balance\": {"]
1356#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1357#[doc = " },"]
1358#[doc = " \"locked\": {"]
1359#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1360#[doc = " },"]
1361#[doc = " \"stake\": {"]
1362#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1363#[doc = " }"]
1364#[doc = " }"]
1365#[doc = " }"]
1366#[doc = " },"]
1367#[doc = " \"additionalProperties\": false"]
1368#[doc = " },"]
1369#[doc = " {"]
1370#[doc = " \"type\": \"object\","]
1371#[doc = " \"required\": ["]
1372#[doc = " \"InsufficientStake\""]
1373#[doc = " ],"]
1374#[doc = " \"properties\": {"]
1375#[doc = " \"InsufficientStake\": {"]
1376#[doc = " \"type\": \"object\","]
1377#[doc = " \"required\": ["]
1378#[doc = " \"account_id\","]
1379#[doc = " \"minimum_stake\","]
1380#[doc = " \"stake\""]
1381#[doc = " ],"]
1382#[doc = " \"properties\": {"]
1383#[doc = " \"account_id\": {"]
1384#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1385#[doc = " },"]
1386#[doc = " \"minimum_stake\": {"]
1387#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1388#[doc = " },"]
1389#[doc = " \"stake\": {"]
1390#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1391#[doc = " }"]
1392#[doc = " }"]
1393#[doc = " }"]
1394#[doc = " },"]
1395#[doc = " \"additionalProperties\": false"]
1396#[doc = " },"]
1397#[doc = " {"]
1398#[doc = " \"description\": \"An error occurred during a `FunctionCall` Action, parameter is debug message.\","]
1399#[doc = " \"type\": \"object\","]
1400#[doc = " \"required\": ["]
1401#[doc = " \"FunctionCallError\""]
1402#[doc = " ],"]
1403#[doc = " \"properties\": {"]
1404#[doc = " \"FunctionCallError\": {"]
1405#[doc = " \"$ref\": \"#/components/schemas/FunctionCallError\""]
1406#[doc = " }"]
1407#[doc = " },"]
1408#[doc = " \"additionalProperties\": false"]
1409#[doc = " },"]
1410#[doc = " {"]
1411#[doc = " \"description\": \"Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\\nreceipt validation.\","]
1412#[doc = " \"type\": \"object\","]
1413#[doc = " \"required\": ["]
1414#[doc = " \"NewReceiptValidationError\""]
1415#[doc = " ],"]
1416#[doc = " \"properties\": {"]
1417#[doc = " \"NewReceiptValidationError\": {"]
1418#[doc = " \"$ref\": \"#/components/schemas/ReceiptValidationError\""]
1419#[doc = " }"]
1420#[doc = " },"]
1421#[doc = " \"additionalProperties\": false"]
1422#[doc = " },"]
1423#[doc = " {"]
1424#[doc = " \"description\": \"Error occurs when a `CreateAccount` action is called on a NEAR-implicit or ETH-implicit account.\\nSee NEAR-implicit account creation NEP: <https://github.com/nearprotocol/NEPs/pull/71>.\\nAlso, see ETH-implicit account creation NEP: <https://github.com/near/NEPs/issues/518>.\\n\\nTODO(#8598): This error is named very poorly. A better name would be\\n`OnlyNamedAccountCreationAllowed`.\","]
1425#[doc = " \"type\": \"object\","]
1426#[doc = " \"required\": ["]
1427#[doc = " \"OnlyImplicitAccountCreationAllowed\""]
1428#[doc = " ],"]
1429#[doc = " \"properties\": {"]
1430#[doc = " \"OnlyImplicitAccountCreationAllowed\": {"]
1431#[doc = " \"type\": \"object\","]
1432#[doc = " \"required\": ["]
1433#[doc = " \"account_id\""]
1434#[doc = " ],"]
1435#[doc = " \"properties\": {"]
1436#[doc = " \"account_id\": {"]
1437#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1438#[doc = " }"]
1439#[doc = " }"]
1440#[doc = " }"]
1441#[doc = " },"]
1442#[doc = " \"additionalProperties\": false"]
1443#[doc = " },"]
1444#[doc = " {"]
1445#[doc = " \"description\": \"Delete account whose state is large is temporarily banned.\","]
1446#[doc = " \"type\": \"object\","]
1447#[doc = " \"required\": ["]
1448#[doc = " \"DeleteAccountWithLargeState\""]
1449#[doc = " ],"]
1450#[doc = " \"properties\": {"]
1451#[doc = " \"DeleteAccountWithLargeState\": {"]
1452#[doc = " \"type\": \"object\","]
1453#[doc = " \"required\": ["]
1454#[doc = " \"account_id\""]
1455#[doc = " ],"]
1456#[doc = " \"properties\": {"]
1457#[doc = " \"account_id\": {"]
1458#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1459#[doc = " }"]
1460#[doc = " }"]
1461#[doc = " }"]
1462#[doc = " },"]
1463#[doc = " \"additionalProperties\": false"]
1464#[doc = " },"]
1465#[doc = " {"]
1466#[doc = " \"description\": \"Signature does not match the provided actions and given signer public key.\","]
1467#[doc = " \"type\": \"string\","]
1468#[doc = " \"enum\": ["]
1469#[doc = " \"DelegateActionInvalidSignature\""]
1470#[doc = " ]"]
1471#[doc = " },"]
1472#[doc = " {"]
1473#[doc = " \"description\": \"Receiver of the transaction doesn't match Sender of the delegate action\","]
1474#[doc = " \"type\": \"object\","]
1475#[doc = " \"required\": ["]
1476#[doc = " \"DelegateActionSenderDoesNotMatchTxReceiver\""]
1477#[doc = " ],"]
1478#[doc = " \"properties\": {"]
1479#[doc = " \"DelegateActionSenderDoesNotMatchTxReceiver\": {"]
1480#[doc = " \"type\": \"object\","]
1481#[doc = " \"required\": ["]
1482#[doc = " \"receiver_id\","]
1483#[doc = " \"sender_id\""]
1484#[doc = " ],"]
1485#[doc = " \"properties\": {"]
1486#[doc = " \"receiver_id\": {"]
1487#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1488#[doc = " },"]
1489#[doc = " \"sender_id\": {"]
1490#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1491#[doc = " }"]
1492#[doc = " }"]
1493#[doc = " }"]
1494#[doc = " },"]
1495#[doc = " \"additionalProperties\": false"]
1496#[doc = " },"]
1497#[doc = " {"]
1498#[doc = " \"description\": \"Delegate action has expired. `max_block_height` is less than actual block height.\","]
1499#[doc = " \"type\": \"string\","]
1500#[doc = " \"enum\": ["]
1501#[doc = " \"DelegateActionExpired\""]
1502#[doc = " ]"]
1503#[doc = " },"]
1504#[doc = " {"]
1505#[doc = " \"description\": \"The given public key doesn't exist for Sender account\","]
1506#[doc = " \"type\": \"object\","]
1507#[doc = " \"required\": ["]
1508#[doc = " \"DelegateActionAccessKeyError\""]
1509#[doc = " ],"]
1510#[doc = " \"properties\": {"]
1511#[doc = " \"DelegateActionAccessKeyError\": {"]
1512#[doc = " \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
1513#[doc = " }"]
1514#[doc = " },"]
1515#[doc = " \"additionalProperties\": false"]
1516#[doc = " },"]
1517#[doc = " {"]
1518#[doc = " \"description\": \"DelegateAction nonce must be greater sender[public_key].nonce\","]
1519#[doc = " \"type\": \"object\","]
1520#[doc = " \"required\": ["]
1521#[doc = " \"DelegateActionInvalidNonce\""]
1522#[doc = " ],"]
1523#[doc = " \"properties\": {"]
1524#[doc = " \"DelegateActionInvalidNonce\": {"]
1525#[doc = " \"type\": \"object\","]
1526#[doc = " \"required\": ["]
1527#[doc = " \"ak_nonce\","]
1528#[doc = " \"delegate_nonce\""]
1529#[doc = " ],"]
1530#[doc = " \"properties\": {"]
1531#[doc = " \"ak_nonce\": {"]
1532#[doc = " \"type\": \"integer\","]
1533#[doc = " \"format\": \"uint64\","]
1534#[doc = " \"minimum\": 0.0"]
1535#[doc = " },"]
1536#[doc = " \"delegate_nonce\": {"]
1537#[doc = " \"type\": \"integer\","]
1538#[doc = " \"format\": \"uint64\","]
1539#[doc = " \"minimum\": 0.0"]
1540#[doc = " }"]
1541#[doc = " }"]
1542#[doc = " }"]
1543#[doc = " },"]
1544#[doc = " \"additionalProperties\": false"]
1545#[doc = " },"]
1546#[doc = " {"]
1547#[doc = " \"description\": \"DelegateAction nonce is larger than the upper bound given by the block height\","]
1548#[doc = " \"type\": \"object\","]
1549#[doc = " \"required\": ["]
1550#[doc = " \"DelegateActionNonceTooLarge\""]
1551#[doc = " ],"]
1552#[doc = " \"properties\": {"]
1553#[doc = " \"DelegateActionNonceTooLarge\": {"]
1554#[doc = " \"type\": \"object\","]
1555#[doc = " \"required\": ["]
1556#[doc = " \"delegate_nonce\","]
1557#[doc = " \"upper_bound\""]
1558#[doc = " ],"]
1559#[doc = " \"properties\": {"]
1560#[doc = " \"delegate_nonce\": {"]
1561#[doc = " \"type\": \"integer\","]
1562#[doc = " \"format\": \"uint64\","]
1563#[doc = " \"minimum\": 0.0"]
1564#[doc = " },"]
1565#[doc = " \"upper_bound\": {"]
1566#[doc = " \"type\": \"integer\","]
1567#[doc = " \"format\": \"uint64\","]
1568#[doc = " \"minimum\": 0.0"]
1569#[doc = " }"]
1570#[doc = " }"]
1571#[doc = " }"]
1572#[doc = " },"]
1573#[doc = " \"additionalProperties\": false"]
1574#[doc = " },"]
1575#[doc = " {"]
1576#[doc = " \"type\": \"object\","]
1577#[doc = " \"required\": ["]
1578#[doc = " \"GlobalContractDoesNotExist\""]
1579#[doc = " ],"]
1580#[doc = " \"properties\": {"]
1581#[doc = " \"GlobalContractDoesNotExist\": {"]
1582#[doc = " \"type\": \"object\","]
1583#[doc = " \"required\": ["]
1584#[doc = " \"identifier\""]
1585#[doc = " ],"]
1586#[doc = " \"properties\": {"]
1587#[doc = " \"identifier\": {"]
1588#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
1589#[doc = " }"]
1590#[doc = " }"]
1591#[doc = " }"]
1592#[doc = " },"]
1593#[doc = " \"additionalProperties\": false"]
1594#[doc = " },"]
1595#[doc = " {"]
1596#[doc = " \"type\": \"object\","]
1597#[doc = " \"required\": ["]
1598#[doc = " \"GasKeyDoesNotExist\""]
1599#[doc = " ],"]
1600#[doc = " \"properties\": {"]
1601#[doc = " \"GasKeyDoesNotExist\": {"]
1602#[doc = " \"type\": \"object\","]
1603#[doc = " \"required\": ["]
1604#[doc = " \"account_id\","]
1605#[doc = " \"public_key\""]
1606#[doc = " ],"]
1607#[doc = " \"properties\": {"]
1608#[doc = " \"account_id\": {"]
1609#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1610#[doc = " },"]
1611#[doc = " \"public_key\": {"]
1612#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1613#[doc = " }"]
1614#[doc = " }"]
1615#[doc = " }"]
1616#[doc = " },"]
1617#[doc = " \"additionalProperties\": false"]
1618#[doc = " },"]
1619#[doc = " {"]
1620#[doc = " \"type\": \"object\","]
1621#[doc = " \"required\": ["]
1622#[doc = " \"GasKeyAlreadyExists\""]
1623#[doc = " ],"]
1624#[doc = " \"properties\": {"]
1625#[doc = " \"GasKeyAlreadyExists\": {"]
1626#[doc = " \"type\": \"object\","]
1627#[doc = " \"required\": ["]
1628#[doc = " \"account_id\","]
1629#[doc = " \"public_key\""]
1630#[doc = " ],"]
1631#[doc = " \"properties\": {"]
1632#[doc = " \"account_id\": {"]
1633#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1634#[doc = " },"]
1635#[doc = " \"public_key\": {"]
1636#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1637#[doc = " }"]
1638#[doc = " }"]
1639#[doc = " }"]
1640#[doc = " },"]
1641#[doc = " \"additionalProperties\": false"]
1642#[doc = " }"]
1643#[doc = " ]"]
1644#[doc = "}"]
1645#[doc = r" ```"]
1646#[doc = r" </details>"]
1647#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1648pub enum ActionErrorKind {
1649 #[doc = "Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage"]
1650 AccountAlreadyExists { account_id: AccountId },
1651 #[doc = "Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)"]
1652 AccountDoesNotExist { account_id: AccountId },
1653 #[doc = "A top-level account ID can only be created by registrar."]
1654 CreateAccountOnlyByRegistrar {
1655 account_id: AccountId,
1656 predecessor_id: AccountId,
1657 registrar_account_id: AccountId,
1658 },
1659 #[doc = "A newly created account must be under a namespace of the creator account"]
1660 CreateAccountNotAllowed {
1661 account_id: AccountId,
1662 predecessor_id: AccountId,
1663 },
1664 #[doc = "Administrative actions like `DeployContract`, `Stake`, `AddKey`, `DeleteKey`. can be proceed only if sender=receiver\nor the first TX action is a `CreateAccount` action"]
1665 ActorNoPermission {
1666 account_id: AccountId,
1667 actor_id: AccountId,
1668 },
1669 #[doc = "Account tries to remove an access key that doesn't exist"]
1670 DeleteKeyDoesNotExist {
1671 account_id: AccountId,
1672 public_key: PublicKey,
1673 },
1674 #[doc = "The public key is already used for an existing access key"]
1675 AddKeyAlreadyExists {
1676 account_id: AccountId,
1677 public_key: PublicKey,
1678 },
1679 #[doc = "Account is staking and can not be deleted"]
1680 DeleteAccountStaking { account_id: AccountId },
1681 #[doc = "ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage."]
1682 LackBalanceForState {
1683 #[doc = "An account which needs balance"]
1684 account_id: AccountId,
1685 #[doc = "Balance required to complete an action."]
1686 amount: NearToken,
1687 },
1688 #[doc = "Account is not yet staked, but tries to unstake"]
1689 TriesToUnstake { account_id: AccountId },
1690 #[doc = "The account doesn't have enough balance to increase the stake."]
1691 TriesToStake {
1692 account_id: AccountId,
1693 balance: NearToken,
1694 locked: NearToken,
1695 stake: NearToken,
1696 },
1697 InsufficientStake {
1698 account_id: AccountId,
1699 minimum_stake: NearToken,
1700 stake: NearToken,
1701 },
1702 #[doc = "An error occurred during a `FunctionCall` Action, parameter is debug message."]
1703 FunctionCallError(FunctionCallError),
1704 #[doc = "Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\nreceipt validation."]
1705 NewReceiptValidationError(ReceiptValidationError),
1706 #[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`."]
1707 OnlyImplicitAccountCreationAllowed { account_id: AccountId },
1708 #[doc = "Delete account whose state is large is temporarily banned."]
1709 DeleteAccountWithLargeState { account_id: AccountId },
1710 #[doc = "Signature does not match the provided actions and given signer public key."]
1711 DelegateActionInvalidSignature,
1712 #[doc = "Receiver of the transaction doesn't match Sender of the delegate action"]
1713 DelegateActionSenderDoesNotMatchTxReceiver {
1714 receiver_id: AccountId,
1715 sender_id: AccountId,
1716 },
1717 #[doc = "Delegate action has expired. `max_block_height` is less than actual block height."]
1718 DelegateActionExpired,
1719 #[doc = "The given public key doesn't exist for Sender account"]
1720 DelegateActionAccessKeyError(InvalidAccessKeyError),
1721 #[doc = "DelegateAction nonce must be greater sender[public_key].nonce"]
1722 DelegateActionInvalidNonce { ak_nonce: u64, delegate_nonce: u64 },
1723 #[doc = "DelegateAction nonce is larger than the upper bound given by the block height"]
1724 DelegateActionNonceTooLarge {
1725 delegate_nonce: u64,
1726 upper_bound: u64,
1727 },
1728 GlobalContractDoesNotExist {
1729 identifier: GlobalContractIdentifier,
1730 },
1731 GasKeyDoesNotExist {
1732 account_id: AccountId,
1733 public_key: PublicKey,
1734 },
1735 GasKeyAlreadyExists {
1736 account_id: AccountId,
1737 public_key: PublicKey,
1738 },
1739}
1740impl ::std::convert::From<&Self> for ActionErrorKind {
1741 fn from(value: &ActionErrorKind) -> Self {
1742 value.clone()
1743 }
1744}
1745impl ::std::convert::From<FunctionCallError> for ActionErrorKind {
1746 fn from(value: FunctionCallError) -> Self {
1747 Self::FunctionCallError(value)
1748 }
1749}
1750impl ::std::convert::From<ReceiptValidationError> for ActionErrorKind {
1751 fn from(value: ReceiptValidationError) -> Self {
1752 Self::NewReceiptValidationError(value)
1753 }
1754}
1755impl ::std::convert::From<InvalidAccessKeyError> for ActionErrorKind {
1756 fn from(value: InvalidAccessKeyError) -> Self {
1757 Self::DelegateActionAccessKeyError(value)
1758 }
1759}
1760#[doc = "`ActionView`"]
1761#[doc = r""]
1762#[doc = r" <details><summary>JSON schema</summary>"]
1763#[doc = r""]
1764#[doc = r" ```json"]
1765#[doc = "{"]
1766#[doc = " \"oneOf\": ["]
1767#[doc = " {"]
1768#[doc = " \"type\": \"string\","]
1769#[doc = " \"enum\": ["]
1770#[doc = " \"CreateAccount\""]
1771#[doc = " ]"]
1772#[doc = " },"]
1773#[doc = " {"]
1774#[doc = " \"type\": \"object\","]
1775#[doc = " \"required\": ["]
1776#[doc = " \"DeployContract\""]
1777#[doc = " ],"]
1778#[doc = " \"properties\": {"]
1779#[doc = " \"DeployContract\": {"]
1780#[doc = " \"type\": \"object\","]
1781#[doc = " \"required\": ["]
1782#[doc = " \"code\""]
1783#[doc = " ],"]
1784#[doc = " \"properties\": {"]
1785#[doc = " \"code\": {"]
1786#[doc = " \"type\": \"string\","]
1787#[doc = " \"format\": \"bytes\""]
1788#[doc = " }"]
1789#[doc = " }"]
1790#[doc = " }"]
1791#[doc = " },"]
1792#[doc = " \"additionalProperties\": false"]
1793#[doc = " },"]
1794#[doc = " {"]
1795#[doc = " \"type\": \"object\","]
1796#[doc = " \"required\": ["]
1797#[doc = " \"FunctionCall\""]
1798#[doc = " ],"]
1799#[doc = " \"properties\": {"]
1800#[doc = " \"FunctionCall\": {"]
1801#[doc = " \"type\": \"object\","]
1802#[doc = " \"required\": ["]
1803#[doc = " \"args\","]
1804#[doc = " \"deposit\","]
1805#[doc = " \"gas\","]
1806#[doc = " \"method_name\""]
1807#[doc = " ],"]
1808#[doc = " \"properties\": {"]
1809#[doc = " \"args\": {"]
1810#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
1811#[doc = " },"]
1812#[doc = " \"deposit\": {"]
1813#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1814#[doc = " },"]
1815#[doc = " \"gas\": {"]
1816#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
1817#[doc = " },"]
1818#[doc = " \"method_name\": {"]
1819#[doc = " \"type\": \"string\""]
1820#[doc = " }"]
1821#[doc = " }"]
1822#[doc = " }"]
1823#[doc = " },"]
1824#[doc = " \"additionalProperties\": false"]
1825#[doc = " },"]
1826#[doc = " {"]
1827#[doc = " \"type\": \"object\","]
1828#[doc = " \"required\": ["]
1829#[doc = " \"Transfer\""]
1830#[doc = " ],"]
1831#[doc = " \"properties\": {"]
1832#[doc = " \"Transfer\": {"]
1833#[doc = " \"type\": \"object\","]
1834#[doc = " \"required\": ["]
1835#[doc = " \"deposit\""]
1836#[doc = " ],"]
1837#[doc = " \"properties\": {"]
1838#[doc = " \"deposit\": {"]
1839#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1840#[doc = " }"]
1841#[doc = " }"]
1842#[doc = " }"]
1843#[doc = " },"]
1844#[doc = " \"additionalProperties\": false"]
1845#[doc = " },"]
1846#[doc = " {"]
1847#[doc = " \"type\": \"object\","]
1848#[doc = " \"required\": ["]
1849#[doc = " \"Stake\""]
1850#[doc = " ],"]
1851#[doc = " \"properties\": {"]
1852#[doc = " \"Stake\": {"]
1853#[doc = " \"type\": \"object\","]
1854#[doc = " \"required\": ["]
1855#[doc = " \"public_key\","]
1856#[doc = " \"stake\""]
1857#[doc = " ],"]
1858#[doc = " \"properties\": {"]
1859#[doc = " \"public_key\": {"]
1860#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1861#[doc = " },"]
1862#[doc = " \"stake\": {"]
1863#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
1864#[doc = " }"]
1865#[doc = " }"]
1866#[doc = " }"]
1867#[doc = " },"]
1868#[doc = " \"additionalProperties\": false"]
1869#[doc = " },"]
1870#[doc = " {"]
1871#[doc = " \"type\": \"object\","]
1872#[doc = " \"required\": ["]
1873#[doc = " \"AddKey\""]
1874#[doc = " ],"]
1875#[doc = " \"properties\": {"]
1876#[doc = " \"AddKey\": {"]
1877#[doc = " \"type\": \"object\","]
1878#[doc = " \"required\": ["]
1879#[doc = " \"access_key\","]
1880#[doc = " \"public_key\""]
1881#[doc = " ],"]
1882#[doc = " \"properties\": {"]
1883#[doc = " \"access_key\": {"]
1884#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
1885#[doc = " },"]
1886#[doc = " \"public_key\": {"]
1887#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1888#[doc = " }"]
1889#[doc = " }"]
1890#[doc = " }"]
1891#[doc = " },"]
1892#[doc = " \"additionalProperties\": false"]
1893#[doc = " },"]
1894#[doc = " {"]
1895#[doc = " \"type\": \"object\","]
1896#[doc = " \"required\": ["]
1897#[doc = " \"DeleteKey\""]
1898#[doc = " ],"]
1899#[doc = " \"properties\": {"]
1900#[doc = " \"DeleteKey\": {"]
1901#[doc = " \"type\": \"object\","]
1902#[doc = " \"required\": ["]
1903#[doc = " \"public_key\""]
1904#[doc = " ],"]
1905#[doc = " \"properties\": {"]
1906#[doc = " \"public_key\": {"]
1907#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1908#[doc = " }"]
1909#[doc = " }"]
1910#[doc = " }"]
1911#[doc = " },"]
1912#[doc = " \"additionalProperties\": false"]
1913#[doc = " },"]
1914#[doc = " {"]
1915#[doc = " \"type\": \"object\","]
1916#[doc = " \"required\": ["]
1917#[doc = " \"DeleteAccount\""]
1918#[doc = " ],"]
1919#[doc = " \"properties\": {"]
1920#[doc = " \"DeleteAccount\": {"]
1921#[doc = " \"type\": \"object\","]
1922#[doc = " \"required\": ["]
1923#[doc = " \"beneficiary_id\""]
1924#[doc = " ],"]
1925#[doc = " \"properties\": {"]
1926#[doc = " \"beneficiary_id\": {"]
1927#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1928#[doc = " }"]
1929#[doc = " }"]
1930#[doc = " }"]
1931#[doc = " },"]
1932#[doc = " \"additionalProperties\": false"]
1933#[doc = " },"]
1934#[doc = " {"]
1935#[doc = " \"type\": \"object\","]
1936#[doc = " \"required\": ["]
1937#[doc = " \"Delegate\""]
1938#[doc = " ],"]
1939#[doc = " \"properties\": {"]
1940#[doc = " \"Delegate\": {"]
1941#[doc = " \"type\": \"object\","]
1942#[doc = " \"required\": ["]
1943#[doc = " \"delegate_action\","]
1944#[doc = " \"signature\""]
1945#[doc = " ],"]
1946#[doc = " \"properties\": {"]
1947#[doc = " \"delegate_action\": {"]
1948#[doc = " \"$ref\": \"#/components/schemas/DelegateAction\""]
1949#[doc = " },"]
1950#[doc = " \"signature\": {"]
1951#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
1952#[doc = " }"]
1953#[doc = " }"]
1954#[doc = " }"]
1955#[doc = " },"]
1956#[doc = " \"additionalProperties\": false"]
1957#[doc = " },"]
1958#[doc = " {"]
1959#[doc = " \"type\": \"object\","]
1960#[doc = " \"required\": ["]
1961#[doc = " \"DeployGlobalContract\""]
1962#[doc = " ],"]
1963#[doc = " \"properties\": {"]
1964#[doc = " \"DeployGlobalContract\": {"]
1965#[doc = " \"type\": \"object\","]
1966#[doc = " \"required\": ["]
1967#[doc = " \"code\""]
1968#[doc = " ],"]
1969#[doc = " \"properties\": {"]
1970#[doc = " \"code\": {"]
1971#[doc = " \"type\": \"string\","]
1972#[doc = " \"format\": \"bytes\""]
1973#[doc = " }"]
1974#[doc = " }"]
1975#[doc = " }"]
1976#[doc = " },"]
1977#[doc = " \"additionalProperties\": false"]
1978#[doc = " },"]
1979#[doc = " {"]
1980#[doc = " \"type\": \"object\","]
1981#[doc = " \"required\": ["]
1982#[doc = " \"DeployGlobalContractByAccountId\""]
1983#[doc = " ],"]
1984#[doc = " \"properties\": {"]
1985#[doc = " \"DeployGlobalContractByAccountId\": {"]
1986#[doc = " \"type\": \"object\","]
1987#[doc = " \"required\": ["]
1988#[doc = " \"code\""]
1989#[doc = " ],"]
1990#[doc = " \"properties\": {"]
1991#[doc = " \"code\": {"]
1992#[doc = " \"type\": \"string\","]
1993#[doc = " \"format\": \"bytes\""]
1994#[doc = " }"]
1995#[doc = " }"]
1996#[doc = " }"]
1997#[doc = " },"]
1998#[doc = " \"additionalProperties\": false"]
1999#[doc = " },"]
2000#[doc = " {"]
2001#[doc = " \"type\": \"object\","]
2002#[doc = " \"required\": ["]
2003#[doc = " \"UseGlobalContract\""]
2004#[doc = " ],"]
2005#[doc = " \"properties\": {"]
2006#[doc = " \"UseGlobalContract\": {"]
2007#[doc = " \"type\": \"object\","]
2008#[doc = " \"required\": ["]
2009#[doc = " \"code_hash\""]
2010#[doc = " ],"]
2011#[doc = " \"properties\": {"]
2012#[doc = " \"code_hash\": {"]
2013#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
2014#[doc = " }"]
2015#[doc = " }"]
2016#[doc = " }"]
2017#[doc = " },"]
2018#[doc = " \"additionalProperties\": false"]
2019#[doc = " },"]
2020#[doc = " {"]
2021#[doc = " \"type\": \"object\","]
2022#[doc = " \"required\": ["]
2023#[doc = " \"UseGlobalContractByAccountId\""]
2024#[doc = " ],"]
2025#[doc = " \"properties\": {"]
2026#[doc = " \"UseGlobalContractByAccountId\": {"]
2027#[doc = " \"type\": \"object\","]
2028#[doc = " \"required\": ["]
2029#[doc = " \"account_id\""]
2030#[doc = " ],"]
2031#[doc = " \"properties\": {"]
2032#[doc = " \"account_id\": {"]
2033#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
2034#[doc = " }"]
2035#[doc = " }"]
2036#[doc = " }"]
2037#[doc = " },"]
2038#[doc = " \"additionalProperties\": false"]
2039#[doc = " },"]
2040#[doc = " {"]
2041#[doc = " \"type\": \"object\","]
2042#[doc = " \"required\": ["]
2043#[doc = " \"DeterministicStateInit\""]
2044#[doc = " ],"]
2045#[doc = " \"properties\": {"]
2046#[doc = " \"DeterministicStateInit\": {"]
2047#[doc = " \"type\": \"object\","]
2048#[doc = " \"required\": ["]
2049#[doc = " \"code\","]
2050#[doc = " \"data\","]
2051#[doc = " \"deposit\""]
2052#[doc = " ],"]
2053#[doc = " \"properties\": {"]
2054#[doc = " \"code\": {"]
2055#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifierView\""]
2056#[doc = " },"]
2057#[doc = " \"data\": {"]
2058#[doc = " \"type\": \"object\","]
2059#[doc = " \"additionalProperties\": {"]
2060#[doc = " \"type\": \"string\""]
2061#[doc = " }"]
2062#[doc = " },"]
2063#[doc = " \"deposit\": {"]
2064#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
2065#[doc = " }"]
2066#[doc = " }"]
2067#[doc = " }"]
2068#[doc = " },"]
2069#[doc = " \"additionalProperties\": false"]
2070#[doc = " },"]
2071#[doc = " {"]
2072#[doc = " \"type\": \"object\","]
2073#[doc = " \"required\": ["]
2074#[doc = " \"AddGasKey\""]
2075#[doc = " ],"]
2076#[doc = " \"properties\": {"]
2077#[doc = " \"AddGasKey\": {"]
2078#[doc = " \"type\": \"object\","]
2079#[doc = " \"required\": ["]
2080#[doc = " \"num_nonces\","]
2081#[doc = " \"permission\","]
2082#[doc = " \"public_key\""]
2083#[doc = " ],"]
2084#[doc = " \"properties\": {"]
2085#[doc = " \"num_nonces\": {"]
2086#[doc = " \"type\": \"integer\","]
2087#[doc = " \"format\": \"uint32\","]
2088#[doc = " \"minimum\": 0.0"]
2089#[doc = " },"]
2090#[doc = " \"permission\": {"]
2091#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
2092#[doc = " },"]
2093#[doc = " \"public_key\": {"]
2094#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2095#[doc = " }"]
2096#[doc = " }"]
2097#[doc = " }"]
2098#[doc = " },"]
2099#[doc = " \"additionalProperties\": false"]
2100#[doc = " },"]
2101#[doc = " {"]
2102#[doc = " \"type\": \"object\","]
2103#[doc = " \"required\": ["]
2104#[doc = " \"DeleteGasKey\""]
2105#[doc = " ],"]
2106#[doc = " \"properties\": {"]
2107#[doc = " \"DeleteGasKey\": {"]
2108#[doc = " \"type\": \"object\","]
2109#[doc = " \"required\": ["]
2110#[doc = " \"public_key\""]
2111#[doc = " ],"]
2112#[doc = " \"properties\": {"]
2113#[doc = " \"public_key\": {"]
2114#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2115#[doc = " }"]
2116#[doc = " }"]
2117#[doc = " }"]
2118#[doc = " },"]
2119#[doc = " \"additionalProperties\": false"]
2120#[doc = " },"]
2121#[doc = " {"]
2122#[doc = " \"type\": \"object\","]
2123#[doc = " \"required\": ["]
2124#[doc = " \"TransferToGasKey\""]
2125#[doc = " ],"]
2126#[doc = " \"properties\": {"]
2127#[doc = " \"TransferToGasKey\": {"]
2128#[doc = " \"type\": \"object\","]
2129#[doc = " \"required\": ["]
2130#[doc = " \"amount\","]
2131#[doc = " \"public_key\""]
2132#[doc = " ],"]
2133#[doc = " \"properties\": {"]
2134#[doc = " \"amount\": {"]
2135#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
2136#[doc = " },"]
2137#[doc = " \"public_key\": {"]
2138#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2139#[doc = " }"]
2140#[doc = " }"]
2141#[doc = " }"]
2142#[doc = " },"]
2143#[doc = " \"additionalProperties\": false"]
2144#[doc = " }"]
2145#[doc = " ]"]
2146#[doc = "}"]
2147#[doc = r" ```"]
2148#[doc = r" </details>"]
2149#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2150pub enum ActionView {
2151 CreateAccount,
2152 DeployContract {
2153 code: ::std::string::String,
2154 },
2155 FunctionCall {
2156 args: FunctionArgs,
2157 deposit: NearToken,
2158 gas: NearGas,
2159 method_name: ::std::string::String,
2160 },
2161 Transfer {
2162 deposit: NearToken,
2163 },
2164 Stake {
2165 public_key: PublicKey,
2166 stake: NearToken,
2167 },
2168 AddKey {
2169 access_key: AccessKeyView,
2170 public_key: PublicKey,
2171 },
2172 DeleteKey {
2173 public_key: PublicKey,
2174 },
2175 DeleteAccount {
2176 beneficiary_id: AccountId,
2177 },
2178 Delegate {
2179 delegate_action: DelegateAction,
2180 signature: Signature,
2181 },
2182 DeployGlobalContract {
2183 code: ::std::string::String,
2184 },
2185 DeployGlobalContractByAccountId {
2186 code: ::std::string::String,
2187 },
2188 UseGlobalContract {
2189 code_hash: CryptoHash,
2190 },
2191 UseGlobalContractByAccountId {
2192 account_id: AccountId,
2193 },
2194 DeterministicStateInit {
2195 code: GlobalContractIdentifierView,
2196 data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2197 deposit: NearToken,
2198 },
2199 AddGasKey {
2200 num_nonces: u32,
2201 permission: AccessKeyPermissionView,
2202 public_key: PublicKey,
2203 },
2204 DeleteGasKey {
2205 public_key: PublicKey,
2206 },
2207 TransferToGasKey {
2208 amount: NearToken,
2209 public_key: PublicKey,
2210 },
2211}
2212impl ::std::convert::From<&Self> for ActionView {
2213 fn from(value: &ActionView) -> Self {
2214 value.clone()
2215 }
2216}
2217#[doc = "Describes the error for validating a list of actions."]
2218#[doc = r""]
2219#[doc = r" <details><summary>JSON schema</summary>"]
2220#[doc = r""]
2221#[doc = r" ```json"]
2222#[doc = "{"]
2223#[doc = " \"description\": \"Describes the error for validating a list of actions.\","]
2224#[doc = " \"oneOf\": ["]
2225#[doc = " {"]
2226#[doc = " \"description\": \"The delete action must be a final action in transaction\","]
2227#[doc = " \"type\": \"string\","]
2228#[doc = " \"enum\": ["]
2229#[doc = " \"DeleteActionMustBeFinal\""]
2230#[doc = " ]"]
2231#[doc = " },"]
2232#[doc = " {"]
2233#[doc = " \"description\": \"The total prepaid gas (for all given actions) exceeded the limit.\","]
2234#[doc = " \"type\": \"object\","]
2235#[doc = " \"required\": ["]
2236#[doc = " \"TotalPrepaidGasExceeded\""]
2237#[doc = " ],"]
2238#[doc = " \"properties\": {"]
2239#[doc = " \"TotalPrepaidGasExceeded\": {"]
2240#[doc = " \"type\": \"object\","]
2241#[doc = " \"required\": ["]
2242#[doc = " \"limit\","]
2243#[doc = " \"total_prepaid_gas\""]
2244#[doc = " ],"]
2245#[doc = " \"properties\": {"]
2246#[doc = " \"limit\": {"]
2247#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
2248#[doc = " },"]
2249#[doc = " \"total_prepaid_gas\": {"]
2250#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
2251#[doc = " }"]
2252#[doc = " }"]
2253#[doc = " }"]
2254#[doc = " },"]
2255#[doc = " \"additionalProperties\": false"]
2256#[doc = " },"]
2257#[doc = " {"]
2258#[doc = " \"description\": \"The number of actions exceeded the given limit.\","]
2259#[doc = " \"type\": \"object\","]
2260#[doc = " \"required\": ["]
2261#[doc = " \"TotalNumberOfActionsExceeded\""]
2262#[doc = " ],"]
2263#[doc = " \"properties\": {"]
2264#[doc = " \"TotalNumberOfActionsExceeded\": {"]
2265#[doc = " \"type\": \"object\","]
2266#[doc = " \"required\": ["]
2267#[doc = " \"limit\","]
2268#[doc = " \"total_number_of_actions\""]
2269#[doc = " ],"]
2270#[doc = " \"properties\": {"]
2271#[doc = " \"limit\": {"]
2272#[doc = " \"type\": \"integer\","]
2273#[doc = " \"format\": \"uint64\","]
2274#[doc = " \"minimum\": 0.0"]
2275#[doc = " },"]
2276#[doc = " \"total_number_of_actions\": {"]
2277#[doc = " \"type\": \"integer\","]
2278#[doc = " \"format\": \"uint64\","]
2279#[doc = " \"minimum\": 0.0"]
2280#[doc = " }"]
2281#[doc = " }"]
2282#[doc = " }"]
2283#[doc = " },"]
2284#[doc = " \"additionalProperties\": false"]
2285#[doc = " },"]
2286#[doc = " {"]
2287#[doc = " \"description\": \"The total number of bytes of the method names exceeded the limit in a Add Key action.\","]
2288#[doc = " \"type\": \"object\","]
2289#[doc = " \"required\": ["]
2290#[doc = " \"AddKeyMethodNamesNumberOfBytesExceeded\""]
2291#[doc = " ],"]
2292#[doc = " \"properties\": {"]
2293#[doc = " \"AddKeyMethodNamesNumberOfBytesExceeded\": {"]
2294#[doc = " \"type\": \"object\","]
2295#[doc = " \"required\": ["]
2296#[doc = " \"limit\","]
2297#[doc = " \"total_number_of_bytes\""]
2298#[doc = " ],"]
2299#[doc = " \"properties\": {"]
2300#[doc = " \"limit\": {"]
2301#[doc = " \"type\": \"integer\","]
2302#[doc = " \"format\": \"uint64\","]
2303#[doc = " \"minimum\": 0.0"]
2304#[doc = " },"]
2305#[doc = " \"total_number_of_bytes\": {"]
2306#[doc = " \"type\": \"integer\","]
2307#[doc = " \"format\": \"uint64\","]
2308#[doc = " \"minimum\": 0.0"]
2309#[doc = " }"]
2310#[doc = " }"]
2311#[doc = " }"]
2312#[doc = " },"]
2313#[doc = " \"additionalProperties\": false"]
2314#[doc = " },"]
2315#[doc = " {"]
2316#[doc = " \"description\": \"The length of some method name exceeded the limit in a Add Key action.\","]
2317#[doc = " \"type\": \"object\","]
2318#[doc = " \"required\": ["]
2319#[doc = " \"AddKeyMethodNameLengthExceeded\""]
2320#[doc = " ],"]
2321#[doc = " \"properties\": {"]
2322#[doc = " \"AddKeyMethodNameLengthExceeded\": {"]
2323#[doc = " \"type\": \"object\","]
2324#[doc = " \"required\": ["]
2325#[doc = " \"length\","]
2326#[doc = " \"limit\""]
2327#[doc = " ],"]
2328#[doc = " \"properties\": {"]
2329#[doc = " \"length\": {"]
2330#[doc = " \"type\": \"integer\","]
2331#[doc = " \"format\": \"uint64\","]
2332#[doc = " \"minimum\": 0.0"]
2333#[doc = " },"]
2334#[doc = " \"limit\": {"]
2335#[doc = " \"type\": \"integer\","]
2336#[doc = " \"format\": \"uint64\","]
2337#[doc = " \"minimum\": 0.0"]
2338#[doc = " }"]
2339#[doc = " }"]
2340#[doc = " }"]
2341#[doc = " },"]
2342#[doc = " \"additionalProperties\": false"]
2343#[doc = " },"]
2344#[doc = " {"]
2345#[doc = " \"description\": \"Integer overflow during a compute.\","]
2346#[doc = " \"type\": \"string\","]
2347#[doc = " \"enum\": ["]
2348#[doc = " \"IntegerOverflow\""]
2349#[doc = " ]"]
2350#[doc = " },"]
2351#[doc = " {"]
2352#[doc = " \"description\": \"Invalid account ID.\","]
2353#[doc = " \"type\": \"object\","]
2354#[doc = " \"required\": ["]
2355#[doc = " \"InvalidAccountId\""]
2356#[doc = " ],"]
2357#[doc = " \"properties\": {"]
2358#[doc = " \"InvalidAccountId\": {"]
2359#[doc = " \"type\": \"object\","]
2360#[doc = " \"required\": ["]
2361#[doc = " \"account_id\""]
2362#[doc = " ],"]
2363#[doc = " \"properties\": {"]
2364#[doc = " \"account_id\": {"]
2365#[doc = " \"type\": \"string\""]
2366#[doc = " }"]
2367#[doc = " }"]
2368#[doc = " }"]
2369#[doc = " },"]
2370#[doc = " \"additionalProperties\": false"]
2371#[doc = " },"]
2372#[doc = " {"]
2373#[doc = " \"description\": \"The size of the contract code exceeded the limit in a DeployContract action.\","]
2374#[doc = " \"type\": \"object\","]
2375#[doc = " \"required\": ["]
2376#[doc = " \"ContractSizeExceeded\""]
2377#[doc = " ],"]
2378#[doc = " \"properties\": {"]
2379#[doc = " \"ContractSizeExceeded\": {"]
2380#[doc = " \"type\": \"object\","]
2381#[doc = " \"required\": ["]
2382#[doc = " \"limit\","]
2383#[doc = " \"size\""]
2384#[doc = " ],"]
2385#[doc = " \"properties\": {"]
2386#[doc = " \"limit\": {"]
2387#[doc = " \"type\": \"integer\","]
2388#[doc = " \"format\": \"uint64\","]
2389#[doc = " \"minimum\": 0.0"]
2390#[doc = " },"]
2391#[doc = " \"size\": {"]
2392#[doc = " \"type\": \"integer\","]
2393#[doc = " \"format\": \"uint64\","]
2394#[doc = " \"minimum\": 0.0"]
2395#[doc = " }"]
2396#[doc = " }"]
2397#[doc = " }"]
2398#[doc = " },"]
2399#[doc = " \"additionalProperties\": false"]
2400#[doc = " },"]
2401#[doc = " {"]
2402#[doc = " \"description\": \"The length of the method name exceeded the limit in a Function Call action.\","]
2403#[doc = " \"type\": \"object\","]
2404#[doc = " \"required\": ["]
2405#[doc = " \"FunctionCallMethodNameLengthExceeded\""]
2406#[doc = " ],"]
2407#[doc = " \"properties\": {"]
2408#[doc = " \"FunctionCallMethodNameLengthExceeded\": {"]
2409#[doc = " \"type\": \"object\","]
2410#[doc = " \"required\": ["]
2411#[doc = " \"length\","]
2412#[doc = " \"limit\""]
2413#[doc = " ],"]
2414#[doc = " \"properties\": {"]
2415#[doc = " \"length\": {"]
2416#[doc = " \"type\": \"integer\","]
2417#[doc = " \"format\": \"uint64\","]
2418#[doc = " \"minimum\": 0.0"]
2419#[doc = " },"]
2420#[doc = " \"limit\": {"]
2421#[doc = " \"type\": \"integer\","]
2422#[doc = " \"format\": \"uint64\","]
2423#[doc = " \"minimum\": 0.0"]
2424#[doc = " }"]
2425#[doc = " }"]
2426#[doc = " }"]
2427#[doc = " },"]
2428#[doc = " \"additionalProperties\": false"]
2429#[doc = " },"]
2430#[doc = " {"]
2431#[doc = " \"description\": \"The length of the arguments exceeded the limit in a Function Call action.\","]
2432#[doc = " \"type\": \"object\","]
2433#[doc = " \"required\": ["]
2434#[doc = " \"FunctionCallArgumentsLengthExceeded\""]
2435#[doc = " ],"]
2436#[doc = " \"properties\": {"]
2437#[doc = " \"FunctionCallArgumentsLengthExceeded\": {"]
2438#[doc = " \"type\": \"object\","]
2439#[doc = " \"required\": ["]
2440#[doc = " \"length\","]
2441#[doc = " \"limit\""]
2442#[doc = " ],"]
2443#[doc = " \"properties\": {"]
2444#[doc = " \"length\": {"]
2445#[doc = " \"type\": \"integer\","]
2446#[doc = " \"format\": \"uint64\","]
2447#[doc = " \"minimum\": 0.0"]
2448#[doc = " },"]
2449#[doc = " \"limit\": {"]
2450#[doc = " \"type\": \"integer\","]
2451#[doc = " \"format\": \"uint64\","]
2452#[doc = " \"minimum\": 0.0"]
2453#[doc = " }"]
2454#[doc = " }"]
2455#[doc = " }"]
2456#[doc = " },"]
2457#[doc = " \"additionalProperties\": false"]
2458#[doc = " },"]
2459#[doc = " {"]
2460#[doc = " \"description\": \"An attempt to stake with a public key that is not convertible to ristretto.\","]
2461#[doc = " \"type\": \"object\","]
2462#[doc = " \"required\": ["]
2463#[doc = " \"UnsuitableStakingKey\""]
2464#[doc = " ],"]
2465#[doc = " \"properties\": {"]
2466#[doc = " \"UnsuitableStakingKey\": {"]
2467#[doc = " \"type\": \"object\","]
2468#[doc = " \"required\": ["]
2469#[doc = " \"public_key\""]
2470#[doc = " ],"]
2471#[doc = " \"properties\": {"]
2472#[doc = " \"public_key\": {"]
2473#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2474#[doc = " }"]
2475#[doc = " }"]
2476#[doc = " }"]
2477#[doc = " },"]
2478#[doc = " \"additionalProperties\": false"]
2479#[doc = " },"]
2480#[doc = " {"]
2481#[doc = " \"description\": \"The attached amount of gas in a FunctionCall action has to be a positive number.\","]
2482#[doc = " \"type\": \"string\","]
2483#[doc = " \"enum\": ["]
2484#[doc = " \"FunctionCallZeroAttachedGas\""]
2485#[doc = " ]"]
2486#[doc = " },"]
2487#[doc = " {"]
2488#[doc = " \"description\": \"There should be the only one DelegateAction\","]
2489#[doc = " \"type\": \"string\","]
2490#[doc = " \"enum\": ["]
2491#[doc = " \"DelegateActionMustBeOnlyOne\""]
2492#[doc = " ]"]
2493#[doc = " },"]
2494#[doc = " {"]
2495#[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.\","]
2496#[doc = " \"type\": \"object\","]
2497#[doc = " \"required\": ["]
2498#[doc = " \"UnsupportedProtocolFeature\""]
2499#[doc = " ],"]
2500#[doc = " \"properties\": {"]
2501#[doc = " \"UnsupportedProtocolFeature\": {"]
2502#[doc = " \"type\": \"object\","]
2503#[doc = " \"required\": ["]
2504#[doc = " \"protocol_feature\","]
2505#[doc = " \"version\""]
2506#[doc = " ],"]
2507#[doc = " \"properties\": {"]
2508#[doc = " \"protocol_feature\": {"]
2509#[doc = " \"type\": \"string\""]
2510#[doc = " },"]
2511#[doc = " \"version\": {"]
2512#[doc = " \"type\": \"integer\","]
2513#[doc = " \"format\": \"uint32\","]
2514#[doc = " \"minimum\": 0.0"]
2515#[doc = " }"]
2516#[doc = " }"]
2517#[doc = " }"]
2518#[doc = " },"]
2519#[doc = " \"additionalProperties\": false"]
2520#[doc = " },"]
2521#[doc = " {"]
2522#[doc = " \"type\": \"object\","]
2523#[doc = " \"required\": ["]
2524#[doc = " \"InvalidDeterministicStateInitReceiver\""]
2525#[doc = " ],"]
2526#[doc = " \"properties\": {"]
2527#[doc = " \"InvalidDeterministicStateInitReceiver\": {"]
2528#[doc = " \"type\": \"object\","]
2529#[doc = " \"required\": ["]
2530#[doc = " \"derived_id\","]
2531#[doc = " \"receiver_id\""]
2532#[doc = " ],"]
2533#[doc = " \"properties\": {"]
2534#[doc = " \"derived_id\": {"]
2535#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
2536#[doc = " },"]
2537#[doc = " \"receiver_id\": {"]
2538#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
2539#[doc = " }"]
2540#[doc = " }"]
2541#[doc = " }"]
2542#[doc = " },"]
2543#[doc = " \"additionalProperties\": false"]
2544#[doc = " },"]
2545#[doc = " {"]
2546#[doc = " \"type\": \"object\","]
2547#[doc = " \"required\": ["]
2548#[doc = " \"DeterministicStateInitKeyLengthExceeded\""]
2549#[doc = " ],"]
2550#[doc = " \"properties\": {"]
2551#[doc = " \"DeterministicStateInitKeyLengthExceeded\": {"]
2552#[doc = " \"type\": \"object\","]
2553#[doc = " \"required\": ["]
2554#[doc = " \"length\","]
2555#[doc = " \"limit\""]
2556#[doc = " ],"]
2557#[doc = " \"properties\": {"]
2558#[doc = " \"length\": {"]
2559#[doc = " \"type\": \"integer\","]
2560#[doc = " \"format\": \"uint64\","]
2561#[doc = " \"minimum\": 0.0"]
2562#[doc = " },"]
2563#[doc = " \"limit\": {"]
2564#[doc = " \"type\": \"integer\","]
2565#[doc = " \"format\": \"uint64\","]
2566#[doc = " \"minimum\": 0.0"]
2567#[doc = " }"]
2568#[doc = " }"]
2569#[doc = " }"]
2570#[doc = " },"]
2571#[doc = " \"additionalProperties\": false"]
2572#[doc = " },"]
2573#[doc = " {"]
2574#[doc = " \"type\": \"object\","]
2575#[doc = " \"required\": ["]
2576#[doc = " \"DeterministicStateInitValueLengthExceeded\""]
2577#[doc = " ],"]
2578#[doc = " \"properties\": {"]
2579#[doc = " \"DeterministicStateInitValueLengthExceeded\": {"]
2580#[doc = " \"type\": \"object\","]
2581#[doc = " \"required\": ["]
2582#[doc = " \"length\","]
2583#[doc = " \"limit\""]
2584#[doc = " ],"]
2585#[doc = " \"properties\": {"]
2586#[doc = " \"length\": {"]
2587#[doc = " \"type\": \"integer\","]
2588#[doc = " \"format\": \"uint64\","]
2589#[doc = " \"minimum\": 0.0"]
2590#[doc = " },"]
2591#[doc = " \"limit\": {"]
2592#[doc = " \"type\": \"integer\","]
2593#[doc = " \"format\": \"uint64\","]
2594#[doc = " \"minimum\": 0.0"]
2595#[doc = " }"]
2596#[doc = " }"]
2597#[doc = " }"]
2598#[doc = " },"]
2599#[doc = " \"additionalProperties\": false"]
2600#[doc = " },"]
2601#[doc = " {"]
2602#[doc = " \"type\": \"object\","]
2603#[doc = " \"required\": ["]
2604#[doc = " \"GasKeyPermissionInvalid\""]
2605#[doc = " ],"]
2606#[doc = " \"properties\": {"]
2607#[doc = " \"GasKeyPermissionInvalid\": {"]
2608#[doc = " \"type\": \"object\","]
2609#[doc = " \"required\": ["]
2610#[doc = " \"permission\""]
2611#[doc = " ],"]
2612#[doc = " \"properties\": {"]
2613#[doc = " \"permission\": {"]
2614#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
2615#[doc = " }"]
2616#[doc = " }"]
2617#[doc = " }"]
2618#[doc = " },"]
2619#[doc = " \"additionalProperties\": false"]
2620#[doc = " },"]
2621#[doc = " {"]
2622#[doc = " \"type\": \"object\","]
2623#[doc = " \"required\": ["]
2624#[doc = " \"GasKeyTooManyNoncesRequested\""]
2625#[doc = " ],"]
2626#[doc = " \"properties\": {"]
2627#[doc = " \"GasKeyTooManyNoncesRequested\": {"]
2628#[doc = " \"type\": \"object\","]
2629#[doc = " \"required\": ["]
2630#[doc = " \"limit\","]
2631#[doc = " \"requested_nonces\""]
2632#[doc = " ],"]
2633#[doc = " \"properties\": {"]
2634#[doc = " \"limit\": {"]
2635#[doc = " \"type\": \"integer\","]
2636#[doc = " \"format\": \"uint32\","]
2637#[doc = " \"minimum\": 0.0"]
2638#[doc = " },"]
2639#[doc = " \"requested_nonces\": {"]
2640#[doc = " \"type\": \"integer\","]
2641#[doc = " \"format\": \"uint32\","]
2642#[doc = " \"minimum\": 0.0"]
2643#[doc = " }"]
2644#[doc = " }"]
2645#[doc = " }"]
2646#[doc = " },"]
2647#[doc = " \"additionalProperties\": false"]
2648#[doc = " }"]
2649#[doc = " ]"]
2650#[doc = "}"]
2651#[doc = r" ```"]
2652#[doc = r" </details>"]
2653#[derive(
2654 :: serde :: Deserialize,
2655 :: serde :: Serialize,
2656 Clone,
2657 Debug,
2658 thiserror::Error,
2659 strum_macros::Display,
2660)]
2661pub enum ActionsValidationError {
2662 #[doc = "The delete action must be a final action in transaction"]
2663 DeleteActionMustBeFinal,
2664 #[doc = "The total prepaid gas (for all given actions) exceeded the limit."]
2665 TotalPrepaidGasExceeded {
2666 limit: NearGas,
2667 total_prepaid_gas: NearGas,
2668 },
2669 #[doc = "The number of actions exceeded the given limit."]
2670 TotalNumberOfActionsExceeded {
2671 limit: u64,
2672 total_number_of_actions: u64,
2673 },
2674 #[doc = "The total number of bytes of the method names exceeded the limit in a Add Key action."]
2675 AddKeyMethodNamesNumberOfBytesExceeded {
2676 limit: u64,
2677 total_number_of_bytes: u64,
2678 },
2679 #[doc = "The length of some method name exceeded the limit in a Add Key action."]
2680 AddKeyMethodNameLengthExceeded {
2681 length: u64,
2682 limit: u64,
2683 },
2684 #[doc = "Integer overflow during a compute."]
2685 IntegerOverflow,
2686 #[doc = "Invalid account ID."]
2687 InvalidAccountId {
2688 account_id: ::std::string::String,
2689 },
2690 #[doc = "The size of the contract code exceeded the limit in a DeployContract action."]
2691 ContractSizeExceeded {
2692 limit: u64,
2693 size: u64,
2694 },
2695 #[doc = "The length of the method name exceeded the limit in a Function Call action."]
2696 FunctionCallMethodNameLengthExceeded {
2697 length: u64,
2698 limit: u64,
2699 },
2700 #[doc = "The length of the arguments exceeded the limit in a Function Call action."]
2701 FunctionCallArgumentsLengthExceeded {
2702 length: u64,
2703 limit: u64,
2704 },
2705 #[doc = "An attempt to stake with a public key that is not convertible to ristretto."]
2706 UnsuitableStakingKey {
2707 public_key: PublicKey,
2708 },
2709 #[doc = "The attached amount of gas in a FunctionCall action has to be a positive number."]
2710 FunctionCallZeroAttachedGas,
2711 #[doc = "There should be the only one DelegateAction"]
2712 DelegateActionMustBeOnlyOne,
2713 #[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."]
2714 UnsupportedProtocolFeature {
2715 protocol_feature: ::std::string::String,
2716 version: u32,
2717 },
2718 InvalidDeterministicStateInitReceiver {
2719 derived_id: AccountId,
2720 receiver_id: AccountId,
2721 },
2722 DeterministicStateInitKeyLengthExceeded {
2723 length: u64,
2724 limit: u64,
2725 },
2726 DeterministicStateInitValueLengthExceeded {
2727 length: u64,
2728 limit: u64,
2729 },
2730 GasKeyPermissionInvalid {
2731 permission: AccessKeyPermission,
2732 },
2733 GasKeyTooManyNoncesRequested {
2734 limit: u32,
2735 requested_nonces: u32,
2736 },
2737}
2738impl ::std::convert::From<&Self> for ActionsValidationError {
2739 fn from(value: &ActionsValidationError) -> Self {
2740 value.clone()
2741 }
2742}
2743#[doc = "`AddGasKeyAction`"]
2744#[doc = r""]
2745#[doc = r" <details><summary>JSON schema</summary>"]
2746#[doc = r""]
2747#[doc = r" ```json"]
2748#[doc = "{"]
2749#[doc = " \"type\": \"object\","]
2750#[doc = " \"required\": ["]
2751#[doc = " \"num_nonces\","]
2752#[doc = " \"permission\","]
2753#[doc = " \"public_key\""]
2754#[doc = " ],"]
2755#[doc = " \"properties\": {"]
2756#[doc = " \"num_nonces\": {"]
2757#[doc = " \"type\": \"integer\","]
2758#[doc = " \"format\": \"uint32\","]
2759#[doc = " \"minimum\": 0.0"]
2760#[doc = " },"]
2761#[doc = " \"permission\": {"]
2762#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
2763#[doc = " },"]
2764#[doc = " \"public_key\": {"]
2765#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2766#[doc = " }"]
2767#[doc = " }"]
2768#[doc = "}"]
2769#[doc = r" ```"]
2770#[doc = r" </details>"]
2771#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2772pub struct AddGasKeyAction {
2773 pub num_nonces: u32,
2774 pub permission: AccessKeyPermission,
2775 pub public_key: PublicKey,
2776}
2777impl ::std::convert::From<&AddGasKeyAction> for AddGasKeyAction {
2778 fn from(value: &AddGasKeyAction) -> Self {
2779 value.clone()
2780 }
2781}
2782#[doc = "An action that adds key with public key associated"]
2783#[doc = r""]
2784#[doc = r" <details><summary>JSON schema</summary>"]
2785#[doc = r""]
2786#[doc = r" ```json"]
2787#[doc = "{"]
2788#[doc = " \"description\": \"An action that adds key with public key associated\","]
2789#[doc = " \"type\": \"object\","]
2790#[doc = " \"required\": ["]
2791#[doc = " \"access_key\","]
2792#[doc = " \"public_key\""]
2793#[doc = " ],"]
2794#[doc = " \"properties\": {"]
2795#[doc = " \"access_key\": {"]
2796#[doc = " \"description\": \"An access key with the permission\","]
2797#[doc = " \"allOf\": ["]
2798#[doc = " {"]
2799#[doc = " \"$ref\": \"#/components/schemas/AccessKey\""]
2800#[doc = " }"]
2801#[doc = " ]"]
2802#[doc = " },"]
2803#[doc = " \"public_key\": {"]
2804#[doc = " \"description\": \"A public key which will be associated with an access_key\","]
2805#[doc = " \"allOf\": ["]
2806#[doc = " {"]
2807#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2808#[doc = " }"]
2809#[doc = " ]"]
2810#[doc = " }"]
2811#[doc = " }"]
2812#[doc = "}"]
2813#[doc = r" ```"]
2814#[doc = r" </details>"]
2815#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2816pub struct AddKeyAction {
2817 #[doc = "An access key with the permission"]
2818 pub access_key: AccessKey,
2819 #[doc = "A public key which will be associated with an access_key"]
2820 pub public_key: PublicKey,
2821}
2822impl ::std::convert::From<&AddKeyAction> for AddKeyAction {
2823 fn from(value: &AddKeyAction) -> Self {
2824 value.clone()
2825 }
2826}
2827#[doc = "`AllAccessKeyChangesByBlockIdChangesType`"]
2828#[doc = r""]
2829#[doc = r" <details><summary>JSON schema</summary>"]
2830#[doc = r""]
2831#[doc = r" ```json"]
2832#[doc = "{"]
2833#[doc = " \"type\": \"string\","]
2834#[doc = " \"enum\": ["]
2835#[doc = " \"all_access_key_changes\""]
2836#[doc = " ]"]
2837#[doc = "}"]
2838#[doc = r" ```"]
2839#[doc = r" </details>"]
2840#[derive(
2841 :: serde :: Deserialize,
2842 :: serde :: Serialize,
2843 Clone,
2844 Copy,
2845 Debug,
2846 Eq,
2847 Hash,
2848 Ord,
2849 PartialEq,
2850 PartialOrd,
2851)]
2852pub enum AllAccessKeyChangesByBlockIdChangesType {
2853 #[serde(rename = "all_access_key_changes")]
2854 AllAccessKeyChanges,
2855}
2856impl ::std::convert::From<&Self> for AllAccessKeyChangesByBlockIdChangesType {
2857 fn from(value: &AllAccessKeyChangesByBlockIdChangesType) -> Self {
2858 value.clone()
2859 }
2860}
2861impl ::std::fmt::Display for AllAccessKeyChangesByBlockIdChangesType {
2862 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2863 match *self {
2864 Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
2865 }
2866 }
2867}
2868impl ::std::str::FromStr for AllAccessKeyChangesByBlockIdChangesType {
2869 type Err = self::error::ConversionError;
2870 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2871 match value {
2872 "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2873 _ => Err("invalid value".into()),
2874 }
2875 }
2876}
2877impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByBlockIdChangesType {
2878 type Error = self::error::ConversionError;
2879 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2880 value.parse()
2881 }
2882}
2883impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2884 type Error = self::error::ConversionError;
2885 fn try_from(
2886 value: &::std::string::String,
2887 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2888 value.parse()
2889 }
2890}
2891impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2892 type Error = self::error::ConversionError;
2893 fn try_from(
2894 value: ::std::string::String,
2895 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2896 value.parse()
2897 }
2898}
2899#[doc = "`AllAccessKeyChangesByFinalityChangesType`"]
2900#[doc = r""]
2901#[doc = r" <details><summary>JSON schema</summary>"]
2902#[doc = r""]
2903#[doc = r" ```json"]
2904#[doc = "{"]
2905#[doc = " \"type\": \"string\","]
2906#[doc = " \"enum\": ["]
2907#[doc = " \"all_access_key_changes\""]
2908#[doc = " ]"]
2909#[doc = "}"]
2910#[doc = r" ```"]
2911#[doc = r" </details>"]
2912#[derive(
2913 :: serde :: Deserialize,
2914 :: serde :: Serialize,
2915 Clone,
2916 Copy,
2917 Debug,
2918 Eq,
2919 Hash,
2920 Ord,
2921 PartialEq,
2922 PartialOrd,
2923)]
2924pub enum AllAccessKeyChangesByFinalityChangesType {
2925 #[serde(rename = "all_access_key_changes")]
2926 AllAccessKeyChanges,
2927}
2928impl ::std::convert::From<&Self> for AllAccessKeyChangesByFinalityChangesType {
2929 fn from(value: &AllAccessKeyChangesByFinalityChangesType) -> Self {
2930 value.clone()
2931 }
2932}
2933impl ::std::fmt::Display for AllAccessKeyChangesByFinalityChangesType {
2934 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2935 match *self {
2936 Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
2937 }
2938 }
2939}
2940impl ::std::str::FromStr for AllAccessKeyChangesByFinalityChangesType {
2941 type Err = self::error::ConversionError;
2942 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2943 match value {
2944 "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2945 _ => Err("invalid value".into()),
2946 }
2947 }
2948}
2949impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByFinalityChangesType {
2950 type Error = self::error::ConversionError;
2951 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2952 value.parse()
2953 }
2954}
2955impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2956 type Error = self::error::ConversionError;
2957 fn try_from(
2958 value: &::std::string::String,
2959 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2960 value.parse()
2961 }
2962}
2963impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2964 type Error = self::error::ConversionError;
2965 fn try_from(
2966 value: ::std::string::String,
2967 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2968 value.parse()
2969 }
2970}
2971#[doc = "`AllAccessKeyChangesBySyncCheckpointChangesType`"]
2972#[doc = r""]
2973#[doc = r" <details><summary>JSON schema</summary>"]
2974#[doc = r""]
2975#[doc = r" ```json"]
2976#[doc = "{"]
2977#[doc = " \"type\": \"string\","]
2978#[doc = " \"enum\": ["]
2979#[doc = " \"all_access_key_changes\""]
2980#[doc = " ]"]
2981#[doc = "}"]
2982#[doc = r" ```"]
2983#[doc = r" </details>"]
2984#[derive(
2985 :: serde :: Deserialize,
2986 :: serde :: Serialize,
2987 Clone,
2988 Copy,
2989 Debug,
2990 Eq,
2991 Hash,
2992 Ord,
2993 PartialEq,
2994 PartialOrd,
2995)]
2996pub enum AllAccessKeyChangesBySyncCheckpointChangesType {
2997 #[serde(rename = "all_access_key_changes")]
2998 AllAccessKeyChanges,
2999}
3000impl ::std::convert::From<&Self> for AllAccessKeyChangesBySyncCheckpointChangesType {
3001 fn from(value: &AllAccessKeyChangesBySyncCheckpointChangesType) -> Self {
3002 value.clone()
3003 }
3004}
3005impl ::std::fmt::Display for AllAccessKeyChangesBySyncCheckpointChangesType {
3006 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3007 match *self {
3008 Self::AllAccessKeyChanges => f.write_str("all_access_key_changes"),
3009 }
3010 }
3011}
3012impl ::std::str::FromStr for AllAccessKeyChangesBySyncCheckpointChangesType {
3013 type Err = self::error::ConversionError;
3014 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3015 match value {
3016 "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
3017 _ => Err("invalid value".into()),
3018 }
3019 }
3020}
3021impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesBySyncCheckpointChangesType {
3022 type Error = self::error::ConversionError;
3023 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3024 value.parse()
3025 }
3026}
3027impl ::std::convert::TryFrom<&::std::string::String>
3028 for AllAccessKeyChangesBySyncCheckpointChangesType
3029{
3030 type Error = self::error::ConversionError;
3031 fn try_from(
3032 value: &::std::string::String,
3033 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3034 value.parse()
3035 }
3036}
3037impl ::std::convert::TryFrom<::std::string::String>
3038 for AllAccessKeyChangesBySyncCheckpointChangesType
3039{
3040 type Error = self::error::ConversionError;
3041 fn try_from(
3042 value: ::std::string::String,
3043 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3044 value.parse()
3045 }
3046}
3047#[doc = "`AllGasKeyChangesByBlockIdChangesType`"]
3048#[doc = r""]
3049#[doc = r" <details><summary>JSON schema</summary>"]
3050#[doc = r""]
3051#[doc = r" ```json"]
3052#[doc = "{"]
3053#[doc = " \"type\": \"string\","]
3054#[doc = " \"enum\": ["]
3055#[doc = " \"all_gas_key_changes\""]
3056#[doc = " ]"]
3057#[doc = "}"]
3058#[doc = r" ```"]
3059#[doc = r" </details>"]
3060#[derive(
3061 :: serde :: Deserialize,
3062 :: serde :: Serialize,
3063 Clone,
3064 Copy,
3065 Debug,
3066 Eq,
3067 Hash,
3068 Ord,
3069 PartialEq,
3070 PartialOrd,
3071)]
3072pub enum AllGasKeyChangesByBlockIdChangesType {
3073 #[serde(rename = "all_gas_key_changes")]
3074 AllGasKeyChanges,
3075}
3076impl ::std::convert::From<&Self> for AllGasKeyChangesByBlockIdChangesType {
3077 fn from(value: &AllGasKeyChangesByBlockIdChangesType) -> Self {
3078 value.clone()
3079 }
3080}
3081impl ::std::fmt::Display for AllGasKeyChangesByBlockIdChangesType {
3082 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3083 match *self {
3084 Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
3085 }
3086 }
3087}
3088impl ::std::str::FromStr for AllGasKeyChangesByBlockIdChangesType {
3089 type Err = self::error::ConversionError;
3090 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3091 match value {
3092 "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
3093 _ => Err("invalid value".into()),
3094 }
3095 }
3096}
3097impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByBlockIdChangesType {
3098 type Error = self::error::ConversionError;
3099 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3100 value.parse()
3101 }
3102}
3103impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
3104 type Error = self::error::ConversionError;
3105 fn try_from(
3106 value: &::std::string::String,
3107 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3108 value.parse()
3109 }
3110}
3111impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
3112 type Error = self::error::ConversionError;
3113 fn try_from(
3114 value: ::std::string::String,
3115 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3116 value.parse()
3117 }
3118}
3119#[doc = "`AllGasKeyChangesByFinalityChangesType`"]
3120#[doc = r""]
3121#[doc = r" <details><summary>JSON schema</summary>"]
3122#[doc = r""]
3123#[doc = r" ```json"]
3124#[doc = "{"]
3125#[doc = " \"type\": \"string\","]
3126#[doc = " \"enum\": ["]
3127#[doc = " \"all_gas_key_changes\""]
3128#[doc = " ]"]
3129#[doc = "}"]
3130#[doc = r" ```"]
3131#[doc = r" </details>"]
3132#[derive(
3133 :: serde :: Deserialize,
3134 :: serde :: Serialize,
3135 Clone,
3136 Copy,
3137 Debug,
3138 Eq,
3139 Hash,
3140 Ord,
3141 PartialEq,
3142 PartialOrd,
3143)]
3144pub enum AllGasKeyChangesByFinalityChangesType {
3145 #[serde(rename = "all_gas_key_changes")]
3146 AllGasKeyChanges,
3147}
3148impl ::std::convert::From<&Self> for AllGasKeyChangesByFinalityChangesType {
3149 fn from(value: &AllGasKeyChangesByFinalityChangesType) -> Self {
3150 value.clone()
3151 }
3152}
3153impl ::std::fmt::Display for AllGasKeyChangesByFinalityChangesType {
3154 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3155 match *self {
3156 Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
3157 }
3158 }
3159}
3160impl ::std::str::FromStr for AllGasKeyChangesByFinalityChangesType {
3161 type Err = self::error::ConversionError;
3162 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3163 match value {
3164 "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
3165 _ => Err("invalid value".into()),
3166 }
3167 }
3168}
3169impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByFinalityChangesType {
3170 type Error = self::error::ConversionError;
3171 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3172 value.parse()
3173 }
3174}
3175impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByFinalityChangesType {
3176 type Error = self::error::ConversionError;
3177 fn try_from(
3178 value: &::std::string::String,
3179 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3180 value.parse()
3181 }
3182}
3183impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByFinalityChangesType {
3184 type Error = self::error::ConversionError;
3185 fn try_from(
3186 value: ::std::string::String,
3187 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3188 value.parse()
3189 }
3190}
3191#[doc = "`AllGasKeyChangesBySyncCheckpointChangesType`"]
3192#[doc = r""]
3193#[doc = r" <details><summary>JSON schema</summary>"]
3194#[doc = r""]
3195#[doc = r" ```json"]
3196#[doc = "{"]
3197#[doc = " \"type\": \"string\","]
3198#[doc = " \"enum\": ["]
3199#[doc = " \"all_gas_key_changes\""]
3200#[doc = " ]"]
3201#[doc = "}"]
3202#[doc = r" ```"]
3203#[doc = r" </details>"]
3204#[derive(
3205 :: serde :: Deserialize,
3206 :: serde :: Serialize,
3207 Clone,
3208 Copy,
3209 Debug,
3210 Eq,
3211 Hash,
3212 Ord,
3213 PartialEq,
3214 PartialOrd,
3215)]
3216pub enum AllGasKeyChangesBySyncCheckpointChangesType {
3217 #[serde(rename = "all_gas_key_changes")]
3218 AllGasKeyChanges,
3219}
3220impl ::std::convert::From<&Self> for AllGasKeyChangesBySyncCheckpointChangesType {
3221 fn from(value: &AllGasKeyChangesBySyncCheckpointChangesType) -> Self {
3222 value.clone()
3223 }
3224}
3225impl ::std::fmt::Display for AllGasKeyChangesBySyncCheckpointChangesType {
3226 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3227 match *self {
3228 Self::AllGasKeyChanges => f.write_str("all_gas_key_changes"),
3229 }
3230 }
3231}
3232impl ::std::str::FromStr for AllGasKeyChangesBySyncCheckpointChangesType {
3233 type Err = self::error::ConversionError;
3234 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3235 match value {
3236 "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
3237 _ => Err("invalid value".into()),
3238 }
3239 }
3240}
3241impl ::std::convert::TryFrom<&str> for AllGasKeyChangesBySyncCheckpointChangesType {
3242 type Error = self::error::ConversionError;
3243 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3244 value.parse()
3245 }
3246}
3247impl ::std::convert::TryFrom<&::std::string::String>
3248 for AllGasKeyChangesBySyncCheckpointChangesType
3249{
3250 type Error = self::error::ConversionError;
3251 fn try_from(
3252 value: &::std::string::String,
3253 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3254 value.parse()
3255 }
3256}
3257impl ::std::convert::TryFrom<::std::string::String>
3258 for AllGasKeyChangesBySyncCheckpointChangesType
3259{
3260 type Error = self::error::ConversionError;
3261 fn try_from(
3262 value: ::std::string::String,
3263 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3264 value.parse()
3265 }
3266}
3267#[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."]
3268#[doc = r""]
3269#[doc = r" <details><summary>JSON schema</summary>"]
3270#[doc = r""]
3271#[doc = r" ```json"]
3272#[doc = "{"]
3273#[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.\","]
3274#[doc = " \"type\": \"object\","]
3275#[doc = " \"required\": ["]
3276#[doc = " \"requested_values_bitmap\","]
3277#[doc = " \"to_shard\""]
3278#[doc = " ],"]
3279#[doc = " \"properties\": {"]
3280#[doc = " \"requested_values_bitmap\": {"]
3281#[doc = " \"description\": \"Bitmap which describes what values of bandwidth are requested.\","]
3282#[doc = " \"allOf\": ["]
3283#[doc = " {"]
3284#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequestBitmap\""]
3285#[doc = " }"]
3286#[doc = " ]"]
3287#[doc = " },"]
3288#[doc = " \"to_shard\": {"]
3289#[doc = " \"description\": \"Requesting bandwidth to this shard.\","]
3290#[doc = " \"type\": \"integer\","]
3291#[doc = " \"format\": \"uint16\","]
3292#[doc = " \"maximum\": 65535.0,"]
3293#[doc = " \"minimum\": 0.0"]
3294#[doc = " }"]
3295#[doc = " }"]
3296#[doc = "}"]
3297#[doc = r" ```"]
3298#[doc = r" </details>"]
3299#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3300pub struct BandwidthRequest {
3301 #[doc = "Bitmap which describes what values of bandwidth are requested."]
3302 pub requested_values_bitmap: BandwidthRequestBitmap,
3303 #[doc = "Requesting bandwidth to this shard."]
3304 pub to_shard: u16,
3305}
3306impl ::std::convert::From<&BandwidthRequest> for BandwidthRequest {
3307 fn from(value: &BandwidthRequest) -> Self {
3308 value.clone()
3309 }
3310}
3311#[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."]
3312#[doc = r""]
3313#[doc = r" <details><summary>JSON schema</summary>"]
3314#[doc = r""]
3315#[doc = r" ```json"]
3316#[doc = "{"]
3317#[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.\","]
3318#[doc = " \"type\": \"object\","]
3319#[doc = " \"required\": ["]
3320#[doc = " \"data\""]
3321#[doc = " ],"]
3322#[doc = " \"properties\": {"]
3323#[doc = " \"data\": {"]
3324#[doc = " \"type\": \"array\","]
3325#[doc = " \"items\": {"]
3326#[doc = " \"type\": \"integer\","]
3327#[doc = " \"format\": \"uint8\","]
3328#[doc = " \"maximum\": 255.0,"]
3329#[doc = " \"minimum\": 0.0"]
3330#[doc = " },"]
3331#[doc = " \"maxItems\": 5,"]
3332#[doc = " \"minItems\": 5"]
3333#[doc = " }"]
3334#[doc = " }"]
3335#[doc = "}"]
3336#[doc = r" ```"]
3337#[doc = r" </details>"]
3338#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3339pub struct BandwidthRequestBitmap {
3340 pub data: [u8; 5usize],
3341}
3342impl ::std::convert::From<&BandwidthRequestBitmap> for BandwidthRequestBitmap {
3343 fn from(value: &BandwidthRequestBitmap) -> Self {
3344 value.clone()
3345 }
3346}
3347#[doc = "A list of shard's bandwidth requests.\nDescribes how much the shard would like to send to other shards."]
3348#[doc = r""]
3349#[doc = r" <details><summary>JSON schema</summary>"]
3350#[doc = r""]
3351#[doc = r" ```json"]
3352#[doc = "{"]
3353#[doc = " \"description\": \"A list of shard's bandwidth requests.\\nDescribes how much the shard would like to send to other shards.\","]
3354#[doc = " \"oneOf\": ["]
3355#[doc = " {"]
3356#[doc = " \"type\": \"object\","]
3357#[doc = " \"required\": ["]
3358#[doc = " \"V1\""]
3359#[doc = " ],"]
3360#[doc = " \"properties\": {"]
3361#[doc = " \"V1\": {"]
3362#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequestsV1\""]
3363#[doc = " }"]
3364#[doc = " },"]
3365#[doc = " \"additionalProperties\": false"]
3366#[doc = " }"]
3367#[doc = " ]"]
3368#[doc = "}"]
3369#[doc = r" ```"]
3370#[doc = r" </details>"]
3371#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3372pub enum BandwidthRequests {
3373 V1(BandwidthRequestsV1),
3374}
3375impl ::std::convert::From<&Self> for BandwidthRequests {
3376 fn from(value: &BandwidthRequests) -> Self {
3377 value.clone()
3378 }
3379}
3380impl ::std::convert::From<BandwidthRequestsV1> for BandwidthRequests {
3381 fn from(value: BandwidthRequestsV1) -> Self {
3382 Self::V1(value)
3383 }
3384}
3385#[doc = "Version 1 of [`BandwidthRequest`]."]
3386#[doc = r""]
3387#[doc = r" <details><summary>JSON schema</summary>"]
3388#[doc = r""]
3389#[doc = r" ```json"]
3390#[doc = "{"]
3391#[doc = " \"description\": \"Version 1 of [`BandwidthRequest`].\","]
3392#[doc = " \"type\": \"object\","]
3393#[doc = " \"required\": ["]
3394#[doc = " \"requests\""]
3395#[doc = " ],"]
3396#[doc = " \"properties\": {"]
3397#[doc = " \"requests\": {"]
3398#[doc = " \"type\": \"array\","]
3399#[doc = " \"items\": {"]
3400#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequest\""]
3401#[doc = " }"]
3402#[doc = " }"]
3403#[doc = " }"]
3404#[doc = "}"]
3405#[doc = r" ```"]
3406#[doc = r" </details>"]
3407#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3408pub struct BandwidthRequestsV1 {
3409 pub requests: ::std::vec::Vec<BandwidthRequest>,
3410}
3411impl ::std::convert::From<&BandwidthRequestsV1> for BandwidthRequestsV1 {
3412 fn from(value: &BandwidthRequestsV1) -> Self {
3413 value.clone()
3414 }
3415}
3416#[doc = "A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
3417#[doc = r""]
3418#[doc = r" <details><summary>JSON schema</summary>"]
3419#[doc = r""]
3420#[doc = r" ```json"]
3421#[doc = "{"]
3422#[doc = " \"description\": \"A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
3423#[doc = " \"type\": \"object\","]
3424#[doc = " \"required\": ["]
3425#[doc = " \"block_merkle_root\","]
3426#[doc = " \"epoch_id\","]
3427#[doc = " \"height\","]
3428#[doc = " \"next_bp_hash\","]
3429#[doc = " \"next_epoch_id\","]
3430#[doc = " \"outcome_root\","]
3431#[doc = " \"prev_state_root\","]
3432#[doc = " \"timestamp\","]
3433#[doc = " \"timestamp_nanosec\""]
3434#[doc = " ],"]
3435#[doc = " \"properties\": {"]
3436#[doc = " \"block_merkle_root\": {"]
3437#[doc = " \"description\": \"The merkle root of all the block hashes\","]
3438#[doc = " \"allOf\": ["]
3439#[doc = " {"]
3440#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3441#[doc = " }"]
3442#[doc = " ]"]
3443#[doc = " },"]
3444#[doc = " \"epoch_id\": {"]
3445#[doc = " \"description\": \"The epoch to which the block that is the current known head belongs\","]
3446#[doc = " \"allOf\": ["]
3447#[doc = " {"]
3448#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3449#[doc = " }"]
3450#[doc = " ]"]
3451#[doc = " },"]
3452#[doc = " \"height\": {"]
3453#[doc = " \"type\": \"integer\","]
3454#[doc = " \"format\": \"uint64\","]
3455#[doc = " \"minimum\": 0.0"]
3456#[doc = " },"]
3457#[doc = " \"next_bp_hash\": {"]
3458#[doc = " \"description\": \"The hash of the block producers set for the next epoch\","]
3459#[doc = " \"allOf\": ["]
3460#[doc = " {"]
3461#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3462#[doc = " }"]
3463#[doc = " ]"]
3464#[doc = " },"]
3465#[doc = " \"next_epoch_id\": {"]
3466#[doc = " \"description\": \"The epoch that will follow the current epoch\","]
3467#[doc = " \"allOf\": ["]
3468#[doc = " {"]
3469#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3470#[doc = " }"]
3471#[doc = " ]"]
3472#[doc = " },"]
3473#[doc = " \"outcome_root\": {"]
3474#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3475#[doc = " },"]
3476#[doc = " \"prev_state_root\": {"]
3477#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3478#[doc = " },"]
3479#[doc = " \"timestamp\": {"]
3480#[doc = " \"description\": \"Legacy json number. Should not be used.\","]
3481#[doc = " \"type\": \"integer\","]
3482#[doc = " \"format\": \"uint64\","]
3483#[doc = " \"minimum\": 0.0"]
3484#[doc = " },"]
3485#[doc = " \"timestamp_nanosec\": {"]
3486#[doc = " \"type\": \"string\""]
3487#[doc = " }"]
3488#[doc = " }"]
3489#[doc = "}"]
3490#[doc = r" ```"]
3491#[doc = r" </details>"]
3492#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3493pub struct BlockHeaderInnerLiteView {
3494 #[doc = "The merkle root of all the block hashes"]
3495 pub block_merkle_root: CryptoHash,
3496 #[doc = "The epoch to which the block that is the current known head belongs"]
3497 pub epoch_id: CryptoHash,
3498 pub height: u64,
3499 #[doc = "The hash of the block producers set for the next epoch"]
3500 pub next_bp_hash: CryptoHash,
3501 #[doc = "The epoch that will follow the current epoch"]
3502 pub next_epoch_id: CryptoHash,
3503 pub outcome_root: CryptoHash,
3504 pub prev_state_root: CryptoHash,
3505 #[doc = "Legacy json number. Should not be used."]
3506 pub timestamp: u64,
3507 pub timestamp_nanosec: ::std::string::String,
3508}
3509impl ::std::convert::From<&BlockHeaderInnerLiteView> for BlockHeaderInnerLiteView {
3510 fn from(value: &BlockHeaderInnerLiteView) -> Self {
3511 value.clone()
3512 }
3513}
3514#[doc = "Contains main info about the block."]
3515#[doc = r""]
3516#[doc = r" <details><summary>JSON schema</summary>"]
3517#[doc = r""]
3518#[doc = r" ```json"]
3519#[doc = "{"]
3520#[doc = " \"description\": \"Contains main info about the block.\","]
3521#[doc = " \"type\": \"object\","]
3522#[doc = " \"required\": ["]
3523#[doc = " \"approvals\","]
3524#[doc = " \"block_merkle_root\","]
3525#[doc = " \"challenges_result\","]
3526#[doc = " \"challenges_root\","]
3527#[doc = " \"chunk_headers_root\","]
3528#[doc = " \"chunk_mask\","]
3529#[doc = " \"chunk_receipts_root\","]
3530#[doc = " \"chunk_tx_root\","]
3531#[doc = " \"chunks_included\","]
3532#[doc = " \"epoch_id\","]
3533#[doc = " \"gas_price\","]
3534#[doc = " \"hash\","]
3535#[doc = " \"height\","]
3536#[doc = " \"last_ds_final_block\","]
3537#[doc = " \"last_final_block\","]
3538#[doc = " \"latest_protocol_version\","]
3539#[doc = " \"next_bp_hash\","]
3540#[doc = " \"next_epoch_id\","]
3541#[doc = " \"outcome_root\","]
3542#[doc = " \"prev_hash\","]
3543#[doc = " \"prev_state_root\","]
3544#[doc = " \"random_value\","]
3545#[doc = " \"signature\","]
3546#[doc = " \"timestamp\","]
3547#[doc = " \"timestamp_nanosec\","]
3548#[doc = " \"total_supply\","]
3549#[doc = " \"validator_proposals\""]
3550#[doc = " ],"]
3551#[doc = " \"properties\": {"]
3552#[doc = " \"approvals\": {"]
3553#[doc = " \"type\": \"array\","]
3554#[doc = " \"items\": {"]
3555#[doc = " \"anyOf\": ["]
3556#[doc = " {"]
3557#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
3558#[doc = " },"]
3559#[doc = " {"]
3560#[doc = " \"type\": \"null\""]
3561#[doc = " }"]
3562#[doc = " ]"]
3563#[doc = " }"]
3564#[doc = " },"]
3565#[doc = " \"block_body_hash\": {"]
3566#[doc = " \"anyOf\": ["]
3567#[doc = " {"]
3568#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3569#[doc = " },"]
3570#[doc = " {"]
3571#[doc = " \"type\": \"null\""]
3572#[doc = " }"]
3573#[doc = " ]"]
3574#[doc = " },"]
3575#[doc = " \"block_merkle_root\": {"]
3576#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3577#[doc = " },"]
3578#[doc = " \"block_ordinal\": {"]
3579#[doc = " \"type\": ["]
3580#[doc = " \"integer\","]
3581#[doc = " \"null\""]
3582#[doc = " ],"]
3583#[doc = " \"format\": \"uint64\","]
3584#[doc = " \"minimum\": 0.0"]
3585#[doc = " },"]
3586#[doc = " \"challenges_result\": {"]
3587#[doc = " \"type\": \"array\","]
3588#[doc = " \"items\": {"]
3589#[doc = " \"$ref\": \"#/components/schemas/SlashedValidator\""]
3590#[doc = " }"]
3591#[doc = " },"]
3592#[doc = " \"challenges_root\": {"]
3593#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3594#[doc = " },"]
3595#[doc = " \"chunk_endorsements\": {"]
3596#[doc = " \"type\": ["]
3597#[doc = " \"array\","]
3598#[doc = " \"null\""]
3599#[doc = " ],"]
3600#[doc = " \"items\": {"]
3601#[doc = " \"type\": \"array\","]
3602#[doc = " \"items\": {"]
3603#[doc = " \"type\": \"integer\","]
3604#[doc = " \"format\": \"uint8\","]
3605#[doc = " \"maximum\": 255.0,"]
3606#[doc = " \"minimum\": 0.0"]
3607#[doc = " }"]
3608#[doc = " }"]
3609#[doc = " },"]
3610#[doc = " \"chunk_headers_root\": {"]
3611#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3612#[doc = " },"]
3613#[doc = " \"chunk_mask\": {"]
3614#[doc = " \"type\": \"array\","]
3615#[doc = " \"items\": {"]
3616#[doc = " \"type\": \"boolean\""]
3617#[doc = " }"]
3618#[doc = " },"]
3619#[doc = " \"chunk_receipts_root\": {"]
3620#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3621#[doc = " },"]
3622#[doc = " \"chunk_tx_root\": {"]
3623#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3624#[doc = " },"]
3625#[doc = " \"chunks_included\": {"]
3626#[doc = " \"type\": \"integer\","]
3627#[doc = " \"format\": \"uint64\","]
3628#[doc = " \"minimum\": 0.0"]
3629#[doc = " },"]
3630#[doc = " \"epoch_id\": {"]
3631#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3632#[doc = " },"]
3633#[doc = " \"epoch_sync_data_hash\": {"]
3634#[doc = " \"anyOf\": ["]
3635#[doc = " {"]
3636#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3637#[doc = " },"]
3638#[doc = " {"]
3639#[doc = " \"type\": \"null\""]
3640#[doc = " }"]
3641#[doc = " ]"]
3642#[doc = " },"]
3643#[doc = " \"gas_price\": {"]
3644#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
3645#[doc = " },"]
3646#[doc = " \"hash\": {"]
3647#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3648#[doc = " },"]
3649#[doc = " \"height\": {"]
3650#[doc = " \"type\": \"integer\","]
3651#[doc = " \"format\": \"uint64\","]
3652#[doc = " \"minimum\": 0.0"]
3653#[doc = " },"]
3654#[doc = " \"last_ds_final_block\": {"]
3655#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3656#[doc = " },"]
3657#[doc = " \"last_final_block\": {"]
3658#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3659#[doc = " },"]
3660#[doc = " \"latest_protocol_version\": {"]
3661#[doc = " \"type\": \"integer\","]
3662#[doc = " \"format\": \"uint32\","]
3663#[doc = " \"minimum\": 0.0"]
3664#[doc = " },"]
3665#[doc = " \"next_bp_hash\": {"]
3666#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3667#[doc = " },"]
3668#[doc = " \"next_epoch_id\": {"]
3669#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3670#[doc = " },"]
3671#[doc = " \"outcome_root\": {"]
3672#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3673#[doc = " },"]
3674#[doc = " \"prev_hash\": {"]
3675#[doc = " \"description\": \"The hash of the previous Block\","]
3676#[doc = " \"allOf\": ["]
3677#[doc = " {"]
3678#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3679#[doc = " }"]
3680#[doc = " ]"]
3681#[doc = " },"]
3682#[doc = " \"prev_height\": {"]
3683#[doc = " \"type\": ["]
3684#[doc = " \"integer\","]
3685#[doc = " \"null\""]
3686#[doc = " ],"]
3687#[doc = " \"format\": \"uint64\","]
3688#[doc = " \"minimum\": 0.0"]
3689#[doc = " },"]
3690#[doc = " \"prev_state_root\": {"]
3691#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3692#[doc = " },"]
3693#[doc = " \"random_value\": {"]
3694#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3695#[doc = " },"]
3696#[doc = " \"rent_paid\": {"]
3697#[doc = " \"description\": \"TODO(2271): deprecated.\","]
3698#[doc = " \"default\": \"0\","]
3699#[doc = " \"allOf\": ["]
3700#[doc = " {"]
3701#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
3702#[doc = " }"]
3703#[doc = " ]"]
3704#[doc = " },"]
3705#[doc = " \"signature\": {"]
3706#[doc = " \"description\": \"Signature of the block producer.\","]
3707#[doc = " \"allOf\": ["]
3708#[doc = " {"]
3709#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
3710#[doc = " }"]
3711#[doc = " ]"]
3712#[doc = " },"]
3713#[doc = " \"timestamp\": {"]
3714#[doc = " \"description\": \"Legacy json number. Should not be used.\","]
3715#[doc = " \"type\": \"integer\","]
3716#[doc = " \"format\": \"uint64\","]
3717#[doc = " \"minimum\": 0.0"]
3718#[doc = " },"]
3719#[doc = " \"timestamp_nanosec\": {"]
3720#[doc = " \"type\": \"string\""]
3721#[doc = " },"]
3722#[doc = " \"total_supply\": {"]
3723#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
3724#[doc = " },"]
3725#[doc = " \"validator_proposals\": {"]
3726#[doc = " \"type\": \"array\","]
3727#[doc = " \"items\": {"]
3728#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
3729#[doc = " }"]
3730#[doc = " },"]
3731#[doc = " \"validator_reward\": {"]
3732#[doc = " \"description\": \"TODO(2271): deprecated.\","]
3733#[doc = " \"default\": \"0\","]
3734#[doc = " \"allOf\": ["]
3735#[doc = " {"]
3736#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
3737#[doc = " }"]
3738#[doc = " ]"]
3739#[doc = " }"]
3740#[doc = " }"]
3741#[doc = "}"]
3742#[doc = r" ```"]
3743#[doc = r" </details>"]
3744#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3745pub struct BlockHeaderView {
3746 pub approvals: ::std::vec::Vec<::std::option::Option<Signature>>,
3747 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3748 pub block_body_hash: ::std::option::Option<CryptoHash>,
3749 pub block_merkle_root: CryptoHash,
3750 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3751 pub block_ordinal: ::std::option::Option<u64>,
3752 pub challenges_result: ::std::vec::Vec<SlashedValidator>,
3753 pub challenges_root: CryptoHash,
3754 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3755 pub chunk_endorsements: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<u8>>>,
3756 pub chunk_headers_root: CryptoHash,
3757 pub chunk_mask: ::std::vec::Vec<bool>,
3758 pub chunk_receipts_root: CryptoHash,
3759 pub chunk_tx_root: CryptoHash,
3760 pub chunks_included: u64,
3761 pub epoch_id: CryptoHash,
3762 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3763 pub epoch_sync_data_hash: ::std::option::Option<CryptoHash>,
3764 pub gas_price: NearToken,
3765 pub hash: CryptoHash,
3766 pub height: u64,
3767 pub last_ds_final_block: CryptoHash,
3768 pub last_final_block: CryptoHash,
3769 pub latest_protocol_version: u32,
3770 pub next_bp_hash: CryptoHash,
3771 pub next_epoch_id: CryptoHash,
3772 pub outcome_root: CryptoHash,
3773 #[doc = "The hash of the previous Block"]
3774 pub prev_hash: CryptoHash,
3775 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3776 pub prev_height: ::std::option::Option<u64>,
3777 pub prev_state_root: CryptoHash,
3778 pub random_value: CryptoHash,
3779 #[doc = "TODO(2271): deprecated."]
3780 #[serde(default = "defaults::block_header_view_rent_paid")]
3781 pub rent_paid: NearToken,
3782 #[doc = "Signature of the block producer."]
3783 pub signature: Signature,
3784 #[doc = "Legacy json number. Should not be used."]
3785 pub timestamp: u64,
3786 pub timestamp_nanosec: ::std::string::String,
3787 pub total_supply: NearToken,
3788 pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
3789 #[doc = "TODO(2271): deprecated."]
3790 #[serde(default = "defaults::block_header_view_validator_reward")]
3791 pub validator_reward: NearToken,
3792}
3793impl ::std::convert::From<&BlockHeaderView> for BlockHeaderView {
3794 fn from(value: &BlockHeaderView) -> Self {
3795 value.clone()
3796 }
3797}
3798#[doc = "`BlockId`"]
3799#[doc = r""]
3800#[doc = r" <details><summary>JSON schema</summary>"]
3801#[doc = r""]
3802#[doc = r" ```json"]
3803#[doc = "{"]
3804#[doc = " \"anyOf\": ["]
3805#[doc = " {"]
3806#[doc = " \"title\": \"block_height\","]
3807#[doc = " \"type\": \"integer\","]
3808#[doc = " \"format\": \"uint64\","]
3809#[doc = " \"minimum\": 0.0"]
3810#[doc = " },"]
3811#[doc = " {"]
3812#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3813#[doc = " }"]
3814#[doc = " ]"]
3815#[doc = "}"]
3816#[doc = r" ```"]
3817#[doc = r" </details>"]
3818#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3819#[serde(untagged)]
3820pub enum BlockId {
3821 BlockHeight(u64),
3822 CryptoHash(CryptoHash),
3823}
3824impl ::std::convert::From<&Self> for BlockId {
3825 fn from(value: &BlockId) -> Self {
3826 value.clone()
3827 }
3828}
3829impl ::std::fmt::Display for BlockId {
3830 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3831 match self {
3832 Self::BlockHeight(x) => x.fmt(f),
3833 Self::CryptoHash(x) => x.fmt(f),
3834 }
3835 }
3836}
3837impl ::std::convert::From<u64> for BlockId {
3838 fn from(value: u64) -> Self {
3839 Self::BlockHeight(value)
3840 }
3841}
3842impl ::std::convert::From<CryptoHash> for BlockId {
3843 fn from(value: CryptoHash) -> Self {
3844 Self::CryptoHash(value)
3845 }
3846}
3847#[doc = "`BlockReference`"]
3848#[doc = r""]
3849#[doc = r" <details><summary>JSON schema</summary>"]
3850#[doc = r""]
3851#[doc = r" ```json"]
3852#[doc = "{"]
3853#[doc = " \"oneOf\": ["]
3854#[doc = " {"]
3855#[doc = " \"type\": \"object\","]
3856#[doc = " \"required\": ["]
3857#[doc = " \"block_id\""]
3858#[doc = " ],"]
3859#[doc = " \"properties\": {"]
3860#[doc = " \"block_id\": {"]
3861#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
3862#[doc = " }"]
3863#[doc = " },"]
3864#[doc = " \"additionalProperties\": false"]
3865#[doc = " },"]
3866#[doc = " {"]
3867#[doc = " \"type\": \"object\","]
3868#[doc = " \"required\": ["]
3869#[doc = " \"finality\""]
3870#[doc = " ],"]
3871#[doc = " \"properties\": {"]
3872#[doc = " \"finality\": {"]
3873#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
3874#[doc = " }"]
3875#[doc = " },"]
3876#[doc = " \"additionalProperties\": false"]
3877#[doc = " },"]
3878#[doc = " {"]
3879#[doc = " \"type\": \"object\","]
3880#[doc = " \"required\": ["]
3881#[doc = " \"sync_checkpoint\""]
3882#[doc = " ],"]
3883#[doc = " \"properties\": {"]
3884#[doc = " \"sync_checkpoint\": {"]
3885#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
3886#[doc = " }"]
3887#[doc = " },"]
3888#[doc = " \"additionalProperties\": false"]
3889#[doc = " }"]
3890#[doc = " ]"]
3891#[doc = "}"]
3892#[doc = r" ```"]
3893#[doc = r" </details>"]
3894#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3895pub enum BlockReference {
3896 #[serde(rename = "block_id")]
3897 BlockId(BlockId),
3898 #[serde(rename = "finality")]
3899 Finality(Finality),
3900 #[serde(rename = "sync_checkpoint")]
3901 SyncCheckpoint(SyncCheckpoint),
3902}
3903impl ::std::convert::From<&Self> for BlockReference {
3904 fn from(value: &BlockReference) -> Self {
3905 value.clone()
3906 }
3907}
3908impl ::std::convert::From<BlockId> for BlockReference {
3909 fn from(value: BlockId) -> Self {
3910 Self::BlockId(value)
3911 }
3912}
3913impl ::std::convert::From<Finality> for BlockReference {
3914 fn from(value: Finality) -> Self {
3915 Self::Finality(value)
3916 }
3917}
3918impl ::std::convert::From<SyncCheckpoint> for BlockReference {
3919 fn from(value: SyncCheckpoint) -> Self {
3920 Self::SyncCheckpoint(value)
3921 }
3922}
3923#[doc = "Height and hash of a block"]
3924#[doc = r""]
3925#[doc = r" <details><summary>JSON schema</summary>"]
3926#[doc = r""]
3927#[doc = r" ```json"]
3928#[doc = "{"]
3929#[doc = " \"description\": \"Height and hash of a block\","]
3930#[doc = " \"type\": \"object\","]
3931#[doc = " \"required\": ["]
3932#[doc = " \"hash\","]
3933#[doc = " \"height\""]
3934#[doc = " ],"]
3935#[doc = " \"properties\": {"]
3936#[doc = " \"hash\": {"]
3937#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3938#[doc = " },"]
3939#[doc = " \"height\": {"]
3940#[doc = " \"type\": \"integer\","]
3941#[doc = " \"format\": \"uint64\","]
3942#[doc = " \"minimum\": 0.0"]
3943#[doc = " }"]
3944#[doc = " }"]
3945#[doc = "}"]
3946#[doc = r" ```"]
3947#[doc = r" </details>"]
3948#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3949pub struct BlockStatusView {
3950 pub hash: CryptoHash,
3951 pub height: u64,
3952}
3953impl ::std::convert::From<&BlockStatusView> for BlockStatusView {
3954 fn from(value: &BlockStatusView) -> Self {
3955 value.clone()
3956 }
3957}
3958#[doc = "`CallFunctionByBlockIdRequestType`"]
3959#[doc = r""]
3960#[doc = r" <details><summary>JSON schema</summary>"]
3961#[doc = r""]
3962#[doc = r" ```json"]
3963#[doc = "{"]
3964#[doc = " \"type\": \"string\","]
3965#[doc = " \"enum\": ["]
3966#[doc = " \"call_function\""]
3967#[doc = " ]"]
3968#[doc = "}"]
3969#[doc = r" ```"]
3970#[doc = r" </details>"]
3971#[derive(
3972 :: serde :: Deserialize,
3973 :: serde :: Serialize,
3974 Clone,
3975 Copy,
3976 Debug,
3977 Eq,
3978 Hash,
3979 Ord,
3980 PartialEq,
3981 PartialOrd,
3982)]
3983pub enum CallFunctionByBlockIdRequestType {
3984 #[serde(rename = "call_function")]
3985 CallFunction,
3986}
3987impl ::std::convert::From<&Self> for CallFunctionByBlockIdRequestType {
3988 fn from(value: &CallFunctionByBlockIdRequestType) -> Self {
3989 value.clone()
3990 }
3991}
3992impl ::std::fmt::Display for CallFunctionByBlockIdRequestType {
3993 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3994 match *self {
3995 Self::CallFunction => f.write_str("call_function"),
3996 }
3997 }
3998}
3999impl ::std::str::FromStr for CallFunctionByBlockIdRequestType {
4000 type Err = self::error::ConversionError;
4001 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4002 match value {
4003 "call_function" => Ok(Self::CallFunction),
4004 _ => Err("invalid value".into()),
4005 }
4006 }
4007}
4008impl ::std::convert::TryFrom<&str> for CallFunctionByBlockIdRequestType {
4009 type Error = self::error::ConversionError;
4010 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4011 value.parse()
4012 }
4013}
4014impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByBlockIdRequestType {
4015 type Error = self::error::ConversionError;
4016 fn try_from(
4017 value: &::std::string::String,
4018 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4019 value.parse()
4020 }
4021}
4022impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByBlockIdRequestType {
4023 type Error = self::error::ConversionError;
4024 fn try_from(
4025 value: ::std::string::String,
4026 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4027 value.parse()
4028 }
4029}
4030#[doc = "`CallFunctionByFinalityRequestType`"]
4031#[doc = r""]
4032#[doc = r" <details><summary>JSON schema</summary>"]
4033#[doc = r""]
4034#[doc = r" ```json"]
4035#[doc = "{"]
4036#[doc = " \"type\": \"string\","]
4037#[doc = " \"enum\": ["]
4038#[doc = " \"call_function\""]
4039#[doc = " ]"]
4040#[doc = "}"]
4041#[doc = r" ```"]
4042#[doc = r" </details>"]
4043#[derive(
4044 :: serde :: Deserialize,
4045 :: serde :: Serialize,
4046 Clone,
4047 Copy,
4048 Debug,
4049 Eq,
4050 Hash,
4051 Ord,
4052 PartialEq,
4053 PartialOrd,
4054)]
4055pub enum CallFunctionByFinalityRequestType {
4056 #[serde(rename = "call_function")]
4057 CallFunction,
4058}
4059impl ::std::convert::From<&Self> for CallFunctionByFinalityRequestType {
4060 fn from(value: &CallFunctionByFinalityRequestType) -> Self {
4061 value.clone()
4062 }
4063}
4064impl ::std::fmt::Display for CallFunctionByFinalityRequestType {
4065 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4066 match *self {
4067 Self::CallFunction => f.write_str("call_function"),
4068 }
4069 }
4070}
4071impl ::std::str::FromStr for CallFunctionByFinalityRequestType {
4072 type Err = self::error::ConversionError;
4073 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4074 match value {
4075 "call_function" => Ok(Self::CallFunction),
4076 _ => Err("invalid value".into()),
4077 }
4078 }
4079}
4080impl ::std::convert::TryFrom<&str> for CallFunctionByFinalityRequestType {
4081 type Error = self::error::ConversionError;
4082 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4083 value.parse()
4084 }
4085}
4086impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByFinalityRequestType {
4087 type Error = self::error::ConversionError;
4088 fn try_from(
4089 value: &::std::string::String,
4090 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4091 value.parse()
4092 }
4093}
4094impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByFinalityRequestType {
4095 type Error = self::error::ConversionError;
4096 fn try_from(
4097 value: ::std::string::String,
4098 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4099 value.parse()
4100 }
4101}
4102#[doc = "`CallFunctionBySyncCheckpointRequestType`"]
4103#[doc = r""]
4104#[doc = r" <details><summary>JSON schema</summary>"]
4105#[doc = r""]
4106#[doc = r" ```json"]
4107#[doc = "{"]
4108#[doc = " \"type\": \"string\","]
4109#[doc = " \"enum\": ["]
4110#[doc = " \"call_function\""]
4111#[doc = " ]"]
4112#[doc = "}"]
4113#[doc = r" ```"]
4114#[doc = r" </details>"]
4115#[derive(
4116 :: serde :: Deserialize,
4117 :: serde :: Serialize,
4118 Clone,
4119 Copy,
4120 Debug,
4121 Eq,
4122 Hash,
4123 Ord,
4124 PartialEq,
4125 PartialOrd,
4126)]
4127pub enum CallFunctionBySyncCheckpointRequestType {
4128 #[serde(rename = "call_function")]
4129 CallFunction,
4130}
4131impl ::std::convert::From<&Self> for CallFunctionBySyncCheckpointRequestType {
4132 fn from(value: &CallFunctionBySyncCheckpointRequestType) -> Self {
4133 value.clone()
4134 }
4135}
4136impl ::std::fmt::Display for CallFunctionBySyncCheckpointRequestType {
4137 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4138 match *self {
4139 Self::CallFunction => f.write_str("call_function"),
4140 }
4141 }
4142}
4143impl ::std::str::FromStr for CallFunctionBySyncCheckpointRequestType {
4144 type Err = self::error::ConversionError;
4145 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4146 match value {
4147 "call_function" => Ok(Self::CallFunction),
4148 _ => Err("invalid value".into()),
4149 }
4150 }
4151}
4152impl ::std::convert::TryFrom<&str> for CallFunctionBySyncCheckpointRequestType {
4153 type Error = self::error::ConversionError;
4154 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4155 value.parse()
4156 }
4157}
4158impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionBySyncCheckpointRequestType {
4159 type Error = self::error::ConversionError;
4160 fn try_from(
4161 value: &::std::string::String,
4162 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4163 value.parse()
4164 }
4165}
4166impl ::std::convert::TryFrom<::std::string::String> for CallFunctionBySyncCheckpointRequestType {
4167 type Error = self::error::ConversionError;
4168 fn try_from(
4169 value: ::std::string::String,
4170 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4171 value.parse()
4172 }
4173}
4174#[doc = "A result returned by contract method"]
4175#[doc = r""]
4176#[doc = r" <details><summary>JSON schema</summary>"]
4177#[doc = r""]
4178#[doc = r" ```json"]
4179#[doc = "{"]
4180#[doc = " \"description\": \"A result returned by contract method\","]
4181#[doc = " \"type\": \"object\","]
4182#[doc = " \"required\": ["]
4183#[doc = " \"logs\","]
4184#[doc = " \"result\""]
4185#[doc = " ],"]
4186#[doc = " \"properties\": {"]
4187#[doc = " \"logs\": {"]
4188#[doc = " \"type\": \"array\","]
4189#[doc = " \"items\": {"]
4190#[doc = " \"type\": \"string\""]
4191#[doc = " }"]
4192#[doc = " },"]
4193#[doc = " \"result\": {"]
4194#[doc = " \"type\": \"array\","]
4195#[doc = " \"items\": {"]
4196#[doc = " \"type\": \"integer\","]
4197#[doc = " \"format\": \"uint8\","]
4198#[doc = " \"maximum\": 255.0,"]
4199#[doc = " \"minimum\": 0.0"]
4200#[doc = " }"]
4201#[doc = " }"]
4202#[doc = " }"]
4203#[doc = "}"]
4204#[doc = r" ```"]
4205#[doc = r" </details>"]
4206#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4207pub struct CallResult {
4208 pub logs: ::std::vec::Vec<::std::string::String>,
4209 pub result: ::std::vec::Vec<u8>,
4210}
4211impl ::std::convert::From<&CallResult> for CallResult {
4212 fn from(value: &CallResult) -> Self {
4213 value.clone()
4214 }
4215}
4216#[doc = "Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process"]
4217#[doc = r""]
4218#[doc = r" <details><summary>JSON schema</summary>"]
4219#[doc = r""]
4220#[doc = r" ```json"]
4221#[doc = "{"]
4222#[doc = " \"description\": \"Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process\","]
4223#[doc = " \"type\": \"object\","]
4224#[doc = " \"required\": ["]
4225#[doc = " \"blocks_to_catchup\","]
4226#[doc = " \"shard_sync_status\","]
4227#[doc = " \"sync_block_hash\","]
4228#[doc = " \"sync_block_height\""]
4229#[doc = " ],"]
4230#[doc = " \"properties\": {"]
4231#[doc = " \"blocks_to_catchup\": {"]
4232#[doc = " \"type\": \"array\","]
4233#[doc = " \"items\": {"]
4234#[doc = " \"$ref\": \"#/components/schemas/BlockStatusView\""]
4235#[doc = " }"]
4236#[doc = " },"]
4237#[doc = " \"shard_sync_status\": {"]
4238#[doc = " \"type\": \"object\","]
4239#[doc = " \"additionalProperties\": false"]
4240#[doc = " },"]
4241#[doc = " \"sync_block_hash\": {"]
4242#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4243#[doc = " },"]
4244#[doc = " \"sync_block_height\": {"]
4245#[doc = " \"type\": \"integer\","]
4246#[doc = " \"format\": \"uint64\","]
4247#[doc = " \"minimum\": 0.0"]
4248#[doc = " }"]
4249#[doc = " }"]
4250#[doc = "}"]
4251#[doc = r" ```"]
4252#[doc = r" </details>"]
4253#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4254pub struct CatchupStatusView {
4255 pub blocks_to_catchup: ::std::vec::Vec<BlockStatusView>,
4256 pub shard_sync_status: CatchupStatusViewShardSyncStatus,
4257 pub sync_block_hash: CryptoHash,
4258 pub sync_block_height: u64,
4259}
4260impl ::std::convert::From<&CatchupStatusView> for CatchupStatusView {
4261 fn from(value: &CatchupStatusView) -> Self {
4262 value.clone()
4263 }
4264}
4265#[doc = "`CatchupStatusViewShardSyncStatus`"]
4266#[doc = r""]
4267#[doc = r" <details><summary>JSON schema</summary>"]
4268#[doc = r""]
4269#[doc = r" ```json"]
4270#[doc = "{"]
4271#[doc = " \"type\": \"object\","]
4272#[doc = " \"additionalProperties\": false"]
4273#[doc = "}"]
4274#[doc = r" ```"]
4275#[doc = r" </details>"]
4276#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4277#[serde(deny_unknown_fields)]
4278pub struct CatchupStatusViewShardSyncStatus {}
4279impl ::std::convert::From<&CatchupStatusViewShardSyncStatus> for CatchupStatusViewShardSyncStatus {
4280 fn from(value: &CatchupStatusViewShardSyncStatus) -> Self {
4281 value.clone()
4282 }
4283}
4284impl ::std::default::Default for CatchupStatusViewShardSyncStatus {
4285 fn default() -> Self {
4286 Self {}
4287 }
4288}
4289#[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."]
4290#[doc = r""]
4291#[doc = r" <details><summary>JSON schema</summary>"]
4292#[doc = r""]
4293#[doc = r" ```json"]
4294#[doc = "{"]
4295#[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.\","]
4296#[doc = " \"type\": \"object\","]
4297#[doc = " \"required\": ["]
4298#[doc = " \"enabled\","]
4299#[doc = " \"uris\""]
4300#[doc = " ],"]
4301#[doc = " \"properties\": {"]
4302#[doc = " \"enabled\": {"]
4303#[doc = " \"type\": \"boolean\""]
4304#[doc = " },"]
4305#[doc = " \"uris\": {"]
4306#[doc = " \"$ref\": \"#/components/schemas/ChunkDistributionUris\""]
4307#[doc = " }"]
4308#[doc = " }"]
4309#[doc = "}"]
4310#[doc = r" ```"]
4311#[doc = r" </details>"]
4312#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4313pub struct ChunkDistributionNetworkConfig {
4314 pub enabled: bool,
4315 pub uris: ChunkDistributionUris,
4316}
4317impl ::std::convert::From<&ChunkDistributionNetworkConfig> for ChunkDistributionNetworkConfig {
4318 fn from(value: &ChunkDistributionNetworkConfig) -> Self {
4319 value.clone()
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 = " \"required\": ["]
4331#[doc = " \"get\","]
4332#[doc = " \"set\""]
4333#[doc = " ],"]
4334#[doc = " \"properties\": {"]
4335#[doc = " \"get\": {"]
4336#[doc = " \"description\": \"URI for pulling chunks from the stream.\","]
4337#[doc = " \"type\": \"string\""]
4338#[doc = " },"]
4339#[doc = " \"set\": {"]
4340#[doc = " \"description\": \"URI for publishing chunks to the stream.\","]
4341#[doc = " \"type\": \"string\""]
4342#[doc = " }"]
4343#[doc = " }"]
4344#[doc = "}"]
4345#[doc = r" ```"]
4346#[doc = r" </details>"]
4347#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4348pub struct ChunkDistributionUris {
4349 #[doc = "URI for pulling chunks from the stream."]
4350 pub get: ::std::string::String,
4351 #[doc = "URI for publishing chunks to the stream."]
4352 pub set: ::std::string::String,
4353}
4354impl ::std::convert::From<&ChunkDistributionUris> for ChunkDistributionUris {
4355 fn from(value: &ChunkDistributionUris) -> Self {
4356 value.clone()
4357 }
4358}
4359#[doc = "`ChunkHash`"]
4360#[doc = r""]
4361#[doc = r" <details><summary>JSON schema</summary>"]
4362#[doc = r""]
4363#[doc = r" ```json"]
4364#[doc = "{"]
4365#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4366#[doc = "}"]
4367#[doc = r" ```"]
4368#[doc = r" </details>"]
4369#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4370#[serde(transparent)]
4371pub struct ChunkHash(pub CryptoHash);
4372impl ::std::ops::Deref for ChunkHash {
4373 type Target = CryptoHash;
4374 fn deref(&self) -> &CryptoHash {
4375 &self.0
4376 }
4377}
4378impl ::std::convert::From<ChunkHash> for CryptoHash {
4379 fn from(value: ChunkHash) -> Self {
4380 value.0
4381 }
4382}
4383impl ::std::convert::From<&ChunkHash> for ChunkHash {
4384 fn from(value: &ChunkHash) -> Self {
4385 value.clone()
4386 }
4387}
4388impl ::std::convert::From<CryptoHash> for ChunkHash {
4389 fn from(value: CryptoHash) -> Self {
4390 Self(value)
4391 }
4392}
4393impl ::std::str::FromStr for ChunkHash {
4394 type Err = <CryptoHash as ::std::str::FromStr>::Err;
4395 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
4396 Ok(Self(value.parse()?))
4397 }
4398}
4399impl ::std::convert::TryFrom<&str> for ChunkHash {
4400 type Error = <CryptoHash as ::std::str::FromStr>::Err;
4401 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
4402 value.parse()
4403 }
4404}
4405impl ::std::convert::TryFrom<&String> for ChunkHash {
4406 type Error = <CryptoHash as ::std::str::FromStr>::Err;
4407 fn try_from(value: &String) -> ::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::fmt::Display for ChunkHash {
4418 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4419 self.0.fmt(f)
4420 }
4421}
4422#[doc = "Contains main info about the chunk."]
4423#[doc = r""]
4424#[doc = r" <details><summary>JSON schema</summary>"]
4425#[doc = r""]
4426#[doc = r" ```json"]
4427#[doc = "{"]
4428#[doc = " \"description\": \"Contains main info about the chunk.\","]
4429#[doc = " \"type\": \"object\","]
4430#[doc = " \"required\": ["]
4431#[doc = " \"balance_burnt\","]
4432#[doc = " \"chunk_hash\","]
4433#[doc = " \"encoded_length\","]
4434#[doc = " \"encoded_merkle_root\","]
4435#[doc = " \"gas_limit\","]
4436#[doc = " \"gas_used\","]
4437#[doc = " \"height_created\","]
4438#[doc = " \"height_included\","]
4439#[doc = " \"outcome_root\","]
4440#[doc = " \"outgoing_receipts_root\","]
4441#[doc = " \"prev_block_hash\","]
4442#[doc = " \"prev_state_root\","]
4443#[doc = " \"shard_id\","]
4444#[doc = " \"signature\","]
4445#[doc = " \"tx_root\","]
4446#[doc = " \"validator_proposals\""]
4447#[doc = " ],"]
4448#[doc = " \"properties\": {"]
4449#[doc = " \"balance_burnt\": {"]
4450#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
4451#[doc = " },"]
4452#[doc = " \"bandwidth_requests\": {"]
4453#[doc = " \"anyOf\": ["]
4454#[doc = " {"]
4455#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequests\""]
4456#[doc = " },"]
4457#[doc = " {"]
4458#[doc = " \"type\": \"null\""]
4459#[doc = " }"]
4460#[doc = " ]"]
4461#[doc = " },"]
4462#[doc = " \"chunk_hash\": {"]
4463#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4464#[doc = " },"]
4465#[doc = " \"congestion_info\": {"]
4466#[doc = " \"anyOf\": ["]
4467#[doc = " {"]
4468#[doc = " \"$ref\": \"#/components/schemas/CongestionInfoView\""]
4469#[doc = " },"]
4470#[doc = " {"]
4471#[doc = " \"type\": \"null\""]
4472#[doc = " }"]
4473#[doc = " ]"]
4474#[doc = " },"]
4475#[doc = " \"encoded_length\": {"]
4476#[doc = " \"type\": \"integer\","]
4477#[doc = " \"format\": \"uint64\","]
4478#[doc = " \"minimum\": 0.0"]
4479#[doc = " },"]
4480#[doc = " \"encoded_merkle_root\": {"]
4481#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4482#[doc = " },"]
4483#[doc = " \"gas_limit\": {"]
4484#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
4485#[doc = " },"]
4486#[doc = " \"gas_used\": {"]
4487#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
4488#[doc = " },"]
4489#[doc = " \"height_created\": {"]
4490#[doc = " \"type\": \"integer\","]
4491#[doc = " \"format\": \"uint64\","]
4492#[doc = " \"minimum\": 0.0"]
4493#[doc = " },"]
4494#[doc = " \"height_included\": {"]
4495#[doc = " \"type\": \"integer\","]
4496#[doc = " \"format\": \"uint64\","]
4497#[doc = " \"minimum\": 0.0"]
4498#[doc = " },"]
4499#[doc = " \"outcome_root\": {"]
4500#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4501#[doc = " },"]
4502#[doc = " \"outgoing_receipts_root\": {"]
4503#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4504#[doc = " },"]
4505#[doc = " \"prev_block_hash\": {"]
4506#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4507#[doc = " },"]
4508#[doc = " \"prev_state_root\": {"]
4509#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4510#[doc = " },"]
4511#[doc = " \"rent_paid\": {"]
4512#[doc = " \"description\": \"TODO(2271): deprecated.\","]
4513#[doc = " \"default\": \"0\","]
4514#[doc = " \"allOf\": ["]
4515#[doc = " {"]
4516#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
4517#[doc = " }"]
4518#[doc = " ]"]
4519#[doc = " },"]
4520#[doc = " \"shard_id\": {"]
4521#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
4522#[doc = " },"]
4523#[doc = " \"signature\": {"]
4524#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
4525#[doc = " },"]
4526#[doc = " \"tx_root\": {"]
4527#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4528#[doc = " },"]
4529#[doc = " \"validator_proposals\": {"]
4530#[doc = " \"type\": \"array\","]
4531#[doc = " \"items\": {"]
4532#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
4533#[doc = " }"]
4534#[doc = " },"]
4535#[doc = " \"validator_reward\": {"]
4536#[doc = " \"description\": \"TODO(2271): deprecated.\","]
4537#[doc = " \"default\": \"0\","]
4538#[doc = " \"allOf\": ["]
4539#[doc = " {"]
4540#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
4541#[doc = " }"]
4542#[doc = " ]"]
4543#[doc = " }"]
4544#[doc = " }"]
4545#[doc = "}"]
4546#[doc = r" ```"]
4547#[doc = r" </details>"]
4548#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4549pub struct ChunkHeaderView {
4550 pub balance_burnt: NearToken,
4551 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4552 pub bandwidth_requests: ::std::option::Option<BandwidthRequests>,
4553 pub chunk_hash: CryptoHash,
4554 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4555 pub congestion_info: ::std::option::Option<CongestionInfoView>,
4556 pub encoded_length: u64,
4557 pub encoded_merkle_root: CryptoHash,
4558 pub gas_limit: NearGas,
4559 pub gas_used: NearGas,
4560 pub height_created: u64,
4561 pub height_included: u64,
4562 pub outcome_root: CryptoHash,
4563 pub outgoing_receipts_root: CryptoHash,
4564 pub prev_block_hash: CryptoHash,
4565 pub prev_state_root: CryptoHash,
4566 #[doc = "TODO(2271): deprecated."]
4567 #[serde(default = "defaults::chunk_header_view_rent_paid")]
4568 pub rent_paid: NearToken,
4569 pub shard_id: ShardId,
4570 pub signature: Signature,
4571 pub tx_root: CryptoHash,
4572 pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
4573 #[doc = "TODO(2271): deprecated."]
4574 #[serde(default = "defaults::chunk_header_view_validator_reward")]
4575 pub validator_reward: NearToken,
4576}
4577impl ::std::convert::From<&ChunkHeaderView> for ChunkHeaderView {
4578 fn from(value: &ChunkHeaderView) -> Self {
4579 value.clone()
4580 }
4581}
4582#[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."]
4583#[doc = r""]
4584#[doc = r" <details><summary>JSON schema</summary>"]
4585#[doc = r""]
4586#[doc = r" ```json"]
4587#[doc = "{"]
4588#[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.\","]
4589#[doc = " \"type\": \"object\","]
4590#[doc = " \"properties\": {"]
4591#[doc = " \"archive_block_data\": {"]
4592#[doc = " \"description\": \"Determines whether block-related data should be written to cloud storage.\","]
4593#[doc = " \"default\": false,"]
4594#[doc = " \"type\": \"boolean\""]
4595#[doc = " },"]
4596#[doc = " \"polling_interval\": {"]
4597#[doc = " \"description\": \"Interval at which the system checks for new blocks or chunks to archive.\","]
4598#[doc = " \"default\": {"]
4599#[doc = " \"nanos\": 0,"]
4600#[doc = " \"secs\": 1"]
4601#[doc = " },"]
4602#[doc = " \"allOf\": ["]
4603#[doc = " {"]
4604#[doc = " \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
4605#[doc = " }"]
4606#[doc = " ]"]
4607#[doc = " }"]
4608#[doc = " }"]
4609#[doc = "}"]
4610#[doc = r" ```"]
4611#[doc = r" </details>"]
4612#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4613pub struct CloudArchivalWriterConfig {
4614 #[doc = "Determines whether block-related data should be written to cloud storage."]
4615 #[serde(default)]
4616 pub archive_block_data: bool,
4617 #[doc = "Interval at which the system checks for new blocks or chunks to archive."]
4618 #[serde(default = "defaults::cloud_archival_writer_config_polling_interval")]
4619 pub polling_interval: DurationAsStdSchemaProvider,
4620}
4621impl ::std::convert::From<&CloudArchivalWriterConfig> for CloudArchivalWriterConfig {
4622 fn from(value: &CloudArchivalWriterConfig) -> Self {
4623 value.clone()
4624 }
4625}
4626impl ::std::default::Default for CloudArchivalWriterConfig {
4627 fn default() -> Self {
4628 Self {
4629 archive_block_data: Default::default(),
4630 polling_interval: defaults::cloud_archival_writer_config_polling_interval(),
4631 }
4632 }
4633}
4634#[doc = "`CompilationError`"]
4635#[doc = r""]
4636#[doc = r" <details><summary>JSON schema</summary>"]
4637#[doc = r""]
4638#[doc = r" ```json"]
4639#[doc = "{"]
4640#[doc = " \"oneOf\": ["]
4641#[doc = " {"]
4642#[doc = " \"type\": \"object\","]
4643#[doc = " \"required\": ["]
4644#[doc = " \"CodeDoesNotExist\""]
4645#[doc = " ],"]
4646#[doc = " \"properties\": {"]
4647#[doc = " \"CodeDoesNotExist\": {"]
4648#[doc = " \"type\": \"object\","]
4649#[doc = " \"required\": ["]
4650#[doc = " \"account_id\""]
4651#[doc = " ],"]
4652#[doc = " \"properties\": {"]
4653#[doc = " \"account_id\": {"]
4654#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
4655#[doc = " }"]
4656#[doc = " }"]
4657#[doc = " }"]
4658#[doc = " },"]
4659#[doc = " \"additionalProperties\": false"]
4660#[doc = " },"]
4661#[doc = " {"]
4662#[doc = " \"type\": \"object\","]
4663#[doc = " \"required\": ["]
4664#[doc = " \"PrepareError\""]
4665#[doc = " ],"]
4666#[doc = " \"properties\": {"]
4667#[doc = " \"PrepareError\": {"]
4668#[doc = " \"$ref\": \"#/components/schemas/PrepareError\""]
4669#[doc = " }"]
4670#[doc = " },"]
4671#[doc = " \"additionalProperties\": false"]
4672#[doc = " },"]
4673#[doc = " {"]
4674#[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\","]
4675#[doc = " \"type\": \"object\","]
4676#[doc = " \"required\": ["]
4677#[doc = " \"WasmerCompileError\""]
4678#[doc = " ],"]
4679#[doc = " \"properties\": {"]
4680#[doc = " \"WasmerCompileError\": {"]
4681#[doc = " \"type\": \"object\","]
4682#[doc = " \"required\": ["]
4683#[doc = " \"msg\""]
4684#[doc = " ],"]
4685#[doc = " \"properties\": {"]
4686#[doc = " \"msg\": {"]
4687#[doc = " \"type\": \"string\""]
4688#[doc = " }"]
4689#[doc = " }"]
4690#[doc = " }"]
4691#[doc = " },"]
4692#[doc = " \"additionalProperties\": false"]
4693#[doc = " }"]
4694#[doc = " ]"]
4695#[doc = "}"]
4696#[doc = r" ```"]
4697#[doc = r" </details>"]
4698#[derive(
4699 :: serde :: Deserialize,
4700 :: serde :: Serialize,
4701 Clone,
4702 Debug,
4703 thiserror::Error,
4704 strum_macros::Display,
4705)]
4706pub enum CompilationError {
4707 CodeDoesNotExist {
4708 account_id: AccountId,
4709 },
4710 PrepareError(PrepareError),
4711 #[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"]
4712 WasmerCompileError {
4713 msg: ::std::string::String,
4714 },
4715}
4716impl ::std::convert::From<&Self> for CompilationError {
4717 fn from(value: &CompilationError) -> Self {
4718 value.clone()
4719 }
4720}
4721impl ::std::convert::From<PrepareError> for CompilationError {
4722 fn from(value: PrepareError) -> Self {
4723 Self::PrepareError(value)
4724 }
4725}
4726#[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)"]
4727#[doc = r""]
4728#[doc = r" <details><summary>JSON schema</summary>"]
4729#[doc = r""]
4730#[doc = r" ```json"]
4731#[doc = "{"]
4732#[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)\","]
4733#[doc = " \"type\": \"object\","]
4734#[doc = " \"required\": ["]
4735#[doc = " \"allowed_shard_outgoing_gas\","]
4736#[doc = " \"max_congestion_incoming_gas\","]
4737#[doc = " \"max_congestion_memory_consumption\","]
4738#[doc = " \"max_congestion_missed_chunks\","]
4739#[doc = " \"max_congestion_outgoing_gas\","]
4740#[doc = " \"max_outgoing_gas\","]
4741#[doc = " \"max_tx_gas\","]
4742#[doc = " \"min_outgoing_gas\","]
4743#[doc = " \"min_tx_gas\","]
4744#[doc = " \"outgoing_receipts_big_size_limit\","]
4745#[doc = " \"outgoing_receipts_usual_size_limit\","]
4746#[doc = " \"reject_tx_congestion_threshold\""]
4747#[doc = " ],"]
4748#[doc = " \"properties\": {"]
4749#[doc = " \"allowed_shard_outgoing_gas\": {"]
4750#[doc = " \"description\": \"How much gas the chosen allowed shard can send to a 100% congested shard.\\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_incoming_gas\": {"]
4758#[doc = " \"description\": \"How much gas in delayed receipts of a shard is 100% incoming congestion.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4759#[doc = " \"allOf\": ["]
4760#[doc = " {"]
4761#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
4762#[doc = " }"]
4763#[doc = " ]"]
4764#[doc = " },"]
4765#[doc = " \"max_congestion_memory_consumption\": {"]
4766#[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.\","]
4767#[doc = " \"type\": \"integer\","]
4768#[doc = " \"format\": \"uint64\","]
4769#[doc = " \"minimum\": 0.0"]
4770#[doc = " },"]
4771#[doc = " \"max_congestion_missed_chunks\": {"]
4772#[doc = " \"description\": \"How many missed chunks in a row in a shard is considered 100% congested.\","]
4773#[doc = " \"type\": \"integer\","]
4774#[doc = " \"format\": \"uint64\","]
4775#[doc = " \"minimum\": 0.0"]
4776#[doc = " },"]
4777#[doc = " \"max_congestion_outgoing_gas\": {"]
4778#[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.\","]
4779#[doc = " \"allOf\": ["]
4780#[doc = " {"]
4781#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
4782#[doc = " }"]
4783#[doc = " ]"]
4784#[doc = " },"]
4785#[doc = " \"max_outgoing_gas\": {"]
4786#[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.\","]
4787#[doc = " \"allOf\": ["]
4788#[doc = " {"]
4789#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
4790#[doc = " }"]
4791#[doc = " ]"]
4792#[doc = " },"]
4793#[doc = " \"max_tx_gas\": {"]
4794#[doc = " \"description\": \"The maximum amount of gas in a chunk spent on converting new transactions to\\nreceipts.\\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_outgoing_gas\": {"]
4802#[doc = " \"description\": \"The minimum gas each shard can send to a shard that is not fully 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 = " \"min_tx_gas\": {"]
4810#[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.\","]
4811#[doc = " \"allOf\": ["]
4812#[doc = " {"]
4813#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
4814#[doc = " }"]
4815#[doc = " ]"]
4816#[doc = " },"]
4817#[doc = " \"outgoing_receipts_big_size_limit\": {"]
4818#[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.\","]
4819#[doc = " \"type\": \"integer\","]
4820#[doc = " \"format\": \"uint64\","]
4821#[doc = " \"minimum\": 0.0"]
4822#[doc = " },"]
4823#[doc = " \"outgoing_receipts_usual_size_limit\": {"]
4824#[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.\","]
4825#[doc = " \"type\": \"integer\","]
4826#[doc = " \"format\": \"uint64\","]
4827#[doc = " \"minimum\": 0.0"]
4828#[doc = " },"]
4829#[doc = " \"reject_tx_congestion_threshold\": {"]
4830#[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.\","]
4831#[doc = " \"type\": \"number\","]
4832#[doc = " \"format\": \"double\""]
4833#[doc = " }"]
4834#[doc = " }"]
4835#[doc = "}"]
4836#[doc = r" ```"]
4837#[doc = r" </details>"]
4838#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4839pub struct CongestionControlConfigView {
4840 #[doc = "How much gas the chosen allowed shard can send to a 100% congested shard.\n\nSee [`CongestionControlConfig`] for more details."]
4841 pub allowed_shard_outgoing_gas: NearGas,
4842 #[doc = "How much gas in delayed receipts of a shard is 100% incoming congestion.\n\nSee [`CongestionControlConfig`] for more details."]
4843 pub max_congestion_incoming_gas: NearGas,
4844 #[doc = "How much memory space of all delayed and buffered receipts in a shard is\nconsidered 100% congested.\n\nSee [`CongestionControlConfig`] for more details."]
4845 pub max_congestion_memory_consumption: u64,
4846 #[doc = "How many missed chunks in a row in a shard is considered 100% congested."]
4847 pub max_congestion_missed_chunks: u64,
4848 #[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."]
4849 pub max_congestion_outgoing_gas: NearGas,
4850 #[doc = "The maximum amount of gas attached to receipts a shard can forward to\nanother shard per chunk.\n\nSee [`CongestionControlConfig`] for more details."]
4851 pub max_outgoing_gas: NearGas,
4852 #[doc = "The maximum amount of gas in a chunk spent on converting new transactions to\nreceipts.\n\nSee [`CongestionControlConfig`] for more details."]
4853 pub max_tx_gas: NearGas,
4854 #[doc = "The minimum gas each shard can send to a shard that is not fully congested.\n\nSee [`CongestionControlConfig`] for more details."]
4855 pub min_outgoing_gas: 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 pub min_tx_gas: NearGas,
4858 #[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."]
4859 pub outgoing_receipts_big_size_limit: u64,
4860 #[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."]
4861 pub outgoing_receipts_usual_size_limit: u64,
4862 pub reject_tx_congestion_threshold: f64,
4863}
4864impl ::std::convert::From<&CongestionControlConfigView> for CongestionControlConfigView {
4865 fn from(value: &CongestionControlConfigView) -> Self {
4866 value.clone()
4867 }
4868}
4869#[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)"]
4870#[doc = r""]
4871#[doc = r" <details><summary>JSON schema</summary>"]
4872#[doc = r""]
4873#[doc = r" ```json"]
4874#[doc = "{"]
4875#[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)\","]
4876#[doc = " \"type\": \"object\","]
4877#[doc = " \"required\": ["]
4878#[doc = " \"allowed_shard\","]
4879#[doc = " \"buffered_receipts_gas\","]
4880#[doc = " \"delayed_receipts_gas\","]
4881#[doc = " \"receipt_bytes\""]
4882#[doc = " ],"]
4883#[doc = " \"properties\": {"]
4884#[doc = " \"allowed_shard\": {"]
4885#[doc = " \"type\": \"integer\","]
4886#[doc = " \"format\": \"uint16\","]
4887#[doc = " \"maximum\": 65535.0,"]
4888#[doc = " \"minimum\": 0.0"]
4889#[doc = " },"]
4890#[doc = " \"buffered_receipts_gas\": {"]
4891#[doc = " \"type\": \"string\""]
4892#[doc = " },"]
4893#[doc = " \"delayed_receipts_gas\": {"]
4894#[doc = " \"type\": \"string\""]
4895#[doc = " },"]
4896#[doc = " \"receipt_bytes\": {"]
4897#[doc = " \"type\": \"integer\","]
4898#[doc = " \"format\": \"uint64\","]
4899#[doc = " \"minimum\": 0.0"]
4900#[doc = " }"]
4901#[doc = " }"]
4902#[doc = "}"]
4903#[doc = r" ```"]
4904#[doc = r" </details>"]
4905#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4906pub struct CongestionInfoView {
4907 pub allowed_shard: u16,
4908 pub buffered_receipts_gas: ::std::string::String,
4909 pub delayed_receipts_gas: ::std::string::String,
4910 pub receipt_bytes: u64,
4911}
4912impl ::std::convert::From<&CongestionInfoView> for CongestionInfoView {
4913 fn from(value: &CongestionInfoView) -> Self {
4914 value.clone()
4915 }
4916}
4917#[doc = "`ContractCodeChangesByBlockIdChangesType`"]
4918#[doc = r""]
4919#[doc = r" <details><summary>JSON schema</summary>"]
4920#[doc = r""]
4921#[doc = r" ```json"]
4922#[doc = "{"]
4923#[doc = " \"type\": \"string\","]
4924#[doc = " \"enum\": ["]
4925#[doc = " \"contract_code_changes\""]
4926#[doc = " ]"]
4927#[doc = "}"]
4928#[doc = r" ```"]
4929#[doc = r" </details>"]
4930#[derive(
4931 :: serde :: Deserialize,
4932 :: serde :: Serialize,
4933 Clone,
4934 Copy,
4935 Debug,
4936 Eq,
4937 Hash,
4938 Ord,
4939 PartialEq,
4940 PartialOrd,
4941)]
4942pub enum ContractCodeChangesByBlockIdChangesType {
4943 #[serde(rename = "contract_code_changes")]
4944 ContractCodeChanges,
4945}
4946impl ::std::convert::From<&Self> for ContractCodeChangesByBlockIdChangesType {
4947 fn from(value: &ContractCodeChangesByBlockIdChangesType) -> Self {
4948 value.clone()
4949 }
4950}
4951impl ::std::fmt::Display for ContractCodeChangesByBlockIdChangesType {
4952 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4953 match *self {
4954 Self::ContractCodeChanges => f.write_str("contract_code_changes"),
4955 }
4956 }
4957}
4958impl ::std::str::FromStr for ContractCodeChangesByBlockIdChangesType {
4959 type Err = self::error::ConversionError;
4960 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4961 match value {
4962 "contract_code_changes" => Ok(Self::ContractCodeChanges),
4963 _ => Err("invalid value".into()),
4964 }
4965 }
4966}
4967impl ::std::convert::TryFrom<&str> for ContractCodeChangesByBlockIdChangesType {
4968 type Error = self::error::ConversionError;
4969 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4970 value.parse()
4971 }
4972}
4973impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4974 type Error = self::error::ConversionError;
4975 fn try_from(
4976 value: &::std::string::String,
4977 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4978 value.parse()
4979 }
4980}
4981impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4982 type Error = self::error::ConversionError;
4983 fn try_from(
4984 value: ::std::string::String,
4985 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4986 value.parse()
4987 }
4988}
4989#[doc = "`ContractCodeChangesByFinalityChangesType`"]
4990#[doc = r""]
4991#[doc = r" <details><summary>JSON schema</summary>"]
4992#[doc = r""]
4993#[doc = r" ```json"]
4994#[doc = "{"]
4995#[doc = " \"type\": \"string\","]
4996#[doc = " \"enum\": ["]
4997#[doc = " \"contract_code_changes\""]
4998#[doc = " ]"]
4999#[doc = "}"]
5000#[doc = r" ```"]
5001#[doc = r" </details>"]
5002#[derive(
5003 :: serde :: Deserialize,
5004 :: serde :: Serialize,
5005 Clone,
5006 Copy,
5007 Debug,
5008 Eq,
5009 Hash,
5010 Ord,
5011 PartialEq,
5012 PartialOrd,
5013)]
5014pub enum ContractCodeChangesByFinalityChangesType {
5015 #[serde(rename = "contract_code_changes")]
5016 ContractCodeChanges,
5017}
5018impl ::std::convert::From<&Self> for ContractCodeChangesByFinalityChangesType {
5019 fn from(value: &ContractCodeChangesByFinalityChangesType) -> Self {
5020 value.clone()
5021 }
5022}
5023impl ::std::fmt::Display for ContractCodeChangesByFinalityChangesType {
5024 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5025 match *self {
5026 Self::ContractCodeChanges => f.write_str("contract_code_changes"),
5027 }
5028 }
5029}
5030impl ::std::str::FromStr for ContractCodeChangesByFinalityChangesType {
5031 type Err = self::error::ConversionError;
5032 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5033 match value {
5034 "contract_code_changes" => Ok(Self::ContractCodeChanges),
5035 _ => Err("invalid value".into()),
5036 }
5037 }
5038}
5039impl ::std::convert::TryFrom<&str> for ContractCodeChangesByFinalityChangesType {
5040 type Error = self::error::ConversionError;
5041 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5042 value.parse()
5043 }
5044}
5045impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByFinalityChangesType {
5046 type Error = self::error::ConversionError;
5047 fn try_from(
5048 value: &::std::string::String,
5049 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5050 value.parse()
5051 }
5052}
5053impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByFinalityChangesType {
5054 type Error = self::error::ConversionError;
5055 fn try_from(
5056 value: ::std::string::String,
5057 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5058 value.parse()
5059 }
5060}
5061#[doc = "`ContractCodeChangesBySyncCheckpointChangesType`"]
5062#[doc = r""]
5063#[doc = r" <details><summary>JSON schema</summary>"]
5064#[doc = r""]
5065#[doc = r" ```json"]
5066#[doc = "{"]
5067#[doc = " \"type\": \"string\","]
5068#[doc = " \"enum\": ["]
5069#[doc = " \"contract_code_changes\""]
5070#[doc = " ]"]
5071#[doc = "}"]
5072#[doc = r" ```"]
5073#[doc = r" </details>"]
5074#[derive(
5075 :: serde :: Deserialize,
5076 :: serde :: Serialize,
5077 Clone,
5078 Copy,
5079 Debug,
5080 Eq,
5081 Hash,
5082 Ord,
5083 PartialEq,
5084 PartialOrd,
5085)]
5086pub enum ContractCodeChangesBySyncCheckpointChangesType {
5087 #[serde(rename = "contract_code_changes")]
5088 ContractCodeChanges,
5089}
5090impl ::std::convert::From<&Self> for ContractCodeChangesBySyncCheckpointChangesType {
5091 fn from(value: &ContractCodeChangesBySyncCheckpointChangesType) -> Self {
5092 value.clone()
5093 }
5094}
5095impl ::std::fmt::Display for ContractCodeChangesBySyncCheckpointChangesType {
5096 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5097 match *self {
5098 Self::ContractCodeChanges => f.write_str("contract_code_changes"),
5099 }
5100 }
5101}
5102impl ::std::str::FromStr for ContractCodeChangesBySyncCheckpointChangesType {
5103 type Err = self::error::ConversionError;
5104 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5105 match value {
5106 "contract_code_changes" => Ok(Self::ContractCodeChanges),
5107 _ => Err("invalid value".into()),
5108 }
5109 }
5110}
5111impl ::std::convert::TryFrom<&str> for ContractCodeChangesBySyncCheckpointChangesType {
5112 type Error = self::error::ConversionError;
5113 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5114 value.parse()
5115 }
5116}
5117impl ::std::convert::TryFrom<&::std::string::String>
5118 for ContractCodeChangesBySyncCheckpointChangesType
5119{
5120 type Error = self::error::ConversionError;
5121 fn try_from(
5122 value: &::std::string::String,
5123 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5124 value.parse()
5125 }
5126}
5127impl ::std::convert::TryFrom<::std::string::String>
5128 for ContractCodeChangesBySyncCheckpointChangesType
5129{
5130 type Error = self::error::ConversionError;
5131 fn try_from(
5132 value: ::std::string::String,
5133 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5134 value.parse()
5135 }
5136}
5137#[doc = "A view of the contract code."]
5138#[doc = r""]
5139#[doc = r" <details><summary>JSON schema</summary>"]
5140#[doc = r""]
5141#[doc = r" ```json"]
5142#[doc = "{"]
5143#[doc = " \"description\": \"A view of the contract code.\","]
5144#[doc = " \"type\": \"object\","]
5145#[doc = " \"required\": ["]
5146#[doc = " \"code_base64\","]
5147#[doc = " \"hash\""]
5148#[doc = " ],"]
5149#[doc = " \"properties\": {"]
5150#[doc = " \"code_base64\": {"]
5151#[doc = " \"type\": \"string\""]
5152#[doc = " },"]
5153#[doc = " \"hash\": {"]
5154#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
5155#[doc = " }"]
5156#[doc = " }"]
5157#[doc = "}"]
5158#[doc = r" ```"]
5159#[doc = r" </details>"]
5160#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5161pub struct ContractCodeView {
5162 pub code_base64: ::std::string::String,
5163 pub hash: CryptoHash,
5164}
5165impl ::std::convert::From<&ContractCodeView> for ContractCodeView {
5166 fn from(value: &ContractCodeView) -> Self {
5167 value.clone()
5168 }
5169}
5170#[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)."]
5171#[doc = r""]
5172#[doc = r" <details><summary>JSON schema</summary>"]
5173#[doc = r""]
5174#[doc = r" ```json"]
5175#[doc = "{"]
5176#[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).\","]
5177#[doc = " \"type\": \"object\","]
5178#[doc = " \"required\": ["]
5179#[doc = " \"cost\","]
5180#[doc = " \"cost_category\","]
5181#[doc = " \"gas_used\""]
5182#[doc = " ],"]
5183#[doc = " \"properties\": {"]
5184#[doc = " \"cost\": {"]
5185#[doc = " \"type\": \"string\""]
5186#[doc = " },"]
5187#[doc = " \"cost_category\": {"]
5188#[doc = " \"description\": \"Either ACTION_COST or WASM_HOST_COST.\","]
5189#[doc = " \"type\": \"string\""]
5190#[doc = " },"]
5191#[doc = " \"gas_used\": {"]
5192#[doc = " \"type\": \"string\""]
5193#[doc = " }"]
5194#[doc = " }"]
5195#[doc = "}"]
5196#[doc = r" ```"]
5197#[doc = r" </details>"]
5198#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5199pub struct CostGasUsed {
5200 pub cost: ::std::string::String,
5201 #[doc = "Either ACTION_COST or WASM_HOST_COST."]
5202 pub cost_category: ::std::string::String,
5203 pub gas_used: ::std::string::String,
5204}
5205impl ::std::convert::From<&CostGasUsed> for CostGasUsed {
5206 fn from(value: &CostGasUsed) -> Self {
5207 value.clone()
5208 }
5209}
5210#[doc = "Create account action"]
5211#[doc = r""]
5212#[doc = r" <details><summary>JSON schema</summary>"]
5213#[doc = r""]
5214#[doc = r" ```json"]
5215#[doc = "{"]
5216#[doc = " \"description\": \"Create account action\","]
5217#[doc = " \"type\": \"object\""]
5218#[doc = "}"]
5219#[doc = r" ```"]
5220#[doc = r" </details>"]
5221#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5222#[serde(transparent)]
5223pub struct CreateAccountAction(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
5224impl ::std::ops::Deref for CreateAccountAction {
5225 type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
5226 fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
5227 &self.0
5228 }
5229}
5230impl ::std::convert::From<CreateAccountAction>
5231 for ::serde_json::Map<::std::string::String, ::serde_json::Value>
5232{
5233 fn from(value: CreateAccountAction) -> Self {
5234 value.0
5235 }
5236}
5237impl ::std::convert::From<&CreateAccountAction> for CreateAccountAction {
5238 fn from(value: &CreateAccountAction) -> Self {
5239 value.clone()
5240 }
5241}
5242impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
5243 for CreateAccountAction
5244{
5245 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
5246 Self(value)
5247 }
5248}
5249#[doc = "`CryptoHash`"]
5250#[doc = r""]
5251#[doc = r" <details><summary>JSON schema</summary>"]
5252#[doc = r""]
5253#[doc = r" ```json"]
5254#[doc = "{"]
5255#[doc = " \"type\": \"string\""]
5256#[doc = "}"]
5257#[doc = r" ```"]
5258#[doc = r" </details>"]
5259#[derive(
5260 :: serde :: Deserialize,
5261 :: serde :: Serialize,
5262 Clone,
5263 Debug,
5264 Eq,
5265 Hash,
5266 Ord,
5267 PartialEq,
5268 PartialOrd,
5269)]
5270#[serde(transparent)]
5271pub struct CryptoHash(pub ::std::string::String);
5272impl ::std::ops::Deref for CryptoHash {
5273 type Target = ::std::string::String;
5274 fn deref(&self) -> &::std::string::String {
5275 &self.0
5276 }
5277}
5278impl ::std::convert::From<CryptoHash> for ::std::string::String {
5279 fn from(value: CryptoHash) -> Self {
5280 value.0
5281 }
5282}
5283impl ::std::convert::From<&CryptoHash> for CryptoHash {
5284 fn from(value: &CryptoHash) -> Self {
5285 value.clone()
5286 }
5287}
5288impl ::std::convert::From<::std::string::String> for CryptoHash {
5289 fn from(value: ::std::string::String) -> Self {
5290 Self(value)
5291 }
5292}
5293impl ::std::str::FromStr for CryptoHash {
5294 type Err = ::std::convert::Infallible;
5295 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
5296 Ok(Self(value.to_string()))
5297 }
5298}
5299impl ::std::fmt::Display for CryptoHash {
5300 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5301 self.0.fmt(f)
5302 }
5303}
5304#[doc = "Describes information about the current epoch validator"]
5305#[doc = r""]
5306#[doc = r" <details><summary>JSON schema</summary>"]
5307#[doc = r""]
5308#[doc = r" ```json"]
5309#[doc = "{"]
5310#[doc = " \"description\": \"Describes information about the current epoch validator\","]
5311#[doc = " \"type\": \"object\","]
5312#[doc = " \"required\": ["]
5313#[doc = " \"account_id\","]
5314#[doc = " \"is_slashed\","]
5315#[doc = " \"num_expected_blocks\","]
5316#[doc = " \"num_produced_blocks\","]
5317#[doc = " \"public_key\","]
5318#[doc = " \"shards\","]
5319#[doc = " \"stake\""]
5320#[doc = " ],"]
5321#[doc = " \"properties\": {"]
5322#[doc = " \"account_id\": {"]
5323#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5324#[doc = " },"]
5325#[doc = " \"is_slashed\": {"]
5326#[doc = " \"type\": \"boolean\""]
5327#[doc = " },"]
5328#[doc = " \"num_expected_blocks\": {"]
5329#[doc = " \"type\": \"integer\","]
5330#[doc = " \"format\": \"uint64\","]
5331#[doc = " \"minimum\": 0.0"]
5332#[doc = " },"]
5333#[doc = " \"num_expected_chunks\": {"]
5334#[doc = " \"default\": 0,"]
5335#[doc = " \"type\": \"integer\","]
5336#[doc = " \"format\": \"uint64\","]
5337#[doc = " \"minimum\": 0.0"]
5338#[doc = " },"]
5339#[doc = " \"num_expected_chunks_per_shard\": {"]
5340#[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.\","]
5341#[doc = " \"default\": [],"]
5342#[doc = " \"type\": \"array\","]
5343#[doc = " \"items\": {"]
5344#[doc = " \"type\": \"integer\","]
5345#[doc = " \"format\": \"uint64\","]
5346#[doc = " \"minimum\": 0.0"]
5347#[doc = " }"]
5348#[doc = " },"]
5349#[doc = " \"num_expected_endorsements\": {"]
5350#[doc = " \"default\": 0,"]
5351#[doc = " \"type\": \"integer\","]
5352#[doc = " \"format\": \"uint64\","]
5353#[doc = " \"minimum\": 0.0"]
5354#[doc = " },"]
5355#[doc = " \"num_expected_endorsements_per_shard\": {"]
5356#[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.\","]
5357#[doc = " \"default\": [],"]
5358#[doc = " \"type\": \"array\","]
5359#[doc = " \"items\": {"]
5360#[doc = " \"type\": \"integer\","]
5361#[doc = " \"format\": \"uint64\","]
5362#[doc = " \"minimum\": 0.0"]
5363#[doc = " }"]
5364#[doc = " },"]
5365#[doc = " \"num_produced_blocks\": {"]
5366#[doc = " \"type\": \"integer\","]
5367#[doc = " \"format\": \"uint64\","]
5368#[doc = " \"minimum\": 0.0"]
5369#[doc = " },"]
5370#[doc = " \"num_produced_chunks\": {"]
5371#[doc = " \"default\": 0,"]
5372#[doc = " \"type\": \"integer\","]
5373#[doc = " \"format\": \"uint64\","]
5374#[doc = " \"minimum\": 0.0"]
5375#[doc = " },"]
5376#[doc = " \"num_produced_chunks_per_shard\": {"]
5377#[doc = " \"default\": [],"]
5378#[doc = " \"type\": \"array\","]
5379#[doc = " \"items\": {"]
5380#[doc = " \"type\": \"integer\","]
5381#[doc = " \"format\": \"uint64\","]
5382#[doc = " \"minimum\": 0.0"]
5383#[doc = " }"]
5384#[doc = " },"]
5385#[doc = " \"num_produced_endorsements\": {"]
5386#[doc = " \"default\": 0,"]
5387#[doc = " \"type\": \"integer\","]
5388#[doc = " \"format\": \"uint64\","]
5389#[doc = " \"minimum\": 0.0"]
5390#[doc = " },"]
5391#[doc = " \"num_produced_endorsements_per_shard\": {"]
5392#[doc = " \"default\": [],"]
5393#[doc = " \"type\": \"array\","]
5394#[doc = " \"items\": {"]
5395#[doc = " \"type\": \"integer\","]
5396#[doc = " \"format\": \"uint64\","]
5397#[doc = " \"minimum\": 0.0"]
5398#[doc = " }"]
5399#[doc = " },"]
5400#[doc = " \"public_key\": {"]
5401#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
5402#[doc = " },"]
5403#[doc = " \"shards\": {"]
5404#[doc = " \"description\": \"Shards this validator is assigned to as chunk producer in the current epoch.\","]
5405#[doc = " \"type\": \"array\","]
5406#[doc = " \"items\": {"]
5407#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
5408#[doc = " }"]
5409#[doc = " },"]
5410#[doc = " \"shards_endorsed\": {"]
5411#[doc = " \"description\": \"Shards this validator is assigned to as chunk validator in the current epoch.\","]
5412#[doc = " \"default\": [],"]
5413#[doc = " \"type\": \"array\","]
5414#[doc = " \"items\": {"]
5415#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
5416#[doc = " }"]
5417#[doc = " },"]
5418#[doc = " \"stake\": {"]
5419#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
5420#[doc = " }"]
5421#[doc = " }"]
5422#[doc = "}"]
5423#[doc = r" ```"]
5424#[doc = r" </details>"]
5425#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5426pub struct CurrentEpochValidatorInfo {
5427 pub account_id: AccountId,
5428 pub is_slashed: bool,
5429 pub num_expected_blocks: u64,
5430 #[serde(default)]
5431 pub num_expected_chunks: u64,
5432 #[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."]
5433 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5434 pub num_expected_chunks_per_shard: ::std::vec::Vec<u64>,
5435 #[serde(default)]
5436 pub num_expected_endorsements: u64,
5437 #[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."]
5438 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5439 pub num_expected_endorsements_per_shard: ::std::vec::Vec<u64>,
5440 pub num_produced_blocks: u64,
5441 #[serde(default)]
5442 pub num_produced_chunks: u64,
5443 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5444 pub num_produced_chunks_per_shard: ::std::vec::Vec<u64>,
5445 #[serde(default)]
5446 pub num_produced_endorsements: u64,
5447 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5448 pub num_produced_endorsements_per_shard: ::std::vec::Vec<u64>,
5449 pub public_key: PublicKey,
5450 #[doc = "Shards this validator is assigned to as chunk producer in the current epoch."]
5451 pub shards: ::std::vec::Vec<ShardId>,
5452 #[doc = "Shards this validator is assigned to as chunk validator in the current epoch."]
5453 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5454 pub shards_endorsed: ::std::vec::Vec<ShardId>,
5455 pub stake: NearToken,
5456}
5457impl ::std::convert::From<&CurrentEpochValidatorInfo> for CurrentEpochValidatorInfo {
5458 fn from(value: &CurrentEpochValidatorInfo) -> Self {
5459 value.clone()
5460 }
5461}
5462#[doc = "`DataChangesByBlockIdChangesType`"]
5463#[doc = r""]
5464#[doc = r" <details><summary>JSON schema</summary>"]
5465#[doc = r""]
5466#[doc = r" ```json"]
5467#[doc = "{"]
5468#[doc = " \"type\": \"string\","]
5469#[doc = " \"enum\": ["]
5470#[doc = " \"data_changes\""]
5471#[doc = " ]"]
5472#[doc = "}"]
5473#[doc = r" ```"]
5474#[doc = r" </details>"]
5475#[derive(
5476 :: serde :: Deserialize,
5477 :: serde :: Serialize,
5478 Clone,
5479 Copy,
5480 Debug,
5481 Eq,
5482 Hash,
5483 Ord,
5484 PartialEq,
5485 PartialOrd,
5486)]
5487pub enum DataChangesByBlockIdChangesType {
5488 #[serde(rename = "data_changes")]
5489 DataChanges,
5490}
5491impl ::std::convert::From<&Self> for DataChangesByBlockIdChangesType {
5492 fn from(value: &DataChangesByBlockIdChangesType) -> Self {
5493 value.clone()
5494 }
5495}
5496impl ::std::fmt::Display for DataChangesByBlockIdChangesType {
5497 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5498 match *self {
5499 Self::DataChanges => f.write_str("data_changes"),
5500 }
5501 }
5502}
5503impl ::std::str::FromStr for DataChangesByBlockIdChangesType {
5504 type Err = self::error::ConversionError;
5505 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5506 match value {
5507 "data_changes" => Ok(Self::DataChanges),
5508 _ => Err("invalid value".into()),
5509 }
5510 }
5511}
5512impl ::std::convert::TryFrom<&str> for DataChangesByBlockIdChangesType {
5513 type Error = self::error::ConversionError;
5514 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5515 value.parse()
5516 }
5517}
5518impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByBlockIdChangesType {
5519 type Error = self::error::ConversionError;
5520 fn try_from(
5521 value: &::std::string::String,
5522 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5523 value.parse()
5524 }
5525}
5526impl ::std::convert::TryFrom<::std::string::String> for DataChangesByBlockIdChangesType {
5527 type Error = self::error::ConversionError;
5528 fn try_from(
5529 value: ::std::string::String,
5530 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5531 value.parse()
5532 }
5533}
5534#[doc = "`DataChangesByFinalityChangesType`"]
5535#[doc = r""]
5536#[doc = r" <details><summary>JSON schema</summary>"]
5537#[doc = r""]
5538#[doc = r" ```json"]
5539#[doc = "{"]
5540#[doc = " \"type\": \"string\","]
5541#[doc = " \"enum\": ["]
5542#[doc = " \"data_changes\""]
5543#[doc = " ]"]
5544#[doc = "}"]
5545#[doc = r" ```"]
5546#[doc = r" </details>"]
5547#[derive(
5548 :: serde :: Deserialize,
5549 :: serde :: Serialize,
5550 Clone,
5551 Copy,
5552 Debug,
5553 Eq,
5554 Hash,
5555 Ord,
5556 PartialEq,
5557 PartialOrd,
5558)]
5559pub enum DataChangesByFinalityChangesType {
5560 #[serde(rename = "data_changes")]
5561 DataChanges,
5562}
5563impl ::std::convert::From<&Self> for DataChangesByFinalityChangesType {
5564 fn from(value: &DataChangesByFinalityChangesType) -> Self {
5565 value.clone()
5566 }
5567}
5568impl ::std::fmt::Display for DataChangesByFinalityChangesType {
5569 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5570 match *self {
5571 Self::DataChanges => f.write_str("data_changes"),
5572 }
5573 }
5574}
5575impl ::std::str::FromStr for DataChangesByFinalityChangesType {
5576 type Err = self::error::ConversionError;
5577 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5578 match value {
5579 "data_changes" => Ok(Self::DataChanges),
5580 _ => Err("invalid value".into()),
5581 }
5582 }
5583}
5584impl ::std::convert::TryFrom<&str> for DataChangesByFinalityChangesType {
5585 type Error = self::error::ConversionError;
5586 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5587 value.parse()
5588 }
5589}
5590impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByFinalityChangesType {
5591 type Error = self::error::ConversionError;
5592 fn try_from(
5593 value: &::std::string::String,
5594 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5595 value.parse()
5596 }
5597}
5598impl ::std::convert::TryFrom<::std::string::String> for DataChangesByFinalityChangesType {
5599 type Error = self::error::ConversionError;
5600 fn try_from(
5601 value: ::std::string::String,
5602 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5603 value.parse()
5604 }
5605}
5606#[doc = "`DataChangesBySyncCheckpointChangesType`"]
5607#[doc = r""]
5608#[doc = r" <details><summary>JSON schema</summary>"]
5609#[doc = r""]
5610#[doc = r" ```json"]
5611#[doc = "{"]
5612#[doc = " \"type\": \"string\","]
5613#[doc = " \"enum\": ["]
5614#[doc = " \"data_changes\""]
5615#[doc = " ]"]
5616#[doc = "}"]
5617#[doc = r" ```"]
5618#[doc = r" </details>"]
5619#[derive(
5620 :: serde :: Deserialize,
5621 :: serde :: Serialize,
5622 Clone,
5623 Copy,
5624 Debug,
5625 Eq,
5626 Hash,
5627 Ord,
5628 PartialEq,
5629 PartialOrd,
5630)]
5631pub enum DataChangesBySyncCheckpointChangesType {
5632 #[serde(rename = "data_changes")]
5633 DataChanges,
5634}
5635impl ::std::convert::From<&Self> for DataChangesBySyncCheckpointChangesType {
5636 fn from(value: &DataChangesBySyncCheckpointChangesType) -> Self {
5637 value.clone()
5638 }
5639}
5640impl ::std::fmt::Display for DataChangesBySyncCheckpointChangesType {
5641 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5642 match *self {
5643 Self::DataChanges => f.write_str("data_changes"),
5644 }
5645 }
5646}
5647impl ::std::str::FromStr for DataChangesBySyncCheckpointChangesType {
5648 type Err = self::error::ConversionError;
5649 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5650 match value {
5651 "data_changes" => Ok(Self::DataChanges),
5652 _ => Err("invalid value".into()),
5653 }
5654 }
5655}
5656impl ::std::convert::TryFrom<&str> for DataChangesBySyncCheckpointChangesType {
5657 type Error = self::error::ConversionError;
5658 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5659 value.parse()
5660 }
5661}
5662impl ::std::convert::TryFrom<&::std::string::String> for DataChangesBySyncCheckpointChangesType {
5663 type Error = self::error::ConversionError;
5664 fn try_from(
5665 value: &::std::string::String,
5666 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5667 value.parse()
5668 }
5669}
5670impl ::std::convert::TryFrom<::std::string::String> for DataChangesBySyncCheckpointChangesType {
5671 type Error = self::error::ConversionError;
5672 fn try_from(
5673 value: ::std::string::String,
5674 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5675 value.parse()
5676 }
5677}
5678#[doc = "The fees settings for a data receipt creation"]
5679#[doc = r""]
5680#[doc = r" <details><summary>JSON schema</summary>"]
5681#[doc = r""]
5682#[doc = r" ```json"]
5683#[doc = "{"]
5684#[doc = " \"description\": \"The fees settings for a data receipt creation\","]
5685#[doc = " \"type\": \"object\","]
5686#[doc = " \"required\": ["]
5687#[doc = " \"base_cost\","]
5688#[doc = " \"cost_per_byte\""]
5689#[doc = " ],"]
5690#[doc = " \"properties\": {"]
5691#[doc = " \"base_cost\": {"]
5692#[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).\","]
5693#[doc = " \"allOf\": ["]
5694#[doc = " {"]
5695#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
5696#[doc = " }"]
5697#[doc = " ]"]
5698#[doc = " },"]
5699#[doc = " \"cost_per_byte\": {"]
5700#[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`.\","]
5701#[doc = " \"allOf\": ["]
5702#[doc = " {"]
5703#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
5704#[doc = " }"]
5705#[doc = " ]"]
5706#[doc = " }"]
5707#[doc = " }"]
5708#[doc = "}"]
5709#[doc = r" ```"]
5710#[doc = r" </details>"]
5711#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5712pub struct DataReceiptCreationConfigView {
5713 #[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)."]
5714 pub base_cost: Fee,
5715 #[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`."]
5716 pub cost_per_byte: Fee,
5717}
5718impl ::std::convert::From<&DataReceiptCreationConfigView> for DataReceiptCreationConfigView {
5719 fn from(value: &DataReceiptCreationConfigView) -> Self {
5720 value.clone()
5721 }
5722}
5723#[doc = "`DataReceiverView`"]
5724#[doc = r""]
5725#[doc = r" <details><summary>JSON schema</summary>"]
5726#[doc = r""]
5727#[doc = r" ```json"]
5728#[doc = "{"]
5729#[doc = " \"type\": \"object\","]
5730#[doc = " \"required\": ["]
5731#[doc = " \"data_id\","]
5732#[doc = " \"receiver_id\""]
5733#[doc = " ],"]
5734#[doc = " \"properties\": {"]
5735#[doc = " \"data_id\": {"]
5736#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
5737#[doc = " },"]
5738#[doc = " \"receiver_id\": {"]
5739#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5740#[doc = " }"]
5741#[doc = " }"]
5742#[doc = "}"]
5743#[doc = r" ```"]
5744#[doc = r" </details>"]
5745#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5746pub struct DataReceiverView {
5747 pub data_id: CryptoHash,
5748 pub receiver_id: AccountId,
5749}
5750impl ::std::convert::From<&DataReceiverView> for DataReceiverView {
5751 fn from(value: &DataReceiverView) -> Self {
5752 value.clone()
5753 }
5754}
5755#[doc = "This action allows to execute the inner actions behalf of the defined sender."]
5756#[doc = r""]
5757#[doc = r" <details><summary>JSON schema</summary>"]
5758#[doc = r""]
5759#[doc = r" ```json"]
5760#[doc = "{"]
5761#[doc = " \"description\": \"This action allows to execute the inner actions behalf of the defined sender.\","]
5762#[doc = " \"type\": \"object\","]
5763#[doc = " \"required\": ["]
5764#[doc = " \"actions\","]
5765#[doc = " \"max_block_height\","]
5766#[doc = " \"nonce\","]
5767#[doc = " \"public_key\","]
5768#[doc = " \"receiver_id\","]
5769#[doc = " \"sender_id\""]
5770#[doc = " ],"]
5771#[doc = " \"properties\": {"]
5772#[doc = " \"actions\": {"]
5773#[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.\","]
5774#[doc = " \"type\": \"array\","]
5775#[doc = " \"items\": {"]
5776#[doc = " \"$ref\": \"#/components/schemas/NonDelegateAction\""]
5777#[doc = " }"]
5778#[doc = " },"]
5779#[doc = " \"max_block_height\": {"]
5780#[doc = " \"description\": \"The maximal height of the block in the blockchain below which the given DelegateAction is valid.\","]
5781#[doc = " \"type\": \"integer\","]
5782#[doc = " \"format\": \"uint64\","]
5783#[doc = " \"minimum\": 0.0"]
5784#[doc = " },"]
5785#[doc = " \"nonce\": {"]
5786#[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.\","]
5787#[doc = " \"type\": \"integer\","]
5788#[doc = " \"format\": \"uint64\","]
5789#[doc = " \"minimum\": 0.0"]
5790#[doc = " },"]
5791#[doc = " \"public_key\": {"]
5792#[doc = " \"description\": \"Public key used to sign this delegated action.\","]
5793#[doc = " \"allOf\": ["]
5794#[doc = " {"]
5795#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
5796#[doc = " }"]
5797#[doc = " ]"]
5798#[doc = " },"]
5799#[doc = " \"receiver_id\": {"]
5800#[doc = " \"description\": \"Receiver of the delegated actions.\","]
5801#[doc = " \"allOf\": ["]
5802#[doc = " {"]
5803#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5804#[doc = " }"]
5805#[doc = " ]"]
5806#[doc = " },"]
5807#[doc = " \"sender_id\": {"]
5808#[doc = " \"description\": \"Signer of the delegated actions\","]
5809#[doc = " \"allOf\": ["]
5810#[doc = " {"]
5811#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5812#[doc = " }"]
5813#[doc = " ]"]
5814#[doc = " }"]
5815#[doc = " }"]
5816#[doc = "}"]
5817#[doc = r" ```"]
5818#[doc = r" </details>"]
5819#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5820pub struct DelegateAction {
5821 #[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."]
5822 pub actions: ::std::vec::Vec<NonDelegateAction>,
5823 #[doc = "The maximal height of the block in the blockchain below which the given DelegateAction is valid."]
5824 pub max_block_height: u64,
5825 #[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."]
5826 pub nonce: u64,
5827 #[doc = "Public key used to sign this delegated action."]
5828 pub public_key: PublicKey,
5829 #[doc = "Receiver of the delegated actions."]
5830 pub receiver_id: AccountId,
5831 #[doc = "Signer of the delegated actions"]
5832 pub sender_id: AccountId,
5833}
5834impl ::std::convert::From<&DelegateAction> for DelegateAction {
5835 fn from(value: &DelegateAction) -> Self {
5836 value.clone()
5837 }
5838}
5839#[doc = "`DeleteAccountAction`"]
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 = " \"beneficiary_id\""]
5848#[doc = " ],"]
5849#[doc = " \"properties\": {"]
5850#[doc = " \"beneficiary_id\": {"]
5851#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5852#[doc = " }"]
5853#[doc = " }"]
5854#[doc = "}"]
5855#[doc = r" ```"]
5856#[doc = r" </details>"]
5857#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5858pub struct DeleteAccountAction {
5859 pub beneficiary_id: AccountId,
5860}
5861impl ::std::convert::From<&DeleteAccountAction> for DeleteAccountAction {
5862 fn from(value: &DeleteAccountAction) -> Self {
5863 value.clone()
5864 }
5865}
5866#[doc = "`DeleteGasKeyAction`"]
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 = " \"$ref\": \"#/components/schemas/PublicKey\""]
5879#[doc = " }"]
5880#[doc = " }"]
5881#[doc = "}"]
5882#[doc = r" ```"]
5883#[doc = r" </details>"]
5884#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5885pub struct DeleteGasKeyAction {
5886 pub public_key: PublicKey,
5887}
5888impl ::std::convert::From<&DeleteGasKeyAction> for DeleteGasKeyAction {
5889 fn from(value: &DeleteGasKeyAction) -> Self {
5890 value.clone()
5891 }
5892}
5893#[doc = "`DeleteKeyAction`"]
5894#[doc = r""]
5895#[doc = r" <details><summary>JSON schema</summary>"]
5896#[doc = r""]
5897#[doc = r" ```json"]
5898#[doc = "{"]
5899#[doc = " \"type\": \"object\","]
5900#[doc = " \"required\": ["]
5901#[doc = " \"public_key\""]
5902#[doc = " ],"]
5903#[doc = " \"properties\": {"]
5904#[doc = " \"public_key\": {"]
5905#[doc = " \"description\": \"A public key associated with the access_key to be deleted.\","]
5906#[doc = " \"allOf\": ["]
5907#[doc = " {"]
5908#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
5909#[doc = " }"]
5910#[doc = " ]"]
5911#[doc = " }"]
5912#[doc = " }"]
5913#[doc = "}"]
5914#[doc = r" ```"]
5915#[doc = r" </details>"]
5916#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5917pub struct DeleteKeyAction {
5918 #[doc = "A public key associated with the access_key to be deleted."]
5919 pub public_key: PublicKey,
5920}
5921impl ::std::convert::From<&DeleteKeyAction> for DeleteKeyAction {
5922 fn from(value: &DeleteKeyAction) -> Self {
5923 value.clone()
5924 }
5925}
5926#[doc = "Deploy contract action"]
5927#[doc = r""]
5928#[doc = r" <details><summary>JSON schema</summary>"]
5929#[doc = r""]
5930#[doc = r" ```json"]
5931#[doc = "{"]
5932#[doc = " \"description\": \"Deploy contract action\","]
5933#[doc = " \"type\": \"object\","]
5934#[doc = " \"required\": ["]
5935#[doc = " \"code\""]
5936#[doc = " ],"]
5937#[doc = " \"properties\": {"]
5938#[doc = " \"code\": {"]
5939#[doc = " \"description\": \"WebAssembly binary\","]
5940#[doc = " \"type\": \"string\""]
5941#[doc = " }"]
5942#[doc = " }"]
5943#[doc = "}"]
5944#[doc = r" ```"]
5945#[doc = r" </details>"]
5946#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5947pub struct DeployContractAction {
5948 #[doc = "WebAssembly binary"]
5949 pub code: ::std::string::String,
5950}
5951impl ::std::convert::From<&DeployContractAction> for DeployContractAction {
5952 fn from(value: &DeployContractAction) -> Self {
5953 value.clone()
5954 }
5955}
5956#[doc = "Deploy global contract action"]
5957#[doc = r""]
5958#[doc = r" <details><summary>JSON schema</summary>"]
5959#[doc = r""]
5960#[doc = r" ```json"]
5961#[doc = "{"]
5962#[doc = " \"description\": \"Deploy global contract action\","]
5963#[doc = " \"type\": \"object\","]
5964#[doc = " \"required\": ["]
5965#[doc = " \"code\","]
5966#[doc = " \"deploy_mode\""]
5967#[doc = " ],"]
5968#[doc = " \"properties\": {"]
5969#[doc = " \"code\": {"]
5970#[doc = " \"description\": \"WebAssembly binary\","]
5971#[doc = " \"type\": \"string\""]
5972#[doc = " },"]
5973#[doc = " \"deploy_mode\": {"]
5974#[doc = " \"$ref\": \"#/components/schemas/GlobalContractDeployMode\""]
5975#[doc = " }"]
5976#[doc = " }"]
5977#[doc = "}"]
5978#[doc = r" ```"]
5979#[doc = r" </details>"]
5980#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5981pub struct DeployGlobalContractAction {
5982 #[doc = "WebAssembly binary"]
5983 pub code: ::std::string::String,
5984 pub deploy_mode: GlobalContractDeployMode,
5985}
5986impl ::std::convert::From<&DeployGlobalContractAction> for DeployGlobalContractAction {
5987 fn from(value: &DeployGlobalContractAction) -> Self {
5988 value.clone()
5989 }
5990}
5991#[doc = "`DetailedDebugStatus`"]
5992#[doc = r""]
5993#[doc = r" <details><summary>JSON schema</summary>"]
5994#[doc = r""]
5995#[doc = r" ```json"]
5996#[doc = "{"]
5997#[doc = " \"type\": \"object\","]
5998#[doc = " \"required\": ["]
5999#[doc = " \"block_production_delay_millis\","]
6000#[doc = " \"catchup_status\","]
6001#[doc = " \"current_head_status\","]
6002#[doc = " \"current_header_head_status\","]
6003#[doc = " \"network_info\","]
6004#[doc = " \"sync_status\""]
6005#[doc = " ],"]
6006#[doc = " \"properties\": {"]
6007#[doc = " \"block_production_delay_millis\": {"]
6008#[doc = " \"type\": \"integer\","]
6009#[doc = " \"format\": \"uint64\","]
6010#[doc = " \"minimum\": 0.0"]
6011#[doc = " },"]
6012#[doc = " \"catchup_status\": {"]
6013#[doc = " \"type\": \"array\","]
6014#[doc = " \"items\": {"]
6015#[doc = " \"$ref\": \"#/components/schemas/CatchupStatusView\""]
6016#[doc = " }"]
6017#[doc = " },"]
6018#[doc = " \"current_head_status\": {"]
6019#[doc = " \"$ref\": \"#/components/schemas/BlockStatusView\""]
6020#[doc = " },"]
6021#[doc = " \"current_header_head_status\": {"]
6022#[doc = " \"$ref\": \"#/components/schemas/BlockStatusView\""]
6023#[doc = " },"]
6024#[doc = " \"network_info\": {"]
6025#[doc = " \"$ref\": \"#/components/schemas/NetworkInfoView\""]
6026#[doc = " },"]
6027#[doc = " \"sync_status\": {"]
6028#[doc = " \"type\": \"string\""]
6029#[doc = " }"]
6030#[doc = " }"]
6031#[doc = "}"]
6032#[doc = r" ```"]
6033#[doc = r" </details>"]
6034#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6035pub struct DetailedDebugStatus {
6036 pub block_production_delay_millis: u64,
6037 pub catchup_status: ::std::vec::Vec<CatchupStatusView>,
6038 pub current_head_status: BlockStatusView,
6039 pub current_header_head_status: BlockStatusView,
6040 pub network_info: NetworkInfoView,
6041 pub sync_status: ::std::string::String,
6042}
6043impl ::std::convert::From<&DetailedDebugStatus> for DetailedDebugStatus {
6044 fn from(value: &DetailedDebugStatus) -> Self {
6045 value.clone()
6046 }
6047}
6048#[doc = "`DeterministicAccountStateInit`"]
6049#[doc = r""]
6050#[doc = r" <details><summary>JSON schema</summary>"]
6051#[doc = r""]
6052#[doc = r" ```json"]
6053#[doc = "{"]
6054#[doc = " \"oneOf\": ["]
6055#[doc = " {"]
6056#[doc = " \"type\": \"object\","]
6057#[doc = " \"required\": ["]
6058#[doc = " \"V1\""]
6059#[doc = " ],"]
6060#[doc = " \"properties\": {"]
6061#[doc = " \"V1\": {"]
6062#[doc = " \"$ref\": \"#/components/schemas/DeterministicAccountStateInitV1\""]
6063#[doc = " }"]
6064#[doc = " },"]
6065#[doc = " \"additionalProperties\": false"]
6066#[doc = " }"]
6067#[doc = " ]"]
6068#[doc = "}"]
6069#[doc = r" ```"]
6070#[doc = r" </details>"]
6071#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6072pub enum DeterministicAccountStateInit {
6073 V1(DeterministicAccountStateInitV1),
6074}
6075impl ::std::convert::From<&Self> for DeterministicAccountStateInit {
6076 fn from(value: &DeterministicAccountStateInit) -> Self {
6077 value.clone()
6078 }
6079}
6080impl ::std::convert::From<DeterministicAccountStateInitV1> for DeterministicAccountStateInit {
6081 fn from(value: DeterministicAccountStateInitV1) -> Self {
6082 Self::V1(value)
6083 }
6084}
6085#[doc = "`DeterministicAccountStateInitV1`"]
6086#[doc = r""]
6087#[doc = r" <details><summary>JSON schema</summary>"]
6088#[doc = r""]
6089#[doc = r" ```json"]
6090#[doc = "{"]
6091#[doc = " \"type\": \"object\","]
6092#[doc = " \"required\": ["]
6093#[doc = " \"code\","]
6094#[doc = " \"data\""]
6095#[doc = " ],"]
6096#[doc = " \"properties\": {"]
6097#[doc = " \"code\": {"]
6098#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
6099#[doc = " },"]
6100#[doc = " \"data\": {"]
6101#[doc = " \"type\": \"object\","]
6102#[doc = " \"additionalProperties\": {"]
6103#[doc = " \"type\": \"string\""]
6104#[doc = " }"]
6105#[doc = " }"]
6106#[doc = " }"]
6107#[doc = "}"]
6108#[doc = r" ```"]
6109#[doc = r" </details>"]
6110#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6111pub struct DeterministicAccountStateInitV1 {
6112 pub code: GlobalContractIdentifier,
6113 pub data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
6114}
6115impl ::std::convert::From<&DeterministicAccountStateInitV1> for DeterministicAccountStateInitV1 {
6116 fn from(value: &DeterministicAccountStateInitV1) -> Self {
6117 value.clone()
6118 }
6119}
6120#[doc = "`DeterministicStateInitAction`"]
6121#[doc = r""]
6122#[doc = r" <details><summary>JSON schema</summary>"]
6123#[doc = r""]
6124#[doc = r" ```json"]
6125#[doc = "{"]
6126#[doc = " \"type\": \"object\","]
6127#[doc = " \"required\": ["]
6128#[doc = " \"deposit\","]
6129#[doc = " \"state_init\""]
6130#[doc = " ],"]
6131#[doc = " \"properties\": {"]
6132#[doc = " \"deposit\": {"]
6133#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
6134#[doc = " },"]
6135#[doc = " \"state_init\": {"]
6136#[doc = " \"$ref\": \"#/components/schemas/DeterministicAccountStateInit\""]
6137#[doc = " }"]
6138#[doc = " }"]
6139#[doc = "}"]
6140#[doc = r" ```"]
6141#[doc = r" </details>"]
6142#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6143pub struct DeterministicStateInitAction {
6144 pub deposit: NearToken,
6145 pub state_init: DeterministicAccountStateInit,
6146}
6147impl ::std::convert::From<&DeterministicStateInitAction> for DeterministicStateInitAction {
6148 fn from(value: &DeterministicStateInitAction) -> Self {
6149 value.clone()
6150 }
6151}
6152#[doc = "`Direction`"]
6153#[doc = r""]
6154#[doc = r" <details><summary>JSON schema</summary>"]
6155#[doc = r""]
6156#[doc = r" ```json"]
6157#[doc = "{"]
6158#[doc = " \"type\": \"string\","]
6159#[doc = " \"enum\": ["]
6160#[doc = " \"Left\","]
6161#[doc = " \"Right\""]
6162#[doc = " ]"]
6163#[doc = "}"]
6164#[doc = r" ```"]
6165#[doc = r" </details>"]
6166#[derive(
6167 :: serde :: Deserialize,
6168 :: serde :: Serialize,
6169 Clone,
6170 Copy,
6171 Debug,
6172 Eq,
6173 Hash,
6174 Ord,
6175 PartialEq,
6176 PartialOrd,
6177)]
6178pub enum Direction {
6179 Left,
6180 Right,
6181}
6182impl ::std::convert::From<&Self> for Direction {
6183 fn from(value: &Direction) -> Self {
6184 value.clone()
6185 }
6186}
6187impl ::std::fmt::Display for Direction {
6188 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6189 match *self {
6190 Self::Left => f.write_str("Left"),
6191 Self::Right => f.write_str("Right"),
6192 }
6193 }
6194}
6195impl ::std::str::FromStr for Direction {
6196 type Err = self::error::ConversionError;
6197 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6198 match value {
6199 "Left" => Ok(Self::Left),
6200 "Right" => Ok(Self::Right),
6201 _ => Err("invalid value".into()),
6202 }
6203 }
6204}
6205impl ::std::convert::TryFrom<&str> for Direction {
6206 type Error = self::error::ConversionError;
6207 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6208 value.parse()
6209 }
6210}
6211impl ::std::convert::TryFrom<&::std::string::String> for Direction {
6212 type Error = self::error::ConversionError;
6213 fn try_from(
6214 value: &::std::string::String,
6215 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6216 value.parse()
6217 }
6218}
6219impl ::std::convert::TryFrom<::std::string::String> for Direction {
6220 type Error = self::error::ConversionError;
6221 fn try_from(
6222 value: ::std::string::String,
6223 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6224 value.parse()
6225 }
6226}
6227#[doc = "Configures how to dump state to external storage."]
6228#[doc = r""]
6229#[doc = r" <details><summary>JSON schema</summary>"]
6230#[doc = r""]
6231#[doc = r" ```json"]
6232#[doc = "{"]
6233#[doc = " \"description\": \"Configures how to dump state to external storage.\","]
6234#[doc = " \"type\": \"object\","]
6235#[doc = " \"required\": ["]
6236#[doc = " \"location\""]
6237#[doc = " ],"]
6238#[doc = " \"properties\": {"]
6239#[doc = " \"credentials_file\": {"]
6240#[doc = " \"description\": \"Location of a json file with credentials allowing access to the bucket.\","]
6241#[doc = " \"type\": ["]
6242#[doc = " \"string\","]
6243#[doc = " \"null\""]
6244#[doc = " ]"]
6245#[doc = " },"]
6246#[doc = " \"iteration_delay\": {"]
6247#[doc = " \"description\": \"How often to check if a new epoch has started.\\nFeel free to set to `None`, defaults are sensible.\","]
6248#[doc = " \"anyOf\": ["]
6249#[doc = " {"]
6250#[doc = " \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
6251#[doc = " },"]
6252#[doc = " {"]
6253#[doc = " \"type\": \"null\""]
6254#[doc = " }"]
6255#[doc = " ]"]
6256#[doc = " },"]
6257#[doc = " \"location\": {"]
6258#[doc = " \"description\": \"Specifies where to write the obtained state parts.\","]
6259#[doc = " \"allOf\": ["]
6260#[doc = " {"]
6261#[doc = " \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
6262#[doc = " }"]
6263#[doc = " ]"]
6264#[doc = " },"]
6265#[doc = " \"restart_dump_for_shards\": {"]
6266#[doc = " \"description\": \"Use in case a node that dumps state to the external storage\\ngets in trouble.\","]
6267#[doc = " \"type\": ["]
6268#[doc = " \"array\","]
6269#[doc = " \"null\""]
6270#[doc = " ],"]
6271#[doc = " \"items\": {"]
6272#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
6273#[doc = " }"]
6274#[doc = " }"]
6275#[doc = " }"]
6276#[doc = "}"]
6277#[doc = r" ```"]
6278#[doc = r" </details>"]
6279#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6280pub struct DumpConfig {
6281 #[doc = "Location of a json file with credentials allowing access to the bucket."]
6282 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6283 pub credentials_file: ::std::option::Option<::std::string::String>,
6284 #[doc = "How often to check if a new epoch has started.\nFeel free to set to `None`, defaults are sensible."]
6285 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6286 pub iteration_delay: ::std::option::Option<DurationAsStdSchemaProvider>,
6287 #[doc = "Specifies where to write the obtained state parts."]
6288 pub location: ExternalStorageLocation,
6289 #[doc = "Use in case a node that dumps state to the external storage\ngets in trouble."]
6290 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6291 pub restart_dump_for_shards: ::std::option::Option<::std::vec::Vec<ShardId>>,
6292}
6293impl ::std::convert::From<&DumpConfig> for DumpConfig {
6294 fn from(value: &DumpConfig) -> Self {
6295 value.clone()
6296 }
6297}
6298#[doc = "`DurationAsStdSchemaProvider`"]
6299#[doc = r""]
6300#[doc = r" <details><summary>JSON schema</summary>"]
6301#[doc = r""]
6302#[doc = r" ```json"]
6303#[doc = "{"]
6304#[doc = " \"type\": \"object\","]
6305#[doc = " \"required\": ["]
6306#[doc = " \"nanos\","]
6307#[doc = " \"secs\""]
6308#[doc = " ],"]
6309#[doc = " \"properties\": {"]
6310#[doc = " \"nanos\": {"]
6311#[doc = " \"type\": \"integer\","]
6312#[doc = " \"format\": \"int32\""]
6313#[doc = " },"]
6314#[doc = " \"secs\": {"]
6315#[doc = " \"type\": \"integer\","]
6316#[doc = " \"format\": \"int64\""]
6317#[doc = " }"]
6318#[doc = " }"]
6319#[doc = "}"]
6320#[doc = r" ```"]
6321#[doc = r" </details>"]
6322#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6323pub struct DurationAsStdSchemaProvider {
6324 pub nanos: i32,
6325 pub secs: i64,
6326}
6327impl ::std::convert::From<&DurationAsStdSchemaProvider> for DurationAsStdSchemaProvider {
6328 fn from(value: &DurationAsStdSchemaProvider) -> Self {
6329 value.clone()
6330 }
6331}
6332#[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"]
6333#[doc = r""]
6334#[doc = r" <details><summary>JSON schema</summary>"]
6335#[doc = r""]
6336#[doc = r" ```json"]
6337#[doc = "{"]
6338#[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\","]
6339#[doc = " \"allOf\": ["]
6340#[doc = " {"]
6341#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
6342#[doc = " }"]
6343#[doc = " ]"]
6344#[doc = "}"]
6345#[doc = r" ```"]
6346#[doc = r" </details>"]
6347#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6348#[serde(transparent)]
6349pub struct EpochId(pub CryptoHash);
6350impl ::std::ops::Deref for EpochId {
6351 type Target = CryptoHash;
6352 fn deref(&self) -> &CryptoHash {
6353 &self.0
6354 }
6355}
6356impl ::std::convert::From<EpochId> for CryptoHash {
6357 fn from(value: EpochId) -> Self {
6358 value.0
6359 }
6360}
6361impl ::std::convert::From<&EpochId> for EpochId {
6362 fn from(value: &EpochId) -> Self {
6363 value.clone()
6364 }
6365}
6366impl ::std::convert::From<CryptoHash> for EpochId {
6367 fn from(value: CryptoHash) -> Self {
6368 Self(value)
6369 }
6370}
6371impl ::std::str::FromStr for EpochId {
6372 type Err = <CryptoHash as ::std::str::FromStr>::Err;
6373 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
6374 Ok(Self(value.parse()?))
6375 }
6376}
6377impl ::std::convert::TryFrom<&str> for EpochId {
6378 type Error = <CryptoHash as ::std::str::FromStr>::Err;
6379 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
6380 value.parse()
6381 }
6382}
6383impl ::std::convert::TryFrom<&String> for EpochId {
6384 type Error = <CryptoHash as ::std::str::FromStr>::Err;
6385 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
6386 value.parse()
6387 }
6388}
6389impl ::std::convert::TryFrom<String> for EpochId {
6390 type Error = <CryptoHash as ::std::str::FromStr>::Err;
6391 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
6392 value.parse()
6393 }
6394}
6395impl ::std::fmt::Display for EpochId {
6396 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6397 self.0.fmt(f)
6398 }
6399}
6400#[doc = "`EpochSyncConfig`"]
6401#[doc = r""]
6402#[doc = r" <details><summary>JSON schema</summary>"]
6403#[doc = r""]
6404#[doc = r" ```json"]
6405#[doc = "{"]
6406#[doc = " \"type\": \"object\","]
6407#[doc = " \"required\": ["]
6408#[doc = " \"epoch_sync_horizon\","]
6409#[doc = " \"timeout_for_epoch_sync\""]
6410#[doc = " ],"]
6411#[doc = " \"properties\": {"]
6412#[doc = " \"disable_epoch_sync_for_bootstrapping\": {"]
6413#[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.\","]
6414#[doc = " \"default\": false,"]
6415#[doc = " \"type\": \"boolean\""]
6416#[doc = " },"]
6417#[doc = " \"epoch_sync_horizon\": {"]
6418#[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.\","]
6419#[doc = " \"type\": \"integer\","]
6420#[doc = " \"format\": \"uint64\","]
6421#[doc = " \"minimum\": 0.0"]
6422#[doc = " },"]
6423#[doc = " \"ignore_epoch_sync_network_requests\": {"]
6424#[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.\","]
6425#[doc = " \"default\": false,"]
6426#[doc = " \"type\": \"boolean\""]
6427#[doc = " },"]
6428#[doc = " \"timeout_for_epoch_sync\": {"]
6429#[doc = " \"description\": \"Timeout for epoch sync requests. The node will continue retrying indefinitely even\\nif this timeout is exceeded.\","]
6430#[doc = " \"allOf\": ["]
6431#[doc = " {"]
6432#[doc = " \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
6433#[doc = " }"]
6434#[doc = " ]"]
6435#[doc = " }"]
6436#[doc = " }"]
6437#[doc = "}"]
6438#[doc = r" ```"]
6439#[doc = r" </details>"]
6440#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6441pub struct EpochSyncConfig {
6442 #[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."]
6443 #[serde(default)]
6444 pub disable_epoch_sync_for_bootstrapping: bool,
6445 #[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."]
6446 pub epoch_sync_horizon: u64,
6447 #[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."]
6448 #[serde(default)]
6449 pub ignore_epoch_sync_network_requests: bool,
6450 #[doc = "Timeout for epoch sync requests. The node will continue retrying indefinitely even\nif this timeout is exceeded."]
6451 pub timeout_for_epoch_sync: DurationAsStdSchemaProvider,
6452}
6453impl ::std::convert::From<&EpochSyncConfig> for EpochSyncConfig {
6454 fn from(value: &EpochSyncConfig) -> Self {
6455 value.clone()
6456 }
6457}
6458#[doc = "`ErrorWrapperForGenesisConfigError`"]
6459#[doc = r""]
6460#[doc = r" <details><summary>JSON schema</summary>"]
6461#[doc = r""]
6462#[doc = r" ```json"]
6463#[doc = "{"]
6464#[doc = " \"oneOf\": ["]
6465#[doc = " {"]
6466#[doc = " \"type\": \"object\","]
6467#[doc = " \"required\": ["]
6468#[doc = " \"cause\","]
6469#[doc = " \"name\""]
6470#[doc = " ],"]
6471#[doc = " \"properties\": {"]
6472#[doc = " \"cause\": {"]
6473#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6474#[doc = " },"]
6475#[doc = " \"name\": {"]
6476#[doc = " \"type\": \"string\","]
6477#[doc = " \"enum\": ["]
6478#[doc = " \"REQUEST_VALIDATION_ERROR\""]
6479#[doc = " ]"]
6480#[doc = " }"]
6481#[doc = " }"]
6482#[doc = " },"]
6483#[doc = " {"]
6484#[doc = " \"type\": \"object\","]
6485#[doc = " \"required\": ["]
6486#[doc = " \"cause\","]
6487#[doc = " \"name\""]
6488#[doc = " ],"]
6489#[doc = " \"properties\": {"]
6490#[doc = " \"cause\": {"]
6491#[doc = " \"$ref\": \"#/components/schemas/GenesisConfigError\""]
6492#[doc = " },"]
6493#[doc = " \"name\": {"]
6494#[doc = " \"type\": \"string\","]
6495#[doc = " \"enum\": ["]
6496#[doc = " \"HANDLER_ERROR\""]
6497#[doc = " ]"]
6498#[doc = " }"]
6499#[doc = " }"]
6500#[doc = " },"]
6501#[doc = " {"]
6502#[doc = " \"type\": \"object\","]
6503#[doc = " \"required\": ["]
6504#[doc = " \"cause\","]
6505#[doc = " \"name\""]
6506#[doc = " ],"]
6507#[doc = " \"properties\": {"]
6508#[doc = " \"cause\": {"]
6509#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
6510#[doc = " },"]
6511#[doc = " \"name\": {"]
6512#[doc = " \"type\": \"string\","]
6513#[doc = " \"enum\": ["]
6514#[doc = " \"INTERNAL_ERROR\""]
6515#[doc = " ]"]
6516#[doc = " }"]
6517#[doc = " }"]
6518#[doc = " }"]
6519#[doc = " ]"]
6520#[doc = "}"]
6521#[doc = r" ```"]
6522#[doc = r" </details>"]
6523#[derive(
6524 :: serde :: Deserialize,
6525 :: serde :: Serialize,
6526 Clone,
6527 Debug,
6528 thiserror::Error,
6529 strum_macros::Display,
6530)]
6531#[serde(tag = "name", content = "cause")]
6532pub enum ErrorWrapperForGenesisConfigError {
6533 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6534 RequestValidationError(RpcRequestValidationErrorKind),
6535 #[serde(rename = "HANDLER_ERROR")]
6536 HandlerError(GenesisConfigError),
6537 #[serde(rename = "INTERNAL_ERROR")]
6538 InternalError(InternalError),
6539}
6540impl ::std::convert::From<&Self> for ErrorWrapperForGenesisConfigError {
6541 fn from(value: &ErrorWrapperForGenesisConfigError) -> Self {
6542 value.clone()
6543 }
6544}
6545impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForGenesisConfigError {
6546 fn from(value: RpcRequestValidationErrorKind) -> Self {
6547 Self::RequestValidationError(value)
6548 }
6549}
6550impl ::std::convert::From<GenesisConfigError> for ErrorWrapperForGenesisConfigError {
6551 fn from(value: GenesisConfigError) -> Self {
6552 Self::HandlerError(value)
6553 }
6554}
6555impl ::std::convert::From<InternalError> for ErrorWrapperForGenesisConfigError {
6556 fn from(value: InternalError) -> Self {
6557 Self::InternalError(value)
6558 }
6559}
6560#[doc = "`ErrorWrapperForRpcBlockError`"]
6561#[doc = r""]
6562#[doc = r" <details><summary>JSON schema</summary>"]
6563#[doc = r""]
6564#[doc = r" ```json"]
6565#[doc = "{"]
6566#[doc = " \"oneOf\": ["]
6567#[doc = " {"]
6568#[doc = " \"type\": \"object\","]
6569#[doc = " \"required\": ["]
6570#[doc = " \"cause\","]
6571#[doc = " \"name\""]
6572#[doc = " ],"]
6573#[doc = " \"properties\": {"]
6574#[doc = " \"cause\": {"]
6575#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6576#[doc = " },"]
6577#[doc = " \"name\": {"]
6578#[doc = " \"type\": \"string\","]
6579#[doc = " \"enum\": ["]
6580#[doc = " \"REQUEST_VALIDATION_ERROR\""]
6581#[doc = " ]"]
6582#[doc = " }"]
6583#[doc = " }"]
6584#[doc = " },"]
6585#[doc = " {"]
6586#[doc = " \"type\": \"object\","]
6587#[doc = " \"required\": ["]
6588#[doc = " \"cause\","]
6589#[doc = " \"name\""]
6590#[doc = " ],"]
6591#[doc = " \"properties\": {"]
6592#[doc = " \"cause\": {"]
6593#[doc = " \"$ref\": \"#/components/schemas/RpcBlockError\""]
6594#[doc = " },"]
6595#[doc = " \"name\": {"]
6596#[doc = " \"type\": \"string\","]
6597#[doc = " \"enum\": ["]
6598#[doc = " \"HANDLER_ERROR\""]
6599#[doc = " ]"]
6600#[doc = " }"]
6601#[doc = " }"]
6602#[doc = " },"]
6603#[doc = " {"]
6604#[doc = " \"type\": \"object\","]
6605#[doc = " \"required\": ["]
6606#[doc = " \"cause\","]
6607#[doc = " \"name\""]
6608#[doc = " ],"]
6609#[doc = " \"properties\": {"]
6610#[doc = " \"cause\": {"]
6611#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
6612#[doc = " },"]
6613#[doc = " \"name\": {"]
6614#[doc = " \"type\": \"string\","]
6615#[doc = " \"enum\": ["]
6616#[doc = " \"INTERNAL_ERROR\""]
6617#[doc = " ]"]
6618#[doc = " }"]
6619#[doc = " }"]
6620#[doc = " }"]
6621#[doc = " ]"]
6622#[doc = "}"]
6623#[doc = r" ```"]
6624#[doc = r" </details>"]
6625#[derive(
6626 :: serde :: Deserialize,
6627 :: serde :: Serialize,
6628 Clone,
6629 Debug,
6630 thiserror::Error,
6631 strum_macros::Display,
6632)]
6633#[serde(tag = "name", content = "cause")]
6634pub enum ErrorWrapperForRpcBlockError {
6635 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6636 RequestValidationError(RpcRequestValidationErrorKind),
6637 #[serde(rename = "HANDLER_ERROR")]
6638 HandlerError(RpcBlockError),
6639 #[serde(rename = "INTERNAL_ERROR")]
6640 InternalError(InternalError),
6641}
6642impl ::std::convert::From<&Self> for ErrorWrapperForRpcBlockError {
6643 fn from(value: &ErrorWrapperForRpcBlockError) -> Self {
6644 value.clone()
6645 }
6646}
6647impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcBlockError {
6648 fn from(value: RpcRequestValidationErrorKind) -> Self {
6649 Self::RequestValidationError(value)
6650 }
6651}
6652impl ::std::convert::From<RpcBlockError> for ErrorWrapperForRpcBlockError {
6653 fn from(value: RpcBlockError) -> Self {
6654 Self::HandlerError(value)
6655 }
6656}
6657impl ::std::convert::From<InternalError> for ErrorWrapperForRpcBlockError {
6658 fn from(value: InternalError) -> Self {
6659 Self::InternalError(value)
6660 }
6661}
6662#[doc = "`ErrorWrapperForRpcChunkError`"]
6663#[doc = r""]
6664#[doc = r" <details><summary>JSON schema</summary>"]
6665#[doc = r""]
6666#[doc = r" ```json"]
6667#[doc = "{"]
6668#[doc = " \"oneOf\": ["]
6669#[doc = " {"]
6670#[doc = " \"type\": \"object\","]
6671#[doc = " \"required\": ["]
6672#[doc = " \"cause\","]
6673#[doc = " \"name\""]
6674#[doc = " ],"]
6675#[doc = " \"properties\": {"]
6676#[doc = " \"cause\": {"]
6677#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6678#[doc = " },"]
6679#[doc = " \"name\": {"]
6680#[doc = " \"type\": \"string\","]
6681#[doc = " \"enum\": ["]
6682#[doc = " \"REQUEST_VALIDATION_ERROR\""]
6683#[doc = " ]"]
6684#[doc = " }"]
6685#[doc = " }"]
6686#[doc = " },"]
6687#[doc = " {"]
6688#[doc = " \"type\": \"object\","]
6689#[doc = " \"required\": ["]
6690#[doc = " \"cause\","]
6691#[doc = " \"name\""]
6692#[doc = " ],"]
6693#[doc = " \"properties\": {"]
6694#[doc = " \"cause\": {"]
6695#[doc = " \"$ref\": \"#/components/schemas/RpcChunkError\""]
6696#[doc = " },"]
6697#[doc = " \"name\": {"]
6698#[doc = " \"type\": \"string\","]
6699#[doc = " \"enum\": ["]
6700#[doc = " \"HANDLER_ERROR\""]
6701#[doc = " ]"]
6702#[doc = " }"]
6703#[doc = " }"]
6704#[doc = " },"]
6705#[doc = " {"]
6706#[doc = " \"type\": \"object\","]
6707#[doc = " \"required\": ["]
6708#[doc = " \"cause\","]
6709#[doc = " \"name\""]
6710#[doc = " ],"]
6711#[doc = " \"properties\": {"]
6712#[doc = " \"cause\": {"]
6713#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
6714#[doc = " },"]
6715#[doc = " \"name\": {"]
6716#[doc = " \"type\": \"string\","]
6717#[doc = " \"enum\": ["]
6718#[doc = " \"INTERNAL_ERROR\""]
6719#[doc = " ]"]
6720#[doc = " }"]
6721#[doc = " }"]
6722#[doc = " }"]
6723#[doc = " ]"]
6724#[doc = "}"]
6725#[doc = r" ```"]
6726#[doc = r" </details>"]
6727#[derive(
6728 :: serde :: Deserialize,
6729 :: serde :: Serialize,
6730 Clone,
6731 Debug,
6732 thiserror::Error,
6733 strum_macros::Display,
6734)]
6735#[serde(tag = "name", content = "cause")]
6736pub enum ErrorWrapperForRpcChunkError {
6737 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6738 RequestValidationError(RpcRequestValidationErrorKind),
6739 #[serde(rename = "HANDLER_ERROR")]
6740 HandlerError(RpcChunkError),
6741 #[serde(rename = "INTERNAL_ERROR")]
6742 InternalError(InternalError),
6743}
6744impl ::std::convert::From<&Self> for ErrorWrapperForRpcChunkError {
6745 fn from(value: &ErrorWrapperForRpcChunkError) -> Self {
6746 value.clone()
6747 }
6748}
6749impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcChunkError {
6750 fn from(value: RpcRequestValidationErrorKind) -> Self {
6751 Self::RequestValidationError(value)
6752 }
6753}
6754impl ::std::convert::From<RpcChunkError> for ErrorWrapperForRpcChunkError {
6755 fn from(value: RpcChunkError) -> Self {
6756 Self::HandlerError(value)
6757 }
6758}
6759impl ::std::convert::From<InternalError> for ErrorWrapperForRpcChunkError {
6760 fn from(value: InternalError) -> Self {
6761 Self::InternalError(value)
6762 }
6763}
6764#[doc = "`ErrorWrapperForRpcClientConfigError`"]
6765#[doc = r""]
6766#[doc = r" <details><summary>JSON schema</summary>"]
6767#[doc = r""]
6768#[doc = r" ```json"]
6769#[doc = "{"]
6770#[doc = " \"oneOf\": ["]
6771#[doc = " {"]
6772#[doc = " \"type\": \"object\","]
6773#[doc = " \"required\": ["]
6774#[doc = " \"cause\","]
6775#[doc = " \"name\""]
6776#[doc = " ],"]
6777#[doc = " \"properties\": {"]
6778#[doc = " \"cause\": {"]
6779#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6780#[doc = " },"]
6781#[doc = " \"name\": {"]
6782#[doc = " \"type\": \"string\","]
6783#[doc = " \"enum\": ["]
6784#[doc = " \"REQUEST_VALIDATION_ERROR\""]
6785#[doc = " ]"]
6786#[doc = " }"]
6787#[doc = " }"]
6788#[doc = " },"]
6789#[doc = " {"]
6790#[doc = " \"type\": \"object\","]
6791#[doc = " \"required\": ["]
6792#[doc = " \"cause\","]
6793#[doc = " \"name\""]
6794#[doc = " ],"]
6795#[doc = " \"properties\": {"]
6796#[doc = " \"cause\": {"]
6797#[doc = " \"$ref\": \"#/components/schemas/RpcClientConfigError\""]
6798#[doc = " },"]
6799#[doc = " \"name\": {"]
6800#[doc = " \"type\": \"string\","]
6801#[doc = " \"enum\": ["]
6802#[doc = " \"HANDLER_ERROR\""]
6803#[doc = " ]"]
6804#[doc = " }"]
6805#[doc = " }"]
6806#[doc = " },"]
6807#[doc = " {"]
6808#[doc = " \"type\": \"object\","]
6809#[doc = " \"required\": ["]
6810#[doc = " \"cause\","]
6811#[doc = " \"name\""]
6812#[doc = " ],"]
6813#[doc = " \"properties\": {"]
6814#[doc = " \"cause\": {"]
6815#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
6816#[doc = " },"]
6817#[doc = " \"name\": {"]
6818#[doc = " \"type\": \"string\","]
6819#[doc = " \"enum\": ["]
6820#[doc = " \"INTERNAL_ERROR\""]
6821#[doc = " ]"]
6822#[doc = " }"]
6823#[doc = " }"]
6824#[doc = " }"]
6825#[doc = " ]"]
6826#[doc = "}"]
6827#[doc = r" ```"]
6828#[doc = r" </details>"]
6829#[derive(
6830 :: serde :: Deserialize,
6831 :: serde :: Serialize,
6832 Clone,
6833 Debug,
6834 thiserror::Error,
6835 strum_macros::Display,
6836)]
6837#[serde(tag = "name", content = "cause")]
6838pub enum ErrorWrapperForRpcClientConfigError {
6839 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6840 RequestValidationError(RpcRequestValidationErrorKind),
6841 #[serde(rename = "HANDLER_ERROR")]
6842 HandlerError(RpcClientConfigError),
6843 #[serde(rename = "INTERNAL_ERROR")]
6844 InternalError(InternalError),
6845}
6846impl ::std::convert::From<&Self> for ErrorWrapperForRpcClientConfigError {
6847 fn from(value: &ErrorWrapperForRpcClientConfigError) -> Self {
6848 value.clone()
6849 }
6850}
6851impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcClientConfigError {
6852 fn from(value: RpcRequestValidationErrorKind) -> Self {
6853 Self::RequestValidationError(value)
6854 }
6855}
6856impl ::std::convert::From<RpcClientConfigError> for ErrorWrapperForRpcClientConfigError {
6857 fn from(value: RpcClientConfigError) -> Self {
6858 Self::HandlerError(value)
6859 }
6860}
6861impl ::std::convert::From<InternalError> for ErrorWrapperForRpcClientConfigError {
6862 fn from(value: InternalError) -> Self {
6863 Self::InternalError(value)
6864 }
6865}
6866#[doc = "`ErrorWrapperForRpcGasPriceError`"]
6867#[doc = r""]
6868#[doc = r" <details><summary>JSON schema</summary>"]
6869#[doc = r""]
6870#[doc = r" ```json"]
6871#[doc = "{"]
6872#[doc = " \"oneOf\": ["]
6873#[doc = " {"]
6874#[doc = " \"type\": \"object\","]
6875#[doc = " \"required\": ["]
6876#[doc = " \"cause\","]
6877#[doc = " \"name\""]
6878#[doc = " ],"]
6879#[doc = " \"properties\": {"]
6880#[doc = " \"cause\": {"]
6881#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6882#[doc = " },"]
6883#[doc = " \"name\": {"]
6884#[doc = " \"type\": \"string\","]
6885#[doc = " \"enum\": ["]
6886#[doc = " \"REQUEST_VALIDATION_ERROR\""]
6887#[doc = " ]"]
6888#[doc = " }"]
6889#[doc = " }"]
6890#[doc = " },"]
6891#[doc = " {"]
6892#[doc = " \"type\": \"object\","]
6893#[doc = " \"required\": ["]
6894#[doc = " \"cause\","]
6895#[doc = " \"name\""]
6896#[doc = " ],"]
6897#[doc = " \"properties\": {"]
6898#[doc = " \"cause\": {"]
6899#[doc = " \"$ref\": \"#/components/schemas/RpcGasPriceError\""]
6900#[doc = " },"]
6901#[doc = " \"name\": {"]
6902#[doc = " \"type\": \"string\","]
6903#[doc = " \"enum\": ["]
6904#[doc = " \"HANDLER_ERROR\""]
6905#[doc = " ]"]
6906#[doc = " }"]
6907#[doc = " }"]
6908#[doc = " },"]
6909#[doc = " {"]
6910#[doc = " \"type\": \"object\","]
6911#[doc = " \"required\": ["]
6912#[doc = " \"cause\","]
6913#[doc = " \"name\""]
6914#[doc = " ],"]
6915#[doc = " \"properties\": {"]
6916#[doc = " \"cause\": {"]
6917#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
6918#[doc = " },"]
6919#[doc = " \"name\": {"]
6920#[doc = " \"type\": \"string\","]
6921#[doc = " \"enum\": ["]
6922#[doc = " \"INTERNAL_ERROR\""]
6923#[doc = " ]"]
6924#[doc = " }"]
6925#[doc = " }"]
6926#[doc = " }"]
6927#[doc = " ]"]
6928#[doc = "}"]
6929#[doc = r" ```"]
6930#[doc = r" </details>"]
6931#[derive(
6932 :: serde :: Deserialize,
6933 :: serde :: Serialize,
6934 Clone,
6935 Debug,
6936 thiserror::Error,
6937 strum_macros::Display,
6938)]
6939#[serde(tag = "name", content = "cause")]
6940pub enum ErrorWrapperForRpcGasPriceError {
6941 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
6942 RequestValidationError(RpcRequestValidationErrorKind),
6943 #[serde(rename = "HANDLER_ERROR")]
6944 HandlerError(RpcGasPriceError),
6945 #[serde(rename = "INTERNAL_ERROR")]
6946 InternalError(InternalError),
6947}
6948impl ::std::convert::From<&Self> for ErrorWrapperForRpcGasPriceError {
6949 fn from(value: &ErrorWrapperForRpcGasPriceError) -> Self {
6950 value.clone()
6951 }
6952}
6953impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcGasPriceError {
6954 fn from(value: RpcRequestValidationErrorKind) -> Self {
6955 Self::RequestValidationError(value)
6956 }
6957}
6958impl ::std::convert::From<RpcGasPriceError> for ErrorWrapperForRpcGasPriceError {
6959 fn from(value: RpcGasPriceError) -> Self {
6960 Self::HandlerError(value)
6961 }
6962}
6963impl ::std::convert::From<InternalError> for ErrorWrapperForRpcGasPriceError {
6964 fn from(value: InternalError) -> Self {
6965 Self::InternalError(value)
6966 }
6967}
6968#[doc = "`ErrorWrapperForRpcLightClientNextBlockError`"]
6969#[doc = r""]
6970#[doc = r" <details><summary>JSON schema</summary>"]
6971#[doc = r""]
6972#[doc = r" ```json"]
6973#[doc = "{"]
6974#[doc = " \"oneOf\": ["]
6975#[doc = " {"]
6976#[doc = " \"type\": \"object\","]
6977#[doc = " \"required\": ["]
6978#[doc = " \"cause\","]
6979#[doc = " \"name\""]
6980#[doc = " ],"]
6981#[doc = " \"properties\": {"]
6982#[doc = " \"cause\": {"]
6983#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
6984#[doc = " },"]
6985#[doc = " \"name\": {"]
6986#[doc = " \"type\": \"string\","]
6987#[doc = " \"enum\": ["]
6988#[doc = " \"REQUEST_VALIDATION_ERROR\""]
6989#[doc = " ]"]
6990#[doc = " }"]
6991#[doc = " }"]
6992#[doc = " },"]
6993#[doc = " {"]
6994#[doc = " \"type\": \"object\","]
6995#[doc = " \"required\": ["]
6996#[doc = " \"cause\","]
6997#[doc = " \"name\""]
6998#[doc = " ],"]
6999#[doc = " \"properties\": {"]
7000#[doc = " \"cause\": {"]
7001#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientNextBlockError\""]
7002#[doc = " },"]
7003#[doc = " \"name\": {"]
7004#[doc = " \"type\": \"string\","]
7005#[doc = " \"enum\": ["]
7006#[doc = " \"HANDLER_ERROR\""]
7007#[doc = " ]"]
7008#[doc = " }"]
7009#[doc = " }"]
7010#[doc = " },"]
7011#[doc = " {"]
7012#[doc = " \"type\": \"object\","]
7013#[doc = " \"required\": ["]
7014#[doc = " \"cause\","]
7015#[doc = " \"name\""]
7016#[doc = " ],"]
7017#[doc = " \"properties\": {"]
7018#[doc = " \"cause\": {"]
7019#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7020#[doc = " },"]
7021#[doc = " \"name\": {"]
7022#[doc = " \"type\": \"string\","]
7023#[doc = " \"enum\": ["]
7024#[doc = " \"INTERNAL_ERROR\""]
7025#[doc = " ]"]
7026#[doc = " }"]
7027#[doc = " }"]
7028#[doc = " }"]
7029#[doc = " ]"]
7030#[doc = "}"]
7031#[doc = r" ```"]
7032#[doc = r" </details>"]
7033#[derive(
7034 :: serde :: Deserialize,
7035 :: serde :: Serialize,
7036 Clone,
7037 Debug,
7038 thiserror::Error,
7039 strum_macros::Display,
7040)]
7041#[serde(tag = "name", content = "cause")]
7042pub enum ErrorWrapperForRpcLightClientNextBlockError {
7043 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7044 RequestValidationError(RpcRequestValidationErrorKind),
7045 #[serde(rename = "HANDLER_ERROR")]
7046 HandlerError(RpcLightClientNextBlockError),
7047 #[serde(rename = "INTERNAL_ERROR")]
7048 InternalError(InternalError),
7049}
7050impl ::std::convert::From<&Self> for ErrorWrapperForRpcLightClientNextBlockError {
7051 fn from(value: &ErrorWrapperForRpcLightClientNextBlockError) -> Self {
7052 value.clone()
7053 }
7054}
7055impl ::std::convert::From<RpcRequestValidationErrorKind>
7056 for ErrorWrapperForRpcLightClientNextBlockError
7057{
7058 fn from(value: RpcRequestValidationErrorKind) -> Self {
7059 Self::RequestValidationError(value)
7060 }
7061}
7062impl ::std::convert::From<RpcLightClientNextBlockError>
7063 for ErrorWrapperForRpcLightClientNextBlockError
7064{
7065 fn from(value: RpcLightClientNextBlockError) -> Self {
7066 Self::HandlerError(value)
7067 }
7068}
7069impl ::std::convert::From<InternalError> for ErrorWrapperForRpcLightClientNextBlockError {
7070 fn from(value: InternalError) -> Self {
7071 Self::InternalError(value)
7072 }
7073}
7074#[doc = "`ErrorWrapperForRpcLightClientProofError`"]
7075#[doc = r""]
7076#[doc = r" <details><summary>JSON schema</summary>"]
7077#[doc = r""]
7078#[doc = r" ```json"]
7079#[doc = "{"]
7080#[doc = " \"oneOf\": ["]
7081#[doc = " {"]
7082#[doc = " \"type\": \"object\","]
7083#[doc = " \"required\": ["]
7084#[doc = " \"cause\","]
7085#[doc = " \"name\""]
7086#[doc = " ],"]
7087#[doc = " \"properties\": {"]
7088#[doc = " \"cause\": {"]
7089#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7090#[doc = " },"]
7091#[doc = " \"name\": {"]
7092#[doc = " \"type\": \"string\","]
7093#[doc = " \"enum\": ["]
7094#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7095#[doc = " ]"]
7096#[doc = " }"]
7097#[doc = " }"]
7098#[doc = " },"]
7099#[doc = " {"]
7100#[doc = " \"type\": \"object\","]
7101#[doc = " \"required\": ["]
7102#[doc = " \"cause\","]
7103#[doc = " \"name\""]
7104#[doc = " ],"]
7105#[doc = " \"properties\": {"]
7106#[doc = " \"cause\": {"]
7107#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientProofError\""]
7108#[doc = " },"]
7109#[doc = " \"name\": {"]
7110#[doc = " \"type\": \"string\","]
7111#[doc = " \"enum\": ["]
7112#[doc = " \"HANDLER_ERROR\""]
7113#[doc = " ]"]
7114#[doc = " }"]
7115#[doc = " }"]
7116#[doc = " },"]
7117#[doc = " {"]
7118#[doc = " \"type\": \"object\","]
7119#[doc = " \"required\": ["]
7120#[doc = " \"cause\","]
7121#[doc = " \"name\""]
7122#[doc = " ],"]
7123#[doc = " \"properties\": {"]
7124#[doc = " \"cause\": {"]
7125#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7126#[doc = " },"]
7127#[doc = " \"name\": {"]
7128#[doc = " \"type\": \"string\","]
7129#[doc = " \"enum\": ["]
7130#[doc = " \"INTERNAL_ERROR\""]
7131#[doc = " ]"]
7132#[doc = " }"]
7133#[doc = " }"]
7134#[doc = " }"]
7135#[doc = " ]"]
7136#[doc = "}"]
7137#[doc = r" ```"]
7138#[doc = r" </details>"]
7139#[derive(
7140 :: serde :: Deserialize,
7141 :: serde :: Serialize,
7142 Clone,
7143 Debug,
7144 thiserror::Error,
7145 strum_macros::Display,
7146)]
7147#[serde(tag = "name", content = "cause")]
7148pub enum ErrorWrapperForRpcLightClientProofError {
7149 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7150 RequestValidationError(RpcRequestValidationErrorKind),
7151 #[serde(rename = "HANDLER_ERROR")]
7152 HandlerError(RpcLightClientProofError),
7153 #[serde(rename = "INTERNAL_ERROR")]
7154 InternalError(InternalError),
7155}
7156impl ::std::convert::From<&Self> for ErrorWrapperForRpcLightClientProofError {
7157 fn from(value: &ErrorWrapperForRpcLightClientProofError) -> Self {
7158 value.clone()
7159 }
7160}
7161impl ::std::convert::From<RpcRequestValidationErrorKind>
7162 for ErrorWrapperForRpcLightClientProofError
7163{
7164 fn from(value: RpcRequestValidationErrorKind) -> Self {
7165 Self::RequestValidationError(value)
7166 }
7167}
7168impl ::std::convert::From<RpcLightClientProofError> for ErrorWrapperForRpcLightClientProofError {
7169 fn from(value: RpcLightClientProofError) -> Self {
7170 Self::HandlerError(value)
7171 }
7172}
7173impl ::std::convert::From<InternalError> for ErrorWrapperForRpcLightClientProofError {
7174 fn from(value: InternalError) -> Self {
7175 Self::InternalError(value)
7176 }
7177}
7178#[doc = "`ErrorWrapperForRpcMaintenanceWindowsError`"]
7179#[doc = r""]
7180#[doc = r" <details><summary>JSON schema</summary>"]
7181#[doc = r""]
7182#[doc = r" ```json"]
7183#[doc = "{"]
7184#[doc = " \"oneOf\": ["]
7185#[doc = " {"]
7186#[doc = " \"type\": \"object\","]
7187#[doc = " \"required\": ["]
7188#[doc = " \"cause\","]
7189#[doc = " \"name\""]
7190#[doc = " ],"]
7191#[doc = " \"properties\": {"]
7192#[doc = " \"cause\": {"]
7193#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7194#[doc = " },"]
7195#[doc = " \"name\": {"]
7196#[doc = " \"type\": \"string\","]
7197#[doc = " \"enum\": ["]
7198#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7199#[doc = " ]"]
7200#[doc = " }"]
7201#[doc = " }"]
7202#[doc = " },"]
7203#[doc = " {"]
7204#[doc = " \"type\": \"object\","]
7205#[doc = " \"required\": ["]
7206#[doc = " \"cause\","]
7207#[doc = " \"name\""]
7208#[doc = " ],"]
7209#[doc = " \"properties\": {"]
7210#[doc = " \"cause\": {"]
7211#[doc = " \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsError\""]
7212#[doc = " },"]
7213#[doc = " \"name\": {"]
7214#[doc = " \"type\": \"string\","]
7215#[doc = " \"enum\": ["]
7216#[doc = " \"HANDLER_ERROR\""]
7217#[doc = " ]"]
7218#[doc = " }"]
7219#[doc = " }"]
7220#[doc = " },"]
7221#[doc = " {"]
7222#[doc = " \"type\": \"object\","]
7223#[doc = " \"required\": ["]
7224#[doc = " \"cause\","]
7225#[doc = " \"name\""]
7226#[doc = " ],"]
7227#[doc = " \"properties\": {"]
7228#[doc = " \"cause\": {"]
7229#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7230#[doc = " },"]
7231#[doc = " \"name\": {"]
7232#[doc = " \"type\": \"string\","]
7233#[doc = " \"enum\": ["]
7234#[doc = " \"INTERNAL_ERROR\""]
7235#[doc = " ]"]
7236#[doc = " }"]
7237#[doc = " }"]
7238#[doc = " }"]
7239#[doc = " ]"]
7240#[doc = "}"]
7241#[doc = r" ```"]
7242#[doc = r" </details>"]
7243#[derive(
7244 :: serde :: Deserialize,
7245 :: serde :: Serialize,
7246 Clone,
7247 Debug,
7248 thiserror::Error,
7249 strum_macros::Display,
7250)]
7251#[serde(tag = "name", content = "cause")]
7252pub enum ErrorWrapperForRpcMaintenanceWindowsError {
7253 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7254 RequestValidationError(RpcRequestValidationErrorKind),
7255 #[serde(rename = "HANDLER_ERROR")]
7256 HandlerError(RpcMaintenanceWindowsError),
7257 #[serde(rename = "INTERNAL_ERROR")]
7258 InternalError(InternalError),
7259}
7260impl ::std::convert::From<&Self> for ErrorWrapperForRpcMaintenanceWindowsError {
7261 fn from(value: &ErrorWrapperForRpcMaintenanceWindowsError) -> Self {
7262 value.clone()
7263 }
7264}
7265impl ::std::convert::From<RpcRequestValidationErrorKind>
7266 for ErrorWrapperForRpcMaintenanceWindowsError
7267{
7268 fn from(value: RpcRequestValidationErrorKind) -> Self {
7269 Self::RequestValidationError(value)
7270 }
7271}
7272impl ::std::convert::From<RpcMaintenanceWindowsError>
7273 for ErrorWrapperForRpcMaintenanceWindowsError
7274{
7275 fn from(value: RpcMaintenanceWindowsError) -> Self {
7276 Self::HandlerError(value)
7277 }
7278}
7279impl ::std::convert::From<InternalError> for ErrorWrapperForRpcMaintenanceWindowsError {
7280 fn from(value: InternalError) -> Self {
7281 Self::InternalError(value)
7282 }
7283}
7284#[doc = "`ErrorWrapperForRpcNetworkInfoError`"]
7285#[doc = r""]
7286#[doc = r" <details><summary>JSON schema</summary>"]
7287#[doc = r""]
7288#[doc = r" ```json"]
7289#[doc = "{"]
7290#[doc = " \"oneOf\": ["]
7291#[doc = " {"]
7292#[doc = " \"type\": \"object\","]
7293#[doc = " \"required\": ["]
7294#[doc = " \"cause\","]
7295#[doc = " \"name\""]
7296#[doc = " ],"]
7297#[doc = " \"properties\": {"]
7298#[doc = " \"cause\": {"]
7299#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7300#[doc = " },"]
7301#[doc = " \"name\": {"]
7302#[doc = " \"type\": \"string\","]
7303#[doc = " \"enum\": ["]
7304#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7305#[doc = " ]"]
7306#[doc = " }"]
7307#[doc = " }"]
7308#[doc = " },"]
7309#[doc = " {"]
7310#[doc = " \"type\": \"object\","]
7311#[doc = " \"required\": ["]
7312#[doc = " \"cause\","]
7313#[doc = " \"name\""]
7314#[doc = " ],"]
7315#[doc = " \"properties\": {"]
7316#[doc = " \"cause\": {"]
7317#[doc = " \"$ref\": \"#/components/schemas/RpcNetworkInfoError\""]
7318#[doc = " },"]
7319#[doc = " \"name\": {"]
7320#[doc = " \"type\": \"string\","]
7321#[doc = " \"enum\": ["]
7322#[doc = " \"HANDLER_ERROR\""]
7323#[doc = " ]"]
7324#[doc = " }"]
7325#[doc = " }"]
7326#[doc = " },"]
7327#[doc = " {"]
7328#[doc = " \"type\": \"object\","]
7329#[doc = " \"required\": ["]
7330#[doc = " \"cause\","]
7331#[doc = " \"name\""]
7332#[doc = " ],"]
7333#[doc = " \"properties\": {"]
7334#[doc = " \"cause\": {"]
7335#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7336#[doc = " },"]
7337#[doc = " \"name\": {"]
7338#[doc = " \"type\": \"string\","]
7339#[doc = " \"enum\": ["]
7340#[doc = " \"INTERNAL_ERROR\""]
7341#[doc = " ]"]
7342#[doc = " }"]
7343#[doc = " }"]
7344#[doc = " }"]
7345#[doc = " ]"]
7346#[doc = "}"]
7347#[doc = r" ```"]
7348#[doc = r" </details>"]
7349#[derive(
7350 :: serde :: Deserialize,
7351 :: serde :: Serialize,
7352 Clone,
7353 Debug,
7354 thiserror::Error,
7355 strum_macros::Display,
7356)]
7357#[serde(tag = "name", content = "cause")]
7358pub enum ErrorWrapperForRpcNetworkInfoError {
7359 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7360 RequestValidationError(RpcRequestValidationErrorKind),
7361 #[serde(rename = "HANDLER_ERROR")]
7362 HandlerError(RpcNetworkInfoError),
7363 #[serde(rename = "INTERNAL_ERROR")]
7364 InternalError(InternalError),
7365}
7366impl ::std::convert::From<&Self> for ErrorWrapperForRpcNetworkInfoError {
7367 fn from(value: &ErrorWrapperForRpcNetworkInfoError) -> Self {
7368 value.clone()
7369 }
7370}
7371impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcNetworkInfoError {
7372 fn from(value: RpcRequestValidationErrorKind) -> Self {
7373 Self::RequestValidationError(value)
7374 }
7375}
7376impl ::std::convert::From<RpcNetworkInfoError> for ErrorWrapperForRpcNetworkInfoError {
7377 fn from(value: RpcNetworkInfoError) -> Self {
7378 Self::HandlerError(value)
7379 }
7380}
7381impl ::std::convert::From<InternalError> for ErrorWrapperForRpcNetworkInfoError {
7382 fn from(value: InternalError) -> Self {
7383 Self::InternalError(value)
7384 }
7385}
7386#[doc = "`ErrorWrapperForRpcProtocolConfigError`"]
7387#[doc = r""]
7388#[doc = r" <details><summary>JSON schema</summary>"]
7389#[doc = r""]
7390#[doc = r" ```json"]
7391#[doc = "{"]
7392#[doc = " \"oneOf\": ["]
7393#[doc = " {"]
7394#[doc = " \"type\": \"object\","]
7395#[doc = " \"required\": ["]
7396#[doc = " \"cause\","]
7397#[doc = " \"name\""]
7398#[doc = " ],"]
7399#[doc = " \"properties\": {"]
7400#[doc = " \"cause\": {"]
7401#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7402#[doc = " },"]
7403#[doc = " \"name\": {"]
7404#[doc = " \"type\": \"string\","]
7405#[doc = " \"enum\": ["]
7406#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7407#[doc = " ]"]
7408#[doc = " }"]
7409#[doc = " }"]
7410#[doc = " },"]
7411#[doc = " {"]
7412#[doc = " \"type\": \"object\","]
7413#[doc = " \"required\": ["]
7414#[doc = " \"cause\","]
7415#[doc = " \"name\""]
7416#[doc = " ],"]
7417#[doc = " \"properties\": {"]
7418#[doc = " \"cause\": {"]
7419#[doc = " \"$ref\": \"#/components/schemas/RpcProtocolConfigError\""]
7420#[doc = " },"]
7421#[doc = " \"name\": {"]
7422#[doc = " \"type\": \"string\","]
7423#[doc = " \"enum\": ["]
7424#[doc = " \"HANDLER_ERROR\""]
7425#[doc = " ]"]
7426#[doc = " }"]
7427#[doc = " }"]
7428#[doc = " },"]
7429#[doc = " {"]
7430#[doc = " \"type\": \"object\","]
7431#[doc = " \"required\": ["]
7432#[doc = " \"cause\","]
7433#[doc = " \"name\""]
7434#[doc = " ],"]
7435#[doc = " \"properties\": {"]
7436#[doc = " \"cause\": {"]
7437#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7438#[doc = " },"]
7439#[doc = " \"name\": {"]
7440#[doc = " \"type\": \"string\","]
7441#[doc = " \"enum\": ["]
7442#[doc = " \"INTERNAL_ERROR\""]
7443#[doc = " ]"]
7444#[doc = " }"]
7445#[doc = " }"]
7446#[doc = " }"]
7447#[doc = " ]"]
7448#[doc = "}"]
7449#[doc = r" ```"]
7450#[doc = r" </details>"]
7451#[derive(
7452 :: serde :: Deserialize,
7453 :: serde :: Serialize,
7454 Clone,
7455 Debug,
7456 thiserror::Error,
7457 strum_macros::Display,
7458)]
7459#[serde(tag = "name", content = "cause")]
7460pub enum ErrorWrapperForRpcProtocolConfigError {
7461 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7462 RequestValidationError(RpcRequestValidationErrorKind),
7463 #[serde(rename = "HANDLER_ERROR")]
7464 HandlerError(RpcProtocolConfigError),
7465 #[serde(rename = "INTERNAL_ERROR")]
7466 InternalError(InternalError),
7467}
7468impl ::std::convert::From<&Self> for ErrorWrapperForRpcProtocolConfigError {
7469 fn from(value: &ErrorWrapperForRpcProtocolConfigError) -> Self {
7470 value.clone()
7471 }
7472}
7473impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcProtocolConfigError {
7474 fn from(value: RpcRequestValidationErrorKind) -> Self {
7475 Self::RequestValidationError(value)
7476 }
7477}
7478impl ::std::convert::From<RpcProtocolConfigError> for ErrorWrapperForRpcProtocolConfigError {
7479 fn from(value: RpcProtocolConfigError) -> Self {
7480 Self::HandlerError(value)
7481 }
7482}
7483impl ::std::convert::From<InternalError> for ErrorWrapperForRpcProtocolConfigError {
7484 fn from(value: InternalError) -> Self {
7485 Self::InternalError(value)
7486 }
7487}
7488#[doc = "`ErrorWrapperForRpcQueryError`"]
7489#[doc = r""]
7490#[doc = r" <details><summary>JSON schema</summary>"]
7491#[doc = r""]
7492#[doc = r" ```json"]
7493#[doc = "{"]
7494#[doc = " \"oneOf\": ["]
7495#[doc = " {"]
7496#[doc = " \"type\": \"object\","]
7497#[doc = " \"required\": ["]
7498#[doc = " \"cause\","]
7499#[doc = " \"name\""]
7500#[doc = " ],"]
7501#[doc = " \"properties\": {"]
7502#[doc = " \"cause\": {"]
7503#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7504#[doc = " },"]
7505#[doc = " \"name\": {"]
7506#[doc = " \"type\": \"string\","]
7507#[doc = " \"enum\": ["]
7508#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7509#[doc = " ]"]
7510#[doc = " }"]
7511#[doc = " }"]
7512#[doc = " },"]
7513#[doc = " {"]
7514#[doc = " \"type\": \"object\","]
7515#[doc = " \"required\": ["]
7516#[doc = " \"cause\","]
7517#[doc = " \"name\""]
7518#[doc = " ],"]
7519#[doc = " \"properties\": {"]
7520#[doc = " \"cause\": {"]
7521#[doc = " \"$ref\": \"#/components/schemas/RpcQueryError\""]
7522#[doc = " },"]
7523#[doc = " \"name\": {"]
7524#[doc = " \"type\": \"string\","]
7525#[doc = " \"enum\": ["]
7526#[doc = " \"HANDLER_ERROR\""]
7527#[doc = " ]"]
7528#[doc = " }"]
7529#[doc = " }"]
7530#[doc = " },"]
7531#[doc = " {"]
7532#[doc = " \"type\": \"object\","]
7533#[doc = " \"required\": ["]
7534#[doc = " \"cause\","]
7535#[doc = " \"name\""]
7536#[doc = " ],"]
7537#[doc = " \"properties\": {"]
7538#[doc = " \"cause\": {"]
7539#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7540#[doc = " },"]
7541#[doc = " \"name\": {"]
7542#[doc = " \"type\": \"string\","]
7543#[doc = " \"enum\": ["]
7544#[doc = " \"INTERNAL_ERROR\""]
7545#[doc = " ]"]
7546#[doc = " }"]
7547#[doc = " }"]
7548#[doc = " }"]
7549#[doc = " ]"]
7550#[doc = "}"]
7551#[doc = r" ```"]
7552#[doc = r" </details>"]
7553#[derive(
7554 :: serde :: Deserialize,
7555 :: serde :: Serialize,
7556 Clone,
7557 Debug,
7558 thiserror::Error,
7559 strum_macros::Display,
7560)]
7561#[serde(tag = "name", content = "cause")]
7562pub enum ErrorWrapperForRpcQueryError {
7563 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7564 RequestValidationError(RpcRequestValidationErrorKind),
7565 #[serde(rename = "HANDLER_ERROR")]
7566 HandlerError(RpcQueryError),
7567 #[serde(rename = "INTERNAL_ERROR")]
7568 InternalError(InternalError),
7569}
7570impl ::std::convert::From<&Self> for ErrorWrapperForRpcQueryError {
7571 fn from(value: &ErrorWrapperForRpcQueryError) -> Self {
7572 value.clone()
7573 }
7574}
7575impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcQueryError {
7576 fn from(value: RpcRequestValidationErrorKind) -> Self {
7577 Self::RequestValidationError(value)
7578 }
7579}
7580impl ::std::convert::From<RpcQueryError> for ErrorWrapperForRpcQueryError {
7581 fn from(value: RpcQueryError) -> Self {
7582 Self::HandlerError(value)
7583 }
7584}
7585impl ::std::convert::From<InternalError> for ErrorWrapperForRpcQueryError {
7586 fn from(value: InternalError) -> Self {
7587 Self::InternalError(value)
7588 }
7589}
7590#[doc = "`ErrorWrapperForRpcReceiptError`"]
7591#[doc = r""]
7592#[doc = r" <details><summary>JSON schema</summary>"]
7593#[doc = r""]
7594#[doc = r" ```json"]
7595#[doc = "{"]
7596#[doc = " \"oneOf\": ["]
7597#[doc = " {"]
7598#[doc = " \"type\": \"object\","]
7599#[doc = " \"required\": ["]
7600#[doc = " \"cause\","]
7601#[doc = " \"name\""]
7602#[doc = " ],"]
7603#[doc = " \"properties\": {"]
7604#[doc = " \"cause\": {"]
7605#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7606#[doc = " },"]
7607#[doc = " \"name\": {"]
7608#[doc = " \"type\": \"string\","]
7609#[doc = " \"enum\": ["]
7610#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7611#[doc = " ]"]
7612#[doc = " }"]
7613#[doc = " }"]
7614#[doc = " },"]
7615#[doc = " {"]
7616#[doc = " \"type\": \"object\","]
7617#[doc = " \"required\": ["]
7618#[doc = " \"cause\","]
7619#[doc = " \"name\""]
7620#[doc = " ],"]
7621#[doc = " \"properties\": {"]
7622#[doc = " \"cause\": {"]
7623#[doc = " \"$ref\": \"#/components/schemas/RpcReceiptError\""]
7624#[doc = " },"]
7625#[doc = " \"name\": {"]
7626#[doc = " \"type\": \"string\","]
7627#[doc = " \"enum\": ["]
7628#[doc = " \"HANDLER_ERROR\""]
7629#[doc = " ]"]
7630#[doc = " }"]
7631#[doc = " }"]
7632#[doc = " },"]
7633#[doc = " {"]
7634#[doc = " \"type\": \"object\","]
7635#[doc = " \"required\": ["]
7636#[doc = " \"cause\","]
7637#[doc = " \"name\""]
7638#[doc = " ],"]
7639#[doc = " \"properties\": {"]
7640#[doc = " \"cause\": {"]
7641#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7642#[doc = " },"]
7643#[doc = " \"name\": {"]
7644#[doc = " \"type\": \"string\","]
7645#[doc = " \"enum\": ["]
7646#[doc = " \"INTERNAL_ERROR\""]
7647#[doc = " ]"]
7648#[doc = " }"]
7649#[doc = " }"]
7650#[doc = " }"]
7651#[doc = " ]"]
7652#[doc = "}"]
7653#[doc = r" ```"]
7654#[doc = r" </details>"]
7655#[derive(
7656 :: serde :: Deserialize,
7657 :: serde :: Serialize,
7658 Clone,
7659 Debug,
7660 thiserror::Error,
7661 strum_macros::Display,
7662)]
7663#[serde(tag = "name", content = "cause")]
7664pub enum ErrorWrapperForRpcReceiptError {
7665 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7666 RequestValidationError(RpcRequestValidationErrorKind),
7667 #[serde(rename = "HANDLER_ERROR")]
7668 HandlerError(RpcReceiptError),
7669 #[serde(rename = "INTERNAL_ERROR")]
7670 InternalError(InternalError),
7671}
7672impl ::std::convert::From<&Self> for ErrorWrapperForRpcReceiptError {
7673 fn from(value: &ErrorWrapperForRpcReceiptError) -> Self {
7674 value.clone()
7675 }
7676}
7677impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcReceiptError {
7678 fn from(value: RpcRequestValidationErrorKind) -> Self {
7679 Self::RequestValidationError(value)
7680 }
7681}
7682impl ::std::convert::From<RpcReceiptError> for ErrorWrapperForRpcReceiptError {
7683 fn from(value: RpcReceiptError) -> Self {
7684 Self::HandlerError(value)
7685 }
7686}
7687impl ::std::convert::From<InternalError> for ErrorWrapperForRpcReceiptError {
7688 fn from(value: InternalError) -> Self {
7689 Self::InternalError(value)
7690 }
7691}
7692#[doc = "`ErrorWrapperForRpcSplitStorageInfoError`"]
7693#[doc = r""]
7694#[doc = r" <details><summary>JSON schema</summary>"]
7695#[doc = r""]
7696#[doc = r" ```json"]
7697#[doc = "{"]
7698#[doc = " \"oneOf\": ["]
7699#[doc = " {"]
7700#[doc = " \"type\": \"object\","]
7701#[doc = " \"required\": ["]
7702#[doc = " \"cause\","]
7703#[doc = " \"name\""]
7704#[doc = " ],"]
7705#[doc = " \"properties\": {"]
7706#[doc = " \"cause\": {"]
7707#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7708#[doc = " },"]
7709#[doc = " \"name\": {"]
7710#[doc = " \"type\": \"string\","]
7711#[doc = " \"enum\": ["]
7712#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7713#[doc = " ]"]
7714#[doc = " }"]
7715#[doc = " }"]
7716#[doc = " },"]
7717#[doc = " {"]
7718#[doc = " \"type\": \"object\","]
7719#[doc = " \"required\": ["]
7720#[doc = " \"cause\","]
7721#[doc = " \"name\""]
7722#[doc = " ],"]
7723#[doc = " \"properties\": {"]
7724#[doc = " \"cause\": {"]
7725#[doc = " \"$ref\": \"#/components/schemas/RpcSplitStorageInfoError\""]
7726#[doc = " },"]
7727#[doc = " \"name\": {"]
7728#[doc = " \"type\": \"string\","]
7729#[doc = " \"enum\": ["]
7730#[doc = " \"HANDLER_ERROR\""]
7731#[doc = " ]"]
7732#[doc = " }"]
7733#[doc = " }"]
7734#[doc = " },"]
7735#[doc = " {"]
7736#[doc = " \"type\": \"object\","]
7737#[doc = " \"required\": ["]
7738#[doc = " \"cause\","]
7739#[doc = " \"name\""]
7740#[doc = " ],"]
7741#[doc = " \"properties\": {"]
7742#[doc = " \"cause\": {"]
7743#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7744#[doc = " },"]
7745#[doc = " \"name\": {"]
7746#[doc = " \"type\": \"string\","]
7747#[doc = " \"enum\": ["]
7748#[doc = " \"INTERNAL_ERROR\""]
7749#[doc = " ]"]
7750#[doc = " }"]
7751#[doc = " }"]
7752#[doc = " }"]
7753#[doc = " ]"]
7754#[doc = "}"]
7755#[doc = r" ```"]
7756#[doc = r" </details>"]
7757#[derive(
7758 :: serde :: Deserialize,
7759 :: serde :: Serialize,
7760 Clone,
7761 Debug,
7762 thiserror::Error,
7763 strum_macros::Display,
7764)]
7765#[serde(tag = "name", content = "cause")]
7766pub enum ErrorWrapperForRpcSplitStorageInfoError {
7767 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7768 RequestValidationError(RpcRequestValidationErrorKind),
7769 #[serde(rename = "HANDLER_ERROR")]
7770 HandlerError(RpcSplitStorageInfoError),
7771 #[serde(rename = "INTERNAL_ERROR")]
7772 InternalError(InternalError),
7773}
7774impl ::std::convert::From<&Self> for ErrorWrapperForRpcSplitStorageInfoError {
7775 fn from(value: &ErrorWrapperForRpcSplitStorageInfoError) -> Self {
7776 value.clone()
7777 }
7778}
7779impl ::std::convert::From<RpcRequestValidationErrorKind>
7780 for ErrorWrapperForRpcSplitStorageInfoError
7781{
7782 fn from(value: RpcRequestValidationErrorKind) -> Self {
7783 Self::RequestValidationError(value)
7784 }
7785}
7786impl ::std::convert::From<RpcSplitStorageInfoError> for ErrorWrapperForRpcSplitStorageInfoError {
7787 fn from(value: RpcSplitStorageInfoError) -> Self {
7788 Self::HandlerError(value)
7789 }
7790}
7791impl ::std::convert::From<InternalError> for ErrorWrapperForRpcSplitStorageInfoError {
7792 fn from(value: InternalError) -> Self {
7793 Self::InternalError(value)
7794 }
7795}
7796#[doc = "`ErrorWrapperForRpcStateChangesError`"]
7797#[doc = r""]
7798#[doc = r" <details><summary>JSON schema</summary>"]
7799#[doc = r""]
7800#[doc = r" ```json"]
7801#[doc = "{"]
7802#[doc = " \"oneOf\": ["]
7803#[doc = " {"]
7804#[doc = " \"type\": \"object\","]
7805#[doc = " \"required\": ["]
7806#[doc = " \"cause\","]
7807#[doc = " \"name\""]
7808#[doc = " ],"]
7809#[doc = " \"properties\": {"]
7810#[doc = " \"cause\": {"]
7811#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7812#[doc = " },"]
7813#[doc = " \"name\": {"]
7814#[doc = " \"type\": \"string\","]
7815#[doc = " \"enum\": ["]
7816#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7817#[doc = " ]"]
7818#[doc = " }"]
7819#[doc = " }"]
7820#[doc = " },"]
7821#[doc = " {"]
7822#[doc = " \"type\": \"object\","]
7823#[doc = " \"required\": ["]
7824#[doc = " \"cause\","]
7825#[doc = " \"name\""]
7826#[doc = " ],"]
7827#[doc = " \"properties\": {"]
7828#[doc = " \"cause\": {"]
7829#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesError\""]
7830#[doc = " },"]
7831#[doc = " \"name\": {"]
7832#[doc = " \"type\": \"string\","]
7833#[doc = " \"enum\": ["]
7834#[doc = " \"HANDLER_ERROR\""]
7835#[doc = " ]"]
7836#[doc = " }"]
7837#[doc = " }"]
7838#[doc = " },"]
7839#[doc = " {"]
7840#[doc = " \"type\": \"object\","]
7841#[doc = " \"required\": ["]
7842#[doc = " \"cause\","]
7843#[doc = " \"name\""]
7844#[doc = " ],"]
7845#[doc = " \"properties\": {"]
7846#[doc = " \"cause\": {"]
7847#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7848#[doc = " },"]
7849#[doc = " \"name\": {"]
7850#[doc = " \"type\": \"string\","]
7851#[doc = " \"enum\": ["]
7852#[doc = " \"INTERNAL_ERROR\""]
7853#[doc = " ]"]
7854#[doc = " }"]
7855#[doc = " }"]
7856#[doc = " }"]
7857#[doc = " ]"]
7858#[doc = "}"]
7859#[doc = r" ```"]
7860#[doc = r" </details>"]
7861#[derive(
7862 :: serde :: Deserialize,
7863 :: serde :: Serialize,
7864 Clone,
7865 Debug,
7866 thiserror::Error,
7867 strum_macros::Display,
7868)]
7869#[serde(tag = "name", content = "cause")]
7870pub enum ErrorWrapperForRpcStateChangesError {
7871 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7872 RequestValidationError(RpcRequestValidationErrorKind),
7873 #[serde(rename = "HANDLER_ERROR")]
7874 HandlerError(RpcStateChangesError),
7875 #[serde(rename = "INTERNAL_ERROR")]
7876 InternalError(InternalError),
7877}
7878impl ::std::convert::From<&Self> for ErrorWrapperForRpcStateChangesError {
7879 fn from(value: &ErrorWrapperForRpcStateChangesError) -> Self {
7880 value.clone()
7881 }
7882}
7883impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcStateChangesError {
7884 fn from(value: RpcRequestValidationErrorKind) -> Self {
7885 Self::RequestValidationError(value)
7886 }
7887}
7888impl ::std::convert::From<RpcStateChangesError> for ErrorWrapperForRpcStateChangesError {
7889 fn from(value: RpcStateChangesError) -> Self {
7890 Self::HandlerError(value)
7891 }
7892}
7893impl ::std::convert::From<InternalError> for ErrorWrapperForRpcStateChangesError {
7894 fn from(value: InternalError) -> Self {
7895 Self::InternalError(value)
7896 }
7897}
7898#[doc = "`ErrorWrapperForRpcStatusError`"]
7899#[doc = r""]
7900#[doc = r" <details><summary>JSON schema</summary>"]
7901#[doc = r""]
7902#[doc = r" ```json"]
7903#[doc = "{"]
7904#[doc = " \"oneOf\": ["]
7905#[doc = " {"]
7906#[doc = " \"type\": \"object\","]
7907#[doc = " \"required\": ["]
7908#[doc = " \"cause\","]
7909#[doc = " \"name\""]
7910#[doc = " ],"]
7911#[doc = " \"properties\": {"]
7912#[doc = " \"cause\": {"]
7913#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
7914#[doc = " },"]
7915#[doc = " \"name\": {"]
7916#[doc = " \"type\": \"string\","]
7917#[doc = " \"enum\": ["]
7918#[doc = " \"REQUEST_VALIDATION_ERROR\""]
7919#[doc = " ]"]
7920#[doc = " }"]
7921#[doc = " }"]
7922#[doc = " },"]
7923#[doc = " {"]
7924#[doc = " \"type\": \"object\","]
7925#[doc = " \"required\": ["]
7926#[doc = " \"cause\","]
7927#[doc = " \"name\""]
7928#[doc = " ],"]
7929#[doc = " \"properties\": {"]
7930#[doc = " \"cause\": {"]
7931#[doc = " \"$ref\": \"#/components/schemas/RpcStatusError\""]
7932#[doc = " },"]
7933#[doc = " \"name\": {"]
7934#[doc = " \"type\": \"string\","]
7935#[doc = " \"enum\": ["]
7936#[doc = " \"HANDLER_ERROR\""]
7937#[doc = " ]"]
7938#[doc = " }"]
7939#[doc = " }"]
7940#[doc = " },"]
7941#[doc = " {"]
7942#[doc = " \"type\": \"object\","]
7943#[doc = " \"required\": ["]
7944#[doc = " \"cause\","]
7945#[doc = " \"name\""]
7946#[doc = " ],"]
7947#[doc = " \"properties\": {"]
7948#[doc = " \"cause\": {"]
7949#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
7950#[doc = " },"]
7951#[doc = " \"name\": {"]
7952#[doc = " \"type\": \"string\","]
7953#[doc = " \"enum\": ["]
7954#[doc = " \"INTERNAL_ERROR\""]
7955#[doc = " ]"]
7956#[doc = " }"]
7957#[doc = " }"]
7958#[doc = " }"]
7959#[doc = " ]"]
7960#[doc = "}"]
7961#[doc = r" ```"]
7962#[doc = r" </details>"]
7963#[derive(
7964 :: serde :: Deserialize,
7965 :: serde :: Serialize,
7966 Clone,
7967 Debug,
7968 thiserror::Error,
7969 strum_macros::Display,
7970)]
7971#[serde(tag = "name", content = "cause")]
7972pub enum ErrorWrapperForRpcStatusError {
7973 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
7974 RequestValidationError(RpcRequestValidationErrorKind),
7975 #[serde(rename = "HANDLER_ERROR")]
7976 HandlerError(RpcStatusError),
7977 #[serde(rename = "INTERNAL_ERROR")]
7978 InternalError(InternalError),
7979}
7980impl ::std::convert::From<&Self> for ErrorWrapperForRpcStatusError {
7981 fn from(value: &ErrorWrapperForRpcStatusError) -> Self {
7982 value.clone()
7983 }
7984}
7985impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcStatusError {
7986 fn from(value: RpcRequestValidationErrorKind) -> Self {
7987 Self::RequestValidationError(value)
7988 }
7989}
7990impl ::std::convert::From<RpcStatusError> for ErrorWrapperForRpcStatusError {
7991 fn from(value: RpcStatusError) -> Self {
7992 Self::HandlerError(value)
7993 }
7994}
7995impl ::std::convert::From<InternalError> for ErrorWrapperForRpcStatusError {
7996 fn from(value: InternalError) -> Self {
7997 Self::InternalError(value)
7998 }
7999}
8000#[doc = "`ErrorWrapperForRpcTransactionError`"]
8001#[doc = r""]
8002#[doc = r" <details><summary>JSON schema</summary>"]
8003#[doc = r""]
8004#[doc = r" ```json"]
8005#[doc = "{"]
8006#[doc = " \"oneOf\": ["]
8007#[doc = " {"]
8008#[doc = " \"type\": \"object\","]
8009#[doc = " \"required\": ["]
8010#[doc = " \"cause\","]
8011#[doc = " \"name\""]
8012#[doc = " ],"]
8013#[doc = " \"properties\": {"]
8014#[doc = " \"cause\": {"]
8015#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
8016#[doc = " },"]
8017#[doc = " \"name\": {"]
8018#[doc = " \"type\": \"string\","]
8019#[doc = " \"enum\": ["]
8020#[doc = " \"REQUEST_VALIDATION_ERROR\""]
8021#[doc = " ]"]
8022#[doc = " }"]
8023#[doc = " }"]
8024#[doc = " },"]
8025#[doc = " {"]
8026#[doc = " \"type\": \"object\","]
8027#[doc = " \"required\": ["]
8028#[doc = " \"cause\","]
8029#[doc = " \"name\""]
8030#[doc = " ],"]
8031#[doc = " \"properties\": {"]
8032#[doc = " \"cause\": {"]
8033#[doc = " \"$ref\": \"#/components/schemas/RpcTransactionError\""]
8034#[doc = " },"]
8035#[doc = " \"name\": {"]
8036#[doc = " \"type\": \"string\","]
8037#[doc = " \"enum\": ["]
8038#[doc = " \"HANDLER_ERROR\""]
8039#[doc = " ]"]
8040#[doc = " }"]
8041#[doc = " }"]
8042#[doc = " },"]
8043#[doc = " {"]
8044#[doc = " \"type\": \"object\","]
8045#[doc = " \"required\": ["]
8046#[doc = " \"cause\","]
8047#[doc = " \"name\""]
8048#[doc = " ],"]
8049#[doc = " \"properties\": {"]
8050#[doc = " \"cause\": {"]
8051#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
8052#[doc = " },"]
8053#[doc = " \"name\": {"]
8054#[doc = " \"type\": \"string\","]
8055#[doc = " \"enum\": ["]
8056#[doc = " \"INTERNAL_ERROR\""]
8057#[doc = " ]"]
8058#[doc = " }"]
8059#[doc = " }"]
8060#[doc = " }"]
8061#[doc = " ]"]
8062#[doc = "}"]
8063#[doc = r" ```"]
8064#[doc = r" </details>"]
8065#[derive(
8066 :: serde :: Deserialize,
8067 :: serde :: Serialize,
8068 Clone,
8069 Debug,
8070 thiserror::Error,
8071 strum_macros::Display,
8072)]
8073#[serde(tag = "name", content = "cause")]
8074pub enum ErrorWrapperForRpcTransactionError {
8075 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
8076 RequestValidationError(RpcRequestValidationErrorKind),
8077 #[serde(rename = "HANDLER_ERROR")]
8078 HandlerError(RpcTransactionError),
8079 #[serde(rename = "INTERNAL_ERROR")]
8080 InternalError(InternalError),
8081}
8082impl ::std::convert::From<&Self> for ErrorWrapperForRpcTransactionError {
8083 fn from(value: &ErrorWrapperForRpcTransactionError) -> Self {
8084 value.clone()
8085 }
8086}
8087impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcTransactionError {
8088 fn from(value: RpcRequestValidationErrorKind) -> Self {
8089 Self::RequestValidationError(value)
8090 }
8091}
8092impl ::std::convert::From<RpcTransactionError> for ErrorWrapperForRpcTransactionError {
8093 fn from(value: RpcTransactionError) -> Self {
8094 Self::HandlerError(value)
8095 }
8096}
8097impl ::std::convert::From<InternalError> for ErrorWrapperForRpcTransactionError {
8098 fn from(value: InternalError) -> Self {
8099 Self::InternalError(value)
8100 }
8101}
8102#[doc = "`ErrorWrapperForRpcValidatorError`"]
8103#[doc = r""]
8104#[doc = r" <details><summary>JSON schema</summary>"]
8105#[doc = r""]
8106#[doc = r" ```json"]
8107#[doc = "{"]
8108#[doc = " \"oneOf\": ["]
8109#[doc = " {"]
8110#[doc = " \"type\": \"object\","]
8111#[doc = " \"required\": ["]
8112#[doc = " \"cause\","]
8113#[doc = " \"name\""]
8114#[doc = " ],"]
8115#[doc = " \"properties\": {"]
8116#[doc = " \"cause\": {"]
8117#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
8118#[doc = " },"]
8119#[doc = " \"name\": {"]
8120#[doc = " \"type\": \"string\","]
8121#[doc = " \"enum\": ["]
8122#[doc = " \"REQUEST_VALIDATION_ERROR\""]
8123#[doc = " ]"]
8124#[doc = " }"]
8125#[doc = " }"]
8126#[doc = " },"]
8127#[doc = " {"]
8128#[doc = " \"type\": \"object\","]
8129#[doc = " \"required\": ["]
8130#[doc = " \"cause\","]
8131#[doc = " \"name\""]
8132#[doc = " ],"]
8133#[doc = " \"properties\": {"]
8134#[doc = " \"cause\": {"]
8135#[doc = " \"$ref\": \"#/components/schemas/RpcValidatorError\""]
8136#[doc = " },"]
8137#[doc = " \"name\": {"]
8138#[doc = " \"type\": \"string\","]
8139#[doc = " \"enum\": ["]
8140#[doc = " \"HANDLER_ERROR\""]
8141#[doc = " ]"]
8142#[doc = " }"]
8143#[doc = " }"]
8144#[doc = " },"]
8145#[doc = " {"]
8146#[doc = " \"type\": \"object\","]
8147#[doc = " \"required\": ["]
8148#[doc = " \"cause\","]
8149#[doc = " \"name\""]
8150#[doc = " ],"]
8151#[doc = " \"properties\": {"]
8152#[doc = " \"cause\": {"]
8153#[doc = " \"$ref\": \"#/components/schemas/InternalError\""]
8154#[doc = " },"]
8155#[doc = " \"name\": {"]
8156#[doc = " \"type\": \"string\","]
8157#[doc = " \"enum\": ["]
8158#[doc = " \"INTERNAL_ERROR\""]
8159#[doc = " ]"]
8160#[doc = " }"]
8161#[doc = " }"]
8162#[doc = " }"]
8163#[doc = " ]"]
8164#[doc = "}"]
8165#[doc = r" ```"]
8166#[doc = r" </details>"]
8167#[derive(
8168 :: serde :: Deserialize,
8169 :: serde :: Serialize,
8170 Clone,
8171 Debug,
8172 thiserror::Error,
8173 strum_macros::Display,
8174)]
8175#[serde(tag = "name", content = "cause")]
8176pub enum ErrorWrapperForRpcValidatorError {
8177 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
8178 RequestValidationError(RpcRequestValidationErrorKind),
8179 #[serde(rename = "HANDLER_ERROR")]
8180 HandlerError(RpcValidatorError),
8181 #[serde(rename = "INTERNAL_ERROR")]
8182 InternalError(InternalError),
8183}
8184impl ::std::convert::From<&Self> for ErrorWrapperForRpcValidatorError {
8185 fn from(value: &ErrorWrapperForRpcValidatorError) -> Self {
8186 value.clone()
8187 }
8188}
8189impl ::std::convert::From<RpcRequestValidationErrorKind> for ErrorWrapperForRpcValidatorError {
8190 fn from(value: RpcRequestValidationErrorKind) -> Self {
8191 Self::RequestValidationError(value)
8192 }
8193}
8194impl ::std::convert::From<RpcValidatorError> for ErrorWrapperForRpcValidatorError {
8195 fn from(value: RpcValidatorError) -> Self {
8196 Self::HandlerError(value)
8197 }
8198}
8199impl ::std::convert::From<InternalError> for ErrorWrapperForRpcValidatorError {
8200 fn from(value: InternalError) -> Self {
8201 Self::InternalError(value)
8202 }
8203}
8204#[doc = "`ExecutionMetadataView`"]
8205#[doc = r""]
8206#[doc = r" <details><summary>JSON schema</summary>"]
8207#[doc = r""]
8208#[doc = r" ```json"]
8209#[doc = "{"]
8210#[doc = " \"type\": \"object\","]
8211#[doc = " \"required\": ["]
8212#[doc = " \"version\""]
8213#[doc = " ],"]
8214#[doc = " \"properties\": {"]
8215#[doc = " \"gas_profile\": {"]
8216#[doc = " \"type\": ["]
8217#[doc = " \"array\","]
8218#[doc = " \"null\""]
8219#[doc = " ],"]
8220#[doc = " \"items\": {"]
8221#[doc = " \"$ref\": \"#/components/schemas/CostGasUsed\""]
8222#[doc = " }"]
8223#[doc = " },"]
8224#[doc = " \"version\": {"]
8225#[doc = " \"type\": \"integer\","]
8226#[doc = " \"format\": \"uint32\","]
8227#[doc = " \"minimum\": 0.0"]
8228#[doc = " }"]
8229#[doc = " }"]
8230#[doc = "}"]
8231#[doc = r" ```"]
8232#[doc = r" </details>"]
8233#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8234pub struct ExecutionMetadataView {
8235 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8236 pub gas_profile: ::std::option::Option<::std::vec::Vec<CostGasUsed>>,
8237 pub version: u32,
8238}
8239impl ::std::convert::From<&ExecutionMetadataView> for ExecutionMetadataView {
8240 fn from(value: &ExecutionMetadataView) -> Self {
8241 value.clone()
8242 }
8243}
8244#[doc = "`ExecutionOutcomeView`"]
8245#[doc = r""]
8246#[doc = r" <details><summary>JSON schema</summary>"]
8247#[doc = r""]
8248#[doc = r" ```json"]
8249#[doc = "{"]
8250#[doc = " \"type\": \"object\","]
8251#[doc = " \"required\": ["]
8252#[doc = " \"executor_id\","]
8253#[doc = " \"gas_burnt\","]
8254#[doc = " \"logs\","]
8255#[doc = " \"receipt_ids\","]
8256#[doc = " \"status\","]
8257#[doc = " \"tokens_burnt\""]
8258#[doc = " ],"]
8259#[doc = " \"properties\": {"]
8260#[doc = " \"executor_id\": {"]
8261#[doc = " \"description\": \"The id of the account on which the execution happens. For transaction this is signer_id,\\nfor receipt this is receiver_id.\","]
8262#[doc = " \"allOf\": ["]
8263#[doc = " {"]
8264#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
8265#[doc = " }"]
8266#[doc = " ]"]
8267#[doc = " },"]
8268#[doc = " \"gas_burnt\": {"]
8269#[doc = " \"description\": \"The amount of the gas burnt by the given transaction or receipt.\","]
8270#[doc = " \"allOf\": ["]
8271#[doc = " {"]
8272#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8273#[doc = " }"]
8274#[doc = " ]"]
8275#[doc = " },"]
8276#[doc = " \"logs\": {"]
8277#[doc = " \"description\": \"Logs from this transaction or receipt.\","]
8278#[doc = " \"type\": \"array\","]
8279#[doc = " \"items\": {"]
8280#[doc = " \"type\": \"string\""]
8281#[doc = " }"]
8282#[doc = " },"]
8283#[doc = " \"metadata\": {"]
8284#[doc = " \"description\": \"Execution metadata, versioned\","]
8285#[doc = " \"default\": {"]
8286#[doc = " \"version\": 1"]
8287#[doc = " },"]
8288#[doc = " \"allOf\": ["]
8289#[doc = " {"]
8290#[doc = " \"$ref\": \"#/components/schemas/ExecutionMetadataView\""]
8291#[doc = " }"]
8292#[doc = " ]"]
8293#[doc = " },"]
8294#[doc = " \"receipt_ids\": {"]
8295#[doc = " \"description\": \"Receipt IDs generated by this transaction or receipt.\","]
8296#[doc = " \"type\": \"array\","]
8297#[doc = " \"items\": {"]
8298#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
8299#[doc = " }"]
8300#[doc = " },"]
8301#[doc = " \"status\": {"]
8302#[doc = " \"description\": \"Execution status. Contains the result in case of successful execution.\","]
8303#[doc = " \"allOf\": ["]
8304#[doc = " {"]
8305#[doc = " \"$ref\": \"#/components/schemas/ExecutionStatusView\""]
8306#[doc = " }"]
8307#[doc = " ]"]
8308#[doc = " },"]
8309#[doc = " \"tokens_burnt\": {"]
8310#[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.\","]
8311#[doc = " \"allOf\": ["]
8312#[doc = " {"]
8313#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
8314#[doc = " }"]
8315#[doc = " ]"]
8316#[doc = " }"]
8317#[doc = " }"]
8318#[doc = "}"]
8319#[doc = r" ```"]
8320#[doc = r" </details>"]
8321#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8322pub struct ExecutionOutcomeView {
8323 #[doc = "The id of the account on which the execution happens. For transaction this is signer_id,\nfor receipt this is receiver_id."]
8324 pub executor_id: AccountId,
8325 #[doc = "The amount of the gas burnt by the given transaction or receipt."]
8326 pub gas_burnt: NearGas,
8327 #[doc = "Logs from this transaction or receipt."]
8328 pub logs: ::std::vec::Vec<::std::string::String>,
8329 #[doc = "Execution metadata, versioned"]
8330 #[serde(default = "defaults::execution_outcome_view_metadata")]
8331 pub metadata: ExecutionMetadataView,
8332 #[doc = "Receipt IDs generated by this transaction or receipt."]
8333 pub receipt_ids: ::std::vec::Vec<CryptoHash>,
8334 #[doc = "Execution status. Contains the result in case of successful execution."]
8335 pub status: ExecutionStatusView,
8336 #[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."]
8337 pub tokens_burnt: NearToken,
8338}
8339impl ::std::convert::From<&ExecutionOutcomeView> for ExecutionOutcomeView {
8340 fn from(value: &ExecutionOutcomeView) -> Self {
8341 value.clone()
8342 }
8343}
8344#[doc = "`ExecutionOutcomeWithIdView`"]
8345#[doc = r""]
8346#[doc = r" <details><summary>JSON schema</summary>"]
8347#[doc = r""]
8348#[doc = r" ```json"]
8349#[doc = "{"]
8350#[doc = " \"type\": \"object\","]
8351#[doc = " \"required\": ["]
8352#[doc = " \"block_hash\","]
8353#[doc = " \"id\","]
8354#[doc = " \"outcome\","]
8355#[doc = " \"proof\""]
8356#[doc = " ],"]
8357#[doc = " \"properties\": {"]
8358#[doc = " \"block_hash\": {"]
8359#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
8360#[doc = " },"]
8361#[doc = " \"id\": {"]
8362#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
8363#[doc = " },"]
8364#[doc = " \"outcome\": {"]
8365#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeView\""]
8366#[doc = " },"]
8367#[doc = " \"proof\": {"]
8368#[doc = " \"type\": \"array\","]
8369#[doc = " \"items\": {"]
8370#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
8371#[doc = " }"]
8372#[doc = " }"]
8373#[doc = " }"]
8374#[doc = "}"]
8375#[doc = r" ```"]
8376#[doc = r" </details>"]
8377#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8378pub struct ExecutionOutcomeWithIdView {
8379 pub block_hash: CryptoHash,
8380 pub id: CryptoHash,
8381 pub outcome: ExecutionOutcomeView,
8382 pub proof: ::std::vec::Vec<MerklePathItem>,
8383}
8384impl ::std::convert::From<&ExecutionOutcomeWithIdView> for ExecutionOutcomeWithIdView {
8385 fn from(value: &ExecutionOutcomeWithIdView) -> Self {
8386 value.clone()
8387 }
8388}
8389#[doc = "`ExecutionStatusView`"]
8390#[doc = r""]
8391#[doc = r" <details><summary>JSON schema</summary>"]
8392#[doc = r""]
8393#[doc = r" ```json"]
8394#[doc = "{"]
8395#[doc = " \"oneOf\": ["]
8396#[doc = " {"]
8397#[doc = " \"description\": \"The execution is pending or unknown.\","]
8398#[doc = " \"type\": \"string\","]
8399#[doc = " \"enum\": ["]
8400#[doc = " \"Unknown\""]
8401#[doc = " ]"]
8402#[doc = " },"]
8403#[doc = " {"]
8404#[doc = " \"description\": \"The execution has failed.\","]
8405#[doc = " \"type\": \"object\","]
8406#[doc = " \"required\": ["]
8407#[doc = " \"Failure\""]
8408#[doc = " ],"]
8409#[doc = " \"properties\": {"]
8410#[doc = " \"Failure\": {"]
8411#[doc = " \"$ref\": \"#/components/schemas/TxExecutionError\""]
8412#[doc = " }"]
8413#[doc = " },"]
8414#[doc = " \"additionalProperties\": false"]
8415#[doc = " },"]
8416#[doc = " {"]
8417#[doc = " \"description\": \"The final action succeeded and returned some value or an empty vec encoded in base64.\","]
8418#[doc = " \"type\": \"object\","]
8419#[doc = " \"required\": ["]
8420#[doc = " \"SuccessValue\""]
8421#[doc = " ],"]
8422#[doc = " \"properties\": {"]
8423#[doc = " \"SuccessValue\": {"]
8424#[doc = " \"type\": \"string\""]
8425#[doc = " }"]
8426#[doc = " },"]
8427#[doc = " \"additionalProperties\": false"]
8428#[doc = " },"]
8429#[doc = " {"]
8430#[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.\","]
8431#[doc = " \"type\": \"object\","]
8432#[doc = " \"required\": ["]
8433#[doc = " \"SuccessReceiptId\""]
8434#[doc = " ],"]
8435#[doc = " \"properties\": {"]
8436#[doc = " \"SuccessReceiptId\": {"]
8437#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
8438#[doc = " }"]
8439#[doc = " },"]
8440#[doc = " \"additionalProperties\": false"]
8441#[doc = " }"]
8442#[doc = " ]"]
8443#[doc = "}"]
8444#[doc = r" ```"]
8445#[doc = r" </details>"]
8446#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8447pub enum ExecutionStatusView {
8448 #[doc = "The execution is pending or unknown."]
8449 Unknown,
8450 #[doc = "The execution has failed."]
8451 Failure(TxExecutionError),
8452 #[doc = "The final action succeeded and returned some value or an empty vec encoded in base64."]
8453 SuccessValue(::std::string::String),
8454 #[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."]
8455 SuccessReceiptId(CryptoHash),
8456}
8457impl ::std::convert::From<&Self> for ExecutionStatusView {
8458 fn from(value: &ExecutionStatusView) -> Self {
8459 value.clone()
8460 }
8461}
8462impl ::std::convert::From<TxExecutionError> for ExecutionStatusView {
8463 fn from(value: TxExecutionError) -> Self {
8464 Self::Failure(value)
8465 }
8466}
8467impl ::std::convert::From<CryptoHash> for ExecutionStatusView {
8468 fn from(value: CryptoHash) -> Self {
8469 Self::SuccessReceiptId(value)
8470 }
8471}
8472#[doc = "Typed view of ExtCostsConfig to preserve JSON output field names in protocol\nconfig RPC output."]
8473#[doc = r""]
8474#[doc = r" <details><summary>JSON schema</summary>"]
8475#[doc = r""]
8476#[doc = r" ```json"]
8477#[doc = "{"]
8478#[doc = " \"description\": \"Typed view of ExtCostsConfig to preserve JSON output field names in protocol\\nconfig RPC output.\","]
8479#[doc = " \"type\": \"object\","]
8480#[doc = " \"required\": ["]
8481#[doc = " \"alt_bn128_g1_multiexp_base\","]
8482#[doc = " \"alt_bn128_g1_multiexp_element\","]
8483#[doc = " \"alt_bn128_g1_sum_base\","]
8484#[doc = " \"alt_bn128_g1_sum_element\","]
8485#[doc = " \"alt_bn128_pairing_check_base\","]
8486#[doc = " \"alt_bn128_pairing_check_element\","]
8487#[doc = " \"base\","]
8488#[doc = " \"bls12381_g1_multiexp_base\","]
8489#[doc = " \"bls12381_g1_multiexp_element\","]
8490#[doc = " \"bls12381_g2_multiexp_base\","]
8491#[doc = " \"bls12381_g2_multiexp_element\","]
8492#[doc = " \"bls12381_map_fp2_to_g2_base\","]
8493#[doc = " \"bls12381_map_fp2_to_g2_element\","]
8494#[doc = " \"bls12381_map_fp_to_g1_base\","]
8495#[doc = " \"bls12381_map_fp_to_g1_element\","]
8496#[doc = " \"bls12381_p1_decompress_base\","]
8497#[doc = " \"bls12381_p1_decompress_element\","]
8498#[doc = " \"bls12381_p1_sum_base\","]
8499#[doc = " \"bls12381_p1_sum_element\","]
8500#[doc = " \"bls12381_p2_decompress_base\","]
8501#[doc = " \"bls12381_p2_decompress_element\","]
8502#[doc = " \"bls12381_p2_sum_base\","]
8503#[doc = " \"bls12381_p2_sum_element\","]
8504#[doc = " \"bls12381_pairing_base\","]
8505#[doc = " \"bls12381_pairing_element\","]
8506#[doc = " \"contract_compile_base\","]
8507#[doc = " \"contract_compile_bytes\","]
8508#[doc = " \"contract_loading_base\","]
8509#[doc = " \"contract_loading_bytes\","]
8510#[doc = " \"ecrecover_base\","]
8511#[doc = " \"ed25519_verify_base\","]
8512#[doc = " \"ed25519_verify_byte\","]
8513#[doc = " \"keccak256_base\","]
8514#[doc = " \"keccak256_byte\","]
8515#[doc = " \"keccak512_base\","]
8516#[doc = " \"keccak512_byte\","]
8517#[doc = " \"log_base\","]
8518#[doc = " \"log_byte\","]
8519#[doc = " \"promise_and_base\","]
8520#[doc = " \"promise_and_per_promise\","]
8521#[doc = " \"promise_return\","]
8522#[doc = " \"read_cached_trie_node\","]
8523#[doc = " \"read_memory_base\","]
8524#[doc = " \"read_memory_byte\","]
8525#[doc = " \"read_register_base\","]
8526#[doc = " \"read_register_byte\","]
8527#[doc = " \"ripemd160_base\","]
8528#[doc = " \"ripemd160_block\","]
8529#[doc = " \"sha256_base\","]
8530#[doc = " \"sha256_byte\","]
8531#[doc = " \"storage_has_key_base\","]
8532#[doc = " \"storage_has_key_byte\","]
8533#[doc = " \"storage_iter_create_from_byte\","]
8534#[doc = " \"storage_iter_create_prefix_base\","]
8535#[doc = " \"storage_iter_create_prefix_byte\","]
8536#[doc = " \"storage_iter_create_range_base\","]
8537#[doc = " \"storage_iter_create_to_byte\","]
8538#[doc = " \"storage_iter_next_base\","]
8539#[doc = " \"storage_iter_next_key_byte\","]
8540#[doc = " \"storage_iter_next_value_byte\","]
8541#[doc = " \"storage_large_read_overhead_base\","]
8542#[doc = " \"storage_large_read_overhead_byte\","]
8543#[doc = " \"storage_read_base\","]
8544#[doc = " \"storage_read_key_byte\","]
8545#[doc = " \"storage_read_value_byte\","]
8546#[doc = " \"storage_remove_base\","]
8547#[doc = " \"storage_remove_key_byte\","]
8548#[doc = " \"storage_remove_ret_value_byte\","]
8549#[doc = " \"storage_write_base\","]
8550#[doc = " \"storage_write_evicted_byte\","]
8551#[doc = " \"storage_write_key_byte\","]
8552#[doc = " \"storage_write_value_byte\","]
8553#[doc = " \"touching_trie_node\","]
8554#[doc = " \"utf16_decoding_base\","]
8555#[doc = " \"utf16_decoding_byte\","]
8556#[doc = " \"utf8_decoding_base\","]
8557#[doc = " \"utf8_decoding_byte\","]
8558#[doc = " \"validator_stake_base\","]
8559#[doc = " \"validator_total_stake_base\","]
8560#[doc = " \"write_memory_base\","]
8561#[doc = " \"write_memory_byte\","]
8562#[doc = " \"write_register_base\","]
8563#[doc = " \"write_register_byte\","]
8564#[doc = " \"yield_create_base\","]
8565#[doc = " \"yield_create_byte\","]
8566#[doc = " \"yield_resume_base\","]
8567#[doc = " \"yield_resume_byte\""]
8568#[doc = " ],"]
8569#[doc = " \"properties\": {"]
8570#[doc = " \"alt_bn128_g1_multiexp_base\": {"]
8571#[doc = " \"description\": \"Base cost for multiexp\","]
8572#[doc = " \"allOf\": ["]
8573#[doc = " {"]
8574#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8575#[doc = " }"]
8576#[doc = " ]"]
8577#[doc = " },"]
8578#[doc = " \"alt_bn128_g1_multiexp_element\": {"]
8579#[doc = " \"description\": \"Per element cost for multiexp\","]
8580#[doc = " \"allOf\": ["]
8581#[doc = " {"]
8582#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8583#[doc = " }"]
8584#[doc = " ]"]
8585#[doc = " },"]
8586#[doc = " \"alt_bn128_g1_sum_base\": {"]
8587#[doc = " \"description\": \"Base cost for sum\","]
8588#[doc = " \"allOf\": ["]
8589#[doc = " {"]
8590#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8591#[doc = " }"]
8592#[doc = " ]"]
8593#[doc = " },"]
8594#[doc = " \"alt_bn128_g1_sum_element\": {"]
8595#[doc = " \"description\": \"Per element cost for sum\","]
8596#[doc = " \"allOf\": ["]
8597#[doc = " {"]
8598#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8599#[doc = " }"]
8600#[doc = " ]"]
8601#[doc = " },"]
8602#[doc = " \"alt_bn128_pairing_check_base\": {"]
8603#[doc = " \"description\": \"Base cost for pairing check\","]
8604#[doc = " \"allOf\": ["]
8605#[doc = " {"]
8606#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8607#[doc = " }"]
8608#[doc = " ]"]
8609#[doc = " },"]
8610#[doc = " \"alt_bn128_pairing_check_element\": {"]
8611#[doc = " \"description\": \"Per element cost for pairing check\","]
8612#[doc = " \"allOf\": ["]
8613#[doc = " {"]
8614#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8615#[doc = " }"]
8616#[doc = " ]"]
8617#[doc = " },"]
8618#[doc = " \"base\": {"]
8619#[doc = " \"description\": \"Base cost for calling a host function.\","]
8620#[doc = " \"allOf\": ["]
8621#[doc = " {"]
8622#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8623#[doc = " }"]
8624#[doc = " ]"]
8625#[doc = " },"]
8626#[doc = " \"bls12381_g1_multiexp_base\": {"]
8627#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8628#[doc = " },"]
8629#[doc = " \"bls12381_g1_multiexp_element\": {"]
8630#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8631#[doc = " },"]
8632#[doc = " \"bls12381_g2_multiexp_base\": {"]
8633#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8634#[doc = " },"]
8635#[doc = " \"bls12381_g2_multiexp_element\": {"]
8636#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8637#[doc = " },"]
8638#[doc = " \"bls12381_map_fp2_to_g2_base\": {"]
8639#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8640#[doc = " },"]
8641#[doc = " \"bls12381_map_fp2_to_g2_element\": {"]
8642#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8643#[doc = " },"]
8644#[doc = " \"bls12381_map_fp_to_g1_base\": {"]
8645#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8646#[doc = " },"]
8647#[doc = " \"bls12381_map_fp_to_g1_element\": {"]
8648#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8649#[doc = " },"]
8650#[doc = " \"bls12381_p1_decompress_base\": {"]
8651#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8652#[doc = " },"]
8653#[doc = " \"bls12381_p1_decompress_element\": {"]
8654#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8655#[doc = " },"]
8656#[doc = " \"bls12381_p1_sum_base\": {"]
8657#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8658#[doc = " },"]
8659#[doc = " \"bls12381_p1_sum_element\": {"]
8660#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8661#[doc = " },"]
8662#[doc = " \"bls12381_p2_decompress_base\": {"]
8663#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8664#[doc = " },"]
8665#[doc = " \"bls12381_p2_decompress_element\": {"]
8666#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8667#[doc = " },"]
8668#[doc = " \"bls12381_p2_sum_base\": {"]
8669#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8670#[doc = " },"]
8671#[doc = " \"bls12381_p2_sum_element\": {"]
8672#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8673#[doc = " },"]
8674#[doc = " \"bls12381_pairing_base\": {"]
8675#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8676#[doc = " },"]
8677#[doc = " \"bls12381_pairing_element\": {"]
8678#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8679#[doc = " },"]
8680#[doc = " \"contract_compile_base\": {"]
8681#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8682#[doc = " },"]
8683#[doc = " \"contract_compile_bytes\": {"]
8684#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8685#[doc = " },"]
8686#[doc = " \"contract_loading_base\": {"]
8687#[doc = " \"description\": \"Base cost of loading a pre-compiled contract\","]
8688#[doc = " \"allOf\": ["]
8689#[doc = " {"]
8690#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8691#[doc = " }"]
8692#[doc = " ]"]
8693#[doc = " },"]
8694#[doc = " \"contract_loading_bytes\": {"]
8695#[doc = " \"description\": \"Cost per byte of loading a pre-compiled contract\","]
8696#[doc = " \"allOf\": ["]
8697#[doc = " {"]
8698#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8699#[doc = " }"]
8700#[doc = " ]"]
8701#[doc = " },"]
8702#[doc = " \"ecrecover_base\": {"]
8703#[doc = " \"description\": \"Cost of calling ecrecover\","]
8704#[doc = " \"allOf\": ["]
8705#[doc = " {"]
8706#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8707#[doc = " }"]
8708#[doc = " ]"]
8709#[doc = " },"]
8710#[doc = " \"ed25519_verify_base\": {"]
8711#[doc = " \"description\": \"Cost of getting ed25519 base\","]
8712#[doc = " \"allOf\": ["]
8713#[doc = " {"]
8714#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8715#[doc = " }"]
8716#[doc = " ]"]
8717#[doc = " },"]
8718#[doc = " \"ed25519_verify_byte\": {"]
8719#[doc = " \"description\": \"Cost of getting ed25519 per byte\","]
8720#[doc = " \"allOf\": ["]
8721#[doc = " {"]
8722#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8723#[doc = " }"]
8724#[doc = " ]"]
8725#[doc = " },"]
8726#[doc = " \"keccak256_base\": {"]
8727#[doc = " \"description\": \"Cost of getting sha256 base\","]
8728#[doc = " \"allOf\": ["]
8729#[doc = " {"]
8730#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8731#[doc = " }"]
8732#[doc = " ]"]
8733#[doc = " },"]
8734#[doc = " \"keccak256_byte\": {"]
8735#[doc = " \"description\": \"Cost of getting sha256 per byte\","]
8736#[doc = " \"allOf\": ["]
8737#[doc = " {"]
8738#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8739#[doc = " }"]
8740#[doc = " ]"]
8741#[doc = " },"]
8742#[doc = " \"keccak512_base\": {"]
8743#[doc = " \"description\": \"Cost of getting sha256 base\","]
8744#[doc = " \"allOf\": ["]
8745#[doc = " {"]
8746#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8747#[doc = " }"]
8748#[doc = " ]"]
8749#[doc = " },"]
8750#[doc = " \"keccak512_byte\": {"]
8751#[doc = " \"description\": \"Cost of getting sha256 per byte\","]
8752#[doc = " \"allOf\": ["]
8753#[doc = " {"]
8754#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8755#[doc = " }"]
8756#[doc = " ]"]
8757#[doc = " },"]
8758#[doc = " \"log_base\": {"]
8759#[doc = " \"description\": \"Cost for calling logging.\","]
8760#[doc = " \"allOf\": ["]
8761#[doc = " {"]
8762#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8763#[doc = " }"]
8764#[doc = " ]"]
8765#[doc = " },"]
8766#[doc = " \"log_byte\": {"]
8767#[doc = " \"description\": \"Cost for logging per byte\","]
8768#[doc = " \"allOf\": ["]
8769#[doc = " {"]
8770#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8771#[doc = " }"]
8772#[doc = " ]"]
8773#[doc = " },"]
8774#[doc = " \"promise_and_base\": {"]
8775#[doc = " \"description\": \"Cost for calling `promise_and`\","]
8776#[doc = " \"allOf\": ["]
8777#[doc = " {"]
8778#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8779#[doc = " }"]
8780#[doc = " ]"]
8781#[doc = " },"]
8782#[doc = " \"promise_and_per_promise\": {"]
8783#[doc = " \"description\": \"Cost for calling `promise_and` for each promise\","]
8784#[doc = " \"allOf\": ["]
8785#[doc = " {"]
8786#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8787#[doc = " }"]
8788#[doc = " ]"]
8789#[doc = " },"]
8790#[doc = " \"promise_return\": {"]
8791#[doc = " \"description\": \"Cost for calling `promise_return`\","]
8792#[doc = " \"allOf\": ["]
8793#[doc = " {"]
8794#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8795#[doc = " }"]
8796#[doc = " ]"]
8797#[doc = " },"]
8798#[doc = " \"read_cached_trie_node\": {"]
8799#[doc = " \"description\": \"Cost for reading trie node from memory\","]
8800#[doc = " \"allOf\": ["]
8801#[doc = " {"]
8802#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8803#[doc = " }"]
8804#[doc = " ]"]
8805#[doc = " },"]
8806#[doc = " \"read_memory_base\": {"]
8807#[doc = " \"description\": \"Base cost for guest memory read\","]
8808#[doc = " \"allOf\": ["]
8809#[doc = " {"]
8810#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8811#[doc = " }"]
8812#[doc = " ]"]
8813#[doc = " },"]
8814#[doc = " \"read_memory_byte\": {"]
8815#[doc = " \"description\": \"Cost for guest memory read\","]
8816#[doc = " \"allOf\": ["]
8817#[doc = " {"]
8818#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8819#[doc = " }"]
8820#[doc = " ]"]
8821#[doc = " },"]
8822#[doc = " \"read_register_base\": {"]
8823#[doc = " \"description\": \"Base cost for reading from register\","]
8824#[doc = " \"allOf\": ["]
8825#[doc = " {"]
8826#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8827#[doc = " }"]
8828#[doc = " ]"]
8829#[doc = " },"]
8830#[doc = " \"read_register_byte\": {"]
8831#[doc = " \"description\": \"Cost for reading byte from register\","]
8832#[doc = " \"allOf\": ["]
8833#[doc = " {"]
8834#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8835#[doc = " }"]
8836#[doc = " ]"]
8837#[doc = " },"]
8838#[doc = " \"ripemd160_base\": {"]
8839#[doc = " \"description\": \"Cost of getting ripemd160 base\","]
8840#[doc = " \"allOf\": ["]
8841#[doc = " {"]
8842#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8843#[doc = " }"]
8844#[doc = " ]"]
8845#[doc = " },"]
8846#[doc = " \"ripemd160_block\": {"]
8847#[doc = " \"description\": \"Cost of getting ripemd160 per message block\","]
8848#[doc = " \"allOf\": ["]
8849#[doc = " {"]
8850#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8851#[doc = " }"]
8852#[doc = " ]"]
8853#[doc = " },"]
8854#[doc = " \"sha256_base\": {"]
8855#[doc = " \"description\": \"Cost of getting sha256 base\","]
8856#[doc = " \"allOf\": ["]
8857#[doc = " {"]
8858#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8859#[doc = " }"]
8860#[doc = " ]"]
8861#[doc = " },"]
8862#[doc = " \"sha256_byte\": {"]
8863#[doc = " \"description\": \"Cost of getting sha256 per byte\","]
8864#[doc = " \"allOf\": ["]
8865#[doc = " {"]
8866#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8867#[doc = " }"]
8868#[doc = " ]"]
8869#[doc = " },"]
8870#[doc = " \"storage_has_key_base\": {"]
8871#[doc = " \"description\": \"Storage trie check for key existence cost base\","]
8872#[doc = " \"allOf\": ["]
8873#[doc = " {"]
8874#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8875#[doc = " }"]
8876#[doc = " ]"]
8877#[doc = " },"]
8878#[doc = " \"storage_has_key_byte\": {"]
8879#[doc = " \"description\": \"Storage trie check for key existence per key byte\","]
8880#[doc = " \"allOf\": ["]
8881#[doc = " {"]
8882#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8883#[doc = " }"]
8884#[doc = " ]"]
8885#[doc = " },"]
8886#[doc = " \"storage_iter_create_from_byte\": {"]
8887#[doc = " \"description\": \"Create trie range iterator cost per byte of from key.\","]
8888#[doc = " \"allOf\": ["]
8889#[doc = " {"]
8890#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8891#[doc = " }"]
8892#[doc = " ]"]
8893#[doc = " },"]
8894#[doc = " \"storage_iter_create_prefix_base\": {"]
8895#[doc = " \"description\": \"Create trie prefix iterator cost base\","]
8896#[doc = " \"allOf\": ["]
8897#[doc = " {"]
8898#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8899#[doc = " }"]
8900#[doc = " ]"]
8901#[doc = " },"]
8902#[doc = " \"storage_iter_create_prefix_byte\": {"]
8903#[doc = " \"description\": \"Create trie prefix iterator cost per byte.\","]
8904#[doc = " \"allOf\": ["]
8905#[doc = " {"]
8906#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8907#[doc = " }"]
8908#[doc = " ]"]
8909#[doc = " },"]
8910#[doc = " \"storage_iter_create_range_base\": {"]
8911#[doc = " \"description\": \"Create trie range iterator cost base\","]
8912#[doc = " \"allOf\": ["]
8913#[doc = " {"]
8914#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8915#[doc = " }"]
8916#[doc = " ]"]
8917#[doc = " },"]
8918#[doc = " \"storage_iter_create_to_byte\": {"]
8919#[doc = " \"description\": \"Create trie range iterator cost per byte of to key.\","]
8920#[doc = " \"allOf\": ["]
8921#[doc = " {"]
8922#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8923#[doc = " }"]
8924#[doc = " ]"]
8925#[doc = " },"]
8926#[doc = " \"storage_iter_next_base\": {"]
8927#[doc = " \"description\": \"Trie iterator per key base cost\","]
8928#[doc = " \"allOf\": ["]
8929#[doc = " {"]
8930#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8931#[doc = " }"]
8932#[doc = " ]"]
8933#[doc = " },"]
8934#[doc = " \"storage_iter_next_key_byte\": {"]
8935#[doc = " \"description\": \"Trie iterator next key byte cost\","]
8936#[doc = " \"allOf\": ["]
8937#[doc = " {"]
8938#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8939#[doc = " }"]
8940#[doc = " ]"]
8941#[doc = " },"]
8942#[doc = " \"storage_iter_next_value_byte\": {"]
8943#[doc = " \"description\": \"Trie iterator next key byte cost\","]
8944#[doc = " \"allOf\": ["]
8945#[doc = " {"]
8946#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8947#[doc = " }"]
8948#[doc = " ]"]
8949#[doc = " },"]
8950#[doc = " \"storage_large_read_overhead_base\": {"]
8951#[doc = " \"description\": \"Storage trie read key overhead base cost, when doing large reads\","]
8952#[doc = " \"allOf\": ["]
8953#[doc = " {"]
8954#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8955#[doc = " }"]
8956#[doc = " ]"]
8957#[doc = " },"]
8958#[doc = " \"storage_large_read_overhead_byte\": {"]
8959#[doc = " \"description\": \"Storage trie read key overhead per-byte cost, when doing large reads\","]
8960#[doc = " \"allOf\": ["]
8961#[doc = " {"]
8962#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8963#[doc = " }"]
8964#[doc = " ]"]
8965#[doc = " },"]
8966#[doc = " \"storage_read_base\": {"]
8967#[doc = " \"description\": \"Storage trie read key base cost\","]
8968#[doc = " \"allOf\": ["]
8969#[doc = " {"]
8970#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8971#[doc = " }"]
8972#[doc = " ]"]
8973#[doc = " },"]
8974#[doc = " \"storage_read_key_byte\": {"]
8975#[doc = " \"description\": \"Storage trie read key per byte cost\","]
8976#[doc = " \"allOf\": ["]
8977#[doc = " {"]
8978#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8979#[doc = " }"]
8980#[doc = " ]"]
8981#[doc = " },"]
8982#[doc = " \"storage_read_value_byte\": {"]
8983#[doc = " \"description\": \"Storage trie read value cost per byte cost\","]
8984#[doc = " \"allOf\": ["]
8985#[doc = " {"]
8986#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8987#[doc = " }"]
8988#[doc = " ]"]
8989#[doc = " },"]
8990#[doc = " \"storage_remove_base\": {"]
8991#[doc = " \"description\": \"Remove key from trie base cost\","]
8992#[doc = " \"allOf\": ["]
8993#[doc = " {"]
8994#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
8995#[doc = " }"]
8996#[doc = " ]"]
8997#[doc = " },"]
8998#[doc = " \"storage_remove_key_byte\": {"]
8999#[doc = " \"description\": \"Remove key from trie per byte cost\","]
9000#[doc = " \"allOf\": ["]
9001#[doc = " {"]
9002#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9003#[doc = " }"]
9004#[doc = " ]"]
9005#[doc = " },"]
9006#[doc = " \"storage_remove_ret_value_byte\": {"]
9007#[doc = " \"description\": \"Remove key from trie ret value byte cost\","]
9008#[doc = " \"allOf\": ["]
9009#[doc = " {"]
9010#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9011#[doc = " }"]
9012#[doc = " ]"]
9013#[doc = " },"]
9014#[doc = " \"storage_write_base\": {"]
9015#[doc = " \"description\": \"Storage trie write key base cost\","]
9016#[doc = " \"allOf\": ["]
9017#[doc = " {"]
9018#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9019#[doc = " }"]
9020#[doc = " ]"]
9021#[doc = " },"]
9022#[doc = " \"storage_write_evicted_byte\": {"]
9023#[doc = " \"description\": \"Storage trie write cost per byte of evicted value.\","]
9024#[doc = " \"allOf\": ["]
9025#[doc = " {"]
9026#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9027#[doc = " }"]
9028#[doc = " ]"]
9029#[doc = " },"]
9030#[doc = " \"storage_write_key_byte\": {"]
9031#[doc = " \"description\": \"Storage trie write key per byte cost\","]
9032#[doc = " \"allOf\": ["]
9033#[doc = " {"]
9034#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9035#[doc = " }"]
9036#[doc = " ]"]
9037#[doc = " },"]
9038#[doc = " \"storage_write_value_byte\": {"]
9039#[doc = " \"description\": \"Storage trie write value per byte cost\","]
9040#[doc = " \"allOf\": ["]
9041#[doc = " {"]
9042#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9043#[doc = " }"]
9044#[doc = " ]"]
9045#[doc = " },"]
9046#[doc = " \"touching_trie_node\": {"]
9047#[doc = " \"description\": \"Cost per reading trie node from DB\","]
9048#[doc = " \"allOf\": ["]
9049#[doc = " {"]
9050#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9051#[doc = " }"]
9052#[doc = " ]"]
9053#[doc = " },"]
9054#[doc = " \"utf16_decoding_base\": {"]
9055#[doc = " \"description\": \"Base cost of decoding utf16. It's used for `log_utf16`.\","]
9056#[doc = " \"allOf\": ["]
9057#[doc = " {"]
9058#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9059#[doc = " }"]
9060#[doc = " ]"]
9061#[doc = " },"]
9062#[doc = " \"utf16_decoding_byte\": {"]
9063#[doc = " \"description\": \"Cost per byte of decoding utf16. It's used for `log_utf16`.\","]
9064#[doc = " \"allOf\": ["]
9065#[doc = " {"]
9066#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9067#[doc = " }"]
9068#[doc = " ]"]
9069#[doc = " },"]
9070#[doc = " \"utf8_decoding_base\": {"]
9071#[doc = " \"description\": \"Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
9072#[doc = " \"allOf\": ["]
9073#[doc = " {"]
9074#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9075#[doc = " }"]
9076#[doc = " ]"]
9077#[doc = " },"]
9078#[doc = " \"utf8_decoding_byte\": {"]
9079#[doc = " \"description\": \"Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
9080#[doc = " \"allOf\": ["]
9081#[doc = " {"]
9082#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9083#[doc = " }"]
9084#[doc = " ]"]
9085#[doc = " },"]
9086#[doc = " \"validator_stake_base\": {"]
9087#[doc = " \"description\": \"Cost of calling `validator_stake`.\","]
9088#[doc = " \"allOf\": ["]
9089#[doc = " {"]
9090#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9091#[doc = " }"]
9092#[doc = " ]"]
9093#[doc = " },"]
9094#[doc = " \"validator_total_stake_base\": {"]
9095#[doc = " \"description\": \"Cost of calling `validator_total_stake`.\","]
9096#[doc = " \"allOf\": ["]
9097#[doc = " {"]
9098#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9099#[doc = " }"]
9100#[doc = " ]"]
9101#[doc = " },"]
9102#[doc = " \"write_memory_base\": {"]
9103#[doc = " \"description\": \"Base cost for guest memory write\","]
9104#[doc = " \"allOf\": ["]
9105#[doc = " {"]
9106#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9107#[doc = " }"]
9108#[doc = " ]"]
9109#[doc = " },"]
9110#[doc = " \"write_memory_byte\": {"]
9111#[doc = " \"description\": \"Cost for guest memory write per byte\","]
9112#[doc = " \"allOf\": ["]
9113#[doc = " {"]
9114#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9115#[doc = " }"]
9116#[doc = " ]"]
9117#[doc = " },"]
9118#[doc = " \"write_register_base\": {"]
9119#[doc = " \"description\": \"Base cost for writing into register\","]
9120#[doc = " \"allOf\": ["]
9121#[doc = " {"]
9122#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9123#[doc = " }"]
9124#[doc = " ]"]
9125#[doc = " },"]
9126#[doc = " \"write_register_byte\": {"]
9127#[doc = " \"description\": \"Cost for writing byte into register\","]
9128#[doc = " \"allOf\": ["]
9129#[doc = " {"]
9130#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9131#[doc = " }"]
9132#[doc = " ]"]
9133#[doc = " },"]
9134#[doc = " \"yield_create_base\": {"]
9135#[doc = " \"description\": \"Base cost for creating a yield promise.\","]
9136#[doc = " \"allOf\": ["]
9137#[doc = " {"]
9138#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9139#[doc = " }"]
9140#[doc = " ]"]
9141#[doc = " },"]
9142#[doc = " \"yield_create_byte\": {"]
9143#[doc = " \"description\": \"Per byte cost of arguments and method name.\","]
9144#[doc = " \"allOf\": ["]
9145#[doc = " {"]
9146#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9147#[doc = " }"]
9148#[doc = " ]"]
9149#[doc = " },"]
9150#[doc = " \"yield_resume_base\": {"]
9151#[doc = " \"description\": \"Base cost for resuming a yield receipt.\","]
9152#[doc = " \"allOf\": ["]
9153#[doc = " {"]
9154#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9155#[doc = " }"]
9156#[doc = " ]"]
9157#[doc = " },"]
9158#[doc = " \"yield_resume_byte\": {"]
9159#[doc = " \"description\": \"Per byte cost of resume payload.\","]
9160#[doc = " \"allOf\": ["]
9161#[doc = " {"]
9162#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9163#[doc = " }"]
9164#[doc = " ]"]
9165#[doc = " }"]
9166#[doc = " }"]
9167#[doc = "}"]
9168#[doc = r" ```"]
9169#[doc = r" </details>"]
9170#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9171pub struct ExtCostsConfigView {
9172 #[doc = "Base cost for multiexp"]
9173 pub alt_bn128_g1_multiexp_base: NearGas,
9174 #[doc = "Per element cost for multiexp"]
9175 pub alt_bn128_g1_multiexp_element: NearGas,
9176 #[doc = "Base cost for sum"]
9177 pub alt_bn128_g1_sum_base: NearGas,
9178 #[doc = "Per element cost for sum"]
9179 pub alt_bn128_g1_sum_element: NearGas,
9180 #[doc = "Base cost for pairing check"]
9181 pub alt_bn128_pairing_check_base: NearGas,
9182 #[doc = "Per element cost for pairing check"]
9183 pub alt_bn128_pairing_check_element: NearGas,
9184 #[doc = "Base cost for calling a host function."]
9185 pub base: NearGas,
9186 pub bls12381_g1_multiexp_base: NearGas,
9187 pub bls12381_g1_multiexp_element: NearGas,
9188 pub bls12381_g2_multiexp_base: NearGas,
9189 pub bls12381_g2_multiexp_element: NearGas,
9190 pub bls12381_map_fp2_to_g2_base: NearGas,
9191 pub bls12381_map_fp2_to_g2_element: NearGas,
9192 pub bls12381_map_fp_to_g1_base: NearGas,
9193 pub bls12381_map_fp_to_g1_element: NearGas,
9194 pub bls12381_p1_decompress_base: NearGas,
9195 pub bls12381_p1_decompress_element: NearGas,
9196 pub bls12381_p1_sum_base: NearGas,
9197 pub bls12381_p1_sum_element: NearGas,
9198 pub bls12381_p2_decompress_base: NearGas,
9199 pub bls12381_p2_decompress_element: NearGas,
9200 pub bls12381_p2_sum_base: NearGas,
9201 pub bls12381_p2_sum_element: NearGas,
9202 pub bls12381_pairing_base: NearGas,
9203 pub bls12381_pairing_element: NearGas,
9204 pub contract_compile_base: NearGas,
9205 pub contract_compile_bytes: NearGas,
9206 #[doc = "Base cost of loading a pre-compiled contract"]
9207 pub contract_loading_base: NearGas,
9208 #[doc = "Cost per byte of loading a pre-compiled contract"]
9209 pub contract_loading_bytes: NearGas,
9210 #[doc = "Cost of calling ecrecover"]
9211 pub ecrecover_base: NearGas,
9212 #[doc = "Cost of getting ed25519 base"]
9213 pub ed25519_verify_base: NearGas,
9214 #[doc = "Cost of getting ed25519 per byte"]
9215 pub ed25519_verify_byte: NearGas,
9216 #[doc = "Cost of getting sha256 base"]
9217 pub keccak256_base: NearGas,
9218 #[doc = "Cost of getting sha256 per byte"]
9219 pub keccak256_byte: NearGas,
9220 #[doc = "Cost of getting sha256 base"]
9221 pub keccak512_base: NearGas,
9222 #[doc = "Cost of getting sha256 per byte"]
9223 pub keccak512_byte: NearGas,
9224 #[doc = "Cost for calling logging."]
9225 pub log_base: NearGas,
9226 #[doc = "Cost for logging per byte"]
9227 pub log_byte: NearGas,
9228 #[doc = "Cost for calling `promise_and`"]
9229 pub promise_and_base: NearGas,
9230 #[doc = "Cost for calling `promise_and` for each promise"]
9231 pub promise_and_per_promise: NearGas,
9232 #[doc = "Cost for calling `promise_return`"]
9233 pub promise_return: NearGas,
9234 #[doc = "Cost for reading trie node from memory"]
9235 pub read_cached_trie_node: NearGas,
9236 #[doc = "Base cost for guest memory read"]
9237 pub read_memory_base: NearGas,
9238 #[doc = "Cost for guest memory read"]
9239 pub read_memory_byte: NearGas,
9240 #[doc = "Base cost for reading from register"]
9241 pub read_register_base: NearGas,
9242 #[doc = "Cost for reading byte from register"]
9243 pub read_register_byte: NearGas,
9244 #[doc = "Cost of getting ripemd160 base"]
9245 pub ripemd160_base: NearGas,
9246 #[doc = "Cost of getting ripemd160 per message block"]
9247 pub ripemd160_block: NearGas,
9248 #[doc = "Cost of getting sha256 base"]
9249 pub sha256_base: NearGas,
9250 #[doc = "Cost of getting sha256 per byte"]
9251 pub sha256_byte: NearGas,
9252 #[doc = "Storage trie check for key existence cost base"]
9253 pub storage_has_key_base: NearGas,
9254 #[doc = "Storage trie check for key existence per key byte"]
9255 pub storage_has_key_byte: NearGas,
9256 #[doc = "Create trie range iterator cost per byte of from key."]
9257 pub storage_iter_create_from_byte: NearGas,
9258 #[doc = "Create trie prefix iterator cost base"]
9259 pub storage_iter_create_prefix_base: NearGas,
9260 #[doc = "Create trie prefix iterator cost per byte."]
9261 pub storage_iter_create_prefix_byte: NearGas,
9262 #[doc = "Create trie range iterator cost base"]
9263 pub storage_iter_create_range_base: NearGas,
9264 #[doc = "Create trie range iterator cost per byte of to key."]
9265 pub storage_iter_create_to_byte: NearGas,
9266 #[doc = "Trie iterator per key base cost"]
9267 pub storage_iter_next_base: NearGas,
9268 #[doc = "Trie iterator next key byte cost"]
9269 pub storage_iter_next_key_byte: NearGas,
9270 #[doc = "Trie iterator next key byte cost"]
9271 pub storage_iter_next_value_byte: NearGas,
9272 #[doc = "Storage trie read key overhead base cost, when doing large reads"]
9273 pub storage_large_read_overhead_base: NearGas,
9274 #[doc = "Storage trie read key overhead per-byte cost, when doing large reads"]
9275 pub storage_large_read_overhead_byte: NearGas,
9276 #[doc = "Storage trie read key base cost"]
9277 pub storage_read_base: NearGas,
9278 #[doc = "Storage trie read key per byte cost"]
9279 pub storage_read_key_byte: NearGas,
9280 #[doc = "Storage trie read value cost per byte cost"]
9281 pub storage_read_value_byte: NearGas,
9282 #[doc = "Remove key from trie base cost"]
9283 pub storage_remove_base: NearGas,
9284 #[doc = "Remove key from trie per byte cost"]
9285 pub storage_remove_key_byte: NearGas,
9286 #[doc = "Remove key from trie ret value byte cost"]
9287 pub storage_remove_ret_value_byte: NearGas,
9288 #[doc = "Storage trie write key base cost"]
9289 pub storage_write_base: NearGas,
9290 #[doc = "Storage trie write cost per byte of evicted value."]
9291 pub storage_write_evicted_byte: NearGas,
9292 #[doc = "Storage trie write key per byte cost"]
9293 pub storage_write_key_byte: NearGas,
9294 #[doc = "Storage trie write value per byte cost"]
9295 pub storage_write_value_byte: NearGas,
9296 #[doc = "Cost per reading trie node from DB"]
9297 pub touching_trie_node: NearGas,
9298 #[doc = "Base cost of decoding utf16. It's used for `log_utf16`."]
9299 pub utf16_decoding_base: NearGas,
9300 #[doc = "Cost per byte of decoding utf16. It's used for `log_utf16`."]
9301 pub utf16_decoding_byte: NearGas,
9302 #[doc = "Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
9303 pub utf8_decoding_base: NearGas,
9304 #[doc = "Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
9305 pub utf8_decoding_byte: NearGas,
9306 #[doc = "Cost of calling `validator_stake`."]
9307 pub validator_stake_base: NearGas,
9308 #[doc = "Cost of calling `validator_total_stake`."]
9309 pub validator_total_stake_base: NearGas,
9310 #[doc = "Base cost for guest memory write"]
9311 pub write_memory_base: NearGas,
9312 #[doc = "Cost for guest memory write per byte"]
9313 pub write_memory_byte: NearGas,
9314 #[doc = "Base cost for writing into register"]
9315 pub write_register_base: NearGas,
9316 #[doc = "Cost for writing byte into register"]
9317 pub write_register_byte: NearGas,
9318 #[doc = "Base cost for creating a yield promise."]
9319 pub yield_create_base: NearGas,
9320 #[doc = "Per byte cost of arguments and method name."]
9321 pub yield_create_byte: NearGas,
9322 #[doc = "Base cost for resuming a yield receipt."]
9323 pub yield_resume_base: NearGas,
9324 #[doc = "Per byte cost of resume payload."]
9325 pub yield_resume_byte: NearGas,
9326}
9327impl ::std::convert::From<&ExtCostsConfigView> for ExtCostsConfigView {
9328 fn from(value: &ExtCostsConfigView) -> Self {
9329 value.clone()
9330 }
9331}
9332#[doc = "`ExternalStorageConfig`"]
9333#[doc = r""]
9334#[doc = r" <details><summary>JSON schema</summary>"]
9335#[doc = r""]
9336#[doc = r" ```json"]
9337#[doc = "{"]
9338#[doc = " \"type\": \"object\","]
9339#[doc = " \"required\": ["]
9340#[doc = " \"location\""]
9341#[doc = " ],"]
9342#[doc = " \"properties\": {"]
9343#[doc = " \"external_storage_fallback_threshold\": {"]
9344#[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.\","]
9345#[doc = " \"default\": 3,"]
9346#[doc = " \"type\": \"integer\","]
9347#[doc = " \"format\": \"uint64\","]
9348#[doc = " \"minimum\": 0.0"]
9349#[doc = " },"]
9350#[doc = " \"location\": {"]
9351#[doc = " \"description\": \"Location of state parts.\","]
9352#[doc = " \"allOf\": ["]
9353#[doc = " {"]
9354#[doc = " \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
9355#[doc = " }"]
9356#[doc = " ]"]
9357#[doc = " },"]
9358#[doc = " \"num_concurrent_requests\": {"]
9359#[doc = " \"description\": \"When fetching state parts from external storage, throttle fetch requests\\nto this many concurrent requests.\","]
9360#[doc = " \"default\": 25,"]
9361#[doc = " \"type\": \"integer\","]
9362#[doc = " \"format\": \"uint8\","]
9363#[doc = " \"maximum\": 255.0,"]
9364#[doc = " \"minimum\": 0.0"]
9365#[doc = " },"]
9366#[doc = " \"num_concurrent_requests_during_catchup\": {"]
9367#[doc = " \"description\": \"During catchup, the node will use a different number of concurrent requests\\nto reduce the performance impact of state sync.\","]
9368#[doc = " \"default\": 5,"]
9369#[doc = " \"type\": \"integer\","]
9370#[doc = " \"format\": \"uint8\","]
9371#[doc = " \"maximum\": 255.0,"]
9372#[doc = " \"minimum\": 0.0"]
9373#[doc = " }"]
9374#[doc = " }"]
9375#[doc = "}"]
9376#[doc = r" ```"]
9377#[doc = r" </details>"]
9378#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9379pub struct ExternalStorageConfig {
9380 #[doc = "The number of attempts the node will make to obtain a part from peers in\nthe network before it fetches from external storage."]
9381 #[serde(default = "defaults::default_u64::<u64, 3>")]
9382 pub external_storage_fallback_threshold: u64,
9383 #[doc = "Location of state parts."]
9384 pub location: ExternalStorageLocation,
9385 #[doc = "When fetching state parts from external storage, throttle fetch requests\nto this many concurrent requests."]
9386 #[serde(default = "defaults::default_u64::<u8, 25>")]
9387 pub num_concurrent_requests: u8,
9388 #[doc = "During catchup, the node will use a different number of concurrent requests\nto reduce the performance impact of state sync."]
9389 #[serde(default = "defaults::default_u64::<u8, 5>")]
9390 pub num_concurrent_requests_during_catchup: u8,
9391}
9392impl ::std::convert::From<&ExternalStorageConfig> for ExternalStorageConfig {
9393 fn from(value: &ExternalStorageConfig) -> Self {
9394 value.clone()
9395 }
9396}
9397#[doc = "Supported external storage backends and their minimal config."]
9398#[doc = r""]
9399#[doc = r" <details><summary>JSON schema</summary>"]
9400#[doc = r""]
9401#[doc = r" ```json"]
9402#[doc = "{"]
9403#[doc = " \"description\": \"Supported external storage backends and their minimal config.\","]
9404#[doc = " \"oneOf\": ["]
9405#[doc = " {"]
9406#[doc = " \"type\": \"object\","]
9407#[doc = " \"required\": ["]
9408#[doc = " \"S3\""]
9409#[doc = " ],"]
9410#[doc = " \"properties\": {"]
9411#[doc = " \"S3\": {"]
9412#[doc = " \"type\": \"object\","]
9413#[doc = " \"required\": ["]
9414#[doc = " \"bucket\","]
9415#[doc = " \"region\""]
9416#[doc = " ],"]
9417#[doc = " \"properties\": {"]
9418#[doc = " \"bucket\": {"]
9419#[doc = " \"description\": \"Location on S3.\","]
9420#[doc = " \"type\": \"string\""]
9421#[doc = " },"]
9422#[doc = " \"region\": {"]
9423#[doc = " \"description\": \"Data may only be available in certain locations.\","]
9424#[doc = " \"type\": \"string\""]
9425#[doc = " }"]
9426#[doc = " }"]
9427#[doc = " }"]
9428#[doc = " },"]
9429#[doc = " \"additionalProperties\": false"]
9430#[doc = " },"]
9431#[doc = " {"]
9432#[doc = " \"description\": \"Local filesystem root for storing data.\","]
9433#[doc = " \"type\": \"object\","]
9434#[doc = " \"required\": ["]
9435#[doc = " \"Filesystem\""]
9436#[doc = " ],"]
9437#[doc = " \"properties\": {"]
9438#[doc = " \"Filesystem\": {"]
9439#[doc = " \"type\": \"object\","]
9440#[doc = " \"required\": ["]
9441#[doc = " \"root_dir\""]
9442#[doc = " ],"]
9443#[doc = " \"properties\": {"]
9444#[doc = " \"root_dir\": {"]
9445#[doc = " \"type\": \"string\""]
9446#[doc = " }"]
9447#[doc = " }"]
9448#[doc = " }"]
9449#[doc = " },"]
9450#[doc = " \"additionalProperties\": false"]
9451#[doc = " },"]
9452#[doc = " {"]
9453#[doc = " \"description\": \"Google Cloud Storage bucket name.\","]
9454#[doc = " \"type\": \"object\","]
9455#[doc = " \"required\": ["]
9456#[doc = " \"GCS\""]
9457#[doc = " ],"]
9458#[doc = " \"properties\": {"]
9459#[doc = " \"GCS\": {"]
9460#[doc = " \"type\": \"object\","]
9461#[doc = " \"required\": ["]
9462#[doc = " \"bucket\""]
9463#[doc = " ],"]
9464#[doc = " \"properties\": {"]
9465#[doc = " \"bucket\": {"]
9466#[doc = " \"type\": \"string\""]
9467#[doc = " }"]
9468#[doc = " }"]
9469#[doc = " }"]
9470#[doc = " },"]
9471#[doc = " \"additionalProperties\": false"]
9472#[doc = " }"]
9473#[doc = " ]"]
9474#[doc = "}"]
9475#[doc = r" ```"]
9476#[doc = r" </details>"]
9477#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9478pub enum ExternalStorageLocation {
9479 S3 {
9480 #[doc = "Location on S3."]
9481 bucket: ::std::string::String,
9482 #[doc = "Data may only be available in certain locations."]
9483 region: ::std::string::String,
9484 },
9485 #[doc = "Local filesystem root for storing data."]
9486 Filesystem { root_dir: ::std::string::String },
9487 #[doc = "Google Cloud Storage bucket name."]
9488 #[serde(rename = "GCS")]
9489 Gcs { bucket: ::std::string::String },
9490}
9491impl ::std::convert::From<&Self> for ExternalStorageLocation {
9492 fn from(value: &ExternalStorageLocation) -> Self {
9493 value.clone()
9494 }
9495}
9496#[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."]
9497#[doc = r""]
9498#[doc = r" <details><summary>JSON schema</summary>"]
9499#[doc = r""]
9500#[doc = r" ```json"]
9501#[doc = "{"]
9502#[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.\","]
9503#[doc = " \"type\": \"object\","]
9504#[doc = " \"required\": ["]
9505#[doc = " \"execution\","]
9506#[doc = " \"send_not_sir\","]
9507#[doc = " \"send_sir\""]
9508#[doc = " ],"]
9509#[doc = " \"properties\": {"]
9510#[doc = " \"execution\": {"]
9511#[doc = " \"description\": \"Fee for executing the object.\","]
9512#[doc = " \"allOf\": ["]
9513#[doc = " {"]
9514#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9515#[doc = " }"]
9516#[doc = " ]"]
9517#[doc = " },"]
9518#[doc = " \"send_not_sir\": {"]
9519#[doc = " \"description\": \"Fee for sending an object potentially across the shards.\","]
9520#[doc = " \"allOf\": ["]
9521#[doc = " {"]
9522#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9523#[doc = " }"]
9524#[doc = " ]"]
9525#[doc = " },"]
9526#[doc = " \"send_sir\": {"]
9527#[doc = " \"description\": \"Fee for sending an object from the sender to itself, guaranteeing that it does not leave\\nthe shard.\","]
9528#[doc = " \"allOf\": ["]
9529#[doc = " {"]
9530#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9531#[doc = " }"]
9532#[doc = " ]"]
9533#[doc = " }"]
9534#[doc = " }"]
9535#[doc = "}"]
9536#[doc = r" ```"]
9537#[doc = r" </details>"]
9538#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9539pub struct Fee {
9540 #[doc = "Fee for executing the object."]
9541 pub execution: NearGas,
9542 #[doc = "Fee for sending an object potentially across the shards."]
9543 pub send_not_sir: NearGas,
9544 #[doc = "Fee for sending an object from the sender to itself, guaranteeing that it does not leave\nthe shard."]
9545 pub send_sir: NearGas,
9546}
9547impl ::std::convert::From<&Fee> for Fee {
9548 fn from(value: &Fee) -> Self {
9549 value.clone()
9550 }
9551}
9552#[doc = "Execution outcome of the transaction and all the subsequent receipts.\nCould be not finalized yet"]
9553#[doc = r""]
9554#[doc = r" <details><summary>JSON schema</summary>"]
9555#[doc = r""]
9556#[doc = r" ```json"]
9557#[doc = "{"]
9558#[doc = " \"description\": \"Execution outcome of the transaction and all the subsequent receipts.\\nCould be not finalized yet\","]
9559#[doc = " \"type\": \"object\","]
9560#[doc = " \"required\": ["]
9561#[doc = " \"receipts_outcome\","]
9562#[doc = " \"status\","]
9563#[doc = " \"transaction\","]
9564#[doc = " \"transaction_outcome\""]
9565#[doc = " ],"]
9566#[doc = " \"properties\": {"]
9567#[doc = " \"receipts_outcome\": {"]
9568#[doc = " \"description\": \"The execution outcome of receipts.\","]
9569#[doc = " \"type\": \"array\","]
9570#[doc = " \"items\": {"]
9571#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9572#[doc = " }"]
9573#[doc = " },"]
9574#[doc = " \"status\": {"]
9575#[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\","]
9576#[doc = " \"allOf\": ["]
9577#[doc = " {"]
9578#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
9579#[doc = " }"]
9580#[doc = " ]"]
9581#[doc = " },"]
9582#[doc = " \"transaction\": {"]
9583#[doc = " \"description\": \"Signed Transaction\","]
9584#[doc = " \"allOf\": ["]
9585#[doc = " {"]
9586#[doc = " \"$ref\": \"#/components/schemas/SignedTransactionView\""]
9587#[doc = " }"]
9588#[doc = " ]"]
9589#[doc = " },"]
9590#[doc = " \"transaction_outcome\": {"]
9591#[doc = " \"description\": \"The execution outcome of the signed transaction.\","]
9592#[doc = " \"allOf\": ["]
9593#[doc = " {"]
9594#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9595#[doc = " }"]
9596#[doc = " ]"]
9597#[doc = " }"]
9598#[doc = " }"]
9599#[doc = "}"]
9600#[doc = r" ```"]
9601#[doc = r" </details>"]
9602#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9603pub struct FinalExecutionOutcomeView {
9604 #[doc = "The execution outcome of receipts."]
9605 pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
9606 #[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"]
9607 pub status: FinalExecutionStatus,
9608 #[doc = "Signed Transaction"]
9609 pub transaction: SignedTransactionView,
9610 #[doc = "The execution outcome of the signed transaction."]
9611 pub transaction_outcome: ExecutionOutcomeWithIdView,
9612}
9613impl ::std::convert::From<&FinalExecutionOutcomeView> for FinalExecutionOutcomeView {
9614 fn from(value: &FinalExecutionOutcomeView) -> Self {
9615 value.clone()
9616 }
9617}
9618#[doc = "Final execution outcome of the transaction and all of subsequent the receipts. Also includes\nthe generated receipt."]
9619#[doc = r""]
9620#[doc = r" <details><summary>JSON schema</summary>"]
9621#[doc = r""]
9622#[doc = r" ```json"]
9623#[doc = "{"]
9624#[doc = " \"description\": \"Final execution outcome of the transaction and all of subsequent the receipts. Also includes\\nthe generated receipt.\","]
9625#[doc = " \"type\": \"object\","]
9626#[doc = " \"required\": ["]
9627#[doc = " \"receipts\","]
9628#[doc = " \"receipts_outcome\","]
9629#[doc = " \"status\","]
9630#[doc = " \"transaction\","]
9631#[doc = " \"transaction_outcome\""]
9632#[doc = " ],"]
9633#[doc = " \"properties\": {"]
9634#[doc = " \"receipts\": {"]
9635#[doc = " \"description\": \"Receipts generated from the transaction\","]
9636#[doc = " \"type\": \"array\","]
9637#[doc = " \"items\": {"]
9638#[doc = " \"$ref\": \"#/components/schemas/ReceiptView\""]
9639#[doc = " }"]
9640#[doc = " },"]
9641#[doc = " \"receipts_outcome\": {"]
9642#[doc = " \"description\": \"The execution outcome of receipts.\","]
9643#[doc = " \"type\": \"array\","]
9644#[doc = " \"items\": {"]
9645#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9646#[doc = " }"]
9647#[doc = " },"]
9648#[doc = " \"status\": {"]
9649#[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\","]
9650#[doc = " \"allOf\": ["]
9651#[doc = " {"]
9652#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
9653#[doc = " }"]
9654#[doc = " ]"]
9655#[doc = " },"]
9656#[doc = " \"transaction\": {"]
9657#[doc = " \"description\": \"Signed Transaction\","]
9658#[doc = " \"allOf\": ["]
9659#[doc = " {"]
9660#[doc = " \"$ref\": \"#/components/schemas/SignedTransactionView\""]
9661#[doc = " }"]
9662#[doc = " ]"]
9663#[doc = " },"]
9664#[doc = " \"transaction_outcome\": {"]
9665#[doc = " \"description\": \"The execution outcome of the signed transaction.\","]
9666#[doc = " \"allOf\": ["]
9667#[doc = " {"]
9668#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
9669#[doc = " }"]
9670#[doc = " ]"]
9671#[doc = " }"]
9672#[doc = " }"]
9673#[doc = "}"]
9674#[doc = r" ```"]
9675#[doc = r" </details>"]
9676#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9677pub struct FinalExecutionOutcomeWithReceiptView {
9678 #[doc = "Receipts generated from the transaction"]
9679 pub receipts: ::std::vec::Vec<ReceiptView>,
9680 #[doc = "The execution outcome of receipts."]
9681 pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
9682 #[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"]
9683 pub status: FinalExecutionStatus,
9684 #[doc = "Signed Transaction"]
9685 pub transaction: SignedTransactionView,
9686 #[doc = "The execution outcome of the signed transaction."]
9687 pub transaction_outcome: ExecutionOutcomeWithIdView,
9688}
9689impl ::std::convert::From<&FinalExecutionOutcomeWithReceiptView>
9690 for FinalExecutionOutcomeWithReceiptView
9691{
9692 fn from(value: &FinalExecutionOutcomeWithReceiptView) -> Self {
9693 value.clone()
9694 }
9695}
9696#[doc = "`FinalExecutionStatus`"]
9697#[doc = r""]
9698#[doc = r" <details><summary>JSON schema</summary>"]
9699#[doc = r""]
9700#[doc = r" ```json"]
9701#[doc = "{"]
9702#[doc = " \"oneOf\": ["]
9703#[doc = " {"]
9704#[doc = " \"description\": \"The execution has not yet started.\","]
9705#[doc = " \"type\": \"string\","]
9706#[doc = " \"enum\": ["]
9707#[doc = " \"NotStarted\""]
9708#[doc = " ]"]
9709#[doc = " },"]
9710#[doc = " {"]
9711#[doc = " \"description\": \"The execution has started and still going.\","]
9712#[doc = " \"type\": \"string\","]
9713#[doc = " \"enum\": ["]
9714#[doc = " \"Started\""]
9715#[doc = " ]"]
9716#[doc = " },"]
9717#[doc = " {"]
9718#[doc = " \"description\": \"The execution has failed with the given error.\","]
9719#[doc = " \"type\": \"object\","]
9720#[doc = " \"required\": ["]
9721#[doc = " \"Failure\""]
9722#[doc = " ],"]
9723#[doc = " \"properties\": {"]
9724#[doc = " \"Failure\": {"]
9725#[doc = " \"$ref\": \"#/components/schemas/TxExecutionError\""]
9726#[doc = " }"]
9727#[doc = " },"]
9728#[doc = " \"additionalProperties\": false"]
9729#[doc = " },"]
9730#[doc = " {"]
9731#[doc = " \"description\": \"The execution has succeeded and returned some value or an empty vec encoded in base64.\","]
9732#[doc = " \"type\": \"object\","]
9733#[doc = " \"required\": ["]
9734#[doc = " \"SuccessValue\""]
9735#[doc = " ],"]
9736#[doc = " \"properties\": {"]
9737#[doc = " \"SuccessValue\": {"]
9738#[doc = " \"type\": \"string\""]
9739#[doc = " }"]
9740#[doc = " },"]
9741#[doc = " \"additionalProperties\": false"]
9742#[doc = " }"]
9743#[doc = " ]"]
9744#[doc = "}"]
9745#[doc = r" ```"]
9746#[doc = r" </details>"]
9747#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9748pub enum FinalExecutionStatus {
9749 #[doc = "The execution has not yet started."]
9750 NotStarted,
9751 #[doc = "The execution has started and still going."]
9752 Started,
9753 #[doc = "The execution has failed with the given error."]
9754 Failure(TxExecutionError),
9755 #[doc = "The execution has succeeded and returned some value or an empty vec encoded in base64."]
9756 SuccessValue(::std::string::String),
9757}
9758impl ::std::convert::From<&Self> for FinalExecutionStatus {
9759 fn from(value: &FinalExecutionStatus) -> Self {
9760 value.clone()
9761 }
9762}
9763impl ::std::convert::From<TxExecutionError> for FinalExecutionStatus {
9764 fn from(value: TxExecutionError) -> Self {
9765 Self::Failure(value)
9766 }
9767}
9768#[doc = "Different types of finality."]
9769#[doc = r""]
9770#[doc = r" <details><summary>JSON schema</summary>"]
9771#[doc = r""]
9772#[doc = r" ```json"]
9773#[doc = "{"]
9774#[doc = " \"description\": \"Different types of finality.\","]
9775#[doc = " \"type\": \"string\","]
9776#[doc = " \"enum\": ["]
9777#[doc = " \"optimistic\","]
9778#[doc = " \"near-final\","]
9779#[doc = " \"final\""]
9780#[doc = " ]"]
9781#[doc = "}"]
9782#[doc = r" ```"]
9783#[doc = r" </details>"]
9784#[derive(
9785 :: serde :: Deserialize,
9786 :: serde :: Serialize,
9787 Clone,
9788 Copy,
9789 Debug,
9790 Eq,
9791 Hash,
9792 Ord,
9793 PartialEq,
9794 PartialOrd,
9795)]
9796pub enum Finality {
9797 #[serde(rename = "optimistic")]
9798 Optimistic,
9799 #[serde(rename = "near-final")]
9800 NearFinal,
9801 #[serde(rename = "final")]
9802 Final,
9803}
9804impl ::std::convert::From<&Self> for Finality {
9805 fn from(value: &Finality) -> Self {
9806 value.clone()
9807 }
9808}
9809impl ::std::fmt::Display for Finality {
9810 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9811 match *self {
9812 Self::Optimistic => f.write_str("optimistic"),
9813 Self::NearFinal => f.write_str("near-final"),
9814 Self::Final => f.write_str("final"),
9815 }
9816 }
9817}
9818impl ::std::str::FromStr for Finality {
9819 type Err = self::error::ConversionError;
9820 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9821 match value {
9822 "optimistic" => Ok(Self::Optimistic),
9823 "near-final" => Ok(Self::NearFinal),
9824 "final" => Ok(Self::Final),
9825 _ => Err("invalid value".into()),
9826 }
9827 }
9828}
9829impl ::std::convert::TryFrom<&str> for Finality {
9830 type Error = self::error::ConversionError;
9831 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9832 value.parse()
9833 }
9834}
9835impl ::std::convert::TryFrom<&::std::string::String> for Finality {
9836 type Error = self::error::ConversionError;
9837 fn try_from(
9838 value: &::std::string::String,
9839 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9840 value.parse()
9841 }
9842}
9843impl ::std::convert::TryFrom<::std::string::String> for Finality {
9844 type Error = self::error::ConversionError;
9845 fn try_from(
9846 value: ::std::string::String,
9847 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9848 value.parse()
9849 }
9850}
9851#[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)."]
9852#[doc = r""]
9853#[doc = r" <details><summary>JSON schema</summary>"]
9854#[doc = r""]
9855#[doc = r" ```json"]
9856#[doc = "{"]
9857#[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).\","]
9858#[doc = " \"type\": \"string\","]
9859#[doc = " \"format\": \"bytes\""]
9860#[doc = "}"]
9861#[doc = r" ```"]
9862#[doc = r" </details>"]
9863#[derive(
9864 :: serde :: Deserialize,
9865 :: serde :: Serialize,
9866 Clone,
9867 Debug,
9868 Eq,
9869 Hash,
9870 Ord,
9871 PartialEq,
9872 PartialOrd,
9873)]
9874#[serde(transparent)]
9875pub struct FunctionArgs(pub ::std::string::String);
9876impl ::std::ops::Deref for FunctionArgs {
9877 type Target = ::std::string::String;
9878 fn deref(&self) -> &::std::string::String {
9879 &self.0
9880 }
9881}
9882impl ::std::convert::From<FunctionArgs> for ::std::string::String {
9883 fn from(value: FunctionArgs) -> Self {
9884 value.0
9885 }
9886}
9887impl ::std::convert::From<&FunctionArgs> for FunctionArgs {
9888 fn from(value: &FunctionArgs) -> Self {
9889 value.clone()
9890 }
9891}
9892impl ::std::convert::From<::std::string::String> for FunctionArgs {
9893 fn from(value: ::std::string::String) -> Self {
9894 Self(value)
9895 }
9896}
9897impl ::std::str::FromStr for FunctionArgs {
9898 type Err = ::std::convert::Infallible;
9899 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
9900 Ok(Self(value.to_string()))
9901 }
9902}
9903impl ::std::fmt::Display for FunctionArgs {
9904 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9905 self.0.fmt(f)
9906 }
9907}
9908#[doc = "`FunctionCallAction`"]
9909#[doc = r""]
9910#[doc = r" <details><summary>JSON schema</summary>"]
9911#[doc = r""]
9912#[doc = r" ```json"]
9913#[doc = "{"]
9914#[doc = " \"type\": \"object\","]
9915#[doc = " \"required\": ["]
9916#[doc = " \"args\","]
9917#[doc = " \"deposit\","]
9918#[doc = " \"gas\","]
9919#[doc = " \"method_name\""]
9920#[doc = " ],"]
9921#[doc = " \"properties\": {"]
9922#[doc = " \"args\": {"]
9923#[doc = " \"type\": \"string\""]
9924#[doc = " },"]
9925#[doc = " \"deposit\": {"]
9926#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
9927#[doc = " },"]
9928#[doc = " \"gas\": {"]
9929#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
9930#[doc = " },"]
9931#[doc = " \"method_name\": {"]
9932#[doc = " \"type\": \"string\""]
9933#[doc = " }"]
9934#[doc = " }"]
9935#[doc = "}"]
9936#[doc = r" ```"]
9937#[doc = r" </details>"]
9938#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9939pub struct FunctionCallAction {
9940 pub args: ::std::string::String,
9941 pub deposit: NearToken,
9942 pub gas: NearGas,
9943 pub method_name: ::std::string::String,
9944}
9945impl ::std::convert::From<&FunctionCallAction> for FunctionCallAction {
9946 fn from(value: &FunctionCallAction) -> Self {
9947 value.clone()
9948 }
9949}
9950#[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."]
9951#[doc = r""]
9952#[doc = r" <details><summary>JSON schema</summary>"]
9953#[doc = r""]
9954#[doc = r" ```json"]
9955#[doc = "{"]
9956#[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.\","]
9957#[doc = " \"oneOf\": ["]
9958#[doc = " {"]
9959#[doc = " \"type\": \"string\","]
9960#[doc = " \"enum\": ["]
9961#[doc = " \"WasmUnknownError\","]
9962#[doc = " \"_EVMError\""]
9963#[doc = " ]"]
9964#[doc = " },"]
9965#[doc = " {"]
9966#[doc = " \"description\": \"Wasm compilation error\","]
9967#[doc = " \"type\": \"object\","]
9968#[doc = " \"required\": ["]
9969#[doc = " \"CompilationError\""]
9970#[doc = " ],"]
9971#[doc = " \"properties\": {"]
9972#[doc = " \"CompilationError\": {"]
9973#[doc = " \"$ref\": \"#/components/schemas/CompilationError\""]
9974#[doc = " }"]
9975#[doc = " },"]
9976#[doc = " \"additionalProperties\": false"]
9977#[doc = " },"]
9978#[doc = " {"]
9979#[doc = " \"description\": \"Wasm binary env link error\\n\\nNote: this is only to deserialize old data, use execution error for new data\","]
9980#[doc = " \"type\": \"object\","]
9981#[doc = " \"required\": ["]
9982#[doc = " \"LinkError\""]
9983#[doc = " ],"]
9984#[doc = " \"properties\": {"]
9985#[doc = " \"LinkError\": {"]
9986#[doc = " \"type\": \"object\","]
9987#[doc = " \"required\": ["]
9988#[doc = " \"msg\""]
9989#[doc = " ],"]
9990#[doc = " \"properties\": {"]
9991#[doc = " \"msg\": {"]
9992#[doc = " \"type\": \"string\""]
9993#[doc = " }"]
9994#[doc = " }"]
9995#[doc = " }"]
9996#[doc = " },"]
9997#[doc = " \"additionalProperties\": false"]
9998#[doc = " },"]
9999#[doc = " {"]
10000#[doc = " \"description\": \"Import/export resolve error\","]
10001#[doc = " \"type\": \"object\","]
10002#[doc = " \"required\": ["]
10003#[doc = " \"MethodResolveError\""]
10004#[doc = " ],"]
10005#[doc = " \"properties\": {"]
10006#[doc = " \"MethodResolveError\": {"]
10007#[doc = " \"$ref\": \"#/components/schemas/MethodResolveError\""]
10008#[doc = " }"]
10009#[doc = " },"]
10010#[doc = " \"additionalProperties\": false"]
10011#[doc = " },"]
10012#[doc = " {"]
10013#[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\","]
10014#[doc = " \"type\": \"object\","]
10015#[doc = " \"required\": ["]
10016#[doc = " \"WasmTrap\""]
10017#[doc = " ],"]
10018#[doc = " \"properties\": {"]
10019#[doc = " \"WasmTrap\": {"]
10020#[doc = " \"$ref\": \"#/components/schemas/WasmTrap\""]
10021#[doc = " }"]
10022#[doc = " },"]
10023#[doc = " \"additionalProperties\": false"]
10024#[doc = " },"]
10025#[doc = " {"]
10026#[doc = " \"description\": \"Note: this is only to deserialize old data, use execution error for new data\","]
10027#[doc = " \"type\": \"object\","]
10028#[doc = " \"required\": ["]
10029#[doc = " \"HostError\""]
10030#[doc = " ],"]
10031#[doc = " \"properties\": {"]
10032#[doc = " \"HostError\": {"]
10033#[doc = " \"$ref\": \"#/components/schemas/HostError\""]
10034#[doc = " }"]
10035#[doc = " },"]
10036#[doc = " \"additionalProperties\": false"]
10037#[doc = " },"]
10038#[doc = " {"]
10039#[doc = " \"type\": \"object\","]
10040#[doc = " \"required\": ["]
10041#[doc = " \"ExecutionError\""]
10042#[doc = " ],"]
10043#[doc = " \"properties\": {"]
10044#[doc = " \"ExecutionError\": {"]
10045#[doc = " \"type\": \"string\""]
10046#[doc = " }"]
10047#[doc = " },"]
10048#[doc = " \"additionalProperties\": false"]
10049#[doc = " }"]
10050#[doc = " ]"]
10051#[doc = "}"]
10052#[doc = r" ```"]
10053#[doc = r" </details>"]
10054#[derive(
10055 :: serde :: Deserialize,
10056 :: serde :: Serialize,
10057 Clone,
10058 Debug,
10059 thiserror::Error,
10060 strum_macros::Display,
10061)]
10062pub enum FunctionCallError {
10063 WasmUnknownError,
10064 #[serde(rename = "_EVMError")]
10065 EvmError,
10066 #[doc = "Wasm compilation error"]
10067 CompilationError(CompilationError),
10068 #[doc = "Wasm binary env link error\n\nNote: this is only to deserialize old data, use execution error for new data"]
10069 LinkError {
10070 msg: ::std::string::String,
10071 },
10072 #[doc = "Import/export resolve error"]
10073 MethodResolveError(MethodResolveError),
10074 #[doc = "A trap happened during execution of a binary\n\nNote: this is only to deserialize old data, use execution error for new data"]
10075 WasmTrap(WasmTrap),
10076 #[doc = "Note: this is only to deserialize old data, use execution error for new data"]
10077 HostError(HostError),
10078 ExecutionError(::std::string::String),
10079}
10080impl ::std::convert::From<&Self> for FunctionCallError {
10081 fn from(value: &FunctionCallError) -> Self {
10082 value.clone()
10083 }
10084}
10085impl ::std::convert::From<CompilationError> for FunctionCallError {
10086 fn from(value: CompilationError) -> Self {
10087 Self::CompilationError(value)
10088 }
10089}
10090impl ::std::convert::From<MethodResolveError> for FunctionCallError {
10091 fn from(value: MethodResolveError) -> Self {
10092 Self::MethodResolveError(value)
10093 }
10094}
10095impl ::std::convert::From<WasmTrap> for FunctionCallError {
10096 fn from(value: WasmTrap) -> Self {
10097 Self::WasmTrap(value)
10098 }
10099}
10100impl ::std::convert::From<HostError> for FunctionCallError {
10101 fn from(value: HostError) -> Self {
10102 Self::HostError(value)
10103 }
10104}
10105#[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."]
10106#[doc = r""]
10107#[doc = r" <details><summary>JSON schema</summary>"]
10108#[doc = r""]
10109#[doc = r" ```json"]
10110#[doc = "{"]
10111#[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.\","]
10112#[doc = " \"type\": \"object\","]
10113#[doc = " \"required\": ["]
10114#[doc = " \"method_names\","]
10115#[doc = " \"receiver_id\""]
10116#[doc = " ],"]
10117#[doc = " \"properties\": {"]
10118#[doc = " \"allowance\": {"]
10119#[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.\","]
10120#[doc = " \"anyOf\": ["]
10121#[doc = " {"]
10122#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
10123#[doc = " },"]
10124#[doc = " {"]
10125#[doc = " \"type\": \"null\""]
10126#[doc = " }"]
10127#[doc = " ]"]
10128#[doc = " },"]
10129#[doc = " \"method_names\": {"]
10130#[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.\","]
10131#[doc = " \"type\": \"array\","]
10132#[doc = " \"items\": {"]
10133#[doc = " \"type\": \"string\""]
10134#[doc = " }"]
10135#[doc = " },"]
10136#[doc = " \"receiver_id\": {"]
10137#[doc = " \"description\": \"The access key only allows transactions with the given receiver's account id.\","]
10138#[doc = " \"type\": \"string\""]
10139#[doc = " }"]
10140#[doc = " }"]
10141#[doc = "}"]
10142#[doc = r" ```"]
10143#[doc = r" </details>"]
10144#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10145pub struct FunctionCallPermission {
10146 #[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."]
10147 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10148 pub allowance: ::std::option::Option<NearToken>,
10149 #[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."]
10150 pub method_names: ::std::vec::Vec<::std::string::String>,
10151 #[doc = "The access key only allows transactions with the given receiver's account id."]
10152 pub receiver_id: ::std::string::String,
10153}
10154impl ::std::convert::From<&FunctionCallPermission> for FunctionCallPermission {
10155 fn from(value: &FunctionCallPermission) -> Self {
10156 value.clone()
10157 }
10158}
10159#[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."]
10160#[doc = r""]
10161#[doc = r" <details><summary>JSON schema</summary>"]
10162#[doc = r""]
10163#[doc = r" ```json"]
10164#[doc = "{"]
10165#[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.\","]
10166#[doc = " \"type\": \"object\","]
10167#[doc = " \"required\": ["]
10168#[doc = " \"balance\","]
10169#[doc = " \"num_nonces\","]
10170#[doc = " \"permission\""]
10171#[doc = " ],"]
10172#[doc = " \"properties\": {"]
10173#[doc = " \"balance\": {"]
10174#[doc = " \"description\": \"The balance of the gas key.\","]
10175#[doc = " \"allOf\": ["]
10176#[doc = " {"]
10177#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
10178#[doc = " }"]
10179#[doc = " ]"]
10180#[doc = " },"]
10181#[doc = " \"num_nonces\": {"]
10182#[doc = " \"description\": \"The number of nonces this gas key has.\","]
10183#[doc = " \"type\": \"integer\","]
10184#[doc = " \"format\": \"uint32\","]
10185#[doc = " \"minimum\": 0.0"]
10186#[doc = " },"]
10187#[doc = " \"permission\": {"]
10188#[doc = " \"description\": \"Defines the permissions for this gas key.\\nIf this is a `FunctionCallPermission`, the allowance must be None (unlimited).\","]
10189#[doc = " \"allOf\": ["]
10190#[doc = " {"]
10191#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
10192#[doc = " }"]
10193#[doc = " ]"]
10194#[doc = " }"]
10195#[doc = " }"]
10196#[doc = "}"]
10197#[doc = r" ```"]
10198#[doc = r" </details>"]
10199#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10200pub struct GasKey {
10201 #[doc = "The balance of the gas key."]
10202 pub balance: NearToken,
10203 #[doc = "The number of nonces this gas key has."]
10204 pub num_nonces: u32,
10205 #[doc = "Defines the permissions for this gas key.\nIf this is a `FunctionCallPermission`, the allowance must be None (unlimited)."]
10206 pub permission: AccessKeyPermission,
10207}
10208impl ::std::convert::From<&GasKey> for GasKey {
10209 fn from(value: &GasKey) -> Self {
10210 value.clone()
10211 }
10212}
10213#[doc = "`GasKeyInfoView`"]
10214#[doc = r""]
10215#[doc = r" <details><summary>JSON schema</summary>"]
10216#[doc = r""]
10217#[doc = r" ```json"]
10218#[doc = "{"]
10219#[doc = " \"type\": \"object\","]
10220#[doc = " \"required\": ["]
10221#[doc = " \"gas_key\","]
10222#[doc = " \"public_key\""]
10223#[doc = " ],"]
10224#[doc = " \"properties\": {"]
10225#[doc = " \"gas_key\": {"]
10226#[doc = " \"$ref\": \"#/components/schemas/GasKeyView\""]
10227#[doc = " },"]
10228#[doc = " \"public_key\": {"]
10229#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
10230#[doc = " }"]
10231#[doc = " }"]
10232#[doc = "}"]
10233#[doc = r" ```"]
10234#[doc = r" </details>"]
10235#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10236pub struct GasKeyInfoView {
10237 pub gas_key: GasKeyView,
10238 pub public_key: PublicKey,
10239}
10240impl ::std::convert::From<&GasKeyInfoView> for GasKeyInfoView {
10241 fn from(value: &GasKeyInfoView) -> Self {
10242 value.clone()
10243 }
10244}
10245#[doc = "`GasKeyList`"]
10246#[doc = r""]
10247#[doc = r" <details><summary>JSON schema</summary>"]
10248#[doc = r""]
10249#[doc = r" ```json"]
10250#[doc = "{"]
10251#[doc = " \"type\": \"object\","]
10252#[doc = " \"required\": ["]
10253#[doc = " \"keys\""]
10254#[doc = " ],"]
10255#[doc = " \"properties\": {"]
10256#[doc = " \"keys\": {"]
10257#[doc = " \"type\": \"array\","]
10258#[doc = " \"items\": {"]
10259#[doc = " \"$ref\": \"#/components/schemas/GasKeyInfoView\""]
10260#[doc = " }"]
10261#[doc = " }"]
10262#[doc = " }"]
10263#[doc = "}"]
10264#[doc = r" ```"]
10265#[doc = r" </details>"]
10266#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10267pub struct GasKeyList {
10268 pub keys: ::std::vec::Vec<GasKeyInfoView>,
10269}
10270impl ::std::convert::From<&GasKeyList> for GasKeyList {
10271 fn from(value: &GasKeyList) -> Self {
10272 value.clone()
10273 }
10274}
10275#[doc = "`GasKeyView`"]
10276#[doc = r""]
10277#[doc = r" <details><summary>JSON schema</summary>"]
10278#[doc = r""]
10279#[doc = r" ```json"]
10280#[doc = "{"]
10281#[doc = " \"type\": \"object\","]
10282#[doc = " \"required\": ["]
10283#[doc = " \"balance\","]
10284#[doc = " \"nonces\","]
10285#[doc = " \"num_nonces\","]
10286#[doc = " \"permission\""]
10287#[doc = " ],"]
10288#[doc = " \"properties\": {"]
10289#[doc = " \"balance\": {"]
10290#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
10291#[doc = " },"]
10292#[doc = " \"nonces\": {"]
10293#[doc = " \"type\": \"array\","]
10294#[doc = " \"items\": {"]
10295#[doc = " \"type\": \"integer\","]
10296#[doc = " \"format\": \"uint64\","]
10297#[doc = " \"minimum\": 0.0"]
10298#[doc = " }"]
10299#[doc = " },"]
10300#[doc = " \"num_nonces\": {"]
10301#[doc = " \"type\": \"integer\","]
10302#[doc = " \"format\": \"uint32\","]
10303#[doc = " \"minimum\": 0.0"]
10304#[doc = " },"]
10305#[doc = " \"permission\": {"]
10306#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
10307#[doc = " }"]
10308#[doc = " }"]
10309#[doc = "}"]
10310#[doc = r" ```"]
10311#[doc = r" </details>"]
10312#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10313pub struct GasKeyView {
10314 pub balance: NearToken,
10315 pub nonces: ::std::vec::Vec<u64>,
10316 pub num_nonces: u32,
10317 pub permission: AccessKeyPermissionView,
10318}
10319impl ::std::convert::From<&GasKeyView> for GasKeyView {
10320 fn from(value: &GasKeyView) -> Self {
10321 value.clone()
10322 }
10323}
10324#[doc = "Configuration for garbage collection."]
10325#[doc = r""]
10326#[doc = r" <details><summary>JSON schema</summary>"]
10327#[doc = r""]
10328#[doc = r" ```json"]
10329#[doc = "{"]
10330#[doc = " \"description\": \"Configuration for garbage collection.\","]
10331#[doc = " \"type\": \"object\","]
10332#[doc = " \"properties\": {"]
10333#[doc = " \"gc_blocks_limit\": {"]
10334#[doc = " \"description\": \"Maximum number of blocks to garbage collect at every garbage collection\\ncall.\","]
10335#[doc = " \"default\": 2,"]
10336#[doc = " \"type\": \"integer\","]
10337#[doc = " \"format\": \"uint64\","]
10338#[doc = " \"minimum\": 0.0"]
10339#[doc = " },"]
10340#[doc = " \"gc_fork_clean_step\": {"]
10341#[doc = " \"description\": \"Maximum number of height to go through at each garbage collection step\\nwhen cleaning forks during garbage collection.\","]
10342#[doc = " \"default\": 100,"]
10343#[doc = " \"type\": \"integer\","]
10344#[doc = " \"format\": \"uint64\","]
10345#[doc = " \"minimum\": 0.0"]
10346#[doc = " },"]
10347#[doc = " \"gc_num_epochs_to_keep\": {"]
10348#[doc = " \"description\": \"Number of epochs for which we keep store data.\","]
10349#[doc = " \"default\": 5,"]
10350#[doc = " \"type\": \"integer\","]
10351#[doc = " \"format\": \"uint64\","]
10352#[doc = " \"minimum\": 0.0"]
10353#[doc = " },"]
10354#[doc = " \"gc_step_period\": {"]
10355#[doc = " \"description\": \"How often gc should be run\","]
10356#[doc = " \"default\": {"]
10357#[doc = " \"nanos\": 500000000,"]
10358#[doc = " \"secs\": 0"]
10359#[doc = " },"]
10360#[doc = " \"allOf\": ["]
10361#[doc = " {"]
10362#[doc = " \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
10363#[doc = " }"]
10364#[doc = " ]"]
10365#[doc = " }"]
10366#[doc = " }"]
10367#[doc = "}"]
10368#[doc = r" ```"]
10369#[doc = r" </details>"]
10370#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10371pub struct GcConfig {
10372 #[doc = "Maximum number of blocks to garbage collect at every garbage collection\ncall."]
10373 #[serde(default = "defaults::default_u64::<u64, 2>")]
10374 pub gc_blocks_limit: u64,
10375 #[doc = "Maximum number of height to go through at each garbage collection step\nwhen cleaning forks during garbage collection."]
10376 #[serde(default = "defaults::default_u64::<u64, 100>")]
10377 pub gc_fork_clean_step: u64,
10378 #[doc = "Number of epochs for which we keep store data."]
10379 #[serde(default = "defaults::default_u64::<u64, 5>")]
10380 pub gc_num_epochs_to_keep: u64,
10381 #[doc = "How often gc should be run"]
10382 #[serde(default = "defaults::gc_config_gc_step_period")]
10383 pub gc_step_period: DurationAsStdSchemaProvider,
10384}
10385impl ::std::convert::From<&GcConfig> for GcConfig {
10386 fn from(value: &GcConfig) -> Self {
10387 value.clone()
10388 }
10389}
10390impl ::std::default::Default for GcConfig {
10391 fn default() -> Self {
10392 Self {
10393 gc_blocks_limit: defaults::default_u64::<u64, 2>(),
10394 gc_fork_clean_step: defaults::default_u64::<u64, 100>(),
10395 gc_num_epochs_to_keep: defaults::default_u64::<u64, 5>(),
10396 gc_step_period: defaults::gc_config_gc_step_period(),
10397 }
10398 }
10399}
10400#[doc = "`GenesisConfig`"]
10401#[doc = r""]
10402#[doc = r" <details><summary>JSON schema</summary>"]
10403#[doc = r""]
10404#[doc = r" ```json"]
10405#[doc = "{"]
10406#[doc = " \"type\": \"object\","]
10407#[doc = " \"required\": ["]
10408#[doc = " \"avg_hidden_validator_seats_per_shard\","]
10409#[doc = " \"block_producer_kickout_threshold\","]
10410#[doc = " \"chain_id\","]
10411#[doc = " \"chunk_producer_kickout_threshold\","]
10412#[doc = " \"dynamic_resharding\","]
10413#[doc = " \"epoch_length\","]
10414#[doc = " \"fishermen_threshold\","]
10415#[doc = " \"gas_limit\","]
10416#[doc = " \"gas_price_adjustment_rate\","]
10417#[doc = " \"genesis_height\","]
10418#[doc = " \"genesis_time\","]
10419#[doc = " \"max_gas_price\","]
10420#[doc = " \"max_inflation_rate\","]
10421#[doc = " \"min_gas_price\","]
10422#[doc = " \"num_block_producer_seats\","]
10423#[doc = " \"num_block_producer_seats_per_shard\","]
10424#[doc = " \"num_blocks_per_year\","]
10425#[doc = " \"protocol_reward_rate\","]
10426#[doc = " \"protocol_treasury_account\","]
10427#[doc = " \"protocol_version\","]
10428#[doc = " \"total_supply\","]
10429#[doc = " \"transaction_validity_period\","]
10430#[doc = " \"validators\""]
10431#[doc = " ],"]
10432#[doc = " \"properties\": {"]
10433#[doc = " \"avg_hidden_validator_seats_per_shard\": {"]
10434#[doc = " \"description\": \"Expected number of hidden validators per shard.\","]
10435#[doc = " \"type\": \"array\","]
10436#[doc = " \"items\": {"]
10437#[doc = " \"type\": \"integer\","]
10438#[doc = " \"format\": \"uint64\","]
10439#[doc = " \"minimum\": 0.0"]
10440#[doc = " }"]
10441#[doc = " },"]
10442#[doc = " \"block_producer_kickout_threshold\": {"]
10443#[doc = " \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
10444#[doc = " \"type\": \"integer\","]
10445#[doc = " \"format\": \"uint8\","]
10446#[doc = " \"maximum\": 255.0,"]
10447#[doc = " \"minimum\": 0.0"]
10448#[doc = " },"]
10449#[doc = " \"chain_id\": {"]
10450#[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.\","]
10451#[doc = " \"type\": \"string\""]
10452#[doc = " },"]
10453#[doc = " \"chunk_producer_assignment_changes_limit\": {"]
10454#[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.\","]
10455#[doc = " \"default\": 5,"]
10456#[doc = " \"type\": \"integer\","]
10457#[doc = " \"format\": \"uint64\","]
10458#[doc = " \"minimum\": 0.0"]
10459#[doc = " },"]
10460#[doc = " \"chunk_producer_kickout_threshold\": {"]
10461#[doc = " \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
10462#[doc = " \"type\": \"integer\","]
10463#[doc = " \"format\": \"uint8\","]
10464#[doc = " \"maximum\": 255.0,"]
10465#[doc = " \"minimum\": 0.0"]
10466#[doc = " },"]
10467#[doc = " \"chunk_validator_only_kickout_threshold\": {"]
10468#[doc = " \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
10469#[doc = " \"default\": 80,"]
10470#[doc = " \"type\": \"integer\","]
10471#[doc = " \"format\": \"uint8\","]
10472#[doc = " \"maximum\": 255.0,"]
10473#[doc = " \"minimum\": 0.0"]
10474#[doc = " },"]
10475#[doc = " \"dynamic_resharding\": {"]
10476#[doc = " \"description\": \"Enable dynamic re-sharding.\","]
10477#[doc = " \"type\": \"boolean\""]
10478#[doc = " },"]
10479#[doc = " \"epoch_length\": {"]
10480#[doc = " \"description\": \"Epoch length counted in block heights.\","]
10481#[doc = " \"type\": \"integer\","]
10482#[doc = " \"format\": \"uint64\","]
10483#[doc = " \"minimum\": 0.0"]
10484#[doc = " },"]
10485#[doc = " \"fishermen_threshold\": {"]
10486#[doc = " \"description\": \"Fishermen stake threshold.\","]
10487#[doc = " \"allOf\": ["]
10488#[doc = " {"]
10489#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
10490#[doc = " }"]
10491#[doc = " ]"]
10492#[doc = " },"]
10493#[doc = " \"gas_limit\": {"]
10494#[doc = " \"description\": \"Initial gas limit.\","]
10495#[doc = " \"allOf\": ["]
10496#[doc = " {"]
10497#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
10498#[doc = " }"]
10499#[doc = " ]"]
10500#[doc = " },"]
10501#[doc = " \"gas_price_adjustment_rate\": {"]
10502#[doc = " \"description\": \"Gas price adjustment rate\","]
10503#[doc = " \"type\": \"array\","]
10504#[doc = " \"items\": {"]
10505#[doc = " \"type\": \"integer\","]
10506#[doc = " \"format\": \"int32\""]
10507#[doc = " },"]
10508#[doc = " \"maxItems\": 2,"]
10509#[doc = " \"minItems\": 2"]
10510#[doc = " },"]
10511#[doc = " \"genesis_height\": {"]
10512#[doc = " \"description\": \"Height of genesis block.\","]
10513#[doc = " \"type\": \"integer\","]
10514#[doc = " \"format\": \"uint64\","]
10515#[doc = " \"minimum\": 0.0"]
10516#[doc = " },"]
10517#[doc = " \"genesis_time\": {"]
10518#[doc = " \"description\": \"Official time of blockchain start.\","]
10519#[doc = " \"type\": \"string\","]
10520#[doc = " \"format\": \"date-time\""]
10521#[doc = " },"]
10522#[doc = " \"max_gas_price\": {"]
10523#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
10524#[doc = " },"]
10525#[doc = " \"max_inflation_rate\": {"]
10526#[doc = " \"description\": \"Maximum inflation on the total supply every epoch.\","]
10527#[doc = " \"type\": \"array\","]
10528#[doc = " \"items\": {"]
10529#[doc = " \"type\": \"integer\","]
10530#[doc = " \"format\": \"int32\""]
10531#[doc = " },"]
10532#[doc = " \"maxItems\": 2,"]
10533#[doc = " \"minItems\": 2"]
10534#[doc = " },"]
10535#[doc = " \"max_kickout_stake_perc\": {"]
10536#[doc = " \"description\": \"Max stake percentage of the validators we will kick out.\","]
10537#[doc = " \"default\": 100,"]
10538#[doc = " \"type\": \"integer\","]
10539#[doc = " \"format\": \"uint8\","]
10540#[doc = " \"maximum\": 255.0,"]
10541#[doc = " \"minimum\": 0.0"]
10542#[doc = " },"]
10543#[doc = " \"min_gas_price\": {"]
10544#[doc = " \"description\": \"Minimum gas price. It is also the initial gas price.\","]
10545#[doc = " \"allOf\": ["]
10546#[doc = " {"]
10547#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
10548#[doc = " }"]
10549#[doc = " ]"]
10550#[doc = " },"]
10551#[doc = " \"minimum_stake_divisor\": {"]
10552#[doc = " \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
10553#[doc = " \"default\": 10,"]
10554#[doc = " \"type\": \"integer\","]
10555#[doc = " \"format\": \"uint64\","]
10556#[doc = " \"minimum\": 0.0"]
10557#[doc = " },"]
10558#[doc = " \"minimum_stake_ratio\": {"]
10559#[doc = " \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
10560#[doc = " \"default\": ["]
10561#[doc = " 1,"]
10562#[doc = " 6250"]
10563#[doc = " ],"]
10564#[doc = " \"type\": \"array\","]
10565#[doc = " \"items\": {"]
10566#[doc = " \"type\": \"integer\","]
10567#[doc = " \"format\": \"int32\""]
10568#[doc = " },"]
10569#[doc = " \"maxItems\": 2,"]
10570#[doc = " \"minItems\": 2"]
10571#[doc = " },"]
10572#[doc = " \"minimum_validators_per_shard\": {"]
10573#[doc = " \"description\": \"The minimum number of validators each shard must have\","]
10574#[doc = " \"default\": 1,"]
10575#[doc = " \"type\": \"integer\","]
10576#[doc = " \"format\": \"uint64\","]
10577#[doc = " \"minimum\": 0.0"]
10578#[doc = " },"]
10579#[doc = " \"num_block_producer_seats\": {"]
10580#[doc = " \"description\": \"Number of block producer seats at genesis.\","]
10581#[doc = " \"type\": \"integer\","]
10582#[doc = " \"format\": \"uint64\","]
10583#[doc = " \"minimum\": 0.0"]
10584#[doc = " },"]
10585#[doc = " \"num_block_producer_seats_per_shard\": {"]
10586#[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\","]
10587#[doc = " \"type\": \"array\","]
10588#[doc = " \"items\": {"]
10589#[doc = " \"type\": \"integer\","]
10590#[doc = " \"format\": \"uint64\","]
10591#[doc = " \"minimum\": 0.0"]
10592#[doc = " }"]
10593#[doc = " },"]
10594#[doc = " \"num_blocks_per_year\": {"]
10595#[doc = " \"description\": \"Expected number of blocks per year\","]
10596#[doc = " \"type\": \"integer\","]
10597#[doc = " \"format\": \"uint64\","]
10598#[doc = " \"minimum\": 0.0"]
10599#[doc = " },"]
10600#[doc = " \"num_chunk_only_producer_seats\": {"]
10601#[doc = " \"description\": \"Deprecated.\","]
10602#[doc = " \"default\": 300,"]
10603#[doc = " \"type\": \"integer\","]
10604#[doc = " \"format\": \"uint64\","]
10605#[doc = " \"minimum\": 0.0"]
10606#[doc = " },"]
10607#[doc = " \"num_chunk_producer_seats\": {"]
10608#[doc = " \"description\": \"Number of chunk producers.\\nDon't mess it up with chunk-only producers feature which is deprecated.\","]
10609#[doc = " \"default\": 100,"]
10610#[doc = " \"type\": \"integer\","]
10611#[doc = " \"format\": \"uint64\","]
10612#[doc = " \"minimum\": 0.0"]
10613#[doc = " },"]
10614#[doc = " \"num_chunk_validator_seats\": {"]
10615#[doc = " \"default\": 300,"]
10616#[doc = " \"type\": \"integer\","]
10617#[doc = " \"format\": \"uint64\","]
10618#[doc = " \"minimum\": 0.0"]
10619#[doc = " },"]
10620#[doc = " \"online_max_threshold\": {"]
10621#[doc = " \"description\": \"Online maximum threshold above which validator gets full reward.\","]
10622#[doc = " \"default\": ["]
10623#[doc = " 99,"]
10624#[doc = " 100"]
10625#[doc = " ],"]
10626#[doc = " \"type\": \"array\","]
10627#[doc = " \"items\": {"]
10628#[doc = " \"type\": \"integer\","]
10629#[doc = " \"format\": \"int32\""]
10630#[doc = " },"]
10631#[doc = " \"maxItems\": 2,"]
10632#[doc = " \"minItems\": 2"]
10633#[doc = " },"]
10634#[doc = " \"online_min_threshold\": {"]
10635#[doc = " \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
10636#[doc = " \"default\": ["]
10637#[doc = " 9,"]
10638#[doc = " 10"]
10639#[doc = " ],"]
10640#[doc = " \"type\": \"array\","]
10641#[doc = " \"items\": {"]
10642#[doc = " \"type\": \"integer\","]
10643#[doc = " \"format\": \"int32\""]
10644#[doc = " },"]
10645#[doc = " \"maxItems\": 2,"]
10646#[doc = " \"minItems\": 2"]
10647#[doc = " },"]
10648#[doc = " \"protocol_reward_rate\": {"]
10649#[doc = " \"description\": \"Protocol treasury 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 = " \"protocol_treasury_account\": {"]
10659#[doc = " \"description\": \"Protocol treasury account\","]
10660#[doc = " \"allOf\": ["]
10661#[doc = " {"]
10662#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
10663#[doc = " }"]
10664#[doc = " ]"]
10665#[doc = " },"]
10666#[doc = " \"protocol_upgrade_stake_threshold\": {"]
10667#[doc = " \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
10668#[doc = " \"default\": ["]
10669#[doc = " 4,"]
10670#[doc = " 5"]
10671#[doc = " ],"]
10672#[doc = " \"type\": \"array\","]
10673#[doc = " \"items\": {"]
10674#[doc = " \"type\": \"integer\","]
10675#[doc = " \"format\": \"int32\""]
10676#[doc = " },"]
10677#[doc = " \"maxItems\": 2,"]
10678#[doc = " \"minItems\": 2"]
10679#[doc = " },"]
10680#[doc = " \"protocol_version\": {"]
10681#[doc = " \"description\": \"Protocol version that this genesis works with.\","]
10682#[doc = " \"type\": \"integer\","]
10683#[doc = " \"format\": \"uint32\","]
10684#[doc = " \"minimum\": 0.0"]
10685#[doc = " },"]
10686#[doc = " \"shard_layout\": {"]
10687#[doc = " \"description\": \"Layout information regarding how to split accounts to shards\","]
10688#[doc = " \"default\": {"]
10689#[doc = " \"V2\": {"]
10690#[doc = " \"boundary_accounts\": [],"]
10691#[doc = " \"id_to_index_map\": {"]
10692#[doc = " \"0\": 0"]
10693#[doc = " },"]
10694#[doc = " \"index_to_id_map\": {"]
10695#[doc = " \"0\": 0"]
10696#[doc = " },"]
10697#[doc = " \"shard_ids\": ["]
10698#[doc = " 0"]
10699#[doc = " ],"]
10700#[doc = " \"version\": 0"]
10701#[doc = " }"]
10702#[doc = " },"]
10703#[doc = " \"allOf\": ["]
10704#[doc = " {"]
10705#[doc = " \"$ref\": \"#/components/schemas/ShardLayout\""]
10706#[doc = " }"]
10707#[doc = " ]"]
10708#[doc = " },"]
10709#[doc = " \"shuffle_shard_assignment_for_chunk_producers\": {"]
10710#[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]`.\","]
10711#[doc = " \"default\": false,"]
10712#[doc = " \"type\": \"boolean\""]
10713#[doc = " },"]
10714#[doc = " \"target_validator_mandates_per_shard\": {"]
10715#[doc = " \"description\": \"Number of target chunk validator mandates for each shard.\","]
10716#[doc = " \"default\": 68,"]
10717#[doc = " \"type\": \"integer\","]
10718#[doc = " \"format\": \"uint64\","]
10719#[doc = " \"minimum\": 0.0"]
10720#[doc = " },"]
10721#[doc = " \"total_supply\": {"]
10722#[doc = " \"description\": \"Total supply of tokens at genesis.\","]
10723#[doc = " \"allOf\": ["]
10724#[doc = " {"]
10725#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
10726#[doc = " }"]
10727#[doc = " ]"]
10728#[doc = " },"]
10729#[doc = " \"transaction_validity_period\": {"]
10730#[doc = " \"description\": \"Number of blocks for which a given transaction is valid\","]
10731#[doc = " \"type\": \"integer\","]
10732#[doc = " \"format\": \"uint64\","]
10733#[doc = " \"minimum\": 0.0"]
10734#[doc = " },"]
10735#[doc = " \"use_production_config\": {"]
10736#[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.\","]
10737#[doc = " \"default\": false,"]
10738#[doc = " \"type\": \"boolean\""]
10739#[doc = " },"]
10740#[doc = " \"validators\": {"]
10741#[doc = " \"description\": \"List of initial validators.\","]
10742#[doc = " \"type\": \"array\","]
10743#[doc = " \"items\": {"]
10744#[doc = " \"$ref\": \"#/components/schemas/AccountInfo\""]
10745#[doc = " }"]
10746#[doc = " }"]
10747#[doc = " }"]
10748#[doc = "}"]
10749#[doc = r" ```"]
10750#[doc = r" </details>"]
10751#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10752pub struct GenesisConfig {
10753 #[doc = "Expected number of hidden validators per shard."]
10754 pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
10755 #[doc = "Threshold for kicking out block producers, between 0 and 100."]
10756 pub block_producer_kickout_threshold: u8,
10757 #[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."]
10758 pub chain_id: ::std::string::String,
10759 #[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."]
10760 #[serde(default = "defaults::default_u64::<u64, 5>")]
10761 pub chunk_producer_assignment_changes_limit: u64,
10762 #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
10763 pub chunk_producer_kickout_threshold: u8,
10764 #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
10765 #[serde(default = "defaults::default_u64::<u8, 80>")]
10766 pub chunk_validator_only_kickout_threshold: u8,
10767 #[doc = "Enable dynamic re-sharding."]
10768 pub dynamic_resharding: bool,
10769 #[doc = "Epoch length counted in block heights."]
10770 pub epoch_length: u64,
10771 #[doc = "Fishermen stake threshold."]
10772 pub fishermen_threshold: NearToken,
10773 #[doc = "Initial gas limit."]
10774 pub gas_limit: NearGas,
10775 #[doc = "Gas price adjustment rate"]
10776 pub gas_price_adjustment_rate: [i32; 2usize],
10777 #[doc = "Height of genesis block."]
10778 pub genesis_height: u64,
10779 #[doc = "Official time of blockchain start."]
10780 pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
10781 pub max_gas_price: NearToken,
10782 #[doc = "Maximum inflation on the total supply every epoch."]
10783 pub max_inflation_rate: [i32; 2usize],
10784 #[doc = "Max stake percentage of the validators we will kick out."]
10785 #[serde(default = "defaults::default_u64::<u8, 100>")]
10786 pub max_kickout_stake_perc: u8,
10787 #[doc = "Minimum gas price. It is also the initial gas price."]
10788 pub min_gas_price: NearToken,
10789 #[doc = "The minimum stake required for staking is last seat price divided by this number."]
10790 #[serde(default = "defaults::default_u64::<u64, 10>")]
10791 pub minimum_stake_divisor: u64,
10792 #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
10793 #[serde(default = "defaults::genesis_config_minimum_stake_ratio")]
10794 pub minimum_stake_ratio: [i32; 2usize],
10795 #[doc = "The minimum number of validators each shard must have"]
10796 #[serde(default = "defaults::default_u64::<u64, 1>")]
10797 pub minimum_validators_per_shard: u64,
10798 #[doc = "Number of block producer seats at genesis."]
10799 pub num_block_producer_seats: u64,
10800 #[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"]
10801 pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
10802 #[doc = "Expected number of blocks per year"]
10803 pub num_blocks_per_year: u64,
10804 #[doc = "Deprecated."]
10805 #[serde(default = "defaults::default_u64::<u64, 300>")]
10806 pub num_chunk_only_producer_seats: u64,
10807 #[doc = "Number of chunk producers.\nDon't mess it up with chunk-only producers feature which is deprecated."]
10808 #[serde(default = "defaults::default_u64::<u64, 100>")]
10809 pub num_chunk_producer_seats: u64,
10810 #[serde(default = "defaults::default_u64::<u64, 300>")]
10811 pub num_chunk_validator_seats: u64,
10812 #[doc = "Online maximum threshold above which validator gets full reward."]
10813 #[serde(default = "defaults::genesis_config_online_max_threshold")]
10814 pub online_max_threshold: [i32; 2usize],
10815 #[doc = "Online minimum threshold below which validator doesn't receive reward."]
10816 #[serde(default = "defaults::genesis_config_online_min_threshold")]
10817 pub online_min_threshold: [i32; 2usize],
10818 #[doc = "Protocol treasury rate"]
10819 pub protocol_reward_rate: [i32; 2usize],
10820 #[doc = "Protocol treasury account"]
10821 pub protocol_treasury_account: AccountId,
10822 #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
10823 #[serde(default = "defaults::genesis_config_protocol_upgrade_stake_threshold")]
10824 pub protocol_upgrade_stake_threshold: [i32; 2usize],
10825 #[doc = "Protocol version that this genesis works with."]
10826 pub protocol_version: u32,
10827 #[doc = "Layout information regarding how to split accounts to shards"]
10828 #[serde(default = "defaults::genesis_config_shard_layout")]
10829 pub shard_layout: ShardLayout,
10830 #[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]`."]
10831 #[serde(default)]
10832 pub shuffle_shard_assignment_for_chunk_producers: bool,
10833 #[doc = "Number of target chunk validator mandates for each shard."]
10834 #[serde(default = "defaults::default_u64::<u64, 68>")]
10835 pub target_validator_mandates_per_shard: u64,
10836 #[doc = "Total supply of tokens at genesis."]
10837 pub total_supply: NearToken,
10838 #[doc = "Number of blocks for which a given transaction is valid"]
10839 pub transaction_validity_period: u64,
10840 #[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."]
10841 #[serde(default)]
10842 pub use_production_config: bool,
10843 #[doc = "List of initial validators."]
10844 pub validators: ::std::vec::Vec<AccountInfo>,
10845}
10846impl ::std::convert::From<&GenesisConfig> for GenesisConfig {
10847 fn from(value: &GenesisConfig) -> Self {
10848 value.clone()
10849 }
10850}
10851#[doc = "`GenesisConfigError`"]
10852#[doc = r""]
10853#[doc = r" <details><summary>JSON schema</summary>"]
10854#[doc = r""]
10855#[doc = r" ```json"]
10856#[doc = "{"]
10857#[doc = " \"type\": \"null\""]
10858#[doc = "}"]
10859#[doc = r" ```"]
10860#[doc = r" </details>"]
10861#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10862#[serde(transparent)]
10863pub struct GenesisConfigError(pub ());
10864impl ::std::ops::Deref for GenesisConfigError {
10865 type Target = ();
10866 fn deref(&self) -> &() {
10867 &self.0
10868 }
10869}
10870impl ::std::convert::From<GenesisConfigError> for () {
10871 fn from(value: GenesisConfigError) -> Self {
10872 value.0
10873 }
10874}
10875impl ::std::convert::From<&GenesisConfigError> for GenesisConfigError {
10876 fn from(value: &GenesisConfigError) -> Self {
10877 value.clone()
10878 }
10879}
10880impl ::std::convert::From<()> for GenesisConfigError {
10881 fn from(value: ()) -> Self {
10882 Self(value)
10883 }
10884}
10885#[doc = "`GenesisConfigRequest`"]
10886#[doc = r""]
10887#[doc = r" <details><summary>JSON schema</summary>"]
10888#[doc = r""]
10889#[doc = r" ```json"]
10890#[doc = "{"]
10891#[doc = " \"title\": \"GenesisConfigRequest\","]
10892#[doc = " \"type\": \"null\""]
10893#[doc = "}"]
10894#[doc = r" ```"]
10895#[doc = r" </details>"]
10896#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10897#[serde(transparent)]
10898pub struct GenesisConfigRequest(pub ());
10899impl ::std::ops::Deref for GenesisConfigRequest {
10900 type Target = ();
10901 fn deref(&self) -> &() {
10902 &self.0
10903 }
10904}
10905impl ::std::convert::From<GenesisConfigRequest> for () {
10906 fn from(value: GenesisConfigRequest) -> Self {
10907 value.0
10908 }
10909}
10910impl ::std::convert::From<&GenesisConfigRequest> for GenesisConfigRequest {
10911 fn from(value: &GenesisConfigRequest) -> Self {
10912 value.clone()
10913 }
10914}
10915impl ::std::convert::From<()> for GenesisConfigRequest {
10916 fn from(value: ()) -> Self {
10917 Self(value)
10918 }
10919}
10920#[doc = "`GlobalContractDeployMode`"]
10921#[doc = r""]
10922#[doc = r" <details><summary>JSON schema</summary>"]
10923#[doc = r""]
10924#[doc = r" ```json"]
10925#[doc = "{"]
10926#[doc = " \"oneOf\": ["]
10927#[doc = " {"]
10928#[doc = " \"description\": \"Contract is deployed under its code hash.\\nUsers will be able reference it by that hash.\\nThis effectively makes the contract immutable.\","]
10929#[doc = " \"type\": \"string\","]
10930#[doc = " \"enum\": ["]
10931#[doc = " \"CodeHash\""]
10932#[doc = " ]"]
10933#[doc = " },"]
10934#[doc = " {"]
10935#[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.\","]
10936#[doc = " \"type\": \"string\","]
10937#[doc = " \"enum\": ["]
10938#[doc = " \"AccountId\""]
10939#[doc = " ]"]
10940#[doc = " }"]
10941#[doc = " ]"]
10942#[doc = "}"]
10943#[doc = r" ```"]
10944#[doc = r" </details>"]
10945#[derive(
10946 :: serde :: Deserialize,
10947 :: serde :: Serialize,
10948 Clone,
10949 Copy,
10950 Debug,
10951 Eq,
10952 Hash,
10953 Ord,
10954 PartialEq,
10955 PartialOrd,
10956)]
10957pub enum GlobalContractDeployMode {
10958 #[doc = "Contract is deployed under its code hash.\nUsers will be able reference it by that hash.\nThis effectively makes the contract immutable."]
10959 CodeHash,
10960 #[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."]
10961 AccountId,
10962}
10963impl ::std::convert::From<&Self> for GlobalContractDeployMode {
10964 fn from(value: &GlobalContractDeployMode) -> Self {
10965 value.clone()
10966 }
10967}
10968impl ::std::fmt::Display for GlobalContractDeployMode {
10969 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10970 match *self {
10971 Self::CodeHash => f.write_str("CodeHash"),
10972 Self::AccountId => f.write_str("AccountId"),
10973 }
10974 }
10975}
10976impl ::std::str::FromStr for GlobalContractDeployMode {
10977 type Err = self::error::ConversionError;
10978 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10979 match value {
10980 "CodeHash" => Ok(Self::CodeHash),
10981 "AccountId" => Ok(Self::AccountId),
10982 _ => Err("invalid value".into()),
10983 }
10984 }
10985}
10986impl ::std::convert::TryFrom<&str> for GlobalContractDeployMode {
10987 type Error = self::error::ConversionError;
10988 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10989 value.parse()
10990 }
10991}
10992impl ::std::convert::TryFrom<&::std::string::String> for GlobalContractDeployMode {
10993 type Error = self::error::ConversionError;
10994 fn try_from(
10995 value: &::std::string::String,
10996 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10997 value.parse()
10998 }
10999}
11000impl ::std::convert::TryFrom<::std::string::String> for GlobalContractDeployMode {
11001 type Error = self::error::ConversionError;
11002 fn try_from(
11003 value: ::std::string::String,
11004 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11005 value.parse()
11006 }
11007}
11008#[doc = "`GlobalContractIdentifier`"]
11009#[doc = r""]
11010#[doc = r" <details><summary>JSON schema</summary>"]
11011#[doc = r""]
11012#[doc = r" ```json"]
11013#[doc = "{"]
11014#[doc = " \"oneOf\": ["]
11015#[doc = " {"]
11016#[doc = " \"type\": \"object\","]
11017#[doc = " \"required\": ["]
11018#[doc = " \"CodeHash\""]
11019#[doc = " ],"]
11020#[doc = " \"properties\": {"]
11021#[doc = " \"CodeHash\": {"]
11022#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
11023#[doc = " }"]
11024#[doc = " },"]
11025#[doc = " \"additionalProperties\": false"]
11026#[doc = " },"]
11027#[doc = " {"]
11028#[doc = " \"type\": \"object\","]
11029#[doc = " \"required\": ["]
11030#[doc = " \"AccountId\""]
11031#[doc = " ],"]
11032#[doc = " \"properties\": {"]
11033#[doc = " \"AccountId\": {"]
11034#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
11035#[doc = " }"]
11036#[doc = " },"]
11037#[doc = " \"additionalProperties\": false"]
11038#[doc = " }"]
11039#[doc = " ]"]
11040#[doc = "}"]
11041#[doc = r" ```"]
11042#[doc = r" </details>"]
11043#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11044pub enum GlobalContractIdentifier {
11045 CodeHash(CryptoHash),
11046 AccountId(AccountId),
11047}
11048impl ::std::convert::From<&Self> for GlobalContractIdentifier {
11049 fn from(value: &GlobalContractIdentifier) -> Self {
11050 value.clone()
11051 }
11052}
11053impl ::std::convert::From<CryptoHash> for GlobalContractIdentifier {
11054 fn from(value: CryptoHash) -> Self {
11055 Self::CodeHash(value)
11056 }
11057}
11058impl ::std::convert::From<AccountId> for GlobalContractIdentifier {
11059 fn from(value: AccountId) -> Self {
11060 Self::AccountId(value)
11061 }
11062}
11063#[doc = "`GlobalContractIdentifierView`"]
11064#[doc = r""]
11065#[doc = r" <details><summary>JSON schema</summary>"]
11066#[doc = r""]
11067#[doc = r" ```json"]
11068#[doc = "{"]
11069#[doc = " \"anyOf\": ["]
11070#[doc = " {"]
11071#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
11072#[doc = " },"]
11073#[doc = " {"]
11074#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
11075#[doc = " }"]
11076#[doc = " ]"]
11077#[doc = "}"]
11078#[doc = r" ```"]
11079#[doc = r" </details>"]
11080#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11081pub struct GlobalContractIdentifierView {
11082 #[serde(
11083 flatten,
11084 default,
11085 skip_serializing_if = "::std::option::Option::is_none"
11086 )]
11087 pub subtype_0: ::std::option::Option<CryptoHash>,
11088 #[serde(
11089 flatten,
11090 default,
11091 skip_serializing_if = "::std::option::Option::is_none"
11092 )]
11093 pub subtype_1: ::std::option::Option<AccountId>,
11094}
11095impl ::std::convert::From<&GlobalContractIdentifierView> for GlobalContractIdentifierView {
11096 fn from(value: &GlobalContractIdentifierView) -> Self {
11097 value.clone()
11098 }
11099}
11100impl ::std::default::Default for GlobalContractIdentifierView {
11101 fn default() -> Self {
11102 Self {
11103 subtype_0: Default::default(),
11104 subtype_1: Default::default(),
11105 }
11106 }
11107}
11108#[doc = "`HostError`"]
11109#[doc = r""]
11110#[doc = r" <details><summary>JSON schema</summary>"]
11111#[doc = r""]
11112#[doc = r" ```json"]
11113#[doc = "{"]
11114#[doc = " \"oneOf\": ["]
11115#[doc = " {"]
11116#[doc = " \"description\": \"String encoding is bad UTF-16 sequence\","]
11117#[doc = " \"type\": \"string\","]
11118#[doc = " \"enum\": ["]
11119#[doc = " \"BadUTF16\""]
11120#[doc = " ]"]
11121#[doc = " },"]
11122#[doc = " {"]
11123#[doc = " \"description\": \"String encoding is bad UTF-8 sequence\","]
11124#[doc = " \"type\": \"string\","]
11125#[doc = " \"enum\": ["]
11126#[doc = " \"BadUTF8\""]
11127#[doc = " ]"]
11128#[doc = " },"]
11129#[doc = " {"]
11130#[doc = " \"description\": \"Exceeded the prepaid gas\","]
11131#[doc = " \"type\": \"string\","]
11132#[doc = " \"enum\": ["]
11133#[doc = " \"GasExceeded\""]
11134#[doc = " ]"]
11135#[doc = " },"]
11136#[doc = " {"]
11137#[doc = " \"description\": \"Exceeded the maximum amount of gas allowed to burn per contract\","]
11138#[doc = " \"type\": \"string\","]
11139#[doc = " \"enum\": ["]
11140#[doc = " \"GasLimitExceeded\""]
11141#[doc = " ]"]
11142#[doc = " },"]
11143#[doc = " {"]
11144#[doc = " \"description\": \"Exceeded the account balance\","]
11145#[doc = " \"type\": \"string\","]
11146#[doc = " \"enum\": ["]
11147#[doc = " \"BalanceExceeded\""]
11148#[doc = " ]"]
11149#[doc = " },"]
11150#[doc = " {"]
11151#[doc = " \"description\": \"Tried to call an empty method name\","]
11152#[doc = " \"type\": \"string\","]
11153#[doc = " \"enum\": ["]
11154#[doc = " \"EmptyMethodName\""]
11155#[doc = " ]"]
11156#[doc = " },"]
11157#[doc = " {"]
11158#[doc = " \"description\": \"Smart contract panicked\","]
11159#[doc = " \"type\": \"object\","]
11160#[doc = " \"required\": ["]
11161#[doc = " \"GuestPanic\""]
11162#[doc = " ],"]
11163#[doc = " \"properties\": {"]
11164#[doc = " \"GuestPanic\": {"]
11165#[doc = " \"type\": \"object\","]
11166#[doc = " \"required\": ["]
11167#[doc = " \"panic_msg\""]
11168#[doc = " ],"]
11169#[doc = " \"properties\": {"]
11170#[doc = " \"panic_msg\": {"]
11171#[doc = " \"type\": \"string\""]
11172#[doc = " }"]
11173#[doc = " }"]
11174#[doc = " }"]
11175#[doc = " },"]
11176#[doc = " \"additionalProperties\": false"]
11177#[doc = " },"]
11178#[doc = " {"]
11179#[doc = " \"description\": \"IntegerOverflow happened during a contract execution\","]
11180#[doc = " \"type\": \"string\","]
11181#[doc = " \"enum\": ["]
11182#[doc = " \"IntegerOverflow\""]
11183#[doc = " ]"]
11184#[doc = " },"]
11185#[doc = " {"]
11186#[doc = " \"description\": \"`promise_idx` does not correspond to existing promises\","]
11187#[doc = " \"type\": \"object\","]
11188#[doc = " \"required\": ["]
11189#[doc = " \"InvalidPromiseIndex\""]
11190#[doc = " ],"]
11191#[doc = " \"properties\": {"]
11192#[doc = " \"InvalidPromiseIndex\": {"]
11193#[doc = " \"type\": \"object\","]
11194#[doc = " \"required\": ["]
11195#[doc = " \"promise_idx\""]
11196#[doc = " ],"]
11197#[doc = " \"properties\": {"]
11198#[doc = " \"promise_idx\": {"]
11199#[doc = " \"type\": \"integer\","]
11200#[doc = " \"format\": \"uint64\","]
11201#[doc = " \"minimum\": 0.0"]
11202#[doc = " }"]
11203#[doc = " }"]
11204#[doc = " }"]
11205#[doc = " },"]
11206#[doc = " \"additionalProperties\": false"]
11207#[doc = " },"]
11208#[doc = " {"]
11209#[doc = " \"description\": \"Actions can only be appended to non-joint promise.\","]
11210#[doc = " \"type\": \"string\","]
11211#[doc = " \"enum\": ["]
11212#[doc = " \"CannotAppendActionToJointPromise\""]
11213#[doc = " ]"]
11214#[doc = " },"]
11215#[doc = " {"]
11216#[doc = " \"description\": \"Returning joint promise is currently prohibited\","]
11217#[doc = " \"type\": \"string\","]
11218#[doc = " \"enum\": ["]
11219#[doc = " \"CannotReturnJointPromise\""]
11220#[doc = " ]"]
11221#[doc = " },"]
11222#[doc = " {"]
11223#[doc = " \"description\": \"Accessed invalid promise result index\","]
11224#[doc = " \"type\": \"object\","]
11225#[doc = " \"required\": ["]
11226#[doc = " \"InvalidPromiseResultIndex\""]
11227#[doc = " ],"]
11228#[doc = " \"properties\": {"]
11229#[doc = " \"InvalidPromiseResultIndex\": {"]
11230#[doc = " \"type\": \"object\","]
11231#[doc = " \"required\": ["]
11232#[doc = " \"result_idx\""]
11233#[doc = " ],"]
11234#[doc = " \"properties\": {"]
11235#[doc = " \"result_idx\": {"]
11236#[doc = " \"type\": \"integer\","]
11237#[doc = " \"format\": \"uint64\","]
11238#[doc = " \"minimum\": 0.0"]
11239#[doc = " }"]
11240#[doc = " }"]
11241#[doc = " }"]
11242#[doc = " },"]
11243#[doc = " \"additionalProperties\": false"]
11244#[doc = " },"]
11245#[doc = " {"]
11246#[doc = " \"description\": \"Accessed invalid register id\","]
11247#[doc = " \"type\": \"object\","]
11248#[doc = " \"required\": ["]
11249#[doc = " \"InvalidRegisterId\""]
11250#[doc = " ],"]
11251#[doc = " \"properties\": {"]
11252#[doc = " \"InvalidRegisterId\": {"]
11253#[doc = " \"type\": \"object\","]
11254#[doc = " \"required\": ["]
11255#[doc = " \"register_id\""]
11256#[doc = " ],"]
11257#[doc = " \"properties\": {"]
11258#[doc = " \"register_id\": {"]
11259#[doc = " \"type\": \"integer\","]
11260#[doc = " \"format\": \"uint64\","]
11261#[doc = " \"minimum\": 0.0"]
11262#[doc = " }"]
11263#[doc = " }"]
11264#[doc = " }"]
11265#[doc = " },"]
11266#[doc = " \"additionalProperties\": false"]
11267#[doc = " },"]
11268#[doc = " {"]
11269#[doc = " \"description\": \"Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie\","]
11270#[doc = " \"type\": \"object\","]
11271#[doc = " \"required\": ["]
11272#[doc = " \"IteratorWasInvalidated\""]
11273#[doc = " ],"]
11274#[doc = " \"properties\": {"]
11275#[doc = " \"IteratorWasInvalidated\": {"]
11276#[doc = " \"type\": \"object\","]
11277#[doc = " \"required\": ["]
11278#[doc = " \"iterator_index\""]
11279#[doc = " ],"]
11280#[doc = " \"properties\": {"]
11281#[doc = " \"iterator_index\": {"]
11282#[doc = " \"type\": \"integer\","]
11283#[doc = " \"format\": \"uint64\","]
11284#[doc = " \"minimum\": 0.0"]
11285#[doc = " }"]
11286#[doc = " }"]
11287#[doc = " }"]
11288#[doc = " },"]
11289#[doc = " \"additionalProperties\": false"]
11290#[doc = " },"]
11291#[doc = " {"]
11292#[doc = " \"description\": \"Accessed memory outside the bounds\","]
11293#[doc = " \"type\": \"string\","]
11294#[doc = " \"enum\": ["]
11295#[doc = " \"MemoryAccessViolation\""]
11296#[doc = " ]"]
11297#[doc = " },"]
11298#[doc = " {"]
11299#[doc = " \"description\": \"VM Logic returned an invalid receipt index\","]
11300#[doc = " \"type\": \"object\","]
11301#[doc = " \"required\": ["]
11302#[doc = " \"InvalidReceiptIndex\""]
11303#[doc = " ],"]
11304#[doc = " \"properties\": {"]
11305#[doc = " \"InvalidReceiptIndex\": {"]
11306#[doc = " \"type\": \"object\","]
11307#[doc = " \"required\": ["]
11308#[doc = " \"receipt_index\""]
11309#[doc = " ],"]
11310#[doc = " \"properties\": {"]
11311#[doc = " \"receipt_index\": {"]
11312#[doc = " \"type\": \"integer\","]
11313#[doc = " \"format\": \"uint64\","]
11314#[doc = " \"minimum\": 0.0"]
11315#[doc = " }"]
11316#[doc = " }"]
11317#[doc = " }"]
11318#[doc = " },"]
11319#[doc = " \"additionalProperties\": false"]
11320#[doc = " },"]
11321#[doc = " {"]
11322#[doc = " \"description\": \"Iterator index `iterator_index` does not exist\","]
11323#[doc = " \"type\": \"object\","]
11324#[doc = " \"required\": ["]
11325#[doc = " \"InvalidIteratorIndex\""]
11326#[doc = " ],"]
11327#[doc = " \"properties\": {"]
11328#[doc = " \"InvalidIteratorIndex\": {"]
11329#[doc = " \"type\": \"object\","]
11330#[doc = " \"required\": ["]
11331#[doc = " \"iterator_index\""]
11332#[doc = " ],"]
11333#[doc = " \"properties\": {"]
11334#[doc = " \"iterator_index\": {"]
11335#[doc = " \"type\": \"integer\","]
11336#[doc = " \"format\": \"uint64\","]
11337#[doc = " \"minimum\": 0.0"]
11338#[doc = " }"]
11339#[doc = " }"]
11340#[doc = " }"]
11341#[doc = " },"]
11342#[doc = " \"additionalProperties\": false"]
11343#[doc = " },"]
11344#[doc = " {"]
11345#[doc = " \"description\": \"VM Logic returned an invalid account id\","]
11346#[doc = " \"type\": \"string\","]
11347#[doc = " \"enum\": ["]
11348#[doc = " \"InvalidAccountId\""]
11349#[doc = " ]"]
11350#[doc = " },"]
11351#[doc = " {"]
11352#[doc = " \"description\": \"VM Logic returned an invalid method name\","]
11353#[doc = " \"type\": \"string\","]
11354#[doc = " \"enum\": ["]
11355#[doc = " \"InvalidMethodName\""]
11356#[doc = " ]"]
11357#[doc = " },"]
11358#[doc = " {"]
11359#[doc = " \"description\": \"VM Logic provided an invalid public key\","]
11360#[doc = " \"type\": \"string\","]
11361#[doc = " \"enum\": ["]
11362#[doc = " \"InvalidPublicKey\""]
11363#[doc = " ]"]
11364#[doc = " },"]
11365#[doc = " {"]
11366#[doc = " \"description\": \"`method_name` is not allowed in view calls\","]
11367#[doc = " \"type\": \"object\","]
11368#[doc = " \"required\": ["]
11369#[doc = " \"ProhibitedInView\""]
11370#[doc = " ],"]
11371#[doc = " \"properties\": {"]
11372#[doc = " \"ProhibitedInView\": {"]
11373#[doc = " \"type\": \"object\","]
11374#[doc = " \"required\": ["]
11375#[doc = " \"method_name\""]
11376#[doc = " ],"]
11377#[doc = " \"properties\": {"]
11378#[doc = " \"method_name\": {"]
11379#[doc = " \"type\": \"string\""]
11380#[doc = " }"]
11381#[doc = " }"]
11382#[doc = " }"]
11383#[doc = " },"]
11384#[doc = " \"additionalProperties\": false"]
11385#[doc = " },"]
11386#[doc = " {"]
11387#[doc = " \"description\": \"The total number of logs will exceed the limit.\","]
11388#[doc = " \"type\": \"object\","]
11389#[doc = " \"required\": ["]
11390#[doc = " \"NumberOfLogsExceeded\""]
11391#[doc = " ],"]
11392#[doc = " \"properties\": {"]
11393#[doc = " \"NumberOfLogsExceeded\": {"]
11394#[doc = " \"type\": \"object\","]
11395#[doc = " \"required\": ["]
11396#[doc = " \"limit\""]
11397#[doc = " ],"]
11398#[doc = " \"properties\": {"]
11399#[doc = " \"limit\": {"]
11400#[doc = " \"type\": \"integer\","]
11401#[doc = " \"format\": \"uint64\","]
11402#[doc = " \"minimum\": 0.0"]
11403#[doc = " }"]
11404#[doc = " }"]
11405#[doc = " }"]
11406#[doc = " },"]
11407#[doc = " \"additionalProperties\": false"]
11408#[doc = " },"]
11409#[doc = " {"]
11410#[doc = " \"description\": \"The storage key length exceeded the limit.\","]
11411#[doc = " \"type\": \"object\","]
11412#[doc = " \"required\": ["]
11413#[doc = " \"KeyLengthExceeded\""]
11414#[doc = " ],"]
11415#[doc = " \"properties\": {"]
11416#[doc = " \"KeyLengthExceeded\": {"]
11417#[doc = " \"type\": \"object\","]
11418#[doc = " \"required\": ["]
11419#[doc = " \"length\","]
11420#[doc = " \"limit\""]
11421#[doc = " ],"]
11422#[doc = " \"properties\": {"]
11423#[doc = " \"length\": {"]
11424#[doc = " \"type\": \"integer\","]
11425#[doc = " \"format\": \"uint64\","]
11426#[doc = " \"minimum\": 0.0"]
11427#[doc = " },"]
11428#[doc = " \"limit\": {"]
11429#[doc = " \"type\": \"integer\","]
11430#[doc = " \"format\": \"uint64\","]
11431#[doc = " \"minimum\": 0.0"]
11432#[doc = " }"]
11433#[doc = " }"]
11434#[doc = " }"]
11435#[doc = " },"]
11436#[doc = " \"additionalProperties\": false"]
11437#[doc = " },"]
11438#[doc = " {"]
11439#[doc = " \"description\": \"The storage value length exceeded the limit.\","]
11440#[doc = " \"type\": \"object\","]
11441#[doc = " \"required\": ["]
11442#[doc = " \"ValueLengthExceeded\""]
11443#[doc = " ],"]
11444#[doc = " \"properties\": {"]
11445#[doc = " \"ValueLengthExceeded\": {"]
11446#[doc = " \"type\": \"object\","]
11447#[doc = " \"required\": ["]
11448#[doc = " \"length\","]
11449#[doc = " \"limit\""]
11450#[doc = " ],"]
11451#[doc = " \"properties\": {"]
11452#[doc = " \"length\": {"]
11453#[doc = " \"type\": \"integer\","]
11454#[doc = " \"format\": \"uint64\","]
11455#[doc = " \"minimum\": 0.0"]
11456#[doc = " },"]
11457#[doc = " \"limit\": {"]
11458#[doc = " \"type\": \"integer\","]
11459#[doc = " \"format\": \"uint64\","]
11460#[doc = " \"minimum\": 0.0"]
11461#[doc = " }"]
11462#[doc = " }"]
11463#[doc = " }"]
11464#[doc = " },"]
11465#[doc = " \"additionalProperties\": false"]
11466#[doc = " },"]
11467#[doc = " {"]
11468#[doc = " \"description\": \"The total log length exceeded the limit.\","]
11469#[doc = " \"type\": \"object\","]
11470#[doc = " \"required\": ["]
11471#[doc = " \"TotalLogLengthExceeded\""]
11472#[doc = " ],"]
11473#[doc = " \"properties\": {"]
11474#[doc = " \"TotalLogLengthExceeded\": {"]
11475#[doc = " \"type\": \"object\","]
11476#[doc = " \"required\": ["]
11477#[doc = " \"length\","]
11478#[doc = " \"limit\""]
11479#[doc = " ],"]
11480#[doc = " \"properties\": {"]
11481#[doc = " \"length\": {"]
11482#[doc = " \"type\": \"integer\","]
11483#[doc = " \"format\": \"uint64\","]
11484#[doc = " \"minimum\": 0.0"]
11485#[doc = " },"]
11486#[doc = " \"limit\": {"]
11487#[doc = " \"type\": \"integer\","]
11488#[doc = " \"format\": \"uint64\","]
11489#[doc = " \"minimum\": 0.0"]
11490#[doc = " }"]
11491#[doc = " }"]
11492#[doc = " }"]
11493#[doc = " },"]
11494#[doc = " \"additionalProperties\": false"]
11495#[doc = " },"]
11496#[doc = " {"]
11497#[doc = " \"description\": \"The maximum number of promises within a FunctionCall exceeded the limit.\","]
11498#[doc = " \"type\": \"object\","]
11499#[doc = " \"required\": ["]
11500#[doc = " \"NumberPromisesExceeded\""]
11501#[doc = " ],"]
11502#[doc = " \"properties\": {"]
11503#[doc = " \"NumberPromisesExceeded\": {"]
11504#[doc = " \"type\": \"object\","]
11505#[doc = " \"required\": ["]
11506#[doc = " \"limit\","]
11507#[doc = " \"number_of_promises\""]
11508#[doc = " ],"]
11509#[doc = " \"properties\": {"]
11510#[doc = " \"limit\": {"]
11511#[doc = " \"type\": \"integer\","]
11512#[doc = " \"format\": \"uint64\","]
11513#[doc = " \"minimum\": 0.0"]
11514#[doc = " },"]
11515#[doc = " \"number_of_promises\": {"]
11516#[doc = " \"type\": \"integer\","]
11517#[doc = " \"format\": \"uint64\","]
11518#[doc = " \"minimum\": 0.0"]
11519#[doc = " }"]
11520#[doc = " }"]
11521#[doc = " }"]
11522#[doc = " },"]
11523#[doc = " \"additionalProperties\": false"]
11524#[doc = " },"]
11525#[doc = " {"]
11526#[doc = " \"description\": \"The maximum number of input data dependencies exceeded the limit.\","]
11527#[doc = " \"type\": \"object\","]
11528#[doc = " \"required\": ["]
11529#[doc = " \"NumberInputDataDependenciesExceeded\""]
11530#[doc = " ],"]
11531#[doc = " \"properties\": {"]
11532#[doc = " \"NumberInputDataDependenciesExceeded\": {"]
11533#[doc = " \"type\": \"object\","]
11534#[doc = " \"required\": ["]
11535#[doc = " \"limit\","]
11536#[doc = " \"number_of_input_data_dependencies\""]
11537#[doc = " ],"]
11538#[doc = " \"properties\": {"]
11539#[doc = " \"limit\": {"]
11540#[doc = " \"type\": \"integer\","]
11541#[doc = " \"format\": \"uint64\","]
11542#[doc = " \"minimum\": 0.0"]
11543#[doc = " },"]
11544#[doc = " \"number_of_input_data_dependencies\": {"]
11545#[doc = " \"type\": \"integer\","]
11546#[doc = " \"format\": \"uint64\","]
11547#[doc = " \"minimum\": 0.0"]
11548#[doc = " }"]
11549#[doc = " }"]
11550#[doc = " }"]
11551#[doc = " },"]
11552#[doc = " \"additionalProperties\": false"]
11553#[doc = " },"]
11554#[doc = " {"]
11555#[doc = " \"description\": \"The returned value length exceeded the limit.\","]
11556#[doc = " \"type\": \"object\","]
11557#[doc = " \"required\": ["]
11558#[doc = " \"ReturnedValueLengthExceeded\""]
11559#[doc = " ],"]
11560#[doc = " \"properties\": {"]
11561#[doc = " \"ReturnedValueLengthExceeded\": {"]
11562#[doc = " \"type\": \"object\","]
11563#[doc = " \"required\": ["]
11564#[doc = " \"length\","]
11565#[doc = " \"limit\""]
11566#[doc = " ],"]
11567#[doc = " \"properties\": {"]
11568#[doc = " \"length\": {"]
11569#[doc = " \"type\": \"integer\","]
11570#[doc = " \"format\": \"uint64\","]
11571#[doc = " \"minimum\": 0.0"]
11572#[doc = " },"]
11573#[doc = " \"limit\": {"]
11574#[doc = " \"type\": \"integer\","]
11575#[doc = " \"format\": \"uint64\","]
11576#[doc = " \"minimum\": 0.0"]
11577#[doc = " }"]
11578#[doc = " }"]
11579#[doc = " }"]
11580#[doc = " },"]
11581#[doc = " \"additionalProperties\": false"]
11582#[doc = " },"]
11583#[doc = " {"]
11584#[doc = " \"description\": \"The contract size for DeployContract action exceeded the limit.\","]
11585#[doc = " \"type\": \"object\","]
11586#[doc = " \"required\": ["]
11587#[doc = " \"ContractSizeExceeded\""]
11588#[doc = " ],"]
11589#[doc = " \"properties\": {"]
11590#[doc = " \"ContractSizeExceeded\": {"]
11591#[doc = " \"type\": \"object\","]
11592#[doc = " \"required\": ["]
11593#[doc = " \"limit\","]
11594#[doc = " \"size\""]
11595#[doc = " ],"]
11596#[doc = " \"properties\": {"]
11597#[doc = " \"limit\": {"]
11598#[doc = " \"type\": \"integer\","]
11599#[doc = " \"format\": \"uint64\","]
11600#[doc = " \"minimum\": 0.0"]
11601#[doc = " },"]
11602#[doc = " \"size\": {"]
11603#[doc = " \"type\": \"integer\","]
11604#[doc = " \"format\": \"uint64\","]
11605#[doc = " \"minimum\": 0.0"]
11606#[doc = " }"]
11607#[doc = " }"]
11608#[doc = " }"]
11609#[doc = " },"]
11610#[doc = " \"additionalProperties\": false"]
11611#[doc = " },"]
11612#[doc = " {"]
11613#[doc = " \"description\": \"The host function was deprecated.\","]
11614#[doc = " \"type\": \"object\","]
11615#[doc = " \"required\": ["]
11616#[doc = " \"Deprecated\""]
11617#[doc = " ],"]
11618#[doc = " \"properties\": {"]
11619#[doc = " \"Deprecated\": {"]
11620#[doc = " \"type\": \"object\","]
11621#[doc = " \"required\": ["]
11622#[doc = " \"method_name\""]
11623#[doc = " ],"]
11624#[doc = " \"properties\": {"]
11625#[doc = " \"method_name\": {"]
11626#[doc = " \"type\": \"string\""]
11627#[doc = " }"]
11628#[doc = " }"]
11629#[doc = " }"]
11630#[doc = " },"]
11631#[doc = " \"additionalProperties\": false"]
11632#[doc = " },"]
11633#[doc = " {"]
11634#[doc = " \"description\": \"General errors for ECDSA recover.\","]
11635#[doc = " \"type\": \"object\","]
11636#[doc = " \"required\": ["]
11637#[doc = " \"ECRecoverError\""]
11638#[doc = " ],"]
11639#[doc = " \"properties\": {"]
11640#[doc = " \"ECRecoverError\": {"]
11641#[doc = " \"type\": \"object\","]
11642#[doc = " \"required\": ["]
11643#[doc = " \"msg\""]
11644#[doc = " ],"]
11645#[doc = " \"properties\": {"]
11646#[doc = " \"msg\": {"]
11647#[doc = " \"type\": \"string\""]
11648#[doc = " }"]
11649#[doc = " }"]
11650#[doc = " }"]
11651#[doc = " },"]
11652#[doc = " \"additionalProperties\": false"]
11653#[doc = " },"]
11654#[doc = " {"]
11655#[doc = " \"description\": \"Invalid input to alt_bn128 family of functions (e.g., point which isn't\\non the curve).\","]
11656#[doc = " \"type\": \"object\","]
11657#[doc = " \"required\": ["]
11658#[doc = " \"AltBn128InvalidInput\""]
11659#[doc = " ],"]
11660#[doc = " \"properties\": {"]
11661#[doc = " \"AltBn128InvalidInput\": {"]
11662#[doc = " \"type\": \"object\","]
11663#[doc = " \"required\": ["]
11664#[doc = " \"msg\""]
11665#[doc = " ],"]
11666#[doc = " \"properties\": {"]
11667#[doc = " \"msg\": {"]
11668#[doc = " \"type\": \"string\""]
11669#[doc = " }"]
11670#[doc = " }"]
11671#[doc = " }"]
11672#[doc = " },"]
11673#[doc = " \"additionalProperties\": false"]
11674#[doc = " },"]
11675#[doc = " {"]
11676#[doc = " \"description\": \"Invalid input to ed25519 signature verification function (e.g. signature cannot be\\nderived from bytes).\","]
11677#[doc = " \"type\": \"object\","]
11678#[doc = " \"required\": ["]
11679#[doc = " \"Ed25519VerifyInvalidInput\""]
11680#[doc = " ],"]
11681#[doc = " \"properties\": {"]
11682#[doc = " \"Ed25519VerifyInvalidInput\": {"]
11683#[doc = " \"type\": \"object\","]
11684#[doc = " \"required\": ["]
11685#[doc = " \"msg\""]
11686#[doc = " ],"]
11687#[doc = " \"properties\": {"]
11688#[doc = " \"msg\": {"]
11689#[doc = " \"type\": \"string\""]
11690#[doc = " }"]
11691#[doc = " }"]
11692#[doc = " }"]
11693#[doc = " },"]
11694#[doc = " \"additionalProperties\": false"]
11695#[doc = " }"]
11696#[doc = " ]"]
11697#[doc = "}"]
11698#[doc = r" ```"]
11699#[doc = r" </details>"]
11700#[derive(
11701 :: serde :: Deserialize,
11702 :: serde :: Serialize,
11703 Clone,
11704 Debug,
11705 thiserror::Error,
11706 strum_macros::Display,
11707)]
11708pub enum HostError {
11709 #[doc = "String encoding is bad UTF-16 sequence"]
11710 #[serde(rename = "BadUTF16")]
11711 BadUtf16,
11712 #[doc = "String encoding is bad UTF-8 sequence"]
11713 #[serde(rename = "BadUTF8")]
11714 BadUtf8,
11715 #[doc = "Exceeded the prepaid gas"]
11716 GasExceeded,
11717 #[doc = "Exceeded the maximum amount of gas allowed to burn per contract"]
11718 GasLimitExceeded,
11719 #[doc = "Exceeded the account balance"]
11720 BalanceExceeded,
11721 #[doc = "Tried to call an empty method name"]
11722 EmptyMethodName,
11723 #[doc = "Smart contract panicked"]
11724 GuestPanic { panic_msg: ::std::string::String },
11725 #[doc = "IntegerOverflow happened during a contract execution"]
11726 IntegerOverflow,
11727 #[doc = "`promise_idx` does not correspond to existing promises"]
11728 InvalidPromiseIndex { promise_idx: u64 },
11729 #[doc = "Actions can only be appended to non-joint promise."]
11730 CannotAppendActionToJointPromise,
11731 #[doc = "Returning joint promise is currently prohibited"]
11732 CannotReturnJointPromise,
11733 #[doc = "Accessed invalid promise result index"]
11734 InvalidPromiseResultIndex { result_idx: u64 },
11735 #[doc = "Accessed invalid register id"]
11736 InvalidRegisterId { register_id: u64 },
11737 #[doc = "Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie"]
11738 IteratorWasInvalidated { iterator_index: u64 },
11739 #[doc = "Accessed memory outside the bounds"]
11740 MemoryAccessViolation,
11741 #[doc = "VM Logic returned an invalid receipt index"]
11742 InvalidReceiptIndex { receipt_index: u64 },
11743 #[doc = "Iterator index `iterator_index` does not exist"]
11744 InvalidIteratorIndex { iterator_index: u64 },
11745 #[doc = "VM Logic returned an invalid account id"]
11746 InvalidAccountId,
11747 #[doc = "VM Logic returned an invalid method name"]
11748 InvalidMethodName,
11749 #[doc = "VM Logic provided an invalid public key"]
11750 InvalidPublicKey,
11751 #[doc = "`method_name` is not allowed in view calls"]
11752 ProhibitedInView { method_name: ::std::string::String },
11753 #[doc = "The total number of logs will exceed the limit."]
11754 NumberOfLogsExceeded { limit: u64 },
11755 #[doc = "The storage key length exceeded the limit."]
11756 KeyLengthExceeded { length: u64, limit: u64 },
11757 #[doc = "The storage value length exceeded the limit."]
11758 ValueLengthExceeded { length: u64, limit: u64 },
11759 #[doc = "The total log length exceeded the limit."]
11760 TotalLogLengthExceeded { length: u64, limit: u64 },
11761 #[doc = "The maximum number of promises within a FunctionCall exceeded the limit."]
11762 NumberPromisesExceeded { limit: u64, number_of_promises: u64 },
11763 #[doc = "The maximum number of input data dependencies exceeded the limit."]
11764 NumberInputDataDependenciesExceeded {
11765 limit: u64,
11766 number_of_input_data_dependencies: u64,
11767 },
11768 #[doc = "The returned value length exceeded the limit."]
11769 ReturnedValueLengthExceeded { length: u64, limit: u64 },
11770 #[doc = "The contract size for DeployContract action exceeded the limit."]
11771 ContractSizeExceeded { limit: u64, size: u64 },
11772 #[doc = "The host function was deprecated."]
11773 Deprecated { method_name: ::std::string::String },
11774 #[doc = "General errors for ECDSA recover."]
11775 #[serde(rename = "ECRecoverError")]
11776 EcRecoverError { msg: ::std::string::String },
11777 #[doc = "Invalid input to alt_bn128 family of functions (e.g., point which isn't\non the curve)."]
11778 AltBn128InvalidInput { msg: ::std::string::String },
11779 #[doc = "Invalid input to ed25519 signature verification function (e.g. signature cannot be\nderived from bytes)."]
11780 Ed25519VerifyInvalidInput { msg: ::std::string::String },
11781}
11782impl ::std::convert::From<&Self> for HostError {
11783 fn from(value: &HostError) -> Self {
11784 value.clone()
11785 }
11786}
11787#[doc = "`InternalError`"]
11788#[doc = r""]
11789#[doc = r" <details><summary>JSON schema</summary>"]
11790#[doc = r""]
11791#[doc = r" ```json"]
11792#[doc = "{"]
11793#[doc = " \"oneOf\": ["]
11794#[doc = " {"]
11795#[doc = " \"type\": \"object\","]
11796#[doc = " \"required\": ["]
11797#[doc = " \"info\","]
11798#[doc = " \"name\""]
11799#[doc = " ],"]
11800#[doc = " \"properties\": {"]
11801#[doc = " \"info\": {"]
11802#[doc = " \"type\": \"object\","]
11803#[doc = " \"required\": ["]
11804#[doc = " \"error_message\""]
11805#[doc = " ],"]
11806#[doc = " \"properties\": {"]
11807#[doc = " \"error_message\": {"]
11808#[doc = " \"type\": \"string\""]
11809#[doc = " }"]
11810#[doc = " }"]
11811#[doc = " },"]
11812#[doc = " \"name\": {"]
11813#[doc = " \"type\": \"string\","]
11814#[doc = " \"enum\": ["]
11815#[doc = " \"INTERNAL_ERROR\""]
11816#[doc = " ]"]
11817#[doc = " }"]
11818#[doc = " }"]
11819#[doc = " }"]
11820#[doc = " ]"]
11821#[doc = "}"]
11822#[doc = r" ```"]
11823#[doc = r" </details>"]
11824#[derive(
11825 :: serde :: Deserialize,
11826 :: serde :: Serialize,
11827 Clone,
11828 Debug,
11829 thiserror::Error,
11830 strum_macros::Display,
11831)]
11832#[serde(tag = "name", content = "info")]
11833pub enum InternalError {
11834 #[serde(rename = "INTERNAL_ERROR")]
11835 InternalError {
11836 error_message: ::std::string::String,
11837 },
11838}
11839impl ::std::convert::From<&Self> for InternalError {
11840 fn from(value: &InternalError) -> Self {
11841 value.clone()
11842 }
11843}
11844#[doc = "`InvalidAccessKeyError`"]
11845#[doc = r""]
11846#[doc = r" <details><summary>JSON schema</summary>"]
11847#[doc = r""]
11848#[doc = r" ```json"]
11849#[doc = "{"]
11850#[doc = " \"oneOf\": ["]
11851#[doc = " {"]
11852#[doc = " \"description\": \"The access key identified by the `public_key` doesn't exist for the account\","]
11853#[doc = " \"type\": \"object\","]
11854#[doc = " \"required\": ["]
11855#[doc = " \"AccessKeyNotFound\""]
11856#[doc = " ],"]
11857#[doc = " \"properties\": {"]
11858#[doc = " \"AccessKeyNotFound\": {"]
11859#[doc = " \"type\": \"object\","]
11860#[doc = " \"required\": ["]
11861#[doc = " \"account_id\","]
11862#[doc = " \"public_key\""]
11863#[doc = " ],"]
11864#[doc = " \"properties\": {"]
11865#[doc = " \"account_id\": {"]
11866#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
11867#[doc = " },"]
11868#[doc = " \"public_key\": {"]
11869#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
11870#[doc = " }"]
11871#[doc = " }"]
11872#[doc = " }"]
11873#[doc = " },"]
11874#[doc = " \"additionalProperties\": false"]
11875#[doc = " },"]
11876#[doc = " {"]
11877#[doc = " \"description\": \"Transaction `receiver_id` doesn't match the access key receiver_id\","]
11878#[doc = " \"type\": \"object\","]
11879#[doc = " \"required\": ["]
11880#[doc = " \"ReceiverMismatch\""]
11881#[doc = " ],"]
11882#[doc = " \"properties\": {"]
11883#[doc = " \"ReceiverMismatch\": {"]
11884#[doc = " \"type\": \"object\","]
11885#[doc = " \"required\": ["]
11886#[doc = " \"ak_receiver\","]
11887#[doc = " \"tx_receiver\""]
11888#[doc = " ],"]
11889#[doc = " \"properties\": {"]
11890#[doc = " \"ak_receiver\": {"]
11891#[doc = " \"type\": \"string\""]
11892#[doc = " },"]
11893#[doc = " \"tx_receiver\": {"]
11894#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
11895#[doc = " }"]
11896#[doc = " }"]
11897#[doc = " }"]
11898#[doc = " },"]
11899#[doc = " \"additionalProperties\": false"]
11900#[doc = " },"]
11901#[doc = " {"]
11902#[doc = " \"description\": \"Transaction method name isn't allowed by the access key\","]
11903#[doc = " \"type\": \"object\","]
11904#[doc = " \"required\": ["]
11905#[doc = " \"MethodNameMismatch\""]
11906#[doc = " ],"]
11907#[doc = " \"properties\": {"]
11908#[doc = " \"MethodNameMismatch\": {"]
11909#[doc = " \"type\": \"object\","]
11910#[doc = " \"required\": ["]
11911#[doc = " \"method_name\""]
11912#[doc = " ],"]
11913#[doc = " \"properties\": {"]
11914#[doc = " \"method_name\": {"]
11915#[doc = " \"type\": \"string\""]
11916#[doc = " }"]
11917#[doc = " }"]
11918#[doc = " }"]
11919#[doc = " },"]
11920#[doc = " \"additionalProperties\": false"]
11921#[doc = " },"]
11922#[doc = " {"]
11923#[doc = " \"description\": \"Transaction requires a full permission access key.\","]
11924#[doc = " \"type\": \"string\","]
11925#[doc = " \"enum\": ["]
11926#[doc = " \"RequiresFullAccess\""]
11927#[doc = " ]"]
11928#[doc = " },"]
11929#[doc = " {"]
11930#[doc = " \"description\": \"Access Key does not have enough allowance to cover transaction cost\","]
11931#[doc = " \"type\": \"object\","]
11932#[doc = " \"required\": ["]
11933#[doc = " \"NotEnoughAllowance\""]
11934#[doc = " ],"]
11935#[doc = " \"properties\": {"]
11936#[doc = " \"NotEnoughAllowance\": {"]
11937#[doc = " \"type\": \"object\","]
11938#[doc = " \"required\": ["]
11939#[doc = " \"account_id\","]
11940#[doc = " \"allowance\","]
11941#[doc = " \"cost\","]
11942#[doc = " \"public_key\""]
11943#[doc = " ],"]
11944#[doc = " \"properties\": {"]
11945#[doc = " \"account_id\": {"]
11946#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
11947#[doc = " },"]
11948#[doc = " \"allowance\": {"]
11949#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
11950#[doc = " },"]
11951#[doc = " \"cost\": {"]
11952#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
11953#[doc = " },"]
11954#[doc = " \"public_key\": {"]
11955#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
11956#[doc = " }"]
11957#[doc = " }"]
11958#[doc = " }"]
11959#[doc = " },"]
11960#[doc = " \"additionalProperties\": false"]
11961#[doc = " },"]
11962#[doc = " {"]
11963#[doc = " \"description\": \"Having a deposit with a function call action is not allowed with a function call access key.\","]
11964#[doc = " \"type\": \"string\","]
11965#[doc = " \"enum\": ["]
11966#[doc = " \"DepositWithFunctionCall\""]
11967#[doc = " ]"]
11968#[doc = " }"]
11969#[doc = " ]"]
11970#[doc = "}"]
11971#[doc = r" ```"]
11972#[doc = r" </details>"]
11973#[derive(
11974 :: serde :: Deserialize,
11975 :: serde :: Serialize,
11976 Clone,
11977 Debug,
11978 thiserror::Error,
11979 strum_macros::Display,
11980)]
11981pub enum InvalidAccessKeyError {
11982 #[doc = "The access key identified by the `public_key` doesn't exist for the account"]
11983 AccessKeyNotFound {
11984 account_id: AccountId,
11985 public_key: PublicKey,
11986 },
11987 #[doc = "Transaction `receiver_id` doesn't match the access key receiver_id"]
11988 ReceiverMismatch {
11989 ak_receiver: ::std::string::String,
11990 tx_receiver: AccountId,
11991 },
11992 #[doc = "Transaction method name isn't allowed by the access key"]
11993 MethodNameMismatch { method_name: ::std::string::String },
11994 #[doc = "Transaction requires a full permission access key."]
11995 RequiresFullAccess,
11996 #[doc = "Access Key does not have enough allowance to cover transaction cost"]
11997 NotEnoughAllowance {
11998 account_id: AccountId,
11999 allowance: NearToken,
12000 cost: NearToken,
12001 public_key: PublicKey,
12002 },
12003 #[doc = "Having a deposit with a function call action is not allowed with a function call access key."]
12004 DepositWithFunctionCall,
12005}
12006impl ::std::convert::From<&Self> for InvalidAccessKeyError {
12007 fn from(value: &InvalidAccessKeyError) -> Self {
12008 value.clone()
12009 }
12010}
12011#[doc = "An error happened during TX execution"]
12012#[doc = r""]
12013#[doc = r" <details><summary>JSON schema</summary>"]
12014#[doc = r""]
12015#[doc = r" ```json"]
12016#[doc = "{"]
12017#[doc = " \"description\": \"An error happened during TX execution\","]
12018#[doc = " \"oneOf\": ["]
12019#[doc = " {"]
12020#[doc = " \"description\": \"Happens if a wrong AccessKey used or AccessKey has not enough permissions\","]
12021#[doc = " \"type\": \"object\","]
12022#[doc = " \"required\": ["]
12023#[doc = " \"InvalidAccessKeyError\""]
12024#[doc = " ],"]
12025#[doc = " \"properties\": {"]
12026#[doc = " \"InvalidAccessKeyError\": {"]
12027#[doc = " \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
12028#[doc = " }"]
12029#[doc = " },"]
12030#[doc = " \"additionalProperties\": false"]
12031#[doc = " },"]
12032#[doc = " {"]
12033#[doc = " \"description\": \"TX signer_id is not a valid [`AccountId`]\","]
12034#[doc = " \"type\": \"object\","]
12035#[doc = " \"required\": ["]
12036#[doc = " \"InvalidSignerId\""]
12037#[doc = " ],"]
12038#[doc = " \"properties\": {"]
12039#[doc = " \"InvalidSignerId\": {"]
12040#[doc = " \"type\": \"object\","]
12041#[doc = " \"required\": ["]
12042#[doc = " \"signer_id\""]
12043#[doc = " ],"]
12044#[doc = " \"properties\": {"]
12045#[doc = " \"signer_id\": {"]
12046#[doc = " \"type\": \"string\""]
12047#[doc = " }"]
12048#[doc = " }"]
12049#[doc = " }"]
12050#[doc = " },"]
12051#[doc = " \"additionalProperties\": false"]
12052#[doc = " },"]
12053#[doc = " {"]
12054#[doc = " \"description\": \"TX signer_id is not found in a storage\","]
12055#[doc = " \"type\": \"object\","]
12056#[doc = " \"required\": ["]
12057#[doc = " \"SignerDoesNotExist\""]
12058#[doc = " ],"]
12059#[doc = " \"properties\": {"]
12060#[doc = " \"SignerDoesNotExist\": {"]
12061#[doc = " \"type\": \"object\","]
12062#[doc = " \"required\": ["]
12063#[doc = " \"signer_id\""]
12064#[doc = " ],"]
12065#[doc = " \"properties\": {"]
12066#[doc = " \"signer_id\": {"]
12067#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
12068#[doc = " }"]
12069#[doc = " }"]
12070#[doc = " }"]
12071#[doc = " },"]
12072#[doc = " \"additionalProperties\": false"]
12073#[doc = " },"]
12074#[doc = " {"]
12075#[doc = " \"description\": \"Transaction nonce must be strictly greater than `account[access_key].nonce`.\","]
12076#[doc = " \"type\": \"object\","]
12077#[doc = " \"required\": ["]
12078#[doc = " \"InvalidNonce\""]
12079#[doc = " ],"]
12080#[doc = " \"properties\": {"]
12081#[doc = " \"InvalidNonce\": {"]
12082#[doc = " \"type\": \"object\","]
12083#[doc = " \"required\": ["]
12084#[doc = " \"ak_nonce\","]
12085#[doc = " \"tx_nonce\""]
12086#[doc = " ],"]
12087#[doc = " \"properties\": {"]
12088#[doc = " \"ak_nonce\": {"]
12089#[doc = " \"type\": \"integer\","]
12090#[doc = " \"format\": \"uint64\","]
12091#[doc = " \"minimum\": 0.0"]
12092#[doc = " },"]
12093#[doc = " \"tx_nonce\": {"]
12094#[doc = " \"type\": \"integer\","]
12095#[doc = " \"format\": \"uint64\","]
12096#[doc = " \"minimum\": 0.0"]
12097#[doc = " }"]
12098#[doc = " }"]
12099#[doc = " }"]
12100#[doc = " },"]
12101#[doc = " \"additionalProperties\": false"]
12102#[doc = " },"]
12103#[doc = " {"]
12104#[doc = " \"description\": \"Transaction nonce is larger than the upper bound given by the block height\","]
12105#[doc = " \"type\": \"object\","]
12106#[doc = " \"required\": ["]
12107#[doc = " \"NonceTooLarge\""]
12108#[doc = " ],"]
12109#[doc = " \"properties\": {"]
12110#[doc = " \"NonceTooLarge\": {"]
12111#[doc = " \"type\": \"object\","]
12112#[doc = " \"required\": ["]
12113#[doc = " \"tx_nonce\","]
12114#[doc = " \"upper_bound\""]
12115#[doc = " ],"]
12116#[doc = " \"properties\": {"]
12117#[doc = " \"tx_nonce\": {"]
12118#[doc = " \"type\": \"integer\","]
12119#[doc = " \"format\": \"uint64\","]
12120#[doc = " \"minimum\": 0.0"]
12121#[doc = " },"]
12122#[doc = " \"upper_bound\": {"]
12123#[doc = " \"type\": \"integer\","]
12124#[doc = " \"format\": \"uint64\","]
12125#[doc = " \"minimum\": 0.0"]
12126#[doc = " }"]
12127#[doc = " }"]
12128#[doc = " }"]
12129#[doc = " },"]
12130#[doc = " \"additionalProperties\": false"]
12131#[doc = " },"]
12132#[doc = " {"]
12133#[doc = " \"description\": \"TX receiver_id is not a valid AccountId\","]
12134#[doc = " \"type\": \"object\","]
12135#[doc = " \"required\": ["]
12136#[doc = " \"InvalidReceiverId\""]
12137#[doc = " ],"]
12138#[doc = " \"properties\": {"]
12139#[doc = " \"InvalidReceiverId\": {"]
12140#[doc = " \"type\": \"object\","]
12141#[doc = " \"required\": ["]
12142#[doc = " \"receiver_id\""]
12143#[doc = " ],"]
12144#[doc = " \"properties\": {"]
12145#[doc = " \"receiver_id\": {"]
12146#[doc = " \"type\": \"string\""]
12147#[doc = " }"]
12148#[doc = " }"]
12149#[doc = " }"]
12150#[doc = " },"]
12151#[doc = " \"additionalProperties\": false"]
12152#[doc = " },"]
12153#[doc = " {"]
12154#[doc = " \"description\": \"TX signature is not valid\","]
12155#[doc = " \"type\": \"string\","]
12156#[doc = " \"enum\": ["]
12157#[doc = " \"InvalidSignature\""]
12158#[doc = " ]"]
12159#[doc = " },"]
12160#[doc = " {"]
12161#[doc = " \"description\": \"Account does not have enough balance to cover TX cost\","]
12162#[doc = " \"type\": \"object\","]
12163#[doc = " \"required\": ["]
12164#[doc = " \"NotEnoughBalance\""]
12165#[doc = " ],"]
12166#[doc = " \"properties\": {"]
12167#[doc = " \"NotEnoughBalance\": {"]
12168#[doc = " \"type\": \"object\","]
12169#[doc = " \"required\": ["]
12170#[doc = " \"balance\","]
12171#[doc = " \"cost\","]
12172#[doc = " \"signer_id\""]
12173#[doc = " ],"]
12174#[doc = " \"properties\": {"]
12175#[doc = " \"balance\": {"]
12176#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
12177#[doc = " },"]
12178#[doc = " \"cost\": {"]
12179#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
12180#[doc = " },"]
12181#[doc = " \"signer_id\": {"]
12182#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
12183#[doc = " }"]
12184#[doc = " }"]
12185#[doc = " }"]
12186#[doc = " },"]
12187#[doc = " \"additionalProperties\": false"]
12188#[doc = " },"]
12189#[doc = " {"]
12190#[doc = " \"description\": \"Signer account doesn't have enough balance after transaction.\","]
12191#[doc = " \"type\": \"object\","]
12192#[doc = " \"required\": ["]
12193#[doc = " \"LackBalanceForState\""]
12194#[doc = " ],"]
12195#[doc = " \"properties\": {"]
12196#[doc = " \"LackBalanceForState\": {"]
12197#[doc = " \"type\": \"object\","]
12198#[doc = " \"required\": ["]
12199#[doc = " \"amount\","]
12200#[doc = " \"signer_id\""]
12201#[doc = " ],"]
12202#[doc = " \"properties\": {"]
12203#[doc = " \"amount\": {"]
12204#[doc = " \"description\": \"Required balance to cover the state.\","]
12205#[doc = " \"allOf\": ["]
12206#[doc = " {"]
12207#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
12208#[doc = " }"]
12209#[doc = " ]"]
12210#[doc = " },"]
12211#[doc = " \"signer_id\": {"]
12212#[doc = " \"description\": \"An account which doesn't have enough balance to cover storage.\","]
12213#[doc = " \"allOf\": ["]
12214#[doc = " {"]
12215#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
12216#[doc = " }"]
12217#[doc = " ]"]
12218#[doc = " }"]
12219#[doc = " }"]
12220#[doc = " }"]
12221#[doc = " },"]
12222#[doc = " \"additionalProperties\": false"]
12223#[doc = " },"]
12224#[doc = " {"]
12225#[doc = " \"description\": \"An integer overflow occurred during transaction cost estimation.\","]
12226#[doc = " \"type\": \"string\","]
12227#[doc = " \"enum\": ["]
12228#[doc = " \"CostOverflow\""]
12229#[doc = " ]"]
12230#[doc = " },"]
12231#[doc = " {"]
12232#[doc = " \"description\": \"Transaction parent block hash doesn't belong to the current chain\","]
12233#[doc = " \"type\": \"string\","]
12234#[doc = " \"enum\": ["]
12235#[doc = " \"InvalidChain\""]
12236#[doc = " ]"]
12237#[doc = " },"]
12238#[doc = " {"]
12239#[doc = " \"description\": \"Transaction has expired\","]
12240#[doc = " \"type\": \"string\","]
12241#[doc = " \"enum\": ["]
12242#[doc = " \"Expired\""]
12243#[doc = " ]"]
12244#[doc = " },"]
12245#[doc = " {"]
12246#[doc = " \"description\": \"An error occurred while validating actions of a Transaction.\","]
12247#[doc = " \"type\": \"object\","]
12248#[doc = " \"required\": ["]
12249#[doc = " \"ActionsValidation\""]
12250#[doc = " ],"]
12251#[doc = " \"properties\": {"]
12252#[doc = " \"ActionsValidation\": {"]
12253#[doc = " \"$ref\": \"#/components/schemas/ActionsValidationError\""]
12254#[doc = " }"]
12255#[doc = " },"]
12256#[doc = " \"additionalProperties\": false"]
12257#[doc = " },"]
12258#[doc = " {"]
12259#[doc = " \"description\": \"The size of serialized transaction exceeded the limit.\","]
12260#[doc = " \"type\": \"object\","]
12261#[doc = " \"required\": ["]
12262#[doc = " \"TransactionSizeExceeded\""]
12263#[doc = " ],"]
12264#[doc = " \"properties\": {"]
12265#[doc = " \"TransactionSizeExceeded\": {"]
12266#[doc = " \"type\": \"object\","]
12267#[doc = " \"required\": ["]
12268#[doc = " \"limit\","]
12269#[doc = " \"size\""]
12270#[doc = " ],"]
12271#[doc = " \"properties\": {"]
12272#[doc = " \"limit\": {"]
12273#[doc = " \"type\": \"integer\","]
12274#[doc = " \"format\": \"uint64\","]
12275#[doc = " \"minimum\": 0.0"]
12276#[doc = " },"]
12277#[doc = " \"size\": {"]
12278#[doc = " \"type\": \"integer\","]
12279#[doc = " \"format\": \"uint64\","]
12280#[doc = " \"minimum\": 0.0"]
12281#[doc = " }"]
12282#[doc = " }"]
12283#[doc = " }"]
12284#[doc = " },"]
12285#[doc = " \"additionalProperties\": false"]
12286#[doc = " },"]
12287#[doc = " {"]
12288#[doc = " \"description\": \"Transaction version is invalid.\","]
12289#[doc = " \"type\": \"string\","]
12290#[doc = " \"enum\": ["]
12291#[doc = " \"InvalidTransactionVersion\""]
12292#[doc = " ]"]
12293#[doc = " },"]
12294#[doc = " {"]
12295#[doc = " \"type\": \"object\","]
12296#[doc = " \"required\": ["]
12297#[doc = " \"StorageError\""]
12298#[doc = " ],"]
12299#[doc = " \"properties\": {"]
12300#[doc = " \"StorageError\": {"]
12301#[doc = " \"$ref\": \"#/components/schemas/StorageError\""]
12302#[doc = " }"]
12303#[doc = " },"]
12304#[doc = " \"additionalProperties\": false"]
12305#[doc = " },"]
12306#[doc = " {"]
12307#[doc = " \"description\": \"The receiver shard of the transaction is too congested to accept new\\ntransactions at the moment.\","]
12308#[doc = " \"type\": \"object\","]
12309#[doc = " \"required\": ["]
12310#[doc = " \"ShardCongested\""]
12311#[doc = " ],"]
12312#[doc = " \"properties\": {"]
12313#[doc = " \"ShardCongested\": {"]
12314#[doc = " \"type\": \"object\","]
12315#[doc = " \"required\": ["]
12316#[doc = " \"congestion_level\","]
12317#[doc = " \"shard_id\""]
12318#[doc = " ],"]
12319#[doc = " \"properties\": {"]
12320#[doc = " \"congestion_level\": {"]
12321#[doc = " \"description\": \"A value between 0 (no congestion) and 1 (max congestion).\","]
12322#[doc = " \"type\": \"number\","]
12323#[doc = " \"format\": \"double\""]
12324#[doc = " },"]
12325#[doc = " \"shard_id\": {"]
12326#[doc = " \"description\": \"The congested shard.\","]
12327#[doc = " \"type\": \"integer\","]
12328#[doc = " \"format\": \"uint32\","]
12329#[doc = " \"minimum\": 0.0"]
12330#[doc = " }"]
12331#[doc = " }"]
12332#[doc = " }"]
12333#[doc = " },"]
12334#[doc = " \"additionalProperties\": false"]
12335#[doc = " },"]
12336#[doc = " {"]
12337#[doc = " \"description\": \"The receiver shard of the transaction missed several chunks and rejects\\nnew transaction until it can make progress again.\","]
12338#[doc = " \"type\": \"object\","]
12339#[doc = " \"required\": ["]
12340#[doc = " \"ShardStuck\""]
12341#[doc = " ],"]
12342#[doc = " \"properties\": {"]
12343#[doc = " \"ShardStuck\": {"]
12344#[doc = " \"type\": \"object\","]
12345#[doc = " \"required\": ["]
12346#[doc = " \"missed_chunks\","]
12347#[doc = " \"shard_id\""]
12348#[doc = " ],"]
12349#[doc = " \"properties\": {"]
12350#[doc = " \"missed_chunks\": {"]
12351#[doc = " \"description\": \"The number of blocks since the last included chunk of the shard.\","]
12352#[doc = " \"type\": \"integer\","]
12353#[doc = " \"format\": \"uint64\","]
12354#[doc = " \"minimum\": 0.0"]
12355#[doc = " },"]
12356#[doc = " \"shard_id\": {"]
12357#[doc = " \"description\": \"The shard that fails making progress.\","]
12358#[doc = " \"type\": \"integer\","]
12359#[doc = " \"format\": \"uint32\","]
12360#[doc = " \"minimum\": 0.0"]
12361#[doc = " }"]
12362#[doc = " }"]
12363#[doc = " }"]
12364#[doc = " },"]
12365#[doc = " \"additionalProperties\": false"]
12366#[doc = " }"]
12367#[doc = " ]"]
12368#[doc = "}"]
12369#[doc = r" ```"]
12370#[doc = r" </details>"]
12371#[derive(
12372 :: serde :: Deserialize,
12373 :: serde :: Serialize,
12374 Clone,
12375 Debug,
12376 thiserror::Error,
12377 strum_macros::Display,
12378)]
12379pub enum InvalidTxError {
12380 #[doc = "Happens if a wrong AccessKey used or AccessKey has not enough permissions"]
12381 InvalidAccessKeyError(InvalidAccessKeyError),
12382 #[doc = "TX signer_id is not a valid [`AccountId`]"]
12383 InvalidSignerId {
12384 signer_id: ::std::string::String,
12385 },
12386 #[doc = "TX signer_id is not found in a storage"]
12387 SignerDoesNotExist {
12388 signer_id: AccountId,
12389 },
12390 #[doc = "Transaction nonce must be strictly greater than `account[access_key].nonce`."]
12391 InvalidNonce {
12392 ak_nonce: u64,
12393 tx_nonce: u64,
12394 },
12395 #[doc = "Transaction nonce is larger than the upper bound given by the block height"]
12396 NonceTooLarge {
12397 tx_nonce: u64,
12398 upper_bound: u64,
12399 },
12400 #[doc = "TX receiver_id is not a valid AccountId"]
12401 InvalidReceiverId {
12402 receiver_id: ::std::string::String,
12403 },
12404 #[doc = "TX signature is not valid"]
12405 InvalidSignature,
12406 #[doc = "Account does not have enough balance to cover TX cost"]
12407 NotEnoughBalance {
12408 balance: NearToken,
12409 cost: NearToken,
12410 signer_id: AccountId,
12411 },
12412 #[doc = "Signer account doesn't have enough balance after transaction."]
12413 LackBalanceForState {
12414 #[doc = "Required balance to cover the state."]
12415 amount: NearToken,
12416 #[doc = "An account which doesn't have enough balance to cover storage."]
12417 signer_id: AccountId,
12418 },
12419 #[doc = "An integer overflow occurred during transaction cost estimation."]
12420 CostOverflow,
12421 #[doc = "Transaction parent block hash doesn't belong to the current chain"]
12422 InvalidChain,
12423 #[doc = "Transaction has expired"]
12424 Expired,
12425 #[doc = "An error occurred while validating actions of a Transaction."]
12426 ActionsValidation(ActionsValidationError),
12427 #[doc = "The size of serialized transaction exceeded the limit."]
12428 TransactionSizeExceeded {
12429 limit: u64,
12430 size: u64,
12431 },
12432 #[doc = "Transaction version is invalid."]
12433 InvalidTransactionVersion,
12434 StorageError(StorageError),
12435 #[doc = "The receiver shard of the transaction is too congested to accept new\ntransactions at the moment."]
12436 ShardCongested {
12437 congestion_level: f64,
12438 #[doc = "The congested shard."]
12439 shard_id: u32,
12440 },
12441 #[doc = "The receiver shard of the transaction missed several chunks and rejects\nnew transaction until it can make progress again."]
12442 ShardStuck {
12443 #[doc = "The number of blocks since the last included chunk of the shard."]
12444 missed_chunks: u64,
12445 #[doc = "The shard that fails making progress."]
12446 shard_id: u32,
12447 },
12448}
12449impl ::std::convert::From<&Self> for InvalidTxError {
12450 fn from(value: &InvalidTxError) -> Self {
12451 value.clone()
12452 }
12453}
12454impl ::std::convert::From<InvalidAccessKeyError> for InvalidTxError {
12455 fn from(value: InvalidAccessKeyError) -> Self {
12456 Self::InvalidAccessKeyError(value)
12457 }
12458}
12459impl ::std::convert::From<ActionsValidationError> for InvalidTxError {
12460 fn from(value: ActionsValidationError) -> Self {
12461 Self::ActionsValidation(value)
12462 }
12463}
12464impl ::std::convert::From<StorageError> for InvalidTxError {
12465 fn from(value: StorageError) -> Self {
12466 Self::StorageError(value)
12467 }
12468}
12469#[doc = "`JsonRpcRequestForBlock`"]
12470#[doc = r""]
12471#[doc = r" <details><summary>JSON schema</summary>"]
12472#[doc = r""]
12473#[doc = r" ```json"]
12474#[doc = "{"]
12475#[doc = " \"title\": \"JsonRpcRequest_for_block\","]
12476#[doc = " \"type\": \"object\","]
12477#[doc = " \"required\": ["]
12478#[doc = " \"id\","]
12479#[doc = " \"jsonrpc\","]
12480#[doc = " \"method\","]
12481#[doc = " \"params\""]
12482#[doc = " ],"]
12483#[doc = " \"properties\": {"]
12484#[doc = " \"id\": {"]
12485#[doc = " \"type\": \"string\""]
12486#[doc = " },"]
12487#[doc = " \"jsonrpc\": {"]
12488#[doc = " \"type\": \"string\""]
12489#[doc = " },"]
12490#[doc = " \"method\": {"]
12491#[doc = " \"type\": \"string\","]
12492#[doc = " \"enum\": ["]
12493#[doc = " \"block\""]
12494#[doc = " ]"]
12495#[doc = " },"]
12496#[doc = " \"params\": {"]
12497#[doc = " \"$ref\": \"#/components/schemas/RpcBlockRequest\""]
12498#[doc = " }"]
12499#[doc = " }"]
12500#[doc = "}"]
12501#[doc = r" ```"]
12502#[doc = r" </details>"]
12503#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12504pub struct JsonRpcRequestForBlock {
12505 pub id: ::std::string::String,
12506 pub jsonrpc: ::std::string::String,
12507 pub method: JsonRpcRequestForBlockMethod,
12508 pub params: RpcBlockRequest,
12509}
12510impl ::std::convert::From<&JsonRpcRequestForBlock> for JsonRpcRequestForBlock {
12511 fn from(value: &JsonRpcRequestForBlock) -> Self {
12512 value.clone()
12513 }
12514}
12515#[doc = "`JsonRpcRequestForBlockEffects`"]
12516#[doc = r""]
12517#[doc = r" <details><summary>JSON schema</summary>"]
12518#[doc = r""]
12519#[doc = r" ```json"]
12520#[doc = "{"]
12521#[doc = " \"title\": \"JsonRpcRequest_for_block_effects\","]
12522#[doc = " \"type\": \"object\","]
12523#[doc = " \"required\": ["]
12524#[doc = " \"id\","]
12525#[doc = " \"jsonrpc\","]
12526#[doc = " \"method\","]
12527#[doc = " \"params\""]
12528#[doc = " ],"]
12529#[doc = " \"properties\": {"]
12530#[doc = " \"id\": {"]
12531#[doc = " \"type\": \"string\""]
12532#[doc = " },"]
12533#[doc = " \"jsonrpc\": {"]
12534#[doc = " \"type\": \"string\""]
12535#[doc = " },"]
12536#[doc = " \"method\": {"]
12537#[doc = " \"type\": \"string\","]
12538#[doc = " \"enum\": ["]
12539#[doc = " \"block_effects\""]
12540#[doc = " ]"]
12541#[doc = " },"]
12542#[doc = " \"params\": {"]
12543#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
12544#[doc = " }"]
12545#[doc = " }"]
12546#[doc = "}"]
12547#[doc = r" ```"]
12548#[doc = r" </details>"]
12549#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12550pub struct JsonRpcRequestForBlockEffects {
12551 pub id: ::std::string::String,
12552 pub jsonrpc: ::std::string::String,
12553 pub method: JsonRpcRequestForBlockEffectsMethod,
12554 pub params: RpcStateChangesInBlockRequest,
12555}
12556impl ::std::convert::From<&JsonRpcRequestForBlockEffects> for JsonRpcRequestForBlockEffects {
12557 fn from(value: &JsonRpcRequestForBlockEffects) -> Self {
12558 value.clone()
12559 }
12560}
12561#[doc = "`JsonRpcRequestForBlockEffectsMethod`"]
12562#[doc = r""]
12563#[doc = r" <details><summary>JSON schema</summary>"]
12564#[doc = r""]
12565#[doc = r" ```json"]
12566#[doc = "{"]
12567#[doc = " \"type\": \"string\","]
12568#[doc = " \"enum\": ["]
12569#[doc = " \"block_effects\""]
12570#[doc = " ]"]
12571#[doc = "}"]
12572#[doc = r" ```"]
12573#[doc = r" </details>"]
12574#[derive(
12575 :: serde :: Deserialize,
12576 :: serde :: Serialize,
12577 Clone,
12578 Copy,
12579 Debug,
12580 Eq,
12581 Hash,
12582 Ord,
12583 PartialEq,
12584 PartialOrd,
12585)]
12586pub enum JsonRpcRequestForBlockEffectsMethod {
12587 #[serde(rename = "block_effects")]
12588 BlockEffects,
12589}
12590impl ::std::convert::From<&Self> for JsonRpcRequestForBlockEffectsMethod {
12591 fn from(value: &JsonRpcRequestForBlockEffectsMethod) -> Self {
12592 value.clone()
12593 }
12594}
12595impl ::std::fmt::Display for JsonRpcRequestForBlockEffectsMethod {
12596 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12597 match *self {
12598 Self::BlockEffects => f.write_str("block_effects"),
12599 }
12600 }
12601}
12602impl ::std::str::FromStr for JsonRpcRequestForBlockEffectsMethod {
12603 type Err = self::error::ConversionError;
12604 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12605 match value {
12606 "block_effects" => Ok(Self::BlockEffects),
12607 _ => Err("invalid value".into()),
12608 }
12609 }
12610}
12611impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockEffectsMethod {
12612 type Error = self::error::ConversionError;
12613 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12614 value.parse()
12615 }
12616}
12617impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
12618 type Error = self::error::ConversionError;
12619 fn try_from(
12620 value: &::std::string::String,
12621 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12622 value.parse()
12623 }
12624}
12625impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockEffectsMethod {
12626 type Error = self::error::ConversionError;
12627 fn try_from(
12628 value: ::std::string::String,
12629 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12630 value.parse()
12631 }
12632}
12633#[doc = "`JsonRpcRequestForBlockMethod`"]
12634#[doc = r""]
12635#[doc = r" <details><summary>JSON schema</summary>"]
12636#[doc = r""]
12637#[doc = r" ```json"]
12638#[doc = "{"]
12639#[doc = " \"type\": \"string\","]
12640#[doc = " \"enum\": ["]
12641#[doc = " \"block\""]
12642#[doc = " ]"]
12643#[doc = "}"]
12644#[doc = r" ```"]
12645#[doc = r" </details>"]
12646#[derive(
12647 :: serde :: Deserialize,
12648 :: serde :: Serialize,
12649 Clone,
12650 Copy,
12651 Debug,
12652 Eq,
12653 Hash,
12654 Ord,
12655 PartialEq,
12656 PartialOrd,
12657)]
12658pub enum JsonRpcRequestForBlockMethod {
12659 #[serde(rename = "block")]
12660 Block,
12661}
12662impl ::std::convert::From<&Self> for JsonRpcRequestForBlockMethod {
12663 fn from(value: &JsonRpcRequestForBlockMethod) -> Self {
12664 value.clone()
12665 }
12666}
12667impl ::std::fmt::Display for JsonRpcRequestForBlockMethod {
12668 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12669 match *self {
12670 Self::Block => f.write_str("block"),
12671 }
12672 }
12673}
12674impl ::std::str::FromStr for JsonRpcRequestForBlockMethod {
12675 type Err = self::error::ConversionError;
12676 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12677 match value {
12678 "block" => Ok(Self::Block),
12679 _ => Err("invalid value".into()),
12680 }
12681 }
12682}
12683impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockMethod {
12684 type Error = self::error::ConversionError;
12685 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12686 value.parse()
12687 }
12688}
12689impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockMethod {
12690 type Error = self::error::ConversionError;
12691 fn try_from(
12692 value: &::std::string::String,
12693 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12694 value.parse()
12695 }
12696}
12697impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockMethod {
12698 type Error = self::error::ConversionError;
12699 fn try_from(
12700 value: ::std::string::String,
12701 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12702 value.parse()
12703 }
12704}
12705#[doc = "`JsonRpcRequestForBroadcastTxAsync`"]
12706#[doc = r""]
12707#[doc = r" <details><summary>JSON schema</summary>"]
12708#[doc = r""]
12709#[doc = r" ```json"]
12710#[doc = "{"]
12711#[doc = " \"title\": \"JsonRpcRequest_for_broadcast_tx_async\","]
12712#[doc = " \"type\": \"object\","]
12713#[doc = " \"required\": ["]
12714#[doc = " \"id\","]
12715#[doc = " \"jsonrpc\","]
12716#[doc = " \"method\","]
12717#[doc = " \"params\""]
12718#[doc = " ],"]
12719#[doc = " \"properties\": {"]
12720#[doc = " \"id\": {"]
12721#[doc = " \"type\": \"string\""]
12722#[doc = " },"]
12723#[doc = " \"jsonrpc\": {"]
12724#[doc = " \"type\": \"string\""]
12725#[doc = " },"]
12726#[doc = " \"method\": {"]
12727#[doc = " \"type\": \"string\","]
12728#[doc = " \"enum\": ["]
12729#[doc = " \"broadcast_tx_async\""]
12730#[doc = " ]"]
12731#[doc = " },"]
12732#[doc = " \"params\": {"]
12733#[doc = " \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
12734#[doc = " }"]
12735#[doc = " }"]
12736#[doc = "}"]
12737#[doc = r" ```"]
12738#[doc = r" </details>"]
12739#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12740pub struct JsonRpcRequestForBroadcastTxAsync {
12741 pub id: ::std::string::String,
12742 pub jsonrpc: ::std::string::String,
12743 pub method: JsonRpcRequestForBroadcastTxAsyncMethod,
12744 pub params: RpcSendTransactionRequest,
12745}
12746impl ::std::convert::From<&JsonRpcRequestForBroadcastTxAsync>
12747 for JsonRpcRequestForBroadcastTxAsync
12748{
12749 fn from(value: &JsonRpcRequestForBroadcastTxAsync) -> Self {
12750 value.clone()
12751 }
12752}
12753#[doc = "`JsonRpcRequestForBroadcastTxAsyncMethod`"]
12754#[doc = r""]
12755#[doc = r" <details><summary>JSON schema</summary>"]
12756#[doc = r""]
12757#[doc = r" ```json"]
12758#[doc = "{"]
12759#[doc = " \"type\": \"string\","]
12760#[doc = " \"enum\": ["]
12761#[doc = " \"broadcast_tx_async\""]
12762#[doc = " ]"]
12763#[doc = "}"]
12764#[doc = r" ```"]
12765#[doc = r" </details>"]
12766#[derive(
12767 :: serde :: Deserialize,
12768 :: serde :: Serialize,
12769 Clone,
12770 Copy,
12771 Debug,
12772 Eq,
12773 Hash,
12774 Ord,
12775 PartialEq,
12776 PartialOrd,
12777)]
12778pub enum JsonRpcRequestForBroadcastTxAsyncMethod {
12779 #[serde(rename = "broadcast_tx_async")]
12780 BroadcastTxAsync,
12781}
12782impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxAsyncMethod {
12783 fn from(value: &JsonRpcRequestForBroadcastTxAsyncMethod) -> Self {
12784 value.clone()
12785 }
12786}
12787impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxAsyncMethod {
12788 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12789 match *self {
12790 Self::BroadcastTxAsync => f.write_str("broadcast_tx_async"),
12791 }
12792 }
12793}
12794impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxAsyncMethod {
12795 type Err = self::error::ConversionError;
12796 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12797 match value {
12798 "broadcast_tx_async" => Ok(Self::BroadcastTxAsync),
12799 _ => Err("invalid value".into()),
12800 }
12801 }
12802}
12803impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxAsyncMethod {
12804 type Error = self::error::ConversionError;
12805 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12806 value.parse()
12807 }
12808}
12809impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
12810 type Error = self::error::ConversionError;
12811 fn try_from(
12812 value: &::std::string::String,
12813 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12814 value.parse()
12815 }
12816}
12817impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
12818 type Error = self::error::ConversionError;
12819 fn try_from(
12820 value: ::std::string::String,
12821 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12822 value.parse()
12823 }
12824}
12825#[doc = "`JsonRpcRequestForBroadcastTxCommit`"]
12826#[doc = r""]
12827#[doc = r" <details><summary>JSON schema</summary>"]
12828#[doc = r""]
12829#[doc = r" ```json"]
12830#[doc = "{"]
12831#[doc = " \"title\": \"JsonRpcRequest_for_broadcast_tx_commit\","]
12832#[doc = " \"type\": \"object\","]
12833#[doc = " \"required\": ["]
12834#[doc = " \"id\","]
12835#[doc = " \"jsonrpc\","]
12836#[doc = " \"method\","]
12837#[doc = " \"params\""]
12838#[doc = " ],"]
12839#[doc = " \"properties\": {"]
12840#[doc = " \"id\": {"]
12841#[doc = " \"type\": \"string\""]
12842#[doc = " },"]
12843#[doc = " \"jsonrpc\": {"]
12844#[doc = " \"type\": \"string\""]
12845#[doc = " },"]
12846#[doc = " \"method\": {"]
12847#[doc = " \"type\": \"string\","]
12848#[doc = " \"enum\": ["]
12849#[doc = " \"broadcast_tx_commit\""]
12850#[doc = " ]"]
12851#[doc = " },"]
12852#[doc = " \"params\": {"]
12853#[doc = " \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
12854#[doc = " }"]
12855#[doc = " }"]
12856#[doc = "}"]
12857#[doc = r" ```"]
12858#[doc = r" </details>"]
12859#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12860pub struct JsonRpcRequestForBroadcastTxCommit {
12861 pub id: ::std::string::String,
12862 pub jsonrpc: ::std::string::String,
12863 pub method: JsonRpcRequestForBroadcastTxCommitMethod,
12864 pub params: RpcSendTransactionRequest,
12865}
12866impl ::std::convert::From<&JsonRpcRequestForBroadcastTxCommit>
12867 for JsonRpcRequestForBroadcastTxCommit
12868{
12869 fn from(value: &JsonRpcRequestForBroadcastTxCommit) -> Self {
12870 value.clone()
12871 }
12872}
12873#[doc = "`JsonRpcRequestForBroadcastTxCommitMethod`"]
12874#[doc = r""]
12875#[doc = r" <details><summary>JSON schema</summary>"]
12876#[doc = r""]
12877#[doc = r" ```json"]
12878#[doc = "{"]
12879#[doc = " \"type\": \"string\","]
12880#[doc = " \"enum\": ["]
12881#[doc = " \"broadcast_tx_commit\""]
12882#[doc = " ]"]
12883#[doc = "}"]
12884#[doc = r" ```"]
12885#[doc = r" </details>"]
12886#[derive(
12887 :: serde :: Deserialize,
12888 :: serde :: Serialize,
12889 Clone,
12890 Copy,
12891 Debug,
12892 Eq,
12893 Hash,
12894 Ord,
12895 PartialEq,
12896 PartialOrd,
12897)]
12898pub enum JsonRpcRequestForBroadcastTxCommitMethod {
12899 #[serde(rename = "broadcast_tx_commit")]
12900 BroadcastTxCommit,
12901}
12902impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxCommitMethod {
12903 fn from(value: &JsonRpcRequestForBroadcastTxCommitMethod) -> Self {
12904 value.clone()
12905 }
12906}
12907impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxCommitMethod {
12908 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12909 match *self {
12910 Self::BroadcastTxCommit => f.write_str("broadcast_tx_commit"),
12911 }
12912 }
12913}
12914impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxCommitMethod {
12915 type Err = self::error::ConversionError;
12916 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12917 match value {
12918 "broadcast_tx_commit" => Ok(Self::BroadcastTxCommit),
12919 _ => Err("invalid value".into()),
12920 }
12921 }
12922}
12923impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxCommitMethod {
12924 type Error = self::error::ConversionError;
12925 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12926 value.parse()
12927 }
12928}
12929impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
12930 type Error = self::error::ConversionError;
12931 fn try_from(
12932 value: &::std::string::String,
12933 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12934 value.parse()
12935 }
12936}
12937impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
12938 type Error = self::error::ConversionError;
12939 fn try_from(
12940 value: ::std::string::String,
12941 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12942 value.parse()
12943 }
12944}
12945#[doc = "`JsonRpcRequestForChanges`"]
12946#[doc = r""]
12947#[doc = r" <details><summary>JSON schema</summary>"]
12948#[doc = r""]
12949#[doc = r" ```json"]
12950#[doc = "{"]
12951#[doc = " \"title\": \"JsonRpcRequest_for_changes\","]
12952#[doc = " \"type\": \"object\","]
12953#[doc = " \"required\": ["]
12954#[doc = " \"id\","]
12955#[doc = " \"jsonrpc\","]
12956#[doc = " \"method\","]
12957#[doc = " \"params\""]
12958#[doc = " ],"]
12959#[doc = " \"properties\": {"]
12960#[doc = " \"id\": {"]
12961#[doc = " \"type\": \"string\""]
12962#[doc = " },"]
12963#[doc = " \"jsonrpc\": {"]
12964#[doc = " \"type\": \"string\""]
12965#[doc = " },"]
12966#[doc = " \"method\": {"]
12967#[doc = " \"type\": \"string\","]
12968#[doc = " \"enum\": ["]
12969#[doc = " \"changes\""]
12970#[doc = " ]"]
12971#[doc = " },"]
12972#[doc = " \"params\": {"]
12973#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
12974#[doc = " }"]
12975#[doc = " }"]
12976#[doc = "}"]
12977#[doc = r" ```"]
12978#[doc = r" </details>"]
12979#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12980pub struct JsonRpcRequestForChanges {
12981 pub id: ::std::string::String,
12982 pub jsonrpc: ::std::string::String,
12983 pub method: JsonRpcRequestForChangesMethod,
12984 pub params: RpcStateChangesInBlockByTypeRequest,
12985}
12986impl ::std::convert::From<&JsonRpcRequestForChanges> for JsonRpcRequestForChanges {
12987 fn from(value: &JsonRpcRequestForChanges) -> Self {
12988 value.clone()
12989 }
12990}
12991#[doc = "`JsonRpcRequestForChangesMethod`"]
12992#[doc = r""]
12993#[doc = r" <details><summary>JSON schema</summary>"]
12994#[doc = r""]
12995#[doc = r" ```json"]
12996#[doc = "{"]
12997#[doc = " \"type\": \"string\","]
12998#[doc = " \"enum\": ["]
12999#[doc = " \"changes\""]
13000#[doc = " ]"]
13001#[doc = "}"]
13002#[doc = r" ```"]
13003#[doc = r" </details>"]
13004#[derive(
13005 :: serde :: Deserialize,
13006 :: serde :: Serialize,
13007 Clone,
13008 Copy,
13009 Debug,
13010 Eq,
13011 Hash,
13012 Ord,
13013 PartialEq,
13014 PartialOrd,
13015)]
13016pub enum JsonRpcRequestForChangesMethod {
13017 #[serde(rename = "changes")]
13018 Changes,
13019}
13020impl ::std::convert::From<&Self> for JsonRpcRequestForChangesMethod {
13021 fn from(value: &JsonRpcRequestForChangesMethod) -> Self {
13022 value.clone()
13023 }
13024}
13025impl ::std::fmt::Display for JsonRpcRequestForChangesMethod {
13026 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13027 match *self {
13028 Self::Changes => f.write_str("changes"),
13029 }
13030 }
13031}
13032impl ::std::str::FromStr for JsonRpcRequestForChangesMethod {
13033 type Err = self::error::ConversionError;
13034 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13035 match value {
13036 "changes" => Ok(Self::Changes),
13037 _ => Err("invalid value".into()),
13038 }
13039 }
13040}
13041impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChangesMethod {
13042 type Error = self::error::ConversionError;
13043 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13044 value.parse()
13045 }
13046}
13047impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChangesMethod {
13048 type Error = self::error::ConversionError;
13049 fn try_from(
13050 value: &::std::string::String,
13051 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13052 value.parse()
13053 }
13054}
13055impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChangesMethod {
13056 type Error = self::error::ConversionError;
13057 fn try_from(
13058 value: ::std::string::String,
13059 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13060 value.parse()
13061 }
13062}
13063#[doc = "`JsonRpcRequestForChunk`"]
13064#[doc = r""]
13065#[doc = r" <details><summary>JSON schema</summary>"]
13066#[doc = r""]
13067#[doc = r" ```json"]
13068#[doc = "{"]
13069#[doc = " \"title\": \"JsonRpcRequest_for_chunk\","]
13070#[doc = " \"type\": \"object\","]
13071#[doc = " \"required\": ["]
13072#[doc = " \"id\","]
13073#[doc = " \"jsonrpc\","]
13074#[doc = " \"method\","]
13075#[doc = " \"params\""]
13076#[doc = " ],"]
13077#[doc = " \"properties\": {"]
13078#[doc = " \"id\": {"]
13079#[doc = " \"type\": \"string\""]
13080#[doc = " },"]
13081#[doc = " \"jsonrpc\": {"]
13082#[doc = " \"type\": \"string\""]
13083#[doc = " },"]
13084#[doc = " \"method\": {"]
13085#[doc = " \"type\": \"string\","]
13086#[doc = " \"enum\": ["]
13087#[doc = " \"chunk\""]
13088#[doc = " ]"]
13089#[doc = " },"]
13090#[doc = " \"params\": {"]
13091#[doc = " \"$ref\": \"#/components/schemas/RpcChunkRequest\""]
13092#[doc = " }"]
13093#[doc = " }"]
13094#[doc = "}"]
13095#[doc = r" ```"]
13096#[doc = r" </details>"]
13097#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13098pub struct JsonRpcRequestForChunk {
13099 pub id: ::std::string::String,
13100 pub jsonrpc: ::std::string::String,
13101 pub method: JsonRpcRequestForChunkMethod,
13102 pub params: RpcChunkRequest,
13103}
13104impl ::std::convert::From<&JsonRpcRequestForChunk> for JsonRpcRequestForChunk {
13105 fn from(value: &JsonRpcRequestForChunk) -> Self {
13106 value.clone()
13107 }
13108}
13109#[doc = "`JsonRpcRequestForChunkMethod`"]
13110#[doc = r""]
13111#[doc = r" <details><summary>JSON schema</summary>"]
13112#[doc = r""]
13113#[doc = r" ```json"]
13114#[doc = "{"]
13115#[doc = " \"type\": \"string\","]
13116#[doc = " \"enum\": ["]
13117#[doc = " \"chunk\""]
13118#[doc = " ]"]
13119#[doc = "}"]
13120#[doc = r" ```"]
13121#[doc = r" </details>"]
13122#[derive(
13123 :: serde :: Deserialize,
13124 :: serde :: Serialize,
13125 Clone,
13126 Copy,
13127 Debug,
13128 Eq,
13129 Hash,
13130 Ord,
13131 PartialEq,
13132 PartialOrd,
13133)]
13134pub enum JsonRpcRequestForChunkMethod {
13135 #[serde(rename = "chunk")]
13136 Chunk,
13137}
13138impl ::std::convert::From<&Self> for JsonRpcRequestForChunkMethod {
13139 fn from(value: &JsonRpcRequestForChunkMethod) -> Self {
13140 value.clone()
13141 }
13142}
13143impl ::std::fmt::Display for JsonRpcRequestForChunkMethod {
13144 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13145 match *self {
13146 Self::Chunk => f.write_str("chunk"),
13147 }
13148 }
13149}
13150impl ::std::str::FromStr for JsonRpcRequestForChunkMethod {
13151 type Err = self::error::ConversionError;
13152 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13153 match value {
13154 "chunk" => Ok(Self::Chunk),
13155 _ => Err("invalid value".into()),
13156 }
13157 }
13158}
13159impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChunkMethod {
13160 type Error = self::error::ConversionError;
13161 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13162 value.parse()
13163 }
13164}
13165impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChunkMethod {
13166 type Error = self::error::ConversionError;
13167 fn try_from(
13168 value: &::std::string::String,
13169 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13170 value.parse()
13171 }
13172}
13173impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChunkMethod {
13174 type Error = self::error::ConversionError;
13175 fn try_from(
13176 value: ::std::string::String,
13177 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13178 value.parse()
13179 }
13180}
13181#[doc = "`JsonRpcRequestForClientConfig`"]
13182#[doc = r""]
13183#[doc = r" <details><summary>JSON schema</summary>"]
13184#[doc = r""]
13185#[doc = r" ```json"]
13186#[doc = "{"]
13187#[doc = " \"title\": \"JsonRpcRequest_for_client_config\","]
13188#[doc = " \"type\": \"object\","]
13189#[doc = " \"required\": ["]
13190#[doc = " \"id\","]
13191#[doc = " \"jsonrpc\","]
13192#[doc = " \"method\","]
13193#[doc = " \"params\""]
13194#[doc = " ],"]
13195#[doc = " \"properties\": {"]
13196#[doc = " \"id\": {"]
13197#[doc = " \"type\": \"string\""]
13198#[doc = " },"]
13199#[doc = " \"jsonrpc\": {"]
13200#[doc = " \"type\": \"string\""]
13201#[doc = " },"]
13202#[doc = " \"method\": {"]
13203#[doc = " \"type\": \"string\","]
13204#[doc = " \"enum\": ["]
13205#[doc = " \"client_config\""]
13206#[doc = " ]"]
13207#[doc = " },"]
13208#[doc = " \"params\": {"]
13209#[doc = " \"$ref\": \"#/components/schemas/RpcClientConfigRequest\""]
13210#[doc = " }"]
13211#[doc = " }"]
13212#[doc = "}"]
13213#[doc = r" ```"]
13214#[doc = r" </details>"]
13215#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13216pub struct JsonRpcRequestForClientConfig {
13217 pub id: ::std::string::String,
13218 pub jsonrpc: ::std::string::String,
13219 pub method: JsonRpcRequestForClientConfigMethod,
13220 pub params: RpcClientConfigRequest,
13221}
13222impl ::std::convert::From<&JsonRpcRequestForClientConfig> for JsonRpcRequestForClientConfig {
13223 fn from(value: &JsonRpcRequestForClientConfig) -> Self {
13224 value.clone()
13225 }
13226}
13227#[doc = "`JsonRpcRequestForClientConfigMethod`"]
13228#[doc = r""]
13229#[doc = r" <details><summary>JSON schema</summary>"]
13230#[doc = r""]
13231#[doc = r" ```json"]
13232#[doc = "{"]
13233#[doc = " \"type\": \"string\","]
13234#[doc = " \"enum\": ["]
13235#[doc = " \"client_config\""]
13236#[doc = " ]"]
13237#[doc = "}"]
13238#[doc = r" ```"]
13239#[doc = r" </details>"]
13240#[derive(
13241 :: serde :: Deserialize,
13242 :: serde :: Serialize,
13243 Clone,
13244 Copy,
13245 Debug,
13246 Eq,
13247 Hash,
13248 Ord,
13249 PartialEq,
13250 PartialOrd,
13251)]
13252pub enum JsonRpcRequestForClientConfigMethod {
13253 #[serde(rename = "client_config")]
13254 ClientConfig,
13255}
13256impl ::std::convert::From<&Self> for JsonRpcRequestForClientConfigMethod {
13257 fn from(value: &JsonRpcRequestForClientConfigMethod) -> Self {
13258 value.clone()
13259 }
13260}
13261impl ::std::fmt::Display for JsonRpcRequestForClientConfigMethod {
13262 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13263 match *self {
13264 Self::ClientConfig => f.write_str("client_config"),
13265 }
13266 }
13267}
13268impl ::std::str::FromStr for JsonRpcRequestForClientConfigMethod {
13269 type Err = self::error::ConversionError;
13270 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13271 match value {
13272 "client_config" => Ok(Self::ClientConfig),
13273 _ => Err("invalid value".into()),
13274 }
13275 }
13276}
13277impl ::std::convert::TryFrom<&str> for JsonRpcRequestForClientConfigMethod {
13278 type Error = self::error::ConversionError;
13279 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13280 value.parse()
13281 }
13282}
13283impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForClientConfigMethod {
13284 type Error = self::error::ConversionError;
13285 fn try_from(
13286 value: &::std::string::String,
13287 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13288 value.parse()
13289 }
13290}
13291impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForClientConfigMethod {
13292 type Error = self::error::ConversionError;
13293 fn try_from(
13294 value: ::std::string::String,
13295 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13296 value.parse()
13297 }
13298}
13299#[doc = "`JsonRpcRequestForExperimentalChanges`"]
13300#[doc = r""]
13301#[doc = r" <details><summary>JSON schema</summary>"]
13302#[doc = r""]
13303#[doc = r" ```json"]
13304#[doc = "{"]
13305#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes\","]
13306#[doc = " \"type\": \"object\","]
13307#[doc = " \"required\": ["]
13308#[doc = " \"id\","]
13309#[doc = " \"jsonrpc\","]
13310#[doc = " \"method\","]
13311#[doc = " \"params\""]
13312#[doc = " ],"]
13313#[doc = " \"properties\": {"]
13314#[doc = " \"id\": {"]
13315#[doc = " \"type\": \"string\""]
13316#[doc = " },"]
13317#[doc = " \"jsonrpc\": {"]
13318#[doc = " \"type\": \"string\""]
13319#[doc = " },"]
13320#[doc = " \"method\": {"]
13321#[doc = " \"type\": \"string\","]
13322#[doc = " \"enum\": ["]
13323#[doc = " \"EXPERIMENTAL_changes\""]
13324#[doc = " ]"]
13325#[doc = " },"]
13326#[doc = " \"params\": {"]
13327#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
13328#[doc = " }"]
13329#[doc = " }"]
13330#[doc = "}"]
13331#[doc = r" ```"]
13332#[doc = r" </details>"]
13333#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13334pub struct JsonRpcRequestForExperimentalChanges {
13335 pub id: ::std::string::String,
13336 pub jsonrpc: ::std::string::String,
13337 pub method: JsonRpcRequestForExperimentalChangesMethod,
13338 pub params: RpcStateChangesInBlockByTypeRequest,
13339}
13340impl ::std::convert::From<&JsonRpcRequestForExperimentalChanges>
13341 for JsonRpcRequestForExperimentalChanges
13342{
13343 fn from(value: &JsonRpcRequestForExperimentalChanges) -> Self {
13344 value.clone()
13345 }
13346}
13347#[doc = "`JsonRpcRequestForExperimentalChangesInBlock`"]
13348#[doc = r""]
13349#[doc = r" <details><summary>JSON schema</summary>"]
13350#[doc = r""]
13351#[doc = r" ```json"]
13352#[doc = "{"]
13353#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes_in_block\","]
13354#[doc = " \"type\": \"object\","]
13355#[doc = " \"required\": ["]
13356#[doc = " \"id\","]
13357#[doc = " \"jsonrpc\","]
13358#[doc = " \"method\","]
13359#[doc = " \"params\""]
13360#[doc = " ],"]
13361#[doc = " \"properties\": {"]
13362#[doc = " \"id\": {"]
13363#[doc = " \"type\": \"string\""]
13364#[doc = " },"]
13365#[doc = " \"jsonrpc\": {"]
13366#[doc = " \"type\": \"string\""]
13367#[doc = " },"]
13368#[doc = " \"method\": {"]
13369#[doc = " \"type\": \"string\","]
13370#[doc = " \"enum\": ["]
13371#[doc = " \"EXPERIMENTAL_changes_in_block\""]
13372#[doc = " ]"]
13373#[doc = " },"]
13374#[doc = " \"params\": {"]
13375#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
13376#[doc = " }"]
13377#[doc = " }"]
13378#[doc = "}"]
13379#[doc = r" ```"]
13380#[doc = r" </details>"]
13381#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13382pub struct JsonRpcRequestForExperimentalChangesInBlock {
13383 pub id: ::std::string::String,
13384 pub jsonrpc: ::std::string::String,
13385 pub method: JsonRpcRequestForExperimentalChangesInBlockMethod,
13386 pub params: RpcStateChangesInBlockRequest,
13387}
13388impl ::std::convert::From<&JsonRpcRequestForExperimentalChangesInBlock>
13389 for JsonRpcRequestForExperimentalChangesInBlock
13390{
13391 fn from(value: &JsonRpcRequestForExperimentalChangesInBlock) -> Self {
13392 value.clone()
13393 }
13394}
13395#[doc = "`JsonRpcRequestForExperimentalChangesInBlockMethod`"]
13396#[doc = r""]
13397#[doc = r" <details><summary>JSON schema</summary>"]
13398#[doc = r""]
13399#[doc = r" ```json"]
13400#[doc = "{"]
13401#[doc = " \"type\": \"string\","]
13402#[doc = " \"enum\": ["]
13403#[doc = " \"EXPERIMENTAL_changes_in_block\""]
13404#[doc = " ]"]
13405#[doc = "}"]
13406#[doc = r" ```"]
13407#[doc = r" </details>"]
13408#[derive(
13409 :: serde :: Deserialize,
13410 :: serde :: Serialize,
13411 Clone,
13412 Copy,
13413 Debug,
13414 Eq,
13415 Hash,
13416 Ord,
13417 PartialEq,
13418 PartialOrd,
13419)]
13420pub enum JsonRpcRequestForExperimentalChangesInBlockMethod {
13421 #[serde(rename = "EXPERIMENTAL_changes_in_block")]
13422 ExperimentalChangesInBlock,
13423}
13424impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesInBlockMethod {
13425 fn from(value: &JsonRpcRequestForExperimentalChangesInBlockMethod) -> Self {
13426 value.clone()
13427 }
13428}
13429impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesInBlockMethod {
13430 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13431 match *self {
13432 Self::ExperimentalChangesInBlock => f.write_str("EXPERIMENTAL_changes_in_block"),
13433 }
13434 }
13435}
13436impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesInBlockMethod {
13437 type Err = self::error::ConversionError;
13438 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13439 match value {
13440 "EXPERIMENTAL_changes_in_block" => Ok(Self::ExperimentalChangesInBlock),
13441 _ => Err("invalid value".into()),
13442 }
13443 }
13444}
13445impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesInBlockMethod {
13446 type Error = self::error::ConversionError;
13447 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13448 value.parse()
13449 }
13450}
13451impl ::std::convert::TryFrom<&::std::string::String>
13452 for JsonRpcRequestForExperimentalChangesInBlockMethod
13453{
13454 type Error = self::error::ConversionError;
13455 fn try_from(
13456 value: &::std::string::String,
13457 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13458 value.parse()
13459 }
13460}
13461impl ::std::convert::TryFrom<::std::string::String>
13462 for JsonRpcRequestForExperimentalChangesInBlockMethod
13463{
13464 type Error = self::error::ConversionError;
13465 fn try_from(
13466 value: ::std::string::String,
13467 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13468 value.parse()
13469 }
13470}
13471#[doc = "`JsonRpcRequestForExperimentalChangesMethod`"]
13472#[doc = r""]
13473#[doc = r" <details><summary>JSON schema</summary>"]
13474#[doc = r""]
13475#[doc = r" ```json"]
13476#[doc = "{"]
13477#[doc = " \"type\": \"string\","]
13478#[doc = " \"enum\": ["]
13479#[doc = " \"EXPERIMENTAL_changes\""]
13480#[doc = " ]"]
13481#[doc = "}"]
13482#[doc = r" ```"]
13483#[doc = r" </details>"]
13484#[derive(
13485 :: serde :: Deserialize,
13486 :: serde :: Serialize,
13487 Clone,
13488 Copy,
13489 Debug,
13490 Eq,
13491 Hash,
13492 Ord,
13493 PartialEq,
13494 PartialOrd,
13495)]
13496pub enum JsonRpcRequestForExperimentalChangesMethod {
13497 #[serde(rename = "EXPERIMENTAL_changes")]
13498 ExperimentalChanges,
13499}
13500impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesMethod {
13501 fn from(value: &JsonRpcRequestForExperimentalChangesMethod) -> Self {
13502 value.clone()
13503 }
13504}
13505impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesMethod {
13506 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13507 match *self {
13508 Self::ExperimentalChanges => f.write_str("EXPERIMENTAL_changes"),
13509 }
13510 }
13511}
13512impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesMethod {
13513 type Err = self::error::ConversionError;
13514 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13515 match value {
13516 "EXPERIMENTAL_changes" => Ok(Self::ExperimentalChanges),
13517 _ => Err("invalid value".into()),
13518 }
13519 }
13520}
13521impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesMethod {
13522 type Error = self::error::ConversionError;
13523 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13524 value.parse()
13525 }
13526}
13527impl ::std::convert::TryFrom<&::std::string::String>
13528 for JsonRpcRequestForExperimentalChangesMethod
13529{
13530 type Error = self::error::ConversionError;
13531 fn try_from(
13532 value: &::std::string::String,
13533 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13534 value.parse()
13535 }
13536}
13537impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalChangesMethod {
13538 type Error = self::error::ConversionError;
13539 fn try_from(
13540 value: ::std::string::String,
13541 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13542 value.parse()
13543 }
13544}
13545#[doc = "`JsonRpcRequestForExperimentalCongestionLevel`"]
13546#[doc = r""]
13547#[doc = r" <details><summary>JSON schema</summary>"]
13548#[doc = r""]
13549#[doc = r" ```json"]
13550#[doc = "{"]
13551#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_congestion_level\","]
13552#[doc = " \"type\": \"object\","]
13553#[doc = " \"required\": ["]
13554#[doc = " \"id\","]
13555#[doc = " \"jsonrpc\","]
13556#[doc = " \"method\","]
13557#[doc = " \"params\""]
13558#[doc = " ],"]
13559#[doc = " \"properties\": {"]
13560#[doc = " \"id\": {"]
13561#[doc = " \"type\": \"string\""]
13562#[doc = " },"]
13563#[doc = " \"jsonrpc\": {"]
13564#[doc = " \"type\": \"string\""]
13565#[doc = " },"]
13566#[doc = " \"method\": {"]
13567#[doc = " \"type\": \"string\","]
13568#[doc = " \"enum\": ["]
13569#[doc = " \"EXPERIMENTAL_congestion_level\""]
13570#[doc = " ]"]
13571#[doc = " },"]
13572#[doc = " \"params\": {"]
13573#[doc = " \"$ref\": \"#/components/schemas/RpcCongestionLevelRequest\""]
13574#[doc = " }"]
13575#[doc = " }"]
13576#[doc = "}"]
13577#[doc = r" ```"]
13578#[doc = r" </details>"]
13579#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13580pub struct JsonRpcRequestForExperimentalCongestionLevel {
13581 pub id: ::std::string::String,
13582 pub jsonrpc: ::std::string::String,
13583 pub method: JsonRpcRequestForExperimentalCongestionLevelMethod,
13584 pub params: RpcCongestionLevelRequest,
13585}
13586impl ::std::convert::From<&JsonRpcRequestForExperimentalCongestionLevel>
13587 for JsonRpcRequestForExperimentalCongestionLevel
13588{
13589 fn from(value: &JsonRpcRequestForExperimentalCongestionLevel) -> Self {
13590 value.clone()
13591 }
13592}
13593#[doc = "`JsonRpcRequestForExperimentalCongestionLevelMethod`"]
13594#[doc = r""]
13595#[doc = r" <details><summary>JSON schema</summary>"]
13596#[doc = r""]
13597#[doc = r" ```json"]
13598#[doc = "{"]
13599#[doc = " \"type\": \"string\","]
13600#[doc = " \"enum\": ["]
13601#[doc = " \"EXPERIMENTAL_congestion_level\""]
13602#[doc = " ]"]
13603#[doc = "}"]
13604#[doc = r" ```"]
13605#[doc = r" </details>"]
13606#[derive(
13607 :: serde :: Deserialize,
13608 :: serde :: Serialize,
13609 Clone,
13610 Copy,
13611 Debug,
13612 Eq,
13613 Hash,
13614 Ord,
13615 PartialEq,
13616 PartialOrd,
13617)]
13618pub enum JsonRpcRequestForExperimentalCongestionLevelMethod {
13619 #[serde(rename = "EXPERIMENTAL_congestion_level")]
13620 ExperimentalCongestionLevel,
13621}
13622impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalCongestionLevelMethod {
13623 fn from(value: &JsonRpcRequestForExperimentalCongestionLevelMethod) -> Self {
13624 value.clone()
13625 }
13626}
13627impl ::std::fmt::Display for JsonRpcRequestForExperimentalCongestionLevelMethod {
13628 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13629 match *self {
13630 Self::ExperimentalCongestionLevel => f.write_str("EXPERIMENTAL_congestion_level"),
13631 }
13632 }
13633}
13634impl ::std::str::FromStr for JsonRpcRequestForExperimentalCongestionLevelMethod {
13635 type Err = self::error::ConversionError;
13636 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13637 match value {
13638 "EXPERIMENTAL_congestion_level" => Ok(Self::ExperimentalCongestionLevel),
13639 _ => Err("invalid value".into()),
13640 }
13641 }
13642}
13643impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalCongestionLevelMethod {
13644 type Error = self::error::ConversionError;
13645 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13646 value.parse()
13647 }
13648}
13649impl ::std::convert::TryFrom<&::std::string::String>
13650 for JsonRpcRequestForExperimentalCongestionLevelMethod
13651{
13652 type Error = self::error::ConversionError;
13653 fn try_from(
13654 value: &::std::string::String,
13655 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13656 value.parse()
13657 }
13658}
13659impl ::std::convert::TryFrom<::std::string::String>
13660 for JsonRpcRequestForExperimentalCongestionLevelMethod
13661{
13662 type Error = self::error::ConversionError;
13663 fn try_from(
13664 value: ::std::string::String,
13665 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13666 value.parse()
13667 }
13668}
13669#[doc = "`JsonRpcRequestForExperimentalGenesisConfig`"]
13670#[doc = r""]
13671#[doc = r" <details><summary>JSON schema</summary>"]
13672#[doc = r""]
13673#[doc = r" ```json"]
13674#[doc = "{"]
13675#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_genesis_config\","]
13676#[doc = " \"type\": \"object\","]
13677#[doc = " \"required\": ["]
13678#[doc = " \"id\","]
13679#[doc = " \"jsonrpc\","]
13680#[doc = " \"method\","]
13681#[doc = " \"params\""]
13682#[doc = " ],"]
13683#[doc = " \"properties\": {"]
13684#[doc = " \"id\": {"]
13685#[doc = " \"type\": \"string\""]
13686#[doc = " },"]
13687#[doc = " \"jsonrpc\": {"]
13688#[doc = " \"type\": \"string\""]
13689#[doc = " },"]
13690#[doc = " \"method\": {"]
13691#[doc = " \"type\": \"string\","]
13692#[doc = " \"enum\": ["]
13693#[doc = " \"EXPERIMENTAL_genesis_config\""]
13694#[doc = " ]"]
13695#[doc = " },"]
13696#[doc = " \"params\": {"]
13697#[doc = " \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
13698#[doc = " }"]
13699#[doc = " }"]
13700#[doc = "}"]
13701#[doc = r" ```"]
13702#[doc = r" </details>"]
13703#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13704pub struct JsonRpcRequestForExperimentalGenesisConfig {
13705 pub id: ::std::string::String,
13706 pub jsonrpc: ::std::string::String,
13707 pub method: JsonRpcRequestForExperimentalGenesisConfigMethod,
13708 pub params: GenesisConfigRequest,
13709}
13710impl ::std::convert::From<&JsonRpcRequestForExperimentalGenesisConfig>
13711 for JsonRpcRequestForExperimentalGenesisConfig
13712{
13713 fn from(value: &JsonRpcRequestForExperimentalGenesisConfig) -> Self {
13714 value.clone()
13715 }
13716}
13717#[doc = "`JsonRpcRequestForExperimentalGenesisConfigMethod`"]
13718#[doc = r""]
13719#[doc = r" <details><summary>JSON schema</summary>"]
13720#[doc = r""]
13721#[doc = r" ```json"]
13722#[doc = "{"]
13723#[doc = " \"type\": \"string\","]
13724#[doc = " \"enum\": ["]
13725#[doc = " \"EXPERIMENTAL_genesis_config\""]
13726#[doc = " ]"]
13727#[doc = "}"]
13728#[doc = r" ```"]
13729#[doc = r" </details>"]
13730#[derive(
13731 :: serde :: Deserialize,
13732 :: serde :: Serialize,
13733 Clone,
13734 Copy,
13735 Debug,
13736 Eq,
13737 Hash,
13738 Ord,
13739 PartialEq,
13740 PartialOrd,
13741)]
13742pub enum JsonRpcRequestForExperimentalGenesisConfigMethod {
13743 #[serde(rename = "EXPERIMENTAL_genesis_config")]
13744 ExperimentalGenesisConfig,
13745}
13746impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalGenesisConfigMethod {
13747 fn from(value: &JsonRpcRequestForExperimentalGenesisConfigMethod) -> Self {
13748 value.clone()
13749 }
13750}
13751impl ::std::fmt::Display for JsonRpcRequestForExperimentalGenesisConfigMethod {
13752 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13753 match *self {
13754 Self::ExperimentalGenesisConfig => f.write_str("EXPERIMENTAL_genesis_config"),
13755 }
13756 }
13757}
13758impl ::std::str::FromStr for JsonRpcRequestForExperimentalGenesisConfigMethod {
13759 type Err = self::error::ConversionError;
13760 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13761 match value {
13762 "EXPERIMENTAL_genesis_config" => Ok(Self::ExperimentalGenesisConfig),
13763 _ => Err("invalid value".into()),
13764 }
13765 }
13766}
13767impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalGenesisConfigMethod {
13768 type Error = self::error::ConversionError;
13769 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13770 value.parse()
13771 }
13772}
13773impl ::std::convert::TryFrom<&::std::string::String>
13774 for JsonRpcRequestForExperimentalGenesisConfigMethod
13775{
13776 type Error = self::error::ConversionError;
13777 fn try_from(
13778 value: &::std::string::String,
13779 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13780 value.parse()
13781 }
13782}
13783impl ::std::convert::TryFrom<::std::string::String>
13784 for JsonRpcRequestForExperimentalGenesisConfigMethod
13785{
13786 type Error = self::error::ConversionError;
13787 fn try_from(
13788 value: ::std::string::String,
13789 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13790 value.parse()
13791 }
13792}
13793#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProof`"]
13794#[doc = r""]
13795#[doc = r" <details><summary>JSON schema</summary>"]
13796#[doc = r""]
13797#[doc = r" ```json"]
13798#[doc = "{"]
13799#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_block_proof\","]
13800#[doc = " \"type\": \"object\","]
13801#[doc = " \"required\": ["]
13802#[doc = " \"id\","]
13803#[doc = " \"jsonrpc\","]
13804#[doc = " \"method\","]
13805#[doc = " \"params\""]
13806#[doc = " ],"]
13807#[doc = " \"properties\": {"]
13808#[doc = " \"id\": {"]
13809#[doc = " \"type\": \"string\""]
13810#[doc = " },"]
13811#[doc = " \"jsonrpc\": {"]
13812#[doc = " \"type\": \"string\""]
13813#[doc = " },"]
13814#[doc = " \"method\": {"]
13815#[doc = " \"type\": \"string\","]
13816#[doc = " \"enum\": ["]
13817#[doc = " \"EXPERIMENTAL_light_client_block_proof\""]
13818#[doc = " ]"]
13819#[doc = " },"]
13820#[doc = " \"params\": {"]
13821#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientBlockProofRequest\""]
13822#[doc = " }"]
13823#[doc = " }"]
13824#[doc = "}"]
13825#[doc = r" ```"]
13826#[doc = r" </details>"]
13827#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13828pub struct JsonRpcRequestForExperimentalLightClientBlockProof {
13829 pub id: ::std::string::String,
13830 pub jsonrpc: ::std::string::String,
13831 pub method: JsonRpcRequestForExperimentalLightClientBlockProofMethod,
13832 pub params: RpcLightClientBlockProofRequest,
13833}
13834impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientBlockProof>
13835 for JsonRpcRequestForExperimentalLightClientBlockProof
13836{
13837 fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProof) -> Self {
13838 value.clone()
13839 }
13840}
13841#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProofMethod`"]
13842#[doc = r""]
13843#[doc = r" <details><summary>JSON schema</summary>"]
13844#[doc = r""]
13845#[doc = r" ```json"]
13846#[doc = "{"]
13847#[doc = " \"type\": \"string\","]
13848#[doc = " \"enum\": ["]
13849#[doc = " \"EXPERIMENTAL_light_client_block_proof\""]
13850#[doc = " ]"]
13851#[doc = "}"]
13852#[doc = r" ```"]
13853#[doc = r" </details>"]
13854#[derive(
13855 :: serde :: Deserialize,
13856 :: serde :: Serialize,
13857 Clone,
13858 Copy,
13859 Debug,
13860 Eq,
13861 Hash,
13862 Ord,
13863 PartialEq,
13864 PartialOrd,
13865)]
13866pub enum JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13867 #[serde(rename = "EXPERIMENTAL_light_client_block_proof")]
13868 ExperimentalLightClientBlockProof,
13869}
13870impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13871 fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProofMethod) -> Self {
13872 value.clone()
13873 }
13874}
13875impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13876 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13877 match *self {
13878 Self::ExperimentalLightClientBlockProof => {
13879 f.write_str("EXPERIMENTAL_light_client_block_proof")
13880 }
13881 }
13882 }
13883}
13884impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13885 type Err = self::error::ConversionError;
13886 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13887 match value {
13888 "EXPERIMENTAL_light_client_block_proof" => Ok(Self::ExperimentalLightClientBlockProof),
13889 _ => Err("invalid value".into()),
13890 }
13891 }
13892}
13893impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
13894 type Error = self::error::ConversionError;
13895 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13896 value.parse()
13897 }
13898}
13899impl ::std::convert::TryFrom<&::std::string::String>
13900 for JsonRpcRequestForExperimentalLightClientBlockProofMethod
13901{
13902 type Error = self::error::ConversionError;
13903 fn try_from(
13904 value: &::std::string::String,
13905 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13906 value.parse()
13907 }
13908}
13909impl ::std::convert::TryFrom<::std::string::String>
13910 for JsonRpcRequestForExperimentalLightClientBlockProofMethod
13911{
13912 type Error = self::error::ConversionError;
13913 fn try_from(
13914 value: ::std::string::String,
13915 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13916 value.parse()
13917 }
13918}
13919#[doc = "`JsonRpcRequestForExperimentalLightClientProof`"]
13920#[doc = r""]
13921#[doc = r" <details><summary>JSON schema</summary>"]
13922#[doc = r""]
13923#[doc = r" ```json"]
13924#[doc = "{"]
13925#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_proof\","]
13926#[doc = " \"type\": \"object\","]
13927#[doc = " \"required\": ["]
13928#[doc = " \"id\","]
13929#[doc = " \"jsonrpc\","]
13930#[doc = " \"method\","]
13931#[doc = " \"params\""]
13932#[doc = " ],"]
13933#[doc = " \"properties\": {"]
13934#[doc = " \"id\": {"]
13935#[doc = " \"type\": \"string\""]
13936#[doc = " },"]
13937#[doc = " \"jsonrpc\": {"]
13938#[doc = " \"type\": \"string\""]
13939#[doc = " },"]
13940#[doc = " \"method\": {"]
13941#[doc = " \"type\": \"string\","]
13942#[doc = " \"enum\": ["]
13943#[doc = " \"EXPERIMENTAL_light_client_proof\""]
13944#[doc = " ]"]
13945#[doc = " },"]
13946#[doc = " \"params\": {"]
13947#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
13948#[doc = " }"]
13949#[doc = " }"]
13950#[doc = "}"]
13951#[doc = r" ```"]
13952#[doc = r" </details>"]
13953#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13954pub struct JsonRpcRequestForExperimentalLightClientProof {
13955 pub id: ::std::string::String,
13956 pub jsonrpc: ::std::string::String,
13957 pub method: JsonRpcRequestForExperimentalLightClientProofMethod,
13958 pub params: RpcLightClientExecutionProofRequest,
13959}
13960impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientProof>
13961 for JsonRpcRequestForExperimentalLightClientProof
13962{
13963 fn from(value: &JsonRpcRequestForExperimentalLightClientProof) -> Self {
13964 value.clone()
13965 }
13966}
13967#[doc = "`JsonRpcRequestForExperimentalLightClientProofMethod`"]
13968#[doc = r""]
13969#[doc = r" <details><summary>JSON schema</summary>"]
13970#[doc = r""]
13971#[doc = r" ```json"]
13972#[doc = "{"]
13973#[doc = " \"type\": \"string\","]
13974#[doc = " \"enum\": ["]
13975#[doc = " \"EXPERIMENTAL_light_client_proof\""]
13976#[doc = " ]"]
13977#[doc = "}"]
13978#[doc = r" ```"]
13979#[doc = r" </details>"]
13980#[derive(
13981 :: serde :: Deserialize,
13982 :: serde :: Serialize,
13983 Clone,
13984 Copy,
13985 Debug,
13986 Eq,
13987 Hash,
13988 Ord,
13989 PartialEq,
13990 PartialOrd,
13991)]
13992pub enum JsonRpcRequestForExperimentalLightClientProofMethod {
13993 #[serde(rename = "EXPERIMENTAL_light_client_proof")]
13994 ExperimentalLightClientProof,
13995}
13996impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientProofMethod {
13997 fn from(value: &JsonRpcRequestForExperimentalLightClientProofMethod) -> Self {
13998 value.clone()
13999 }
14000}
14001impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientProofMethod {
14002 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14003 match *self {
14004 Self::ExperimentalLightClientProof => f.write_str("EXPERIMENTAL_light_client_proof"),
14005 }
14006 }
14007}
14008impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientProofMethod {
14009 type Err = self::error::ConversionError;
14010 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14011 match value {
14012 "EXPERIMENTAL_light_client_proof" => Ok(Self::ExperimentalLightClientProof),
14013 _ => Err("invalid value".into()),
14014 }
14015 }
14016}
14017impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientProofMethod {
14018 type Error = self::error::ConversionError;
14019 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14020 value.parse()
14021 }
14022}
14023impl ::std::convert::TryFrom<&::std::string::String>
14024 for JsonRpcRequestForExperimentalLightClientProofMethod
14025{
14026 type Error = self::error::ConversionError;
14027 fn try_from(
14028 value: &::std::string::String,
14029 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14030 value.parse()
14031 }
14032}
14033impl ::std::convert::TryFrom<::std::string::String>
14034 for JsonRpcRequestForExperimentalLightClientProofMethod
14035{
14036 type Error = self::error::ConversionError;
14037 fn try_from(
14038 value: ::std::string::String,
14039 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14040 value.parse()
14041 }
14042}
14043#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindows`"]
14044#[doc = r""]
14045#[doc = r" <details><summary>JSON schema</summary>"]
14046#[doc = r""]
14047#[doc = r" ```json"]
14048#[doc = "{"]
14049#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_maintenance_windows\","]
14050#[doc = " \"type\": \"object\","]
14051#[doc = " \"required\": ["]
14052#[doc = " \"id\","]
14053#[doc = " \"jsonrpc\","]
14054#[doc = " \"method\","]
14055#[doc = " \"params\""]
14056#[doc = " ],"]
14057#[doc = " \"properties\": {"]
14058#[doc = " \"id\": {"]
14059#[doc = " \"type\": \"string\""]
14060#[doc = " },"]
14061#[doc = " \"jsonrpc\": {"]
14062#[doc = " \"type\": \"string\""]
14063#[doc = " },"]
14064#[doc = " \"method\": {"]
14065#[doc = " \"type\": \"string\","]
14066#[doc = " \"enum\": ["]
14067#[doc = " \"EXPERIMENTAL_maintenance_windows\""]
14068#[doc = " ]"]
14069#[doc = " },"]
14070#[doc = " \"params\": {"]
14071#[doc = " \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
14072#[doc = " }"]
14073#[doc = " }"]
14074#[doc = "}"]
14075#[doc = r" ```"]
14076#[doc = r" </details>"]
14077#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14078pub struct JsonRpcRequestForExperimentalMaintenanceWindows {
14079 pub id: ::std::string::String,
14080 pub jsonrpc: ::std::string::String,
14081 pub method: JsonRpcRequestForExperimentalMaintenanceWindowsMethod,
14082 pub params: RpcMaintenanceWindowsRequest,
14083}
14084impl ::std::convert::From<&JsonRpcRequestForExperimentalMaintenanceWindows>
14085 for JsonRpcRequestForExperimentalMaintenanceWindows
14086{
14087 fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindows) -> Self {
14088 value.clone()
14089 }
14090}
14091#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindowsMethod`"]
14092#[doc = r""]
14093#[doc = r" <details><summary>JSON schema</summary>"]
14094#[doc = r""]
14095#[doc = r" ```json"]
14096#[doc = "{"]
14097#[doc = " \"type\": \"string\","]
14098#[doc = " \"enum\": ["]
14099#[doc = " \"EXPERIMENTAL_maintenance_windows\""]
14100#[doc = " ]"]
14101#[doc = "}"]
14102#[doc = r" ```"]
14103#[doc = r" </details>"]
14104#[derive(
14105 :: serde :: Deserialize,
14106 :: serde :: Serialize,
14107 Clone,
14108 Copy,
14109 Debug,
14110 Eq,
14111 Hash,
14112 Ord,
14113 PartialEq,
14114 PartialOrd,
14115)]
14116pub enum JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14117 #[serde(rename = "EXPERIMENTAL_maintenance_windows")]
14118 ExperimentalMaintenanceWindows,
14119}
14120impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14121 fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindowsMethod) -> Self {
14122 value.clone()
14123 }
14124}
14125impl ::std::fmt::Display for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14126 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14127 match *self {
14128 Self::ExperimentalMaintenanceWindows => f.write_str("EXPERIMENTAL_maintenance_windows"),
14129 }
14130 }
14131}
14132impl ::std::str::FromStr for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14133 type Err = self::error::ConversionError;
14134 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14135 match value {
14136 "EXPERIMENTAL_maintenance_windows" => Ok(Self::ExperimentalMaintenanceWindows),
14137 _ => Err("invalid value".into()),
14138 }
14139 }
14140}
14141impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
14142 type Error = self::error::ConversionError;
14143 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14144 value.parse()
14145 }
14146}
14147impl ::std::convert::TryFrom<&::std::string::String>
14148 for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
14149{
14150 type Error = self::error::ConversionError;
14151 fn try_from(
14152 value: &::std::string::String,
14153 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14154 value.parse()
14155 }
14156}
14157impl ::std::convert::TryFrom<::std::string::String>
14158 for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
14159{
14160 type Error = self::error::ConversionError;
14161 fn try_from(
14162 value: ::std::string::String,
14163 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14164 value.parse()
14165 }
14166}
14167#[doc = "`JsonRpcRequestForExperimentalProtocolConfig`"]
14168#[doc = r""]
14169#[doc = r" <details><summary>JSON schema</summary>"]
14170#[doc = r""]
14171#[doc = r" ```json"]
14172#[doc = "{"]
14173#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_protocol_config\","]
14174#[doc = " \"type\": \"object\","]
14175#[doc = " \"required\": ["]
14176#[doc = " \"id\","]
14177#[doc = " \"jsonrpc\","]
14178#[doc = " \"method\","]
14179#[doc = " \"params\""]
14180#[doc = " ],"]
14181#[doc = " \"properties\": {"]
14182#[doc = " \"id\": {"]
14183#[doc = " \"type\": \"string\""]
14184#[doc = " },"]
14185#[doc = " \"jsonrpc\": {"]
14186#[doc = " \"type\": \"string\""]
14187#[doc = " },"]
14188#[doc = " \"method\": {"]
14189#[doc = " \"type\": \"string\","]
14190#[doc = " \"enum\": ["]
14191#[doc = " \"EXPERIMENTAL_protocol_config\""]
14192#[doc = " ]"]
14193#[doc = " },"]
14194#[doc = " \"params\": {"]
14195#[doc = " \"$ref\": \"#/components/schemas/RpcProtocolConfigRequest\""]
14196#[doc = " }"]
14197#[doc = " }"]
14198#[doc = "}"]
14199#[doc = r" ```"]
14200#[doc = r" </details>"]
14201#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14202pub struct JsonRpcRequestForExperimentalProtocolConfig {
14203 pub id: ::std::string::String,
14204 pub jsonrpc: ::std::string::String,
14205 pub method: JsonRpcRequestForExperimentalProtocolConfigMethod,
14206 pub params: RpcProtocolConfigRequest,
14207}
14208impl ::std::convert::From<&JsonRpcRequestForExperimentalProtocolConfig>
14209 for JsonRpcRequestForExperimentalProtocolConfig
14210{
14211 fn from(value: &JsonRpcRequestForExperimentalProtocolConfig) -> Self {
14212 value.clone()
14213 }
14214}
14215#[doc = "`JsonRpcRequestForExperimentalProtocolConfigMethod`"]
14216#[doc = r""]
14217#[doc = r" <details><summary>JSON schema</summary>"]
14218#[doc = r""]
14219#[doc = r" ```json"]
14220#[doc = "{"]
14221#[doc = " \"type\": \"string\","]
14222#[doc = " \"enum\": ["]
14223#[doc = " \"EXPERIMENTAL_protocol_config\""]
14224#[doc = " ]"]
14225#[doc = "}"]
14226#[doc = r" ```"]
14227#[doc = r" </details>"]
14228#[derive(
14229 :: serde :: Deserialize,
14230 :: serde :: Serialize,
14231 Clone,
14232 Copy,
14233 Debug,
14234 Eq,
14235 Hash,
14236 Ord,
14237 PartialEq,
14238 PartialOrd,
14239)]
14240pub enum JsonRpcRequestForExperimentalProtocolConfigMethod {
14241 #[serde(rename = "EXPERIMENTAL_protocol_config")]
14242 ExperimentalProtocolConfig,
14243}
14244impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalProtocolConfigMethod {
14245 fn from(value: &JsonRpcRequestForExperimentalProtocolConfigMethod) -> Self {
14246 value.clone()
14247 }
14248}
14249impl ::std::fmt::Display for JsonRpcRequestForExperimentalProtocolConfigMethod {
14250 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14251 match *self {
14252 Self::ExperimentalProtocolConfig => f.write_str("EXPERIMENTAL_protocol_config"),
14253 }
14254 }
14255}
14256impl ::std::str::FromStr for JsonRpcRequestForExperimentalProtocolConfigMethod {
14257 type Err = self::error::ConversionError;
14258 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14259 match value {
14260 "EXPERIMENTAL_protocol_config" => Ok(Self::ExperimentalProtocolConfig),
14261 _ => Err("invalid value".into()),
14262 }
14263 }
14264}
14265impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalProtocolConfigMethod {
14266 type Error = self::error::ConversionError;
14267 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14268 value.parse()
14269 }
14270}
14271impl ::std::convert::TryFrom<&::std::string::String>
14272 for JsonRpcRequestForExperimentalProtocolConfigMethod
14273{
14274 type Error = self::error::ConversionError;
14275 fn try_from(
14276 value: &::std::string::String,
14277 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14278 value.parse()
14279 }
14280}
14281impl ::std::convert::TryFrom<::std::string::String>
14282 for JsonRpcRequestForExperimentalProtocolConfigMethod
14283{
14284 type Error = self::error::ConversionError;
14285 fn try_from(
14286 value: ::std::string::String,
14287 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14288 value.parse()
14289 }
14290}
14291#[doc = "`JsonRpcRequestForExperimentalReceipt`"]
14292#[doc = r""]
14293#[doc = r" <details><summary>JSON schema</summary>"]
14294#[doc = r""]
14295#[doc = r" ```json"]
14296#[doc = "{"]
14297#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_receipt\","]
14298#[doc = " \"type\": \"object\","]
14299#[doc = " \"required\": ["]
14300#[doc = " \"id\","]
14301#[doc = " \"jsonrpc\","]
14302#[doc = " \"method\","]
14303#[doc = " \"params\""]
14304#[doc = " ],"]
14305#[doc = " \"properties\": {"]
14306#[doc = " \"id\": {"]
14307#[doc = " \"type\": \"string\""]
14308#[doc = " },"]
14309#[doc = " \"jsonrpc\": {"]
14310#[doc = " \"type\": \"string\""]
14311#[doc = " },"]
14312#[doc = " \"method\": {"]
14313#[doc = " \"type\": \"string\","]
14314#[doc = " \"enum\": ["]
14315#[doc = " \"EXPERIMENTAL_receipt\""]
14316#[doc = " ]"]
14317#[doc = " },"]
14318#[doc = " \"params\": {"]
14319#[doc = " \"$ref\": \"#/components/schemas/RpcReceiptRequest\""]
14320#[doc = " }"]
14321#[doc = " }"]
14322#[doc = "}"]
14323#[doc = r" ```"]
14324#[doc = r" </details>"]
14325#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14326pub struct JsonRpcRequestForExperimentalReceipt {
14327 pub id: ::std::string::String,
14328 pub jsonrpc: ::std::string::String,
14329 pub method: JsonRpcRequestForExperimentalReceiptMethod,
14330 pub params: RpcReceiptRequest,
14331}
14332impl ::std::convert::From<&JsonRpcRequestForExperimentalReceipt>
14333 for JsonRpcRequestForExperimentalReceipt
14334{
14335 fn from(value: &JsonRpcRequestForExperimentalReceipt) -> Self {
14336 value.clone()
14337 }
14338}
14339#[doc = "`JsonRpcRequestForExperimentalReceiptMethod`"]
14340#[doc = r""]
14341#[doc = r" <details><summary>JSON schema</summary>"]
14342#[doc = r""]
14343#[doc = r" ```json"]
14344#[doc = "{"]
14345#[doc = " \"type\": \"string\","]
14346#[doc = " \"enum\": ["]
14347#[doc = " \"EXPERIMENTAL_receipt\""]
14348#[doc = " ]"]
14349#[doc = "}"]
14350#[doc = r" ```"]
14351#[doc = r" </details>"]
14352#[derive(
14353 :: serde :: Deserialize,
14354 :: serde :: Serialize,
14355 Clone,
14356 Copy,
14357 Debug,
14358 Eq,
14359 Hash,
14360 Ord,
14361 PartialEq,
14362 PartialOrd,
14363)]
14364pub enum JsonRpcRequestForExperimentalReceiptMethod {
14365 #[serde(rename = "EXPERIMENTAL_receipt")]
14366 ExperimentalReceipt,
14367}
14368impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalReceiptMethod {
14369 fn from(value: &JsonRpcRequestForExperimentalReceiptMethod) -> Self {
14370 value.clone()
14371 }
14372}
14373impl ::std::fmt::Display for JsonRpcRequestForExperimentalReceiptMethod {
14374 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14375 match *self {
14376 Self::ExperimentalReceipt => f.write_str("EXPERIMENTAL_receipt"),
14377 }
14378 }
14379}
14380impl ::std::str::FromStr for JsonRpcRequestForExperimentalReceiptMethod {
14381 type Err = self::error::ConversionError;
14382 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14383 match value {
14384 "EXPERIMENTAL_receipt" => Ok(Self::ExperimentalReceipt),
14385 _ => Err("invalid value".into()),
14386 }
14387 }
14388}
14389impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalReceiptMethod {
14390 type Error = self::error::ConversionError;
14391 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14392 value.parse()
14393 }
14394}
14395impl ::std::convert::TryFrom<&::std::string::String>
14396 for JsonRpcRequestForExperimentalReceiptMethod
14397{
14398 type Error = self::error::ConversionError;
14399 fn try_from(
14400 value: &::std::string::String,
14401 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14402 value.parse()
14403 }
14404}
14405impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalReceiptMethod {
14406 type Error = self::error::ConversionError;
14407 fn try_from(
14408 value: ::std::string::String,
14409 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14410 value.parse()
14411 }
14412}
14413#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfo`"]
14414#[doc = r""]
14415#[doc = r" <details><summary>JSON schema</summary>"]
14416#[doc = r""]
14417#[doc = r" ```json"]
14418#[doc = "{"]
14419#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_split_storage_info\","]
14420#[doc = " \"type\": \"object\","]
14421#[doc = " \"required\": ["]
14422#[doc = " \"id\","]
14423#[doc = " \"jsonrpc\","]
14424#[doc = " \"method\","]
14425#[doc = " \"params\""]
14426#[doc = " ],"]
14427#[doc = " \"properties\": {"]
14428#[doc = " \"id\": {"]
14429#[doc = " \"type\": \"string\""]
14430#[doc = " },"]
14431#[doc = " \"jsonrpc\": {"]
14432#[doc = " \"type\": \"string\""]
14433#[doc = " },"]
14434#[doc = " \"method\": {"]
14435#[doc = " \"type\": \"string\","]
14436#[doc = " \"enum\": ["]
14437#[doc = " \"EXPERIMENTAL_split_storage_info\""]
14438#[doc = " ]"]
14439#[doc = " },"]
14440#[doc = " \"params\": {"]
14441#[doc = " \"$ref\": \"#/components/schemas/RpcSplitStorageInfoRequest\""]
14442#[doc = " }"]
14443#[doc = " }"]
14444#[doc = "}"]
14445#[doc = r" ```"]
14446#[doc = r" </details>"]
14447#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14448pub struct JsonRpcRequestForExperimentalSplitStorageInfo {
14449 pub id: ::std::string::String,
14450 pub jsonrpc: ::std::string::String,
14451 pub method: JsonRpcRequestForExperimentalSplitStorageInfoMethod,
14452 pub params: RpcSplitStorageInfoRequest,
14453}
14454impl ::std::convert::From<&JsonRpcRequestForExperimentalSplitStorageInfo>
14455 for JsonRpcRequestForExperimentalSplitStorageInfo
14456{
14457 fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfo) -> Self {
14458 value.clone()
14459 }
14460}
14461#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfoMethod`"]
14462#[doc = r""]
14463#[doc = r" <details><summary>JSON schema</summary>"]
14464#[doc = r""]
14465#[doc = r" ```json"]
14466#[doc = "{"]
14467#[doc = " \"type\": \"string\","]
14468#[doc = " \"enum\": ["]
14469#[doc = " \"EXPERIMENTAL_split_storage_info\""]
14470#[doc = " ]"]
14471#[doc = "}"]
14472#[doc = r" ```"]
14473#[doc = r" </details>"]
14474#[derive(
14475 :: serde :: Deserialize,
14476 :: serde :: Serialize,
14477 Clone,
14478 Copy,
14479 Debug,
14480 Eq,
14481 Hash,
14482 Ord,
14483 PartialEq,
14484 PartialOrd,
14485)]
14486pub enum JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14487 #[serde(rename = "EXPERIMENTAL_split_storage_info")]
14488 ExperimentalSplitStorageInfo,
14489}
14490impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14491 fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfoMethod) -> Self {
14492 value.clone()
14493 }
14494}
14495impl ::std::fmt::Display for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14496 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14497 match *self {
14498 Self::ExperimentalSplitStorageInfo => f.write_str("EXPERIMENTAL_split_storage_info"),
14499 }
14500 }
14501}
14502impl ::std::str::FromStr for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14503 type Err = self::error::ConversionError;
14504 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14505 match value {
14506 "EXPERIMENTAL_split_storage_info" => Ok(Self::ExperimentalSplitStorageInfo),
14507 _ => Err("invalid value".into()),
14508 }
14509 }
14510}
14511impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
14512 type Error = self::error::ConversionError;
14513 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14514 value.parse()
14515 }
14516}
14517impl ::std::convert::TryFrom<&::std::string::String>
14518 for JsonRpcRequestForExperimentalSplitStorageInfoMethod
14519{
14520 type Error = self::error::ConversionError;
14521 fn try_from(
14522 value: &::std::string::String,
14523 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14524 value.parse()
14525 }
14526}
14527impl ::std::convert::TryFrom<::std::string::String>
14528 for JsonRpcRequestForExperimentalSplitStorageInfoMethod
14529{
14530 type Error = self::error::ConversionError;
14531 fn try_from(
14532 value: ::std::string::String,
14533 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14534 value.parse()
14535 }
14536}
14537#[doc = "`JsonRpcRequestForExperimentalTxStatus`"]
14538#[doc = r""]
14539#[doc = r" <details><summary>JSON schema</summary>"]
14540#[doc = r""]
14541#[doc = r" ```json"]
14542#[doc = "{"]
14543#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_tx_status\","]
14544#[doc = " \"type\": \"object\","]
14545#[doc = " \"required\": ["]
14546#[doc = " \"id\","]
14547#[doc = " \"jsonrpc\","]
14548#[doc = " \"method\","]
14549#[doc = " \"params\""]
14550#[doc = " ],"]
14551#[doc = " \"properties\": {"]
14552#[doc = " \"id\": {"]
14553#[doc = " \"type\": \"string\""]
14554#[doc = " },"]
14555#[doc = " \"jsonrpc\": {"]
14556#[doc = " \"type\": \"string\""]
14557#[doc = " },"]
14558#[doc = " \"method\": {"]
14559#[doc = " \"type\": \"string\","]
14560#[doc = " \"enum\": ["]
14561#[doc = " \"EXPERIMENTAL_tx_status\""]
14562#[doc = " ]"]
14563#[doc = " },"]
14564#[doc = " \"params\": {"]
14565#[doc = " \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
14566#[doc = " }"]
14567#[doc = " }"]
14568#[doc = "}"]
14569#[doc = r" ```"]
14570#[doc = r" </details>"]
14571#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14572pub struct JsonRpcRequestForExperimentalTxStatus {
14573 pub id: ::std::string::String,
14574 pub jsonrpc: ::std::string::String,
14575 pub method: JsonRpcRequestForExperimentalTxStatusMethod,
14576 pub params: RpcTransactionStatusRequest,
14577}
14578impl ::std::convert::From<&JsonRpcRequestForExperimentalTxStatus>
14579 for JsonRpcRequestForExperimentalTxStatus
14580{
14581 fn from(value: &JsonRpcRequestForExperimentalTxStatus) -> Self {
14582 value.clone()
14583 }
14584}
14585#[doc = "`JsonRpcRequestForExperimentalTxStatusMethod`"]
14586#[doc = r""]
14587#[doc = r" <details><summary>JSON schema</summary>"]
14588#[doc = r""]
14589#[doc = r" ```json"]
14590#[doc = "{"]
14591#[doc = " \"type\": \"string\","]
14592#[doc = " \"enum\": ["]
14593#[doc = " \"EXPERIMENTAL_tx_status\""]
14594#[doc = " ]"]
14595#[doc = "}"]
14596#[doc = r" ```"]
14597#[doc = r" </details>"]
14598#[derive(
14599 :: serde :: Deserialize,
14600 :: serde :: Serialize,
14601 Clone,
14602 Copy,
14603 Debug,
14604 Eq,
14605 Hash,
14606 Ord,
14607 PartialEq,
14608 PartialOrd,
14609)]
14610pub enum JsonRpcRequestForExperimentalTxStatusMethod {
14611 #[serde(rename = "EXPERIMENTAL_tx_status")]
14612 ExperimentalTxStatus,
14613}
14614impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalTxStatusMethod {
14615 fn from(value: &JsonRpcRequestForExperimentalTxStatusMethod) -> Self {
14616 value.clone()
14617 }
14618}
14619impl ::std::fmt::Display for JsonRpcRequestForExperimentalTxStatusMethod {
14620 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14621 match *self {
14622 Self::ExperimentalTxStatus => f.write_str("EXPERIMENTAL_tx_status"),
14623 }
14624 }
14625}
14626impl ::std::str::FromStr for JsonRpcRequestForExperimentalTxStatusMethod {
14627 type Err = self::error::ConversionError;
14628 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14629 match value {
14630 "EXPERIMENTAL_tx_status" => Ok(Self::ExperimentalTxStatus),
14631 _ => Err("invalid value".into()),
14632 }
14633 }
14634}
14635impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalTxStatusMethod {
14636 type Error = self::error::ConversionError;
14637 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14638 value.parse()
14639 }
14640}
14641impl ::std::convert::TryFrom<&::std::string::String>
14642 for JsonRpcRequestForExperimentalTxStatusMethod
14643{
14644 type Error = self::error::ConversionError;
14645 fn try_from(
14646 value: &::std::string::String,
14647 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14648 value.parse()
14649 }
14650}
14651impl ::std::convert::TryFrom<::std::string::String>
14652 for JsonRpcRequestForExperimentalTxStatusMethod
14653{
14654 type Error = self::error::ConversionError;
14655 fn try_from(
14656 value: ::std::string::String,
14657 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14658 value.parse()
14659 }
14660}
14661#[doc = "`JsonRpcRequestForExperimentalValidatorsOrdered`"]
14662#[doc = r""]
14663#[doc = r" <details><summary>JSON schema</summary>"]
14664#[doc = r""]
14665#[doc = r" ```json"]
14666#[doc = "{"]
14667#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_validators_ordered\","]
14668#[doc = " \"type\": \"object\","]
14669#[doc = " \"required\": ["]
14670#[doc = " \"id\","]
14671#[doc = " \"jsonrpc\","]
14672#[doc = " \"method\","]
14673#[doc = " \"params\""]
14674#[doc = " ],"]
14675#[doc = " \"properties\": {"]
14676#[doc = " \"id\": {"]
14677#[doc = " \"type\": \"string\""]
14678#[doc = " },"]
14679#[doc = " \"jsonrpc\": {"]
14680#[doc = " \"type\": \"string\""]
14681#[doc = " },"]
14682#[doc = " \"method\": {"]
14683#[doc = " \"type\": \"string\","]
14684#[doc = " \"enum\": ["]
14685#[doc = " \"EXPERIMENTAL_validators_ordered\""]
14686#[doc = " ]"]
14687#[doc = " },"]
14688#[doc = " \"params\": {"]
14689#[doc = " \"$ref\": \"#/components/schemas/RpcValidatorsOrderedRequest\""]
14690#[doc = " }"]
14691#[doc = " }"]
14692#[doc = "}"]
14693#[doc = r" ```"]
14694#[doc = r" </details>"]
14695#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14696pub struct JsonRpcRequestForExperimentalValidatorsOrdered {
14697 pub id: ::std::string::String,
14698 pub jsonrpc: ::std::string::String,
14699 pub method: JsonRpcRequestForExperimentalValidatorsOrderedMethod,
14700 pub params: RpcValidatorsOrderedRequest,
14701}
14702impl ::std::convert::From<&JsonRpcRequestForExperimentalValidatorsOrdered>
14703 for JsonRpcRequestForExperimentalValidatorsOrdered
14704{
14705 fn from(value: &JsonRpcRequestForExperimentalValidatorsOrdered) -> Self {
14706 value.clone()
14707 }
14708}
14709#[doc = "`JsonRpcRequestForExperimentalValidatorsOrderedMethod`"]
14710#[doc = r""]
14711#[doc = r" <details><summary>JSON schema</summary>"]
14712#[doc = r""]
14713#[doc = r" ```json"]
14714#[doc = "{"]
14715#[doc = " \"type\": \"string\","]
14716#[doc = " \"enum\": ["]
14717#[doc = " \"EXPERIMENTAL_validators_ordered\""]
14718#[doc = " ]"]
14719#[doc = "}"]
14720#[doc = r" ```"]
14721#[doc = r" </details>"]
14722#[derive(
14723 :: serde :: Deserialize,
14724 :: serde :: Serialize,
14725 Clone,
14726 Copy,
14727 Debug,
14728 Eq,
14729 Hash,
14730 Ord,
14731 PartialEq,
14732 PartialOrd,
14733)]
14734pub enum JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14735 #[serde(rename = "EXPERIMENTAL_validators_ordered")]
14736 ExperimentalValidatorsOrdered,
14737}
14738impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14739 fn from(value: &JsonRpcRequestForExperimentalValidatorsOrderedMethod) -> Self {
14740 value.clone()
14741 }
14742}
14743impl ::std::fmt::Display for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14744 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14745 match *self {
14746 Self::ExperimentalValidatorsOrdered => f.write_str("EXPERIMENTAL_validators_ordered"),
14747 }
14748 }
14749}
14750impl ::std::str::FromStr for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14751 type Err = self::error::ConversionError;
14752 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14753 match value {
14754 "EXPERIMENTAL_validators_ordered" => Ok(Self::ExperimentalValidatorsOrdered),
14755 _ => Err("invalid value".into()),
14756 }
14757 }
14758}
14759impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
14760 type Error = self::error::ConversionError;
14761 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14762 value.parse()
14763 }
14764}
14765impl ::std::convert::TryFrom<&::std::string::String>
14766 for JsonRpcRequestForExperimentalValidatorsOrderedMethod
14767{
14768 type Error = self::error::ConversionError;
14769 fn try_from(
14770 value: &::std::string::String,
14771 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14772 value.parse()
14773 }
14774}
14775impl ::std::convert::TryFrom<::std::string::String>
14776 for JsonRpcRequestForExperimentalValidatorsOrderedMethod
14777{
14778 type Error = self::error::ConversionError;
14779 fn try_from(
14780 value: ::std::string::String,
14781 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14782 value.parse()
14783 }
14784}
14785#[doc = "`JsonRpcRequestForGasPrice`"]
14786#[doc = r""]
14787#[doc = r" <details><summary>JSON schema</summary>"]
14788#[doc = r""]
14789#[doc = r" ```json"]
14790#[doc = "{"]
14791#[doc = " \"title\": \"JsonRpcRequest_for_gas_price\","]
14792#[doc = " \"type\": \"object\","]
14793#[doc = " \"required\": ["]
14794#[doc = " \"id\","]
14795#[doc = " \"jsonrpc\","]
14796#[doc = " \"method\","]
14797#[doc = " \"params\""]
14798#[doc = " ],"]
14799#[doc = " \"properties\": {"]
14800#[doc = " \"id\": {"]
14801#[doc = " \"type\": \"string\""]
14802#[doc = " },"]
14803#[doc = " \"jsonrpc\": {"]
14804#[doc = " \"type\": \"string\""]
14805#[doc = " },"]
14806#[doc = " \"method\": {"]
14807#[doc = " \"type\": \"string\","]
14808#[doc = " \"enum\": ["]
14809#[doc = " \"gas_price\""]
14810#[doc = " ]"]
14811#[doc = " },"]
14812#[doc = " \"params\": {"]
14813#[doc = " \"$ref\": \"#/components/schemas/RpcGasPriceRequest\""]
14814#[doc = " }"]
14815#[doc = " }"]
14816#[doc = "}"]
14817#[doc = r" ```"]
14818#[doc = r" </details>"]
14819#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14820pub struct JsonRpcRequestForGasPrice {
14821 pub id: ::std::string::String,
14822 pub jsonrpc: ::std::string::String,
14823 pub method: JsonRpcRequestForGasPriceMethod,
14824 pub params: RpcGasPriceRequest,
14825}
14826impl ::std::convert::From<&JsonRpcRequestForGasPrice> for JsonRpcRequestForGasPrice {
14827 fn from(value: &JsonRpcRequestForGasPrice) -> Self {
14828 value.clone()
14829 }
14830}
14831#[doc = "`JsonRpcRequestForGasPriceMethod`"]
14832#[doc = r""]
14833#[doc = r" <details><summary>JSON schema</summary>"]
14834#[doc = r""]
14835#[doc = r" ```json"]
14836#[doc = "{"]
14837#[doc = " \"type\": \"string\","]
14838#[doc = " \"enum\": ["]
14839#[doc = " \"gas_price\""]
14840#[doc = " ]"]
14841#[doc = "}"]
14842#[doc = r" ```"]
14843#[doc = r" </details>"]
14844#[derive(
14845 :: serde :: Deserialize,
14846 :: serde :: Serialize,
14847 Clone,
14848 Copy,
14849 Debug,
14850 Eq,
14851 Hash,
14852 Ord,
14853 PartialEq,
14854 PartialOrd,
14855)]
14856pub enum JsonRpcRequestForGasPriceMethod {
14857 #[serde(rename = "gas_price")]
14858 GasPrice,
14859}
14860impl ::std::convert::From<&Self> for JsonRpcRequestForGasPriceMethod {
14861 fn from(value: &JsonRpcRequestForGasPriceMethod) -> Self {
14862 value.clone()
14863 }
14864}
14865impl ::std::fmt::Display for JsonRpcRequestForGasPriceMethod {
14866 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14867 match *self {
14868 Self::GasPrice => f.write_str("gas_price"),
14869 }
14870 }
14871}
14872impl ::std::str::FromStr for JsonRpcRequestForGasPriceMethod {
14873 type Err = self::error::ConversionError;
14874 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14875 match value {
14876 "gas_price" => Ok(Self::GasPrice),
14877 _ => Err("invalid value".into()),
14878 }
14879 }
14880}
14881impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGasPriceMethod {
14882 type Error = self::error::ConversionError;
14883 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14884 value.parse()
14885 }
14886}
14887impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGasPriceMethod {
14888 type Error = self::error::ConversionError;
14889 fn try_from(
14890 value: &::std::string::String,
14891 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14892 value.parse()
14893 }
14894}
14895impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGasPriceMethod {
14896 type Error = self::error::ConversionError;
14897 fn try_from(
14898 value: ::std::string::String,
14899 ) -> ::std::result::Result<Self, self::error::ConversionError> {
14900 value.parse()
14901 }
14902}
14903#[doc = "`JsonRpcRequestForGenesisConfig`"]
14904#[doc = r""]
14905#[doc = r" <details><summary>JSON schema</summary>"]
14906#[doc = r""]
14907#[doc = r" ```json"]
14908#[doc = "{"]
14909#[doc = " \"title\": \"JsonRpcRequest_for_genesis_config\","]
14910#[doc = " \"type\": \"object\","]
14911#[doc = " \"required\": ["]
14912#[doc = " \"id\","]
14913#[doc = " \"jsonrpc\","]
14914#[doc = " \"method\","]
14915#[doc = " \"params\""]
14916#[doc = " ],"]
14917#[doc = " \"properties\": {"]
14918#[doc = " \"id\": {"]
14919#[doc = " \"type\": \"string\""]
14920#[doc = " },"]
14921#[doc = " \"jsonrpc\": {"]
14922#[doc = " \"type\": \"string\""]
14923#[doc = " },"]
14924#[doc = " \"method\": {"]
14925#[doc = " \"type\": \"string\","]
14926#[doc = " \"enum\": ["]
14927#[doc = " \"genesis_config\""]
14928#[doc = " ]"]
14929#[doc = " },"]
14930#[doc = " \"params\": {"]
14931#[doc = " \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
14932#[doc = " }"]
14933#[doc = " }"]
14934#[doc = "}"]
14935#[doc = r" ```"]
14936#[doc = r" </details>"]
14937#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14938pub struct JsonRpcRequestForGenesisConfig {
14939 pub id: ::std::string::String,
14940 pub jsonrpc: ::std::string::String,
14941 pub method: JsonRpcRequestForGenesisConfigMethod,
14942 pub params: GenesisConfigRequest,
14943}
14944impl ::std::convert::From<&JsonRpcRequestForGenesisConfig> for JsonRpcRequestForGenesisConfig {
14945 fn from(value: &JsonRpcRequestForGenesisConfig) -> Self {
14946 value.clone()
14947 }
14948}
14949#[doc = "`JsonRpcRequestForGenesisConfigMethod`"]
14950#[doc = r""]
14951#[doc = r" <details><summary>JSON schema</summary>"]
14952#[doc = r""]
14953#[doc = r" ```json"]
14954#[doc = "{"]
14955#[doc = " \"type\": \"string\","]
14956#[doc = " \"enum\": ["]
14957#[doc = " \"genesis_config\""]
14958#[doc = " ]"]
14959#[doc = "}"]
14960#[doc = r" ```"]
14961#[doc = r" </details>"]
14962#[derive(
14963 :: serde :: Deserialize,
14964 :: serde :: Serialize,
14965 Clone,
14966 Copy,
14967 Debug,
14968 Eq,
14969 Hash,
14970 Ord,
14971 PartialEq,
14972 PartialOrd,
14973)]
14974pub enum JsonRpcRequestForGenesisConfigMethod {
14975 #[serde(rename = "genesis_config")]
14976 GenesisConfig,
14977}
14978impl ::std::convert::From<&Self> for JsonRpcRequestForGenesisConfigMethod {
14979 fn from(value: &JsonRpcRequestForGenesisConfigMethod) -> Self {
14980 value.clone()
14981 }
14982}
14983impl ::std::fmt::Display for JsonRpcRequestForGenesisConfigMethod {
14984 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14985 match *self {
14986 Self::GenesisConfig => f.write_str("genesis_config"),
14987 }
14988 }
14989}
14990impl ::std::str::FromStr for JsonRpcRequestForGenesisConfigMethod {
14991 type Err = self::error::ConversionError;
14992 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14993 match value {
14994 "genesis_config" => Ok(Self::GenesisConfig),
14995 _ => Err("invalid value".into()),
14996 }
14997 }
14998}
14999impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGenesisConfigMethod {
15000 type Error = self::error::ConversionError;
15001 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15002 value.parse()
15003 }
15004}
15005impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
15006 type Error = self::error::ConversionError;
15007 fn try_from(
15008 value: &::std::string::String,
15009 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15010 value.parse()
15011 }
15012}
15013impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGenesisConfigMethod {
15014 type Error = self::error::ConversionError;
15015 fn try_from(
15016 value: ::std::string::String,
15017 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15018 value.parse()
15019 }
15020}
15021#[doc = "`JsonRpcRequestForHealth`"]
15022#[doc = r""]
15023#[doc = r" <details><summary>JSON schema</summary>"]
15024#[doc = r""]
15025#[doc = r" ```json"]
15026#[doc = "{"]
15027#[doc = " \"title\": \"JsonRpcRequest_for_health\","]
15028#[doc = " \"type\": \"object\","]
15029#[doc = " \"required\": ["]
15030#[doc = " \"id\","]
15031#[doc = " \"jsonrpc\","]
15032#[doc = " \"method\","]
15033#[doc = " \"params\""]
15034#[doc = " ],"]
15035#[doc = " \"properties\": {"]
15036#[doc = " \"id\": {"]
15037#[doc = " \"type\": \"string\""]
15038#[doc = " },"]
15039#[doc = " \"jsonrpc\": {"]
15040#[doc = " \"type\": \"string\""]
15041#[doc = " },"]
15042#[doc = " \"method\": {"]
15043#[doc = " \"type\": \"string\","]
15044#[doc = " \"enum\": ["]
15045#[doc = " \"health\""]
15046#[doc = " ]"]
15047#[doc = " },"]
15048#[doc = " \"params\": {"]
15049#[doc = " \"$ref\": \"#/components/schemas/RpcHealthRequest\""]
15050#[doc = " }"]
15051#[doc = " }"]
15052#[doc = "}"]
15053#[doc = r" ```"]
15054#[doc = r" </details>"]
15055#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15056pub struct JsonRpcRequestForHealth {
15057 pub id: ::std::string::String,
15058 pub jsonrpc: ::std::string::String,
15059 pub method: JsonRpcRequestForHealthMethod,
15060 pub params: RpcHealthRequest,
15061}
15062impl ::std::convert::From<&JsonRpcRequestForHealth> for JsonRpcRequestForHealth {
15063 fn from(value: &JsonRpcRequestForHealth) -> Self {
15064 value.clone()
15065 }
15066}
15067#[doc = "`JsonRpcRequestForHealthMethod`"]
15068#[doc = r""]
15069#[doc = r" <details><summary>JSON schema</summary>"]
15070#[doc = r""]
15071#[doc = r" ```json"]
15072#[doc = "{"]
15073#[doc = " \"type\": \"string\","]
15074#[doc = " \"enum\": ["]
15075#[doc = " \"health\""]
15076#[doc = " ]"]
15077#[doc = "}"]
15078#[doc = r" ```"]
15079#[doc = r" </details>"]
15080#[derive(
15081 :: serde :: Deserialize,
15082 :: serde :: Serialize,
15083 Clone,
15084 Copy,
15085 Debug,
15086 Eq,
15087 Hash,
15088 Ord,
15089 PartialEq,
15090 PartialOrd,
15091)]
15092pub enum JsonRpcRequestForHealthMethod {
15093 #[serde(rename = "health")]
15094 Health,
15095}
15096impl ::std::convert::From<&Self> for JsonRpcRequestForHealthMethod {
15097 fn from(value: &JsonRpcRequestForHealthMethod) -> Self {
15098 value.clone()
15099 }
15100}
15101impl ::std::fmt::Display for JsonRpcRequestForHealthMethod {
15102 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15103 match *self {
15104 Self::Health => f.write_str("health"),
15105 }
15106 }
15107}
15108impl ::std::str::FromStr for JsonRpcRequestForHealthMethod {
15109 type Err = self::error::ConversionError;
15110 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15111 match value {
15112 "health" => Ok(Self::Health),
15113 _ => Err("invalid value".into()),
15114 }
15115 }
15116}
15117impl ::std::convert::TryFrom<&str> for JsonRpcRequestForHealthMethod {
15118 type Error = self::error::ConversionError;
15119 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15120 value.parse()
15121 }
15122}
15123impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForHealthMethod {
15124 type Error = self::error::ConversionError;
15125 fn try_from(
15126 value: &::std::string::String,
15127 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15128 value.parse()
15129 }
15130}
15131impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForHealthMethod {
15132 type Error = self::error::ConversionError;
15133 fn try_from(
15134 value: ::std::string::String,
15135 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15136 value.parse()
15137 }
15138}
15139#[doc = "`JsonRpcRequestForLightClientProof`"]
15140#[doc = r""]
15141#[doc = r" <details><summary>JSON schema</summary>"]
15142#[doc = r""]
15143#[doc = r" ```json"]
15144#[doc = "{"]
15145#[doc = " \"title\": \"JsonRpcRequest_for_light_client_proof\","]
15146#[doc = " \"type\": \"object\","]
15147#[doc = " \"required\": ["]
15148#[doc = " \"id\","]
15149#[doc = " \"jsonrpc\","]
15150#[doc = " \"method\","]
15151#[doc = " \"params\""]
15152#[doc = " ],"]
15153#[doc = " \"properties\": {"]
15154#[doc = " \"id\": {"]
15155#[doc = " \"type\": \"string\""]
15156#[doc = " },"]
15157#[doc = " \"jsonrpc\": {"]
15158#[doc = " \"type\": \"string\""]
15159#[doc = " },"]
15160#[doc = " \"method\": {"]
15161#[doc = " \"type\": \"string\","]
15162#[doc = " \"enum\": ["]
15163#[doc = " \"light_client_proof\""]
15164#[doc = " ]"]
15165#[doc = " },"]
15166#[doc = " \"params\": {"]
15167#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
15168#[doc = " }"]
15169#[doc = " }"]
15170#[doc = "}"]
15171#[doc = r" ```"]
15172#[doc = r" </details>"]
15173#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15174pub struct JsonRpcRequestForLightClientProof {
15175 pub id: ::std::string::String,
15176 pub jsonrpc: ::std::string::String,
15177 pub method: JsonRpcRequestForLightClientProofMethod,
15178 pub params: RpcLightClientExecutionProofRequest,
15179}
15180impl ::std::convert::From<&JsonRpcRequestForLightClientProof>
15181 for JsonRpcRequestForLightClientProof
15182{
15183 fn from(value: &JsonRpcRequestForLightClientProof) -> Self {
15184 value.clone()
15185 }
15186}
15187#[doc = "`JsonRpcRequestForLightClientProofMethod`"]
15188#[doc = r""]
15189#[doc = r" <details><summary>JSON schema</summary>"]
15190#[doc = r""]
15191#[doc = r" ```json"]
15192#[doc = "{"]
15193#[doc = " \"type\": \"string\","]
15194#[doc = " \"enum\": ["]
15195#[doc = " \"light_client_proof\""]
15196#[doc = " ]"]
15197#[doc = "}"]
15198#[doc = r" ```"]
15199#[doc = r" </details>"]
15200#[derive(
15201 :: serde :: Deserialize,
15202 :: serde :: Serialize,
15203 Clone,
15204 Copy,
15205 Debug,
15206 Eq,
15207 Hash,
15208 Ord,
15209 PartialEq,
15210 PartialOrd,
15211)]
15212pub enum JsonRpcRequestForLightClientProofMethod {
15213 #[serde(rename = "light_client_proof")]
15214 LightClientProof,
15215}
15216impl ::std::convert::From<&Self> for JsonRpcRequestForLightClientProofMethod {
15217 fn from(value: &JsonRpcRequestForLightClientProofMethod) -> Self {
15218 value.clone()
15219 }
15220}
15221impl ::std::fmt::Display for JsonRpcRequestForLightClientProofMethod {
15222 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15223 match *self {
15224 Self::LightClientProof => f.write_str("light_client_proof"),
15225 }
15226 }
15227}
15228impl ::std::str::FromStr for JsonRpcRequestForLightClientProofMethod {
15229 type Err = self::error::ConversionError;
15230 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15231 match value {
15232 "light_client_proof" => Ok(Self::LightClientProof),
15233 _ => Err("invalid value".into()),
15234 }
15235 }
15236}
15237impl ::std::convert::TryFrom<&str> for JsonRpcRequestForLightClientProofMethod {
15238 type Error = self::error::ConversionError;
15239 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15240 value.parse()
15241 }
15242}
15243impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForLightClientProofMethod {
15244 type Error = self::error::ConversionError;
15245 fn try_from(
15246 value: &::std::string::String,
15247 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15248 value.parse()
15249 }
15250}
15251impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForLightClientProofMethod {
15252 type Error = self::error::ConversionError;
15253 fn try_from(
15254 value: ::std::string::String,
15255 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15256 value.parse()
15257 }
15258}
15259#[doc = "`JsonRpcRequestForMaintenanceWindows`"]
15260#[doc = r""]
15261#[doc = r" <details><summary>JSON schema</summary>"]
15262#[doc = r""]
15263#[doc = r" ```json"]
15264#[doc = "{"]
15265#[doc = " \"title\": \"JsonRpcRequest_for_maintenance_windows\","]
15266#[doc = " \"type\": \"object\","]
15267#[doc = " \"required\": ["]
15268#[doc = " \"id\","]
15269#[doc = " \"jsonrpc\","]
15270#[doc = " \"method\","]
15271#[doc = " \"params\""]
15272#[doc = " ],"]
15273#[doc = " \"properties\": {"]
15274#[doc = " \"id\": {"]
15275#[doc = " \"type\": \"string\""]
15276#[doc = " },"]
15277#[doc = " \"jsonrpc\": {"]
15278#[doc = " \"type\": \"string\""]
15279#[doc = " },"]
15280#[doc = " \"method\": {"]
15281#[doc = " \"type\": \"string\","]
15282#[doc = " \"enum\": ["]
15283#[doc = " \"maintenance_windows\""]
15284#[doc = " ]"]
15285#[doc = " },"]
15286#[doc = " \"params\": {"]
15287#[doc = " \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
15288#[doc = " }"]
15289#[doc = " }"]
15290#[doc = "}"]
15291#[doc = r" ```"]
15292#[doc = r" </details>"]
15293#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15294pub struct JsonRpcRequestForMaintenanceWindows {
15295 pub id: ::std::string::String,
15296 pub jsonrpc: ::std::string::String,
15297 pub method: JsonRpcRequestForMaintenanceWindowsMethod,
15298 pub params: RpcMaintenanceWindowsRequest,
15299}
15300impl ::std::convert::From<&JsonRpcRequestForMaintenanceWindows>
15301 for JsonRpcRequestForMaintenanceWindows
15302{
15303 fn from(value: &JsonRpcRequestForMaintenanceWindows) -> Self {
15304 value.clone()
15305 }
15306}
15307#[doc = "`JsonRpcRequestForMaintenanceWindowsMethod`"]
15308#[doc = r""]
15309#[doc = r" <details><summary>JSON schema</summary>"]
15310#[doc = r""]
15311#[doc = r" ```json"]
15312#[doc = "{"]
15313#[doc = " \"type\": \"string\","]
15314#[doc = " \"enum\": ["]
15315#[doc = " \"maintenance_windows\""]
15316#[doc = " ]"]
15317#[doc = "}"]
15318#[doc = r" ```"]
15319#[doc = r" </details>"]
15320#[derive(
15321 :: serde :: Deserialize,
15322 :: serde :: Serialize,
15323 Clone,
15324 Copy,
15325 Debug,
15326 Eq,
15327 Hash,
15328 Ord,
15329 PartialEq,
15330 PartialOrd,
15331)]
15332pub enum JsonRpcRequestForMaintenanceWindowsMethod {
15333 #[serde(rename = "maintenance_windows")]
15334 MaintenanceWindows,
15335}
15336impl ::std::convert::From<&Self> for JsonRpcRequestForMaintenanceWindowsMethod {
15337 fn from(value: &JsonRpcRequestForMaintenanceWindowsMethod) -> Self {
15338 value.clone()
15339 }
15340}
15341impl ::std::fmt::Display for JsonRpcRequestForMaintenanceWindowsMethod {
15342 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15343 match *self {
15344 Self::MaintenanceWindows => f.write_str("maintenance_windows"),
15345 }
15346 }
15347}
15348impl ::std::str::FromStr for JsonRpcRequestForMaintenanceWindowsMethod {
15349 type Err = self::error::ConversionError;
15350 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15351 match value {
15352 "maintenance_windows" => Ok(Self::MaintenanceWindows),
15353 _ => Err("invalid value".into()),
15354 }
15355 }
15356}
15357impl ::std::convert::TryFrom<&str> for JsonRpcRequestForMaintenanceWindowsMethod {
15358 type Error = self::error::ConversionError;
15359 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15360 value.parse()
15361 }
15362}
15363impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
15364 type Error = self::error::ConversionError;
15365 fn try_from(
15366 value: &::std::string::String,
15367 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15368 value.parse()
15369 }
15370}
15371impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForMaintenanceWindowsMethod {
15372 type Error = self::error::ConversionError;
15373 fn try_from(
15374 value: ::std::string::String,
15375 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15376 value.parse()
15377 }
15378}
15379#[doc = "`JsonRpcRequestForNetworkInfo`"]
15380#[doc = r""]
15381#[doc = r" <details><summary>JSON schema</summary>"]
15382#[doc = r""]
15383#[doc = r" ```json"]
15384#[doc = "{"]
15385#[doc = " \"title\": \"JsonRpcRequest_for_network_info\","]
15386#[doc = " \"type\": \"object\","]
15387#[doc = " \"required\": ["]
15388#[doc = " \"id\","]
15389#[doc = " \"jsonrpc\","]
15390#[doc = " \"method\","]
15391#[doc = " \"params\""]
15392#[doc = " ],"]
15393#[doc = " \"properties\": {"]
15394#[doc = " \"id\": {"]
15395#[doc = " \"type\": \"string\""]
15396#[doc = " },"]
15397#[doc = " \"jsonrpc\": {"]
15398#[doc = " \"type\": \"string\""]
15399#[doc = " },"]
15400#[doc = " \"method\": {"]
15401#[doc = " \"type\": \"string\","]
15402#[doc = " \"enum\": ["]
15403#[doc = " \"network_info\""]
15404#[doc = " ]"]
15405#[doc = " },"]
15406#[doc = " \"params\": {"]
15407#[doc = " \"$ref\": \"#/components/schemas/RpcNetworkInfoRequest\""]
15408#[doc = " }"]
15409#[doc = " }"]
15410#[doc = "}"]
15411#[doc = r" ```"]
15412#[doc = r" </details>"]
15413#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15414pub struct JsonRpcRequestForNetworkInfo {
15415 pub id: ::std::string::String,
15416 pub jsonrpc: ::std::string::String,
15417 pub method: JsonRpcRequestForNetworkInfoMethod,
15418 pub params: RpcNetworkInfoRequest,
15419}
15420impl ::std::convert::From<&JsonRpcRequestForNetworkInfo> for JsonRpcRequestForNetworkInfo {
15421 fn from(value: &JsonRpcRequestForNetworkInfo) -> Self {
15422 value.clone()
15423 }
15424}
15425#[doc = "`JsonRpcRequestForNetworkInfoMethod`"]
15426#[doc = r""]
15427#[doc = r" <details><summary>JSON schema</summary>"]
15428#[doc = r""]
15429#[doc = r" ```json"]
15430#[doc = "{"]
15431#[doc = " \"type\": \"string\","]
15432#[doc = " \"enum\": ["]
15433#[doc = " \"network_info\""]
15434#[doc = " ]"]
15435#[doc = "}"]
15436#[doc = r" ```"]
15437#[doc = r" </details>"]
15438#[derive(
15439 :: serde :: Deserialize,
15440 :: serde :: Serialize,
15441 Clone,
15442 Copy,
15443 Debug,
15444 Eq,
15445 Hash,
15446 Ord,
15447 PartialEq,
15448 PartialOrd,
15449)]
15450pub enum JsonRpcRequestForNetworkInfoMethod {
15451 #[serde(rename = "network_info")]
15452 NetworkInfo,
15453}
15454impl ::std::convert::From<&Self> for JsonRpcRequestForNetworkInfoMethod {
15455 fn from(value: &JsonRpcRequestForNetworkInfoMethod) -> Self {
15456 value.clone()
15457 }
15458}
15459impl ::std::fmt::Display for JsonRpcRequestForNetworkInfoMethod {
15460 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15461 match *self {
15462 Self::NetworkInfo => f.write_str("network_info"),
15463 }
15464 }
15465}
15466impl ::std::str::FromStr for JsonRpcRequestForNetworkInfoMethod {
15467 type Err = self::error::ConversionError;
15468 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15469 match value {
15470 "network_info" => Ok(Self::NetworkInfo),
15471 _ => Err("invalid value".into()),
15472 }
15473 }
15474}
15475impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNetworkInfoMethod {
15476 type Error = self::error::ConversionError;
15477 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15478 value.parse()
15479 }
15480}
15481impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
15482 type Error = self::error::ConversionError;
15483 fn try_from(
15484 value: &::std::string::String,
15485 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15486 value.parse()
15487 }
15488}
15489impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
15490 type Error = self::error::ConversionError;
15491 fn try_from(
15492 value: ::std::string::String,
15493 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15494 value.parse()
15495 }
15496}
15497#[doc = "`JsonRpcRequestForNextLightClientBlock`"]
15498#[doc = r""]
15499#[doc = r" <details><summary>JSON schema</summary>"]
15500#[doc = r""]
15501#[doc = r" ```json"]
15502#[doc = "{"]
15503#[doc = " \"title\": \"JsonRpcRequest_for_next_light_client_block\","]
15504#[doc = " \"type\": \"object\","]
15505#[doc = " \"required\": ["]
15506#[doc = " \"id\","]
15507#[doc = " \"jsonrpc\","]
15508#[doc = " \"method\","]
15509#[doc = " \"params\""]
15510#[doc = " ],"]
15511#[doc = " \"properties\": {"]
15512#[doc = " \"id\": {"]
15513#[doc = " \"type\": \"string\""]
15514#[doc = " },"]
15515#[doc = " \"jsonrpc\": {"]
15516#[doc = " \"type\": \"string\""]
15517#[doc = " },"]
15518#[doc = " \"method\": {"]
15519#[doc = " \"type\": \"string\","]
15520#[doc = " \"enum\": ["]
15521#[doc = " \"next_light_client_block\""]
15522#[doc = " ]"]
15523#[doc = " },"]
15524#[doc = " \"params\": {"]
15525#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientNextBlockRequest\""]
15526#[doc = " }"]
15527#[doc = " }"]
15528#[doc = "}"]
15529#[doc = r" ```"]
15530#[doc = r" </details>"]
15531#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15532pub struct JsonRpcRequestForNextLightClientBlock {
15533 pub id: ::std::string::String,
15534 pub jsonrpc: ::std::string::String,
15535 pub method: JsonRpcRequestForNextLightClientBlockMethod,
15536 pub params: RpcLightClientNextBlockRequest,
15537}
15538impl ::std::convert::From<&JsonRpcRequestForNextLightClientBlock>
15539 for JsonRpcRequestForNextLightClientBlock
15540{
15541 fn from(value: &JsonRpcRequestForNextLightClientBlock) -> Self {
15542 value.clone()
15543 }
15544}
15545#[doc = "`JsonRpcRequestForNextLightClientBlockMethod`"]
15546#[doc = r""]
15547#[doc = r" <details><summary>JSON schema</summary>"]
15548#[doc = r""]
15549#[doc = r" ```json"]
15550#[doc = "{"]
15551#[doc = " \"type\": \"string\","]
15552#[doc = " \"enum\": ["]
15553#[doc = " \"next_light_client_block\""]
15554#[doc = " ]"]
15555#[doc = "}"]
15556#[doc = r" ```"]
15557#[doc = r" </details>"]
15558#[derive(
15559 :: serde :: Deserialize,
15560 :: serde :: Serialize,
15561 Clone,
15562 Copy,
15563 Debug,
15564 Eq,
15565 Hash,
15566 Ord,
15567 PartialEq,
15568 PartialOrd,
15569)]
15570pub enum JsonRpcRequestForNextLightClientBlockMethod {
15571 #[serde(rename = "next_light_client_block")]
15572 NextLightClientBlock,
15573}
15574impl ::std::convert::From<&Self> for JsonRpcRequestForNextLightClientBlockMethod {
15575 fn from(value: &JsonRpcRequestForNextLightClientBlockMethod) -> Self {
15576 value.clone()
15577 }
15578}
15579impl ::std::fmt::Display for JsonRpcRequestForNextLightClientBlockMethod {
15580 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15581 match *self {
15582 Self::NextLightClientBlock => f.write_str("next_light_client_block"),
15583 }
15584 }
15585}
15586impl ::std::str::FromStr for JsonRpcRequestForNextLightClientBlockMethod {
15587 type Err = self::error::ConversionError;
15588 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15589 match value {
15590 "next_light_client_block" => Ok(Self::NextLightClientBlock),
15591 _ => Err("invalid value".into()),
15592 }
15593 }
15594}
15595impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNextLightClientBlockMethod {
15596 type Error = self::error::ConversionError;
15597 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15598 value.parse()
15599 }
15600}
15601impl ::std::convert::TryFrom<&::std::string::String>
15602 for JsonRpcRequestForNextLightClientBlockMethod
15603{
15604 type Error = self::error::ConversionError;
15605 fn try_from(
15606 value: &::std::string::String,
15607 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15608 value.parse()
15609 }
15610}
15611impl ::std::convert::TryFrom<::std::string::String>
15612 for JsonRpcRequestForNextLightClientBlockMethod
15613{
15614 type Error = self::error::ConversionError;
15615 fn try_from(
15616 value: ::std::string::String,
15617 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15618 value.parse()
15619 }
15620}
15621#[doc = "`JsonRpcRequestForQuery`"]
15622#[doc = r""]
15623#[doc = r" <details><summary>JSON schema</summary>"]
15624#[doc = r""]
15625#[doc = r" ```json"]
15626#[doc = "{"]
15627#[doc = " \"title\": \"JsonRpcRequest_for_query\","]
15628#[doc = " \"type\": \"object\","]
15629#[doc = " \"required\": ["]
15630#[doc = " \"id\","]
15631#[doc = " \"jsonrpc\","]
15632#[doc = " \"method\","]
15633#[doc = " \"params\""]
15634#[doc = " ],"]
15635#[doc = " \"properties\": {"]
15636#[doc = " \"id\": {"]
15637#[doc = " \"type\": \"string\""]
15638#[doc = " },"]
15639#[doc = " \"jsonrpc\": {"]
15640#[doc = " \"type\": \"string\""]
15641#[doc = " },"]
15642#[doc = " \"method\": {"]
15643#[doc = " \"type\": \"string\","]
15644#[doc = " \"enum\": ["]
15645#[doc = " \"query\""]
15646#[doc = " ]"]
15647#[doc = " },"]
15648#[doc = " \"params\": {"]
15649#[doc = " \"$ref\": \"#/components/schemas/RpcQueryRequest\""]
15650#[doc = " }"]
15651#[doc = " }"]
15652#[doc = "}"]
15653#[doc = r" ```"]
15654#[doc = r" </details>"]
15655#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15656pub struct JsonRpcRequestForQuery {
15657 pub id: ::std::string::String,
15658 pub jsonrpc: ::std::string::String,
15659 pub method: JsonRpcRequestForQueryMethod,
15660 pub params: RpcQueryRequest,
15661}
15662impl ::std::convert::From<&JsonRpcRequestForQuery> for JsonRpcRequestForQuery {
15663 fn from(value: &JsonRpcRequestForQuery) -> Self {
15664 value.clone()
15665 }
15666}
15667#[doc = "`JsonRpcRequestForQueryMethod`"]
15668#[doc = r""]
15669#[doc = r" <details><summary>JSON schema</summary>"]
15670#[doc = r""]
15671#[doc = r" ```json"]
15672#[doc = "{"]
15673#[doc = " \"type\": \"string\","]
15674#[doc = " \"enum\": ["]
15675#[doc = " \"query\""]
15676#[doc = " ]"]
15677#[doc = "}"]
15678#[doc = r" ```"]
15679#[doc = r" </details>"]
15680#[derive(
15681 :: serde :: Deserialize,
15682 :: serde :: Serialize,
15683 Clone,
15684 Copy,
15685 Debug,
15686 Eq,
15687 Hash,
15688 Ord,
15689 PartialEq,
15690 PartialOrd,
15691)]
15692pub enum JsonRpcRequestForQueryMethod {
15693 #[serde(rename = "query")]
15694 Query,
15695}
15696impl ::std::convert::From<&Self> for JsonRpcRequestForQueryMethod {
15697 fn from(value: &JsonRpcRequestForQueryMethod) -> Self {
15698 value.clone()
15699 }
15700}
15701impl ::std::fmt::Display for JsonRpcRequestForQueryMethod {
15702 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15703 match *self {
15704 Self::Query => f.write_str("query"),
15705 }
15706 }
15707}
15708impl ::std::str::FromStr for JsonRpcRequestForQueryMethod {
15709 type Err = self::error::ConversionError;
15710 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15711 match value {
15712 "query" => Ok(Self::Query),
15713 _ => Err("invalid value".into()),
15714 }
15715 }
15716}
15717impl ::std::convert::TryFrom<&str> for JsonRpcRequestForQueryMethod {
15718 type Error = self::error::ConversionError;
15719 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15720 value.parse()
15721 }
15722}
15723impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForQueryMethod {
15724 type Error = self::error::ConversionError;
15725 fn try_from(
15726 value: &::std::string::String,
15727 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15728 value.parse()
15729 }
15730}
15731impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForQueryMethod {
15732 type Error = self::error::ConversionError;
15733 fn try_from(
15734 value: ::std::string::String,
15735 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15736 value.parse()
15737 }
15738}
15739#[doc = "`JsonRpcRequestForSendTx`"]
15740#[doc = r""]
15741#[doc = r" <details><summary>JSON schema</summary>"]
15742#[doc = r""]
15743#[doc = r" ```json"]
15744#[doc = "{"]
15745#[doc = " \"title\": \"JsonRpcRequest_for_send_tx\","]
15746#[doc = " \"type\": \"object\","]
15747#[doc = " \"required\": ["]
15748#[doc = " \"id\","]
15749#[doc = " \"jsonrpc\","]
15750#[doc = " \"method\","]
15751#[doc = " \"params\""]
15752#[doc = " ],"]
15753#[doc = " \"properties\": {"]
15754#[doc = " \"id\": {"]
15755#[doc = " \"type\": \"string\""]
15756#[doc = " },"]
15757#[doc = " \"jsonrpc\": {"]
15758#[doc = " \"type\": \"string\""]
15759#[doc = " },"]
15760#[doc = " \"method\": {"]
15761#[doc = " \"type\": \"string\","]
15762#[doc = " \"enum\": ["]
15763#[doc = " \"send_tx\""]
15764#[doc = " ]"]
15765#[doc = " },"]
15766#[doc = " \"params\": {"]
15767#[doc = " \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
15768#[doc = " }"]
15769#[doc = " }"]
15770#[doc = "}"]
15771#[doc = r" ```"]
15772#[doc = r" </details>"]
15773#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15774pub struct JsonRpcRequestForSendTx {
15775 pub id: ::std::string::String,
15776 pub jsonrpc: ::std::string::String,
15777 pub method: JsonRpcRequestForSendTxMethod,
15778 pub params: RpcSendTransactionRequest,
15779}
15780impl ::std::convert::From<&JsonRpcRequestForSendTx> for JsonRpcRequestForSendTx {
15781 fn from(value: &JsonRpcRequestForSendTx) -> Self {
15782 value.clone()
15783 }
15784}
15785#[doc = "`JsonRpcRequestForSendTxMethod`"]
15786#[doc = r""]
15787#[doc = r" <details><summary>JSON schema</summary>"]
15788#[doc = r""]
15789#[doc = r" ```json"]
15790#[doc = "{"]
15791#[doc = " \"type\": \"string\","]
15792#[doc = " \"enum\": ["]
15793#[doc = " \"send_tx\""]
15794#[doc = " ]"]
15795#[doc = "}"]
15796#[doc = r" ```"]
15797#[doc = r" </details>"]
15798#[derive(
15799 :: serde :: Deserialize,
15800 :: serde :: Serialize,
15801 Clone,
15802 Copy,
15803 Debug,
15804 Eq,
15805 Hash,
15806 Ord,
15807 PartialEq,
15808 PartialOrd,
15809)]
15810pub enum JsonRpcRequestForSendTxMethod {
15811 #[serde(rename = "send_tx")]
15812 SendTx,
15813}
15814impl ::std::convert::From<&Self> for JsonRpcRequestForSendTxMethod {
15815 fn from(value: &JsonRpcRequestForSendTxMethod) -> Self {
15816 value.clone()
15817 }
15818}
15819impl ::std::fmt::Display for JsonRpcRequestForSendTxMethod {
15820 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15821 match *self {
15822 Self::SendTx => f.write_str("send_tx"),
15823 }
15824 }
15825}
15826impl ::std::str::FromStr for JsonRpcRequestForSendTxMethod {
15827 type Err = self::error::ConversionError;
15828 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15829 match value {
15830 "send_tx" => Ok(Self::SendTx),
15831 _ => Err("invalid value".into()),
15832 }
15833 }
15834}
15835impl ::std::convert::TryFrom<&str> for JsonRpcRequestForSendTxMethod {
15836 type Error = self::error::ConversionError;
15837 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15838 value.parse()
15839 }
15840}
15841impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForSendTxMethod {
15842 type Error = self::error::ConversionError;
15843 fn try_from(
15844 value: &::std::string::String,
15845 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15846 value.parse()
15847 }
15848}
15849impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForSendTxMethod {
15850 type Error = self::error::ConversionError;
15851 fn try_from(
15852 value: ::std::string::String,
15853 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15854 value.parse()
15855 }
15856}
15857#[doc = "`JsonRpcRequestForStatus`"]
15858#[doc = r""]
15859#[doc = r" <details><summary>JSON schema</summary>"]
15860#[doc = r""]
15861#[doc = r" ```json"]
15862#[doc = "{"]
15863#[doc = " \"title\": \"JsonRpcRequest_for_status\","]
15864#[doc = " \"type\": \"object\","]
15865#[doc = " \"required\": ["]
15866#[doc = " \"id\","]
15867#[doc = " \"jsonrpc\","]
15868#[doc = " \"method\","]
15869#[doc = " \"params\""]
15870#[doc = " ],"]
15871#[doc = " \"properties\": {"]
15872#[doc = " \"id\": {"]
15873#[doc = " \"type\": \"string\""]
15874#[doc = " },"]
15875#[doc = " \"jsonrpc\": {"]
15876#[doc = " \"type\": \"string\""]
15877#[doc = " },"]
15878#[doc = " \"method\": {"]
15879#[doc = " \"type\": \"string\","]
15880#[doc = " \"enum\": ["]
15881#[doc = " \"status\""]
15882#[doc = " ]"]
15883#[doc = " },"]
15884#[doc = " \"params\": {"]
15885#[doc = " \"$ref\": \"#/components/schemas/RpcStatusRequest\""]
15886#[doc = " }"]
15887#[doc = " }"]
15888#[doc = "}"]
15889#[doc = r" ```"]
15890#[doc = r" </details>"]
15891#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15892pub struct JsonRpcRequestForStatus {
15893 pub id: ::std::string::String,
15894 pub jsonrpc: ::std::string::String,
15895 pub method: JsonRpcRequestForStatusMethod,
15896 pub params: RpcStatusRequest,
15897}
15898impl ::std::convert::From<&JsonRpcRequestForStatus> for JsonRpcRequestForStatus {
15899 fn from(value: &JsonRpcRequestForStatus) -> Self {
15900 value.clone()
15901 }
15902}
15903#[doc = "`JsonRpcRequestForStatusMethod`"]
15904#[doc = r""]
15905#[doc = r" <details><summary>JSON schema</summary>"]
15906#[doc = r""]
15907#[doc = r" ```json"]
15908#[doc = "{"]
15909#[doc = " \"type\": \"string\","]
15910#[doc = " \"enum\": ["]
15911#[doc = " \"status\""]
15912#[doc = " ]"]
15913#[doc = "}"]
15914#[doc = r" ```"]
15915#[doc = r" </details>"]
15916#[derive(
15917 :: serde :: Deserialize,
15918 :: serde :: Serialize,
15919 Clone,
15920 Copy,
15921 Debug,
15922 Eq,
15923 Hash,
15924 Ord,
15925 PartialEq,
15926 PartialOrd,
15927)]
15928pub enum JsonRpcRequestForStatusMethod {
15929 #[serde(rename = "status")]
15930 Status,
15931}
15932impl ::std::convert::From<&Self> for JsonRpcRequestForStatusMethod {
15933 fn from(value: &JsonRpcRequestForStatusMethod) -> Self {
15934 value.clone()
15935 }
15936}
15937impl ::std::fmt::Display for JsonRpcRequestForStatusMethod {
15938 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15939 match *self {
15940 Self::Status => f.write_str("status"),
15941 }
15942 }
15943}
15944impl ::std::str::FromStr for JsonRpcRequestForStatusMethod {
15945 type Err = self::error::ConversionError;
15946 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15947 match value {
15948 "status" => Ok(Self::Status),
15949 _ => Err("invalid value".into()),
15950 }
15951 }
15952}
15953impl ::std::convert::TryFrom<&str> for JsonRpcRequestForStatusMethod {
15954 type Error = self::error::ConversionError;
15955 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15956 value.parse()
15957 }
15958}
15959impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForStatusMethod {
15960 type Error = self::error::ConversionError;
15961 fn try_from(
15962 value: &::std::string::String,
15963 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15964 value.parse()
15965 }
15966}
15967impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForStatusMethod {
15968 type Error = self::error::ConversionError;
15969 fn try_from(
15970 value: ::std::string::String,
15971 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15972 value.parse()
15973 }
15974}
15975#[doc = "`JsonRpcRequestForTx`"]
15976#[doc = r""]
15977#[doc = r" <details><summary>JSON schema</summary>"]
15978#[doc = r""]
15979#[doc = r" ```json"]
15980#[doc = "{"]
15981#[doc = " \"title\": \"JsonRpcRequest_for_tx\","]
15982#[doc = " \"type\": \"object\","]
15983#[doc = " \"required\": ["]
15984#[doc = " \"id\","]
15985#[doc = " \"jsonrpc\","]
15986#[doc = " \"method\","]
15987#[doc = " \"params\""]
15988#[doc = " ],"]
15989#[doc = " \"properties\": {"]
15990#[doc = " \"id\": {"]
15991#[doc = " \"type\": \"string\""]
15992#[doc = " },"]
15993#[doc = " \"jsonrpc\": {"]
15994#[doc = " \"type\": \"string\""]
15995#[doc = " },"]
15996#[doc = " \"method\": {"]
15997#[doc = " \"type\": \"string\","]
15998#[doc = " \"enum\": ["]
15999#[doc = " \"tx\""]
16000#[doc = " ]"]
16001#[doc = " },"]
16002#[doc = " \"params\": {"]
16003#[doc = " \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
16004#[doc = " }"]
16005#[doc = " }"]
16006#[doc = "}"]
16007#[doc = r" ```"]
16008#[doc = r" </details>"]
16009#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16010pub struct JsonRpcRequestForTx {
16011 pub id: ::std::string::String,
16012 pub jsonrpc: ::std::string::String,
16013 pub method: JsonRpcRequestForTxMethod,
16014 pub params: RpcTransactionStatusRequest,
16015}
16016impl ::std::convert::From<&JsonRpcRequestForTx> for JsonRpcRequestForTx {
16017 fn from(value: &JsonRpcRequestForTx) -> Self {
16018 value.clone()
16019 }
16020}
16021#[doc = "`JsonRpcRequestForTxMethod`"]
16022#[doc = r""]
16023#[doc = r" <details><summary>JSON schema</summary>"]
16024#[doc = r""]
16025#[doc = r" ```json"]
16026#[doc = "{"]
16027#[doc = " \"type\": \"string\","]
16028#[doc = " \"enum\": ["]
16029#[doc = " \"tx\""]
16030#[doc = " ]"]
16031#[doc = "}"]
16032#[doc = r" ```"]
16033#[doc = r" </details>"]
16034#[derive(
16035 :: serde :: Deserialize,
16036 :: serde :: Serialize,
16037 Clone,
16038 Copy,
16039 Debug,
16040 Eq,
16041 Hash,
16042 Ord,
16043 PartialEq,
16044 PartialOrd,
16045)]
16046pub enum JsonRpcRequestForTxMethod {
16047 #[serde(rename = "tx")]
16048 Tx,
16049}
16050impl ::std::convert::From<&Self> for JsonRpcRequestForTxMethod {
16051 fn from(value: &JsonRpcRequestForTxMethod) -> Self {
16052 value.clone()
16053 }
16054}
16055impl ::std::fmt::Display for JsonRpcRequestForTxMethod {
16056 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16057 match *self {
16058 Self::Tx => f.write_str("tx"),
16059 }
16060 }
16061}
16062impl ::std::str::FromStr for JsonRpcRequestForTxMethod {
16063 type Err = self::error::ConversionError;
16064 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16065 match value {
16066 "tx" => Ok(Self::Tx),
16067 _ => Err("invalid value".into()),
16068 }
16069 }
16070}
16071impl ::std::convert::TryFrom<&str> for JsonRpcRequestForTxMethod {
16072 type Error = self::error::ConversionError;
16073 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16074 value.parse()
16075 }
16076}
16077impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForTxMethod {
16078 type Error = self::error::ConversionError;
16079 fn try_from(
16080 value: &::std::string::String,
16081 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16082 value.parse()
16083 }
16084}
16085impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForTxMethod {
16086 type Error = self::error::ConversionError;
16087 fn try_from(
16088 value: ::std::string::String,
16089 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16090 value.parse()
16091 }
16092}
16093#[doc = "`JsonRpcRequestForValidators`"]
16094#[doc = r""]
16095#[doc = r" <details><summary>JSON schema</summary>"]
16096#[doc = r""]
16097#[doc = r" ```json"]
16098#[doc = "{"]
16099#[doc = " \"title\": \"JsonRpcRequest_for_validators\","]
16100#[doc = " \"type\": \"object\","]
16101#[doc = " \"required\": ["]
16102#[doc = " \"id\","]
16103#[doc = " \"jsonrpc\","]
16104#[doc = " \"method\","]
16105#[doc = " \"params\""]
16106#[doc = " ],"]
16107#[doc = " \"properties\": {"]
16108#[doc = " \"id\": {"]
16109#[doc = " \"type\": \"string\""]
16110#[doc = " },"]
16111#[doc = " \"jsonrpc\": {"]
16112#[doc = " \"type\": \"string\""]
16113#[doc = " },"]
16114#[doc = " \"method\": {"]
16115#[doc = " \"type\": \"string\","]
16116#[doc = " \"enum\": ["]
16117#[doc = " \"validators\""]
16118#[doc = " ]"]
16119#[doc = " },"]
16120#[doc = " \"params\": {"]
16121#[doc = " \"$ref\": \"#/components/schemas/RpcValidatorRequest\""]
16122#[doc = " }"]
16123#[doc = " }"]
16124#[doc = "}"]
16125#[doc = r" ```"]
16126#[doc = r" </details>"]
16127#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16128pub struct JsonRpcRequestForValidators {
16129 pub id: ::std::string::String,
16130 pub jsonrpc: ::std::string::String,
16131 pub method: JsonRpcRequestForValidatorsMethod,
16132 pub params: RpcValidatorRequest,
16133}
16134impl ::std::convert::From<&JsonRpcRequestForValidators> for JsonRpcRequestForValidators {
16135 fn from(value: &JsonRpcRequestForValidators) -> Self {
16136 value.clone()
16137 }
16138}
16139#[doc = "`JsonRpcRequestForValidatorsMethod`"]
16140#[doc = r""]
16141#[doc = r" <details><summary>JSON schema</summary>"]
16142#[doc = r""]
16143#[doc = r" ```json"]
16144#[doc = "{"]
16145#[doc = " \"type\": \"string\","]
16146#[doc = " \"enum\": ["]
16147#[doc = " \"validators\""]
16148#[doc = " ]"]
16149#[doc = "}"]
16150#[doc = r" ```"]
16151#[doc = r" </details>"]
16152#[derive(
16153 :: serde :: Deserialize,
16154 :: serde :: Serialize,
16155 Clone,
16156 Copy,
16157 Debug,
16158 Eq,
16159 Hash,
16160 Ord,
16161 PartialEq,
16162 PartialOrd,
16163)]
16164pub enum JsonRpcRequestForValidatorsMethod {
16165 #[serde(rename = "validators")]
16166 Validators,
16167}
16168impl ::std::convert::From<&Self> for JsonRpcRequestForValidatorsMethod {
16169 fn from(value: &JsonRpcRequestForValidatorsMethod) -> Self {
16170 value.clone()
16171 }
16172}
16173impl ::std::fmt::Display for JsonRpcRequestForValidatorsMethod {
16174 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16175 match *self {
16176 Self::Validators => f.write_str("validators"),
16177 }
16178 }
16179}
16180impl ::std::str::FromStr for JsonRpcRequestForValidatorsMethod {
16181 type Err = self::error::ConversionError;
16182 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16183 match value {
16184 "validators" => Ok(Self::Validators),
16185 _ => Err("invalid value".into()),
16186 }
16187 }
16188}
16189impl ::std::convert::TryFrom<&str> for JsonRpcRequestForValidatorsMethod {
16190 type Error = self::error::ConversionError;
16191 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16192 value.parse()
16193 }
16194}
16195impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForValidatorsMethod {
16196 type Error = self::error::ConversionError;
16197 fn try_from(
16198 value: &::std::string::String,
16199 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16200 value.parse()
16201 }
16202}
16203impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForValidatorsMethod {
16204 type Error = self::error::ConversionError;
16205 fn try_from(
16206 value: ::std::string::String,
16207 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16208 value.parse()
16209 }
16210}
16211#[doc = "`JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError`"]
16212#[doc = r""]
16213#[doc = r" <details><summary>JSON schema</summary>"]
16214#[doc = r""]
16215#[doc = r" ```json"]
16216#[doc = "{"]
16217#[doc = " \"title\": \"JsonRpcResponse_for_Array_of_Range_of_uint64_and_RpcMaintenanceWindowsError\","]
16218#[doc = " \"type\": \"object\","]
16219#[doc = " \"oneOf\": ["]
16220#[doc = " {"]
16221#[doc = " \"type\": \"object\","]
16222#[doc = " \"required\": ["]
16223#[doc = " \"result\""]
16224#[doc = " ],"]
16225#[doc = " \"properties\": {"]
16226#[doc = " \"result\": {"]
16227#[doc = " \"type\": \"array\","]
16228#[doc = " \"items\": {"]
16229#[doc = " \"$ref\": \"#/components/schemas/Range_of_uint64\""]
16230#[doc = " }"]
16231#[doc = " }"]
16232#[doc = " }"]
16233#[doc = " },"]
16234#[doc = " {"]
16235#[doc = " \"type\": \"object\","]
16236#[doc = " \"required\": ["]
16237#[doc = " \"error\""]
16238#[doc = " ],"]
16239#[doc = " \"properties\": {"]
16240#[doc = " \"error\": {"]
16241#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcMaintenanceWindowsError\""]
16242#[doc = " }"]
16243#[doc = " }"]
16244#[doc = " }"]
16245#[doc = " ],"]
16246#[doc = " \"required\": ["]
16247#[doc = " \"id\","]
16248#[doc = " \"jsonrpc\""]
16249#[doc = " ],"]
16250#[doc = " \"properties\": {"]
16251#[doc = " \"id\": {"]
16252#[doc = " \"type\": \"string\""]
16253#[doc = " },"]
16254#[doc = " \"jsonrpc\": {"]
16255#[doc = " \"type\": \"string\""]
16256#[doc = " }"]
16257#[doc = " }"]
16258#[doc = "}"]
16259#[doc = r" ```"]
16260#[doc = r" </details>"]
16261#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16262#[serde(untagged)]
16263pub enum JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError {
16264 Variant0 {
16265 id: ::std::string::String,
16266 jsonrpc: ::std::string::String,
16267 result: ::std::vec::Vec<RangeOfUint64>,
16268 },
16269 Variant1 {
16270 error: ErrorWrapperForRpcMaintenanceWindowsError,
16271 id: ::std::string::String,
16272 jsonrpc: ::std::string::String,
16273 },
16274}
16275impl ::std::convert::From<&Self>
16276 for JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError
16277{
16278 fn from(value: &JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError) -> Self {
16279 value.clone()
16280 }
16281}
16282#[doc = "`JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError`"]
16283#[doc = r""]
16284#[doc = r" <details><summary>JSON schema</summary>"]
16285#[doc = r""]
16286#[doc = r" ```json"]
16287#[doc = "{"]
16288#[doc = " \"title\": \"JsonRpcResponse_for_Array_of_ValidatorStakeView_and_RpcValidatorError\","]
16289#[doc = " \"type\": \"object\","]
16290#[doc = " \"oneOf\": ["]
16291#[doc = " {"]
16292#[doc = " \"type\": \"object\","]
16293#[doc = " \"required\": ["]
16294#[doc = " \"result\""]
16295#[doc = " ],"]
16296#[doc = " \"properties\": {"]
16297#[doc = " \"result\": {"]
16298#[doc = " \"type\": \"array\","]
16299#[doc = " \"items\": {"]
16300#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
16301#[doc = " }"]
16302#[doc = " }"]
16303#[doc = " }"]
16304#[doc = " },"]
16305#[doc = " {"]
16306#[doc = " \"type\": \"object\","]
16307#[doc = " \"required\": ["]
16308#[doc = " \"error\""]
16309#[doc = " ],"]
16310#[doc = " \"properties\": {"]
16311#[doc = " \"error\": {"]
16312#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcValidatorError\""]
16313#[doc = " }"]
16314#[doc = " }"]
16315#[doc = " }"]
16316#[doc = " ],"]
16317#[doc = " \"required\": ["]
16318#[doc = " \"id\","]
16319#[doc = " \"jsonrpc\""]
16320#[doc = " ],"]
16321#[doc = " \"properties\": {"]
16322#[doc = " \"id\": {"]
16323#[doc = " \"type\": \"string\""]
16324#[doc = " },"]
16325#[doc = " \"jsonrpc\": {"]
16326#[doc = " \"type\": \"string\""]
16327#[doc = " }"]
16328#[doc = " }"]
16329#[doc = "}"]
16330#[doc = r" ```"]
16331#[doc = r" </details>"]
16332#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16333#[serde(untagged)]
16334pub enum JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError {
16335 Variant0 {
16336 id: ::std::string::String,
16337 jsonrpc: ::std::string::String,
16338 result: ::std::vec::Vec<ValidatorStakeView>,
16339 },
16340 Variant1 {
16341 error: ErrorWrapperForRpcValidatorError,
16342 id: ::std::string::String,
16343 jsonrpc: ::std::string::String,
16344 },
16345}
16346impl ::std::convert::From<&Self>
16347 for JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError
16348{
16349 fn from(value: &JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError) -> Self {
16350 value.clone()
16351 }
16352}
16353#[doc = "`JsonRpcResponseForCryptoHashAndRpcTransactionError`"]
16354#[doc = r""]
16355#[doc = r" <details><summary>JSON schema</summary>"]
16356#[doc = r""]
16357#[doc = r" ```json"]
16358#[doc = "{"]
16359#[doc = " \"title\": \"JsonRpcResponse_for_CryptoHash_and_RpcTransactionError\","]
16360#[doc = " \"type\": \"object\","]
16361#[doc = " \"oneOf\": ["]
16362#[doc = " {"]
16363#[doc = " \"type\": \"object\","]
16364#[doc = " \"required\": ["]
16365#[doc = " \"result\""]
16366#[doc = " ],"]
16367#[doc = " \"properties\": {"]
16368#[doc = " \"result\": {"]
16369#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
16370#[doc = " }"]
16371#[doc = " }"]
16372#[doc = " },"]
16373#[doc = " {"]
16374#[doc = " \"type\": \"object\","]
16375#[doc = " \"required\": ["]
16376#[doc = " \"error\""]
16377#[doc = " ],"]
16378#[doc = " \"properties\": {"]
16379#[doc = " \"error\": {"]
16380#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcTransactionError\""]
16381#[doc = " }"]
16382#[doc = " }"]
16383#[doc = " }"]
16384#[doc = " ],"]
16385#[doc = " \"required\": ["]
16386#[doc = " \"id\","]
16387#[doc = " \"jsonrpc\""]
16388#[doc = " ],"]
16389#[doc = " \"properties\": {"]
16390#[doc = " \"id\": {"]
16391#[doc = " \"type\": \"string\""]
16392#[doc = " },"]
16393#[doc = " \"jsonrpc\": {"]
16394#[doc = " \"type\": \"string\""]
16395#[doc = " }"]
16396#[doc = " }"]
16397#[doc = "}"]
16398#[doc = r" ```"]
16399#[doc = r" </details>"]
16400#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16401#[serde(untagged)]
16402pub enum JsonRpcResponseForCryptoHashAndRpcTransactionError {
16403 Variant0 {
16404 id: ::std::string::String,
16405 jsonrpc: ::std::string::String,
16406 result: CryptoHash,
16407 },
16408 Variant1 {
16409 error: ErrorWrapperForRpcTransactionError,
16410 id: ::std::string::String,
16411 jsonrpc: ::std::string::String,
16412 },
16413}
16414impl ::std::convert::From<&Self> for JsonRpcResponseForCryptoHashAndRpcTransactionError {
16415 fn from(value: &JsonRpcResponseForCryptoHashAndRpcTransactionError) -> Self {
16416 value.clone()
16417 }
16418}
16419#[doc = "`JsonRpcResponseForGenesisConfigAndGenesisConfigError`"]
16420#[doc = r""]
16421#[doc = r" <details><summary>JSON schema</summary>"]
16422#[doc = r""]
16423#[doc = r" ```json"]
16424#[doc = "{"]
16425#[doc = " \"title\": \"JsonRpcResponse_for_GenesisConfig_and_GenesisConfigError\","]
16426#[doc = " \"type\": \"object\","]
16427#[doc = " \"oneOf\": ["]
16428#[doc = " {"]
16429#[doc = " \"type\": \"object\","]
16430#[doc = " \"required\": ["]
16431#[doc = " \"result\""]
16432#[doc = " ],"]
16433#[doc = " \"properties\": {"]
16434#[doc = " \"result\": {"]
16435#[doc = " \"$ref\": \"#/components/schemas/GenesisConfig\""]
16436#[doc = " }"]
16437#[doc = " }"]
16438#[doc = " },"]
16439#[doc = " {"]
16440#[doc = " \"type\": \"object\","]
16441#[doc = " \"required\": ["]
16442#[doc = " \"error\""]
16443#[doc = " ],"]
16444#[doc = " \"properties\": {"]
16445#[doc = " \"error\": {"]
16446#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_GenesisConfigError\""]
16447#[doc = " }"]
16448#[doc = " }"]
16449#[doc = " }"]
16450#[doc = " ],"]
16451#[doc = " \"required\": ["]
16452#[doc = " \"id\","]
16453#[doc = " \"jsonrpc\""]
16454#[doc = " ],"]
16455#[doc = " \"properties\": {"]
16456#[doc = " \"id\": {"]
16457#[doc = " \"type\": \"string\""]
16458#[doc = " },"]
16459#[doc = " \"jsonrpc\": {"]
16460#[doc = " \"type\": \"string\""]
16461#[doc = " }"]
16462#[doc = " }"]
16463#[doc = "}"]
16464#[doc = r" ```"]
16465#[doc = r" </details>"]
16466#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16467#[serde(untagged)]
16468pub enum JsonRpcResponseForGenesisConfigAndGenesisConfigError {
16469 Variant0 {
16470 id: ::std::string::String,
16471 jsonrpc: ::std::string::String,
16472 result: GenesisConfig,
16473 },
16474 Variant1 {
16475 error: ErrorWrapperForGenesisConfigError,
16476 id: ::std::string::String,
16477 jsonrpc: ::std::string::String,
16478 },
16479}
16480impl ::std::convert::From<&Self> for JsonRpcResponseForGenesisConfigAndGenesisConfigError {
16481 fn from(value: &JsonRpcResponseForGenesisConfigAndGenesisConfigError) -> Self {
16482 value.clone()
16483 }
16484}
16485#[doc = "`JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError`"]
16486#[doc = r""]
16487#[doc = r" <details><summary>JSON schema</summary>"]
16488#[doc = r""]
16489#[doc = r" ```json"]
16490#[doc = "{"]
16491#[doc = " \"title\": \"JsonRpcResponse_for_Nullable_RpcHealthResponse_and_RpcStatusError\","]
16492#[doc = " \"type\": \"object\","]
16493#[doc = " \"oneOf\": ["]
16494#[doc = " {"]
16495#[doc = " \"type\": \"object\","]
16496#[doc = " \"required\": ["]
16497#[doc = " \"result\""]
16498#[doc = " ],"]
16499#[doc = " \"properties\": {"]
16500#[doc = " \"result\": {"]
16501#[doc = " \"anyOf\": ["]
16502#[doc = " {"]
16503#[doc = " \"$ref\": \"#/components/schemas/RpcHealthResponse\""]
16504#[doc = " },"]
16505#[doc = " {"]
16506#[doc = " \"type\": \"null\""]
16507#[doc = " }"]
16508#[doc = " ]"]
16509#[doc = " }"]
16510#[doc = " }"]
16511#[doc = " },"]
16512#[doc = " {"]
16513#[doc = " \"type\": \"object\","]
16514#[doc = " \"required\": ["]
16515#[doc = " \"error\""]
16516#[doc = " ],"]
16517#[doc = " \"properties\": {"]
16518#[doc = " \"error\": {"]
16519#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStatusError\""]
16520#[doc = " }"]
16521#[doc = " }"]
16522#[doc = " }"]
16523#[doc = " ],"]
16524#[doc = " \"required\": ["]
16525#[doc = " \"id\","]
16526#[doc = " \"jsonrpc\""]
16527#[doc = " ],"]
16528#[doc = " \"properties\": {"]
16529#[doc = " \"id\": {"]
16530#[doc = " \"type\": \"string\""]
16531#[doc = " },"]
16532#[doc = " \"jsonrpc\": {"]
16533#[doc = " \"type\": \"string\""]
16534#[doc = " }"]
16535#[doc = " }"]
16536#[doc = "}"]
16537#[doc = r" ```"]
16538#[doc = r" </details>"]
16539#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16540#[serde(untagged)]
16541pub enum JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError {
16542 Variant0 {
16543 id: ::std::string::String,
16544 jsonrpc: ::std::string::String,
16545 result: ::std::option::Option<RpcHealthResponse>,
16546 },
16547 Variant1 {
16548 error: ErrorWrapperForRpcStatusError,
16549 id: ::std::string::String,
16550 jsonrpc: ::std::string::String,
16551 },
16552}
16553impl ::std::convert::From<&Self> for JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError {
16554 fn from(value: &JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError) -> Self {
16555 value.clone()
16556 }
16557}
16558#[doc = "`JsonRpcResponseForRpcBlockResponseAndRpcBlockError`"]
16559#[doc = r""]
16560#[doc = r" <details><summary>JSON schema</summary>"]
16561#[doc = r""]
16562#[doc = r" ```json"]
16563#[doc = "{"]
16564#[doc = " \"title\": \"JsonRpcResponse_for_RpcBlockResponse_and_RpcBlockError\","]
16565#[doc = " \"type\": \"object\","]
16566#[doc = " \"oneOf\": ["]
16567#[doc = " {"]
16568#[doc = " \"type\": \"object\","]
16569#[doc = " \"required\": ["]
16570#[doc = " \"result\""]
16571#[doc = " ],"]
16572#[doc = " \"properties\": {"]
16573#[doc = " \"result\": {"]
16574#[doc = " \"$ref\": \"#/components/schemas/RpcBlockResponse\""]
16575#[doc = " }"]
16576#[doc = " }"]
16577#[doc = " },"]
16578#[doc = " {"]
16579#[doc = " \"type\": \"object\","]
16580#[doc = " \"required\": ["]
16581#[doc = " \"error\""]
16582#[doc = " ],"]
16583#[doc = " \"properties\": {"]
16584#[doc = " \"error\": {"]
16585#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcBlockError\""]
16586#[doc = " }"]
16587#[doc = " }"]
16588#[doc = " }"]
16589#[doc = " ],"]
16590#[doc = " \"required\": ["]
16591#[doc = " \"id\","]
16592#[doc = " \"jsonrpc\""]
16593#[doc = " ],"]
16594#[doc = " \"properties\": {"]
16595#[doc = " \"id\": {"]
16596#[doc = " \"type\": \"string\""]
16597#[doc = " },"]
16598#[doc = " \"jsonrpc\": {"]
16599#[doc = " \"type\": \"string\""]
16600#[doc = " }"]
16601#[doc = " }"]
16602#[doc = "}"]
16603#[doc = r" ```"]
16604#[doc = r" </details>"]
16605#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16606#[serde(untagged)]
16607pub enum JsonRpcResponseForRpcBlockResponseAndRpcBlockError {
16608 Variant0 {
16609 id: ::std::string::String,
16610 jsonrpc: ::std::string::String,
16611 result: RpcBlockResponse,
16612 },
16613 Variant1 {
16614 error: ErrorWrapperForRpcBlockError,
16615 id: ::std::string::String,
16616 jsonrpc: ::std::string::String,
16617 },
16618}
16619impl ::std::convert::From<&Self> for JsonRpcResponseForRpcBlockResponseAndRpcBlockError {
16620 fn from(value: &JsonRpcResponseForRpcBlockResponseAndRpcBlockError) -> Self {
16621 value.clone()
16622 }
16623}
16624#[doc = "`JsonRpcResponseForRpcChunkResponseAndRpcChunkError`"]
16625#[doc = r""]
16626#[doc = r" <details><summary>JSON schema</summary>"]
16627#[doc = r""]
16628#[doc = r" ```json"]
16629#[doc = "{"]
16630#[doc = " \"title\": \"JsonRpcResponse_for_RpcChunkResponse_and_RpcChunkError\","]
16631#[doc = " \"type\": \"object\","]
16632#[doc = " \"oneOf\": ["]
16633#[doc = " {"]
16634#[doc = " \"type\": \"object\","]
16635#[doc = " \"required\": ["]
16636#[doc = " \"result\""]
16637#[doc = " ],"]
16638#[doc = " \"properties\": {"]
16639#[doc = " \"result\": {"]
16640#[doc = " \"$ref\": \"#/components/schemas/RpcChunkResponse\""]
16641#[doc = " }"]
16642#[doc = " }"]
16643#[doc = " },"]
16644#[doc = " {"]
16645#[doc = " \"type\": \"object\","]
16646#[doc = " \"required\": ["]
16647#[doc = " \"error\""]
16648#[doc = " ],"]
16649#[doc = " \"properties\": {"]
16650#[doc = " \"error\": {"]
16651#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcChunkError\""]
16652#[doc = " }"]
16653#[doc = " }"]
16654#[doc = " }"]
16655#[doc = " ],"]
16656#[doc = " \"required\": ["]
16657#[doc = " \"id\","]
16658#[doc = " \"jsonrpc\""]
16659#[doc = " ],"]
16660#[doc = " \"properties\": {"]
16661#[doc = " \"id\": {"]
16662#[doc = " \"type\": \"string\""]
16663#[doc = " },"]
16664#[doc = " \"jsonrpc\": {"]
16665#[doc = " \"type\": \"string\""]
16666#[doc = " }"]
16667#[doc = " }"]
16668#[doc = "}"]
16669#[doc = r" ```"]
16670#[doc = r" </details>"]
16671#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16672#[serde(untagged)]
16673pub enum JsonRpcResponseForRpcChunkResponseAndRpcChunkError {
16674 Variant0 {
16675 id: ::std::string::String,
16676 jsonrpc: ::std::string::String,
16677 result: RpcChunkResponse,
16678 },
16679 Variant1 {
16680 error: ErrorWrapperForRpcChunkError,
16681 id: ::std::string::String,
16682 jsonrpc: ::std::string::String,
16683 },
16684}
16685impl ::std::convert::From<&Self> for JsonRpcResponseForRpcChunkResponseAndRpcChunkError {
16686 fn from(value: &JsonRpcResponseForRpcChunkResponseAndRpcChunkError) -> Self {
16687 value.clone()
16688 }
16689}
16690#[doc = "`JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError`"]
16691#[doc = r""]
16692#[doc = r" <details><summary>JSON schema</summary>"]
16693#[doc = r""]
16694#[doc = r" ```json"]
16695#[doc = "{"]
16696#[doc = " \"title\": \"JsonRpcResponse_for_RpcClientConfigResponse_and_RpcClientConfigError\","]
16697#[doc = " \"type\": \"object\","]
16698#[doc = " \"oneOf\": ["]
16699#[doc = " {"]
16700#[doc = " \"type\": \"object\","]
16701#[doc = " \"required\": ["]
16702#[doc = " \"result\""]
16703#[doc = " ],"]
16704#[doc = " \"properties\": {"]
16705#[doc = " \"result\": {"]
16706#[doc = " \"$ref\": \"#/components/schemas/RpcClientConfigResponse\""]
16707#[doc = " }"]
16708#[doc = " }"]
16709#[doc = " },"]
16710#[doc = " {"]
16711#[doc = " \"type\": \"object\","]
16712#[doc = " \"required\": ["]
16713#[doc = " \"error\""]
16714#[doc = " ],"]
16715#[doc = " \"properties\": {"]
16716#[doc = " \"error\": {"]
16717#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcClientConfigError\""]
16718#[doc = " }"]
16719#[doc = " }"]
16720#[doc = " }"]
16721#[doc = " ],"]
16722#[doc = " \"required\": ["]
16723#[doc = " \"id\","]
16724#[doc = " \"jsonrpc\""]
16725#[doc = " ],"]
16726#[doc = " \"properties\": {"]
16727#[doc = " \"id\": {"]
16728#[doc = " \"type\": \"string\""]
16729#[doc = " },"]
16730#[doc = " \"jsonrpc\": {"]
16731#[doc = " \"type\": \"string\""]
16732#[doc = " }"]
16733#[doc = " }"]
16734#[doc = "}"]
16735#[doc = r" ```"]
16736#[doc = r" </details>"]
16737#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16738#[serde(untagged)]
16739pub enum JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError {
16740 Variant0 {
16741 id: ::std::string::String,
16742 jsonrpc: ::std::string::String,
16743 result: RpcClientConfigResponse,
16744 },
16745 Variant1 {
16746 error: ErrorWrapperForRpcClientConfigError,
16747 id: ::std::string::String,
16748 jsonrpc: ::std::string::String,
16749 },
16750}
16751impl ::std::convert::From<&Self>
16752 for JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError
16753{
16754 fn from(value: &JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError) -> Self {
16755 value.clone()
16756 }
16757}
16758#[doc = "`JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError`"]
16759#[doc = r""]
16760#[doc = r" <details><summary>JSON schema</summary>"]
16761#[doc = r""]
16762#[doc = r" ```json"]
16763#[doc = "{"]
16764#[doc = " \"title\": \"JsonRpcResponse_for_RpcCongestionLevelResponse_and_RpcChunkError\","]
16765#[doc = " \"type\": \"object\","]
16766#[doc = " \"oneOf\": ["]
16767#[doc = " {"]
16768#[doc = " \"type\": \"object\","]
16769#[doc = " \"required\": ["]
16770#[doc = " \"result\""]
16771#[doc = " ],"]
16772#[doc = " \"properties\": {"]
16773#[doc = " \"result\": {"]
16774#[doc = " \"$ref\": \"#/components/schemas/RpcCongestionLevelResponse\""]
16775#[doc = " }"]
16776#[doc = " }"]
16777#[doc = " },"]
16778#[doc = " {"]
16779#[doc = " \"type\": \"object\","]
16780#[doc = " \"required\": ["]
16781#[doc = " \"error\""]
16782#[doc = " ],"]
16783#[doc = " \"properties\": {"]
16784#[doc = " \"error\": {"]
16785#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcChunkError\""]
16786#[doc = " }"]
16787#[doc = " }"]
16788#[doc = " }"]
16789#[doc = " ],"]
16790#[doc = " \"required\": ["]
16791#[doc = " \"id\","]
16792#[doc = " \"jsonrpc\""]
16793#[doc = " ],"]
16794#[doc = " \"properties\": {"]
16795#[doc = " \"id\": {"]
16796#[doc = " \"type\": \"string\""]
16797#[doc = " },"]
16798#[doc = " \"jsonrpc\": {"]
16799#[doc = " \"type\": \"string\""]
16800#[doc = " }"]
16801#[doc = " }"]
16802#[doc = "}"]
16803#[doc = r" ```"]
16804#[doc = r" </details>"]
16805#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16806#[serde(untagged)]
16807pub enum JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError {
16808 Variant0 {
16809 id: ::std::string::String,
16810 jsonrpc: ::std::string::String,
16811 result: RpcCongestionLevelResponse,
16812 },
16813 Variant1 {
16814 error: ErrorWrapperForRpcChunkError,
16815 id: ::std::string::String,
16816 jsonrpc: ::std::string::String,
16817 },
16818}
16819impl ::std::convert::From<&Self> for JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError {
16820 fn from(value: &JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError) -> Self {
16821 value.clone()
16822 }
16823}
16824#[doc = "`JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError`"]
16825#[doc = r""]
16826#[doc = r" <details><summary>JSON schema</summary>"]
16827#[doc = r""]
16828#[doc = r" ```json"]
16829#[doc = "{"]
16830#[doc = " \"title\": \"JsonRpcResponse_for_RpcGasPriceResponse_and_RpcGasPriceError\","]
16831#[doc = " \"type\": \"object\","]
16832#[doc = " \"oneOf\": ["]
16833#[doc = " {"]
16834#[doc = " \"type\": \"object\","]
16835#[doc = " \"required\": ["]
16836#[doc = " \"result\""]
16837#[doc = " ],"]
16838#[doc = " \"properties\": {"]
16839#[doc = " \"result\": {"]
16840#[doc = " \"$ref\": \"#/components/schemas/RpcGasPriceResponse\""]
16841#[doc = " }"]
16842#[doc = " }"]
16843#[doc = " },"]
16844#[doc = " {"]
16845#[doc = " \"type\": \"object\","]
16846#[doc = " \"required\": ["]
16847#[doc = " \"error\""]
16848#[doc = " ],"]
16849#[doc = " \"properties\": {"]
16850#[doc = " \"error\": {"]
16851#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcGasPriceError\""]
16852#[doc = " }"]
16853#[doc = " }"]
16854#[doc = " }"]
16855#[doc = " ],"]
16856#[doc = " \"required\": ["]
16857#[doc = " \"id\","]
16858#[doc = " \"jsonrpc\""]
16859#[doc = " ],"]
16860#[doc = " \"properties\": {"]
16861#[doc = " \"id\": {"]
16862#[doc = " \"type\": \"string\""]
16863#[doc = " },"]
16864#[doc = " \"jsonrpc\": {"]
16865#[doc = " \"type\": \"string\""]
16866#[doc = " }"]
16867#[doc = " }"]
16868#[doc = "}"]
16869#[doc = r" ```"]
16870#[doc = r" </details>"]
16871#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16872#[serde(untagged)]
16873pub enum JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError {
16874 Variant0 {
16875 id: ::std::string::String,
16876 jsonrpc: ::std::string::String,
16877 result: RpcGasPriceResponse,
16878 },
16879 Variant1 {
16880 error: ErrorWrapperForRpcGasPriceError,
16881 id: ::std::string::String,
16882 jsonrpc: ::std::string::String,
16883 },
16884}
16885impl ::std::convert::From<&Self> for JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError {
16886 fn from(value: &JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError) -> Self {
16887 value.clone()
16888 }
16889}
16890#[doc = "`JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError`"]
16891#[doc = r""]
16892#[doc = r" <details><summary>JSON schema</summary>"]
16893#[doc = r""]
16894#[doc = r" ```json"]
16895#[doc = "{"]
16896#[doc = " \"title\": \"JsonRpcResponse_for_RpcLightClientBlockProofResponse_and_RpcLightClientProofError\","]
16897#[doc = " \"type\": \"object\","]
16898#[doc = " \"oneOf\": ["]
16899#[doc = " {"]
16900#[doc = " \"type\": \"object\","]
16901#[doc = " \"required\": ["]
16902#[doc = " \"result\""]
16903#[doc = " ],"]
16904#[doc = " \"properties\": {"]
16905#[doc = " \"result\": {"]
16906#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientBlockProofResponse\""]
16907#[doc = " }"]
16908#[doc = " }"]
16909#[doc = " },"]
16910#[doc = " {"]
16911#[doc = " \"type\": \"object\","]
16912#[doc = " \"required\": ["]
16913#[doc = " \"error\""]
16914#[doc = " ],"]
16915#[doc = " \"properties\": {"]
16916#[doc = " \"error\": {"]
16917#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientProofError\""]
16918#[doc = " }"]
16919#[doc = " }"]
16920#[doc = " }"]
16921#[doc = " ],"]
16922#[doc = " \"required\": ["]
16923#[doc = " \"id\","]
16924#[doc = " \"jsonrpc\""]
16925#[doc = " ],"]
16926#[doc = " \"properties\": {"]
16927#[doc = " \"id\": {"]
16928#[doc = " \"type\": \"string\""]
16929#[doc = " },"]
16930#[doc = " \"jsonrpc\": {"]
16931#[doc = " \"type\": \"string\""]
16932#[doc = " }"]
16933#[doc = " }"]
16934#[doc = "}"]
16935#[doc = r" ```"]
16936#[doc = r" </details>"]
16937#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16938#[serde(untagged)]
16939pub enum JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError {
16940 Variant0 {
16941 id: ::std::string::String,
16942 jsonrpc: ::std::string::String,
16943 result: RpcLightClientBlockProofResponse,
16944 },
16945 Variant1 {
16946 error: ErrorWrapperForRpcLightClientProofError,
16947 id: ::std::string::String,
16948 jsonrpc: ::std::string::String,
16949 },
16950}
16951impl ::std::convert::From<&Self>
16952 for JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError
16953{
16954 fn from(
16955 value: &JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError,
16956 ) -> Self {
16957 value.clone()
16958 }
16959}
16960#[doc = "`JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError`"]
16961#[doc = r""]
16962#[doc = r" <details><summary>JSON schema</summary>"]
16963#[doc = r""]
16964#[doc = r" ```json"]
16965#[doc = "{"]
16966#[doc = " \"title\": \"JsonRpcResponse_for_RpcLightClientExecutionProofResponse_and_RpcLightClientProofError\","]
16967#[doc = " \"type\": \"object\","]
16968#[doc = " \"oneOf\": ["]
16969#[doc = " {"]
16970#[doc = " \"type\": \"object\","]
16971#[doc = " \"required\": ["]
16972#[doc = " \"result\""]
16973#[doc = " ],"]
16974#[doc = " \"properties\": {"]
16975#[doc = " \"result\": {"]
16976#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofResponse\""]
16977#[doc = " }"]
16978#[doc = " }"]
16979#[doc = " },"]
16980#[doc = " {"]
16981#[doc = " \"type\": \"object\","]
16982#[doc = " \"required\": ["]
16983#[doc = " \"error\""]
16984#[doc = " ],"]
16985#[doc = " \"properties\": {"]
16986#[doc = " \"error\": {"]
16987#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientProofError\""]
16988#[doc = " }"]
16989#[doc = " }"]
16990#[doc = " }"]
16991#[doc = " ],"]
16992#[doc = " \"required\": ["]
16993#[doc = " \"id\","]
16994#[doc = " \"jsonrpc\""]
16995#[doc = " ],"]
16996#[doc = " \"properties\": {"]
16997#[doc = " \"id\": {"]
16998#[doc = " \"type\": \"string\""]
16999#[doc = " },"]
17000#[doc = " \"jsonrpc\": {"]
17001#[doc = " \"type\": \"string\""]
17002#[doc = " }"]
17003#[doc = " }"]
17004#[doc = "}"]
17005#[doc = r" ```"]
17006#[doc = r" </details>"]
17007#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17008#[serde(untagged)]
17009pub enum JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError {
17010 Variant0 {
17011 id: ::std::string::String,
17012 jsonrpc: ::std::string::String,
17013 result: RpcLightClientExecutionProofResponse,
17014 },
17015 Variant1 {
17016 error: ErrorWrapperForRpcLightClientProofError,
17017 id: ::std::string::String,
17018 jsonrpc: ::std::string::String,
17019 },
17020}
17021impl ::std::convert::From<&Self>
17022 for JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError
17023{
17024 fn from(
17025 value: &JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError,
17026 ) -> Self {
17027 value.clone()
17028 }
17029}
17030#[doc = "`JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError`"]
17031#[doc = r""]
17032#[doc = r" <details><summary>JSON schema</summary>"]
17033#[doc = r""]
17034#[doc = r" ```json"]
17035#[doc = "{"]
17036#[doc = " \"title\": \"JsonRpcResponse_for_RpcLightClientNextBlockResponse_and_RpcLightClientNextBlockError\","]
17037#[doc = " \"type\": \"object\","]
17038#[doc = " \"oneOf\": ["]
17039#[doc = " {"]
17040#[doc = " \"type\": \"object\","]
17041#[doc = " \"required\": ["]
17042#[doc = " \"result\""]
17043#[doc = " ],"]
17044#[doc = " \"properties\": {"]
17045#[doc = " \"result\": {"]
17046#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientNextBlockResponse\""]
17047#[doc = " }"]
17048#[doc = " }"]
17049#[doc = " },"]
17050#[doc = " {"]
17051#[doc = " \"type\": \"object\","]
17052#[doc = " \"required\": ["]
17053#[doc = " \"error\""]
17054#[doc = " ],"]
17055#[doc = " \"properties\": {"]
17056#[doc = " \"error\": {"]
17057#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcLightClientNextBlockError\""]
17058#[doc = " }"]
17059#[doc = " }"]
17060#[doc = " }"]
17061#[doc = " ],"]
17062#[doc = " \"required\": ["]
17063#[doc = " \"id\","]
17064#[doc = " \"jsonrpc\""]
17065#[doc = " ],"]
17066#[doc = " \"properties\": {"]
17067#[doc = " \"id\": {"]
17068#[doc = " \"type\": \"string\""]
17069#[doc = " },"]
17070#[doc = " \"jsonrpc\": {"]
17071#[doc = " \"type\": \"string\""]
17072#[doc = " }"]
17073#[doc = " }"]
17074#[doc = "}"]
17075#[doc = r" ```"]
17076#[doc = r" </details>"]
17077#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17078#[serde(untagged)]
17079pub enum JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError {
17080 Variant0 {
17081 id: ::std::string::String,
17082 jsonrpc: ::std::string::String,
17083 result: RpcLightClientNextBlockResponse,
17084 },
17085 Variant1 {
17086 error: ErrorWrapperForRpcLightClientNextBlockError,
17087 id: ::std::string::String,
17088 jsonrpc: ::std::string::String,
17089 },
17090}
17091impl ::std::convert::From<&Self>
17092 for JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError
17093{
17094 fn from(
17095 value: &JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError,
17096 ) -> Self {
17097 value.clone()
17098 }
17099}
17100#[doc = "`JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError`"]
17101#[doc = r""]
17102#[doc = r" <details><summary>JSON schema</summary>"]
17103#[doc = r""]
17104#[doc = r" ```json"]
17105#[doc = "{"]
17106#[doc = " \"title\": \"JsonRpcResponse_for_RpcNetworkInfoResponse_and_RpcNetworkInfoError\","]
17107#[doc = " \"type\": \"object\","]
17108#[doc = " \"oneOf\": ["]
17109#[doc = " {"]
17110#[doc = " \"type\": \"object\","]
17111#[doc = " \"required\": ["]
17112#[doc = " \"result\""]
17113#[doc = " ],"]
17114#[doc = " \"properties\": {"]
17115#[doc = " \"result\": {"]
17116#[doc = " \"$ref\": \"#/components/schemas/RpcNetworkInfoResponse\""]
17117#[doc = " }"]
17118#[doc = " }"]
17119#[doc = " },"]
17120#[doc = " {"]
17121#[doc = " \"type\": \"object\","]
17122#[doc = " \"required\": ["]
17123#[doc = " \"error\""]
17124#[doc = " ],"]
17125#[doc = " \"properties\": {"]
17126#[doc = " \"error\": {"]
17127#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcNetworkInfoError\""]
17128#[doc = " }"]
17129#[doc = " }"]
17130#[doc = " }"]
17131#[doc = " ],"]
17132#[doc = " \"required\": ["]
17133#[doc = " \"id\","]
17134#[doc = " \"jsonrpc\""]
17135#[doc = " ],"]
17136#[doc = " \"properties\": {"]
17137#[doc = " \"id\": {"]
17138#[doc = " \"type\": \"string\""]
17139#[doc = " },"]
17140#[doc = " \"jsonrpc\": {"]
17141#[doc = " \"type\": \"string\""]
17142#[doc = " }"]
17143#[doc = " }"]
17144#[doc = "}"]
17145#[doc = r" ```"]
17146#[doc = r" </details>"]
17147#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17148#[serde(untagged)]
17149pub enum JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError {
17150 Variant0 {
17151 id: ::std::string::String,
17152 jsonrpc: ::std::string::String,
17153 result: RpcNetworkInfoResponse,
17154 },
17155 Variant1 {
17156 error: ErrorWrapperForRpcNetworkInfoError,
17157 id: ::std::string::String,
17158 jsonrpc: ::std::string::String,
17159 },
17160}
17161impl ::std::convert::From<&Self>
17162 for JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError
17163{
17164 fn from(value: &JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError) -> Self {
17165 value.clone()
17166 }
17167}
17168#[doc = "`JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError`"]
17169#[doc = r""]
17170#[doc = r" <details><summary>JSON schema</summary>"]
17171#[doc = r""]
17172#[doc = r" ```json"]
17173#[doc = "{"]
17174#[doc = " \"title\": \"JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcProtocolConfigError\","]
17175#[doc = " \"type\": \"object\","]
17176#[doc = " \"oneOf\": ["]
17177#[doc = " {"]
17178#[doc = " \"type\": \"object\","]
17179#[doc = " \"required\": ["]
17180#[doc = " \"result\""]
17181#[doc = " ],"]
17182#[doc = " \"properties\": {"]
17183#[doc = " \"result\": {"]
17184#[doc = " \"$ref\": \"#/components/schemas/RpcProtocolConfigResponse\""]
17185#[doc = " }"]
17186#[doc = " }"]
17187#[doc = " },"]
17188#[doc = " {"]
17189#[doc = " \"type\": \"object\","]
17190#[doc = " \"required\": ["]
17191#[doc = " \"error\""]
17192#[doc = " ],"]
17193#[doc = " \"properties\": {"]
17194#[doc = " \"error\": {"]
17195#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcProtocolConfigError\""]
17196#[doc = " }"]
17197#[doc = " }"]
17198#[doc = " }"]
17199#[doc = " ],"]
17200#[doc = " \"required\": ["]
17201#[doc = " \"id\","]
17202#[doc = " \"jsonrpc\""]
17203#[doc = " ],"]
17204#[doc = " \"properties\": {"]
17205#[doc = " \"id\": {"]
17206#[doc = " \"type\": \"string\""]
17207#[doc = " },"]
17208#[doc = " \"jsonrpc\": {"]
17209#[doc = " \"type\": \"string\""]
17210#[doc = " }"]
17211#[doc = " }"]
17212#[doc = "}"]
17213#[doc = r" ```"]
17214#[doc = r" </details>"]
17215#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17216#[serde(untagged)]
17217pub enum JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError {
17218 Variant0 {
17219 id: ::std::string::String,
17220 jsonrpc: ::std::string::String,
17221 result: RpcProtocolConfigResponse,
17222 },
17223 Variant1 {
17224 error: ErrorWrapperForRpcProtocolConfigError,
17225 id: ::std::string::String,
17226 jsonrpc: ::std::string::String,
17227 },
17228}
17229impl ::std::convert::From<&Self>
17230 for JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError
17231{
17232 fn from(value: &JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError) -> Self {
17233 value.clone()
17234 }
17235}
17236#[doc = "`JsonRpcResponseForRpcQueryResponseAndRpcQueryError`"]
17237#[doc = r""]
17238#[doc = r" <details><summary>JSON schema</summary>"]
17239#[doc = r""]
17240#[doc = r" ```json"]
17241#[doc = "{"]
17242#[doc = " \"title\": \"JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError\","]
17243#[doc = " \"type\": \"object\","]
17244#[doc = " \"oneOf\": ["]
17245#[doc = " {"]
17246#[doc = " \"type\": \"object\","]
17247#[doc = " \"required\": ["]
17248#[doc = " \"result\""]
17249#[doc = " ],"]
17250#[doc = " \"properties\": {"]
17251#[doc = " \"result\": {"]
17252#[doc = " \"$ref\": \"#/components/schemas/RpcQueryResponse\""]
17253#[doc = " }"]
17254#[doc = " }"]
17255#[doc = " },"]
17256#[doc = " {"]
17257#[doc = " \"type\": \"object\","]
17258#[doc = " \"required\": ["]
17259#[doc = " \"error\""]
17260#[doc = " ],"]
17261#[doc = " \"properties\": {"]
17262#[doc = " \"error\": {"]
17263#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcQueryError\""]
17264#[doc = " }"]
17265#[doc = " }"]
17266#[doc = " }"]
17267#[doc = " ],"]
17268#[doc = " \"required\": ["]
17269#[doc = " \"id\","]
17270#[doc = " \"jsonrpc\""]
17271#[doc = " ],"]
17272#[doc = " \"properties\": {"]
17273#[doc = " \"id\": {"]
17274#[doc = " \"type\": \"string\""]
17275#[doc = " },"]
17276#[doc = " \"jsonrpc\": {"]
17277#[doc = " \"type\": \"string\""]
17278#[doc = " }"]
17279#[doc = " }"]
17280#[doc = "}"]
17281#[doc = r" ```"]
17282#[doc = r" </details>"]
17283#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17284#[serde(untagged)]
17285pub enum JsonRpcResponseForRpcQueryResponseAndRpcQueryError {
17286 Variant0 {
17287 id: ::std::string::String,
17288 jsonrpc: ::std::string::String,
17289 result: RpcQueryResponse,
17290 },
17291 Variant1 {
17292 error: ErrorWrapperForRpcQueryError,
17293 id: ::std::string::String,
17294 jsonrpc: ::std::string::String,
17295 },
17296}
17297impl ::std::convert::From<&Self> for JsonRpcResponseForRpcQueryResponseAndRpcQueryError {
17298 fn from(value: &JsonRpcResponseForRpcQueryResponseAndRpcQueryError) -> Self {
17299 value.clone()
17300 }
17301}
17302#[doc = "`JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError`"]
17303#[doc = r""]
17304#[doc = r" <details><summary>JSON schema</summary>"]
17305#[doc = r""]
17306#[doc = r" ```json"]
17307#[doc = "{"]
17308#[doc = " \"title\": \"JsonRpcResponse_for_RpcReceiptResponse_and_RpcReceiptError\","]
17309#[doc = " \"type\": \"object\","]
17310#[doc = " \"oneOf\": ["]
17311#[doc = " {"]
17312#[doc = " \"type\": \"object\","]
17313#[doc = " \"required\": ["]
17314#[doc = " \"result\""]
17315#[doc = " ],"]
17316#[doc = " \"properties\": {"]
17317#[doc = " \"result\": {"]
17318#[doc = " \"$ref\": \"#/components/schemas/RpcReceiptResponse\""]
17319#[doc = " }"]
17320#[doc = " }"]
17321#[doc = " },"]
17322#[doc = " {"]
17323#[doc = " \"type\": \"object\","]
17324#[doc = " \"required\": ["]
17325#[doc = " \"error\""]
17326#[doc = " ],"]
17327#[doc = " \"properties\": {"]
17328#[doc = " \"error\": {"]
17329#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcReceiptError\""]
17330#[doc = " }"]
17331#[doc = " }"]
17332#[doc = " }"]
17333#[doc = " ],"]
17334#[doc = " \"required\": ["]
17335#[doc = " \"id\","]
17336#[doc = " \"jsonrpc\""]
17337#[doc = " ],"]
17338#[doc = " \"properties\": {"]
17339#[doc = " \"id\": {"]
17340#[doc = " \"type\": \"string\""]
17341#[doc = " },"]
17342#[doc = " \"jsonrpc\": {"]
17343#[doc = " \"type\": \"string\""]
17344#[doc = " }"]
17345#[doc = " }"]
17346#[doc = "}"]
17347#[doc = r" ```"]
17348#[doc = r" </details>"]
17349#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17350#[serde(untagged)]
17351pub enum JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError {
17352 Variant0 {
17353 id: ::std::string::String,
17354 jsonrpc: ::std::string::String,
17355 result: RpcReceiptResponse,
17356 },
17357 Variant1 {
17358 error: ErrorWrapperForRpcReceiptError,
17359 id: ::std::string::String,
17360 jsonrpc: ::std::string::String,
17361 },
17362}
17363impl ::std::convert::From<&Self> for JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError {
17364 fn from(value: &JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError) -> Self {
17365 value.clone()
17366 }
17367}
17368#[doc = "`JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError`"]
17369#[doc = r""]
17370#[doc = r" <details><summary>JSON schema</summary>"]
17371#[doc = r""]
17372#[doc = r" ```json"]
17373#[doc = "{"]
17374#[doc = " \"title\": \"JsonRpcResponse_for_RpcSplitStorageInfoResponse_and_RpcSplitStorageInfoError\","]
17375#[doc = " \"type\": \"object\","]
17376#[doc = " \"oneOf\": ["]
17377#[doc = " {"]
17378#[doc = " \"type\": \"object\","]
17379#[doc = " \"required\": ["]
17380#[doc = " \"result\""]
17381#[doc = " ],"]
17382#[doc = " \"properties\": {"]
17383#[doc = " \"result\": {"]
17384#[doc = " \"$ref\": \"#/components/schemas/RpcSplitStorageInfoResponse\""]
17385#[doc = " }"]
17386#[doc = " }"]
17387#[doc = " },"]
17388#[doc = " {"]
17389#[doc = " \"type\": \"object\","]
17390#[doc = " \"required\": ["]
17391#[doc = " \"error\""]
17392#[doc = " ],"]
17393#[doc = " \"properties\": {"]
17394#[doc = " \"error\": {"]
17395#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcSplitStorageInfoError\""]
17396#[doc = " }"]
17397#[doc = " }"]
17398#[doc = " }"]
17399#[doc = " ],"]
17400#[doc = " \"required\": ["]
17401#[doc = " \"id\","]
17402#[doc = " \"jsonrpc\""]
17403#[doc = " ],"]
17404#[doc = " \"properties\": {"]
17405#[doc = " \"id\": {"]
17406#[doc = " \"type\": \"string\""]
17407#[doc = " },"]
17408#[doc = " \"jsonrpc\": {"]
17409#[doc = " \"type\": \"string\""]
17410#[doc = " }"]
17411#[doc = " }"]
17412#[doc = "}"]
17413#[doc = r" ```"]
17414#[doc = r" </details>"]
17415#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17416#[serde(untagged)]
17417pub enum JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError {
17418 Variant0 {
17419 id: ::std::string::String,
17420 jsonrpc: ::std::string::String,
17421 result: RpcSplitStorageInfoResponse,
17422 },
17423 Variant1 {
17424 error: ErrorWrapperForRpcSplitStorageInfoError,
17425 id: ::std::string::String,
17426 jsonrpc: ::std::string::String,
17427 },
17428}
17429impl ::std::convert::From<&Self>
17430 for JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError
17431{
17432 fn from(
17433 value: &JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError,
17434 ) -> Self {
17435 value.clone()
17436 }
17437}
17438#[doc = "`JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError`"]
17439#[doc = r""]
17440#[doc = r" <details><summary>JSON schema</summary>"]
17441#[doc = r""]
17442#[doc = r" ```json"]
17443#[doc = "{"]
17444#[doc = " \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError\","]
17445#[doc = " \"type\": \"object\","]
17446#[doc = " \"oneOf\": ["]
17447#[doc = " {"]
17448#[doc = " \"type\": \"object\","]
17449#[doc = " \"required\": ["]
17450#[doc = " \"result\""]
17451#[doc = " ],"]
17452#[doc = " \"properties\": {"]
17453#[doc = " \"result\": {"]
17454#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeResponse\""]
17455#[doc = " }"]
17456#[doc = " }"]
17457#[doc = " },"]
17458#[doc = " {"]
17459#[doc = " \"type\": \"object\","]
17460#[doc = " \"required\": ["]
17461#[doc = " \"error\""]
17462#[doc = " ],"]
17463#[doc = " \"properties\": {"]
17464#[doc = " \"error\": {"]
17465#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStateChangesError\""]
17466#[doc = " }"]
17467#[doc = " }"]
17468#[doc = " }"]
17469#[doc = " ],"]
17470#[doc = " \"required\": ["]
17471#[doc = " \"id\","]
17472#[doc = " \"jsonrpc\""]
17473#[doc = " ],"]
17474#[doc = " \"properties\": {"]
17475#[doc = " \"id\": {"]
17476#[doc = " \"type\": \"string\""]
17477#[doc = " },"]
17478#[doc = " \"jsonrpc\": {"]
17479#[doc = " \"type\": \"string\""]
17480#[doc = " }"]
17481#[doc = " }"]
17482#[doc = "}"]
17483#[doc = r" ```"]
17484#[doc = r" </details>"]
17485#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17486#[serde(untagged)]
17487pub enum JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError {
17488 Variant0 {
17489 id: ::std::string::String,
17490 jsonrpc: ::std::string::String,
17491 result: RpcStateChangesInBlockByTypeResponse,
17492 },
17493 Variant1 {
17494 error: ErrorWrapperForRpcStateChangesError,
17495 id: ::std::string::String,
17496 jsonrpc: ::std::string::String,
17497 },
17498}
17499impl ::std::convert::From<&Self>
17500 for JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError
17501{
17502 fn from(
17503 value: &JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError,
17504 ) -> Self {
17505 value.clone()
17506 }
17507}
17508#[doc = "`JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError`"]
17509#[doc = r""]
17510#[doc = r" <details><summary>JSON schema</summary>"]
17511#[doc = r""]
17512#[doc = r" ```json"]
17513#[doc = "{"]
17514#[doc = " \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockResponse_and_RpcStateChangesError\","]
17515#[doc = " \"type\": \"object\","]
17516#[doc = " \"oneOf\": ["]
17517#[doc = " {"]
17518#[doc = " \"type\": \"object\","]
17519#[doc = " \"required\": ["]
17520#[doc = " \"result\""]
17521#[doc = " ],"]
17522#[doc = " \"properties\": {"]
17523#[doc = " \"result\": {"]
17524#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockResponse\""]
17525#[doc = " }"]
17526#[doc = " }"]
17527#[doc = " },"]
17528#[doc = " {"]
17529#[doc = " \"type\": \"object\","]
17530#[doc = " \"required\": ["]
17531#[doc = " \"error\""]
17532#[doc = " ],"]
17533#[doc = " \"properties\": {"]
17534#[doc = " \"error\": {"]
17535#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStateChangesError\""]
17536#[doc = " }"]
17537#[doc = " }"]
17538#[doc = " }"]
17539#[doc = " ],"]
17540#[doc = " \"required\": ["]
17541#[doc = " \"id\","]
17542#[doc = " \"jsonrpc\""]
17543#[doc = " ],"]
17544#[doc = " \"properties\": {"]
17545#[doc = " \"id\": {"]
17546#[doc = " \"type\": \"string\""]
17547#[doc = " },"]
17548#[doc = " \"jsonrpc\": {"]
17549#[doc = " \"type\": \"string\""]
17550#[doc = " }"]
17551#[doc = " }"]
17552#[doc = "}"]
17553#[doc = r" ```"]
17554#[doc = r" </details>"]
17555#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17556#[serde(untagged)]
17557pub enum JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError {
17558 Variant0 {
17559 id: ::std::string::String,
17560 jsonrpc: ::std::string::String,
17561 result: RpcStateChangesInBlockResponse,
17562 },
17563 Variant1 {
17564 error: ErrorWrapperForRpcStateChangesError,
17565 id: ::std::string::String,
17566 jsonrpc: ::std::string::String,
17567 },
17568}
17569impl ::std::convert::From<&Self>
17570 for JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError
17571{
17572 fn from(
17573 value: &JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError,
17574 ) -> Self {
17575 value.clone()
17576 }
17577}
17578#[doc = "`JsonRpcResponseForRpcStatusResponseAndRpcStatusError`"]
17579#[doc = r""]
17580#[doc = r" <details><summary>JSON schema</summary>"]
17581#[doc = r""]
17582#[doc = r" ```json"]
17583#[doc = "{"]
17584#[doc = " \"title\": \"JsonRpcResponse_for_RpcStatusResponse_and_RpcStatusError\","]
17585#[doc = " \"type\": \"object\","]
17586#[doc = " \"oneOf\": ["]
17587#[doc = " {"]
17588#[doc = " \"type\": \"object\","]
17589#[doc = " \"required\": ["]
17590#[doc = " \"result\""]
17591#[doc = " ],"]
17592#[doc = " \"properties\": {"]
17593#[doc = " \"result\": {"]
17594#[doc = " \"$ref\": \"#/components/schemas/RpcStatusResponse\""]
17595#[doc = " }"]
17596#[doc = " }"]
17597#[doc = " },"]
17598#[doc = " {"]
17599#[doc = " \"type\": \"object\","]
17600#[doc = " \"required\": ["]
17601#[doc = " \"error\""]
17602#[doc = " ],"]
17603#[doc = " \"properties\": {"]
17604#[doc = " \"error\": {"]
17605#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcStatusError\""]
17606#[doc = " }"]
17607#[doc = " }"]
17608#[doc = " }"]
17609#[doc = " ],"]
17610#[doc = " \"required\": ["]
17611#[doc = " \"id\","]
17612#[doc = " \"jsonrpc\""]
17613#[doc = " ],"]
17614#[doc = " \"properties\": {"]
17615#[doc = " \"id\": {"]
17616#[doc = " \"type\": \"string\""]
17617#[doc = " },"]
17618#[doc = " \"jsonrpc\": {"]
17619#[doc = " \"type\": \"string\""]
17620#[doc = " }"]
17621#[doc = " }"]
17622#[doc = "}"]
17623#[doc = r" ```"]
17624#[doc = r" </details>"]
17625#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17626#[serde(untagged)]
17627pub enum JsonRpcResponseForRpcStatusResponseAndRpcStatusError {
17628 Variant0 {
17629 id: ::std::string::String,
17630 jsonrpc: ::std::string::String,
17631 result: RpcStatusResponse,
17632 },
17633 Variant1 {
17634 error: ErrorWrapperForRpcStatusError,
17635 id: ::std::string::String,
17636 jsonrpc: ::std::string::String,
17637 },
17638}
17639impl ::std::convert::From<&Self> for JsonRpcResponseForRpcStatusResponseAndRpcStatusError {
17640 fn from(value: &JsonRpcResponseForRpcStatusResponseAndRpcStatusError) -> Self {
17641 value.clone()
17642 }
17643}
17644#[doc = "`JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError`"]
17645#[doc = r""]
17646#[doc = r" <details><summary>JSON schema</summary>"]
17647#[doc = r""]
17648#[doc = r" ```json"]
17649#[doc = "{"]
17650#[doc = " \"title\": \"JsonRpcResponse_for_RpcTransactionResponse_and_RpcTransactionError\","]
17651#[doc = " \"type\": \"object\","]
17652#[doc = " \"oneOf\": ["]
17653#[doc = " {"]
17654#[doc = " \"type\": \"object\","]
17655#[doc = " \"required\": ["]
17656#[doc = " \"result\""]
17657#[doc = " ],"]
17658#[doc = " \"properties\": {"]
17659#[doc = " \"result\": {"]
17660#[doc = " \"$ref\": \"#/components/schemas/RpcTransactionResponse\""]
17661#[doc = " }"]
17662#[doc = " }"]
17663#[doc = " },"]
17664#[doc = " {"]
17665#[doc = " \"type\": \"object\","]
17666#[doc = " \"required\": ["]
17667#[doc = " \"error\""]
17668#[doc = " ],"]
17669#[doc = " \"properties\": {"]
17670#[doc = " \"error\": {"]
17671#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcTransactionError\""]
17672#[doc = " }"]
17673#[doc = " }"]
17674#[doc = " }"]
17675#[doc = " ],"]
17676#[doc = " \"required\": ["]
17677#[doc = " \"id\","]
17678#[doc = " \"jsonrpc\""]
17679#[doc = " ],"]
17680#[doc = " \"properties\": {"]
17681#[doc = " \"id\": {"]
17682#[doc = " \"type\": \"string\""]
17683#[doc = " },"]
17684#[doc = " \"jsonrpc\": {"]
17685#[doc = " \"type\": \"string\""]
17686#[doc = " }"]
17687#[doc = " }"]
17688#[doc = "}"]
17689#[doc = r" ```"]
17690#[doc = r" </details>"]
17691#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17692#[serde(untagged)]
17693pub enum JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError {
17694 Variant0 {
17695 id: ::std::string::String,
17696 jsonrpc: ::std::string::String,
17697 result: RpcTransactionResponse,
17698 },
17699 Variant1 {
17700 error: ErrorWrapperForRpcTransactionError,
17701 id: ::std::string::String,
17702 jsonrpc: ::std::string::String,
17703 },
17704}
17705impl ::std::convert::From<&Self>
17706 for JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError
17707{
17708 fn from(value: &JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError) -> Self {
17709 value.clone()
17710 }
17711}
17712#[doc = "`JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError`"]
17713#[doc = r""]
17714#[doc = r" <details><summary>JSON schema</summary>"]
17715#[doc = r""]
17716#[doc = r" ```json"]
17717#[doc = "{"]
17718#[doc = " \"title\": \"JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError\","]
17719#[doc = " \"type\": \"object\","]
17720#[doc = " \"oneOf\": ["]
17721#[doc = " {"]
17722#[doc = " \"type\": \"object\","]
17723#[doc = " \"required\": ["]
17724#[doc = " \"result\""]
17725#[doc = " ],"]
17726#[doc = " \"properties\": {"]
17727#[doc = " \"result\": {"]
17728#[doc = " \"$ref\": \"#/components/schemas/RpcValidatorResponse\""]
17729#[doc = " }"]
17730#[doc = " }"]
17731#[doc = " },"]
17732#[doc = " {"]
17733#[doc = " \"type\": \"object\","]
17734#[doc = " \"required\": ["]
17735#[doc = " \"error\""]
17736#[doc = " ],"]
17737#[doc = " \"properties\": {"]
17738#[doc = " \"error\": {"]
17739#[doc = " \"$ref\": \"#/components/schemas/ErrorWrapper_for_RpcValidatorError\""]
17740#[doc = " }"]
17741#[doc = " }"]
17742#[doc = " }"]
17743#[doc = " ],"]
17744#[doc = " \"required\": ["]
17745#[doc = " \"id\","]
17746#[doc = " \"jsonrpc\""]
17747#[doc = " ],"]
17748#[doc = " \"properties\": {"]
17749#[doc = " \"id\": {"]
17750#[doc = " \"type\": \"string\""]
17751#[doc = " },"]
17752#[doc = " \"jsonrpc\": {"]
17753#[doc = " \"type\": \"string\""]
17754#[doc = " }"]
17755#[doc = " }"]
17756#[doc = "}"]
17757#[doc = r" ```"]
17758#[doc = r" </details>"]
17759#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17760#[serde(untagged)]
17761pub enum JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError {
17762 Variant0 {
17763 id: ::std::string::String,
17764 jsonrpc: ::std::string::String,
17765 result: RpcValidatorResponse,
17766 },
17767 Variant1 {
17768 error: ErrorWrapperForRpcValidatorError,
17769 id: ::std::string::String,
17770 jsonrpc: ::std::string::String,
17771 },
17772}
17773impl ::std::convert::From<&Self> for JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError {
17774 fn from(value: &JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError) -> Self {
17775 value.clone()
17776 }
17777}
17778#[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."]
17779#[doc = r""]
17780#[doc = r" <details><summary>JSON schema</summary>"]
17781#[doc = r""]
17782#[doc = r" ```json"]
17783#[doc = "{"]
17784#[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.\","]
17785#[doc = " \"type\": \"object\","]
17786#[doc = " \"required\": ["]
17787#[doc = " \"account_id\","]
17788#[doc = " \"peer_id\""]
17789#[doc = " ],"]
17790#[doc = " \"properties\": {"]
17791#[doc = " \"account_id\": {"]
17792#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
17793#[doc = " },"]
17794#[doc = " \"next_hops\": {"]
17795#[doc = " \"type\": ["]
17796#[doc = " \"array\","]
17797#[doc = " \"null\""]
17798#[doc = " ],"]
17799#[doc = " \"items\": {"]
17800#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
17801#[doc = " }"]
17802#[doc = " },"]
17803#[doc = " \"peer_id\": {"]
17804#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
17805#[doc = " }"]
17806#[doc = " }"]
17807#[doc = "}"]
17808#[doc = r" ```"]
17809#[doc = r" </details>"]
17810#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17811pub struct KnownProducerView {
17812 pub account_id: AccountId,
17813 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17814 pub next_hops: ::std::option::Option<::std::vec::Vec<PublicKey>>,
17815 pub peer_id: PublicKey,
17816}
17817impl ::std::convert::From<&KnownProducerView> for KnownProducerView {
17818 fn from(value: &KnownProducerView) -> Self {
17819 value.clone()
17820 }
17821}
17822#[doc = "`LightClientBlockLiteView`"]
17823#[doc = r""]
17824#[doc = r" <details><summary>JSON schema</summary>"]
17825#[doc = r""]
17826#[doc = r" ```json"]
17827#[doc = "{"]
17828#[doc = " \"type\": \"object\","]
17829#[doc = " \"required\": ["]
17830#[doc = " \"inner_lite\","]
17831#[doc = " \"inner_rest_hash\","]
17832#[doc = " \"prev_block_hash\""]
17833#[doc = " ],"]
17834#[doc = " \"properties\": {"]
17835#[doc = " \"inner_lite\": {"]
17836#[doc = " \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
17837#[doc = " },"]
17838#[doc = " \"inner_rest_hash\": {"]
17839#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
17840#[doc = " },"]
17841#[doc = " \"prev_block_hash\": {"]
17842#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
17843#[doc = " }"]
17844#[doc = " }"]
17845#[doc = "}"]
17846#[doc = r" ```"]
17847#[doc = r" </details>"]
17848#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17849pub struct LightClientBlockLiteView {
17850 pub inner_lite: BlockHeaderInnerLiteView,
17851 pub inner_rest_hash: CryptoHash,
17852 pub prev_block_hash: CryptoHash,
17853}
17854impl ::std::convert::From<&LightClientBlockLiteView> for LightClientBlockLiteView {
17855 fn from(value: &LightClientBlockLiteView) -> Self {
17856 value.clone()
17857 }
17858}
17859#[doc = "Describes limits for VM and Runtime.\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities"]
17860#[doc = r""]
17861#[doc = r" <details><summary>JSON schema</summary>"]
17862#[doc = r""]
17863#[doc = r" ```json"]
17864#[doc = "{"]
17865#[doc = " \"description\": \"Describes limits for VM and Runtime.\\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities\","]
17866#[doc = " \"type\": \"object\","]
17867#[doc = " \"required\": ["]
17868#[doc = " \"initial_memory_pages\","]
17869#[doc = " \"max_actions_per_receipt\","]
17870#[doc = " \"max_arguments_length\","]
17871#[doc = " \"max_contract_size\","]
17872#[doc = " \"max_gas_burnt\","]
17873#[doc = " \"max_length_method_name\","]
17874#[doc = " \"max_length_returned_data\","]
17875#[doc = " \"max_length_storage_key\","]
17876#[doc = " \"max_length_storage_value\","]
17877#[doc = " \"max_memory_pages\","]
17878#[doc = " \"max_number_bytes_method_names\","]
17879#[doc = " \"max_number_input_data_dependencies\","]
17880#[doc = " \"max_number_logs\","]
17881#[doc = " \"max_number_registers\","]
17882#[doc = " \"max_promises_per_function_call_action\","]
17883#[doc = " \"max_receipt_size\","]
17884#[doc = " \"max_register_size\","]
17885#[doc = " \"max_stack_height\","]
17886#[doc = " \"max_total_log_length\","]
17887#[doc = " \"max_total_prepaid_gas\","]
17888#[doc = " \"max_transaction_size\","]
17889#[doc = " \"max_yield_payload_size\","]
17890#[doc = " \"per_receipt_storage_proof_size_limit\","]
17891#[doc = " \"registers_memory_limit\","]
17892#[doc = " \"yield_timeout_length_in_blocks\""]
17893#[doc = " ],"]
17894#[doc = " \"properties\": {"]
17895#[doc = " \"account_id_validity_rules_version\": {"]
17896#[doc = " \"description\": \"Whether to enforce account_id well-formed-ness where it wasn't enforced\\nhistorically.\","]
17897#[doc = " \"default\": 0,"]
17898#[doc = " \"allOf\": ["]
17899#[doc = " {"]
17900#[doc = " \"$ref\": \"#/components/schemas/AccountIdValidityRulesVersion\""]
17901#[doc = " }"]
17902#[doc = " ]"]
17903#[doc = " },"]
17904#[doc = " \"initial_memory_pages\": {"]
17905#[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.\","]
17906#[doc = " \"type\": \"integer\","]
17907#[doc = " \"format\": \"uint32\","]
17908#[doc = " \"minimum\": 0.0"]
17909#[doc = " },"]
17910#[doc = " \"max_actions_per_receipt\": {"]
17911#[doc = " \"description\": \"Max number of actions per receipt.\","]
17912#[doc = " \"type\": \"integer\","]
17913#[doc = " \"format\": \"uint64\","]
17914#[doc = " \"minimum\": 0.0"]
17915#[doc = " },"]
17916#[doc = " \"max_arguments_length\": {"]
17917#[doc = " \"description\": \"Max length of arguments in a function call action.\","]
17918#[doc = " \"type\": \"integer\","]
17919#[doc = " \"format\": \"uint64\","]
17920#[doc = " \"minimum\": 0.0"]
17921#[doc = " },"]
17922#[doc = " \"max_contract_size\": {"]
17923#[doc = " \"description\": \"Max contract size\","]
17924#[doc = " \"type\": \"integer\","]
17925#[doc = " \"format\": \"uint64\","]
17926#[doc = " \"minimum\": 0.0"]
17927#[doc = " },"]
17928#[doc = " \"max_elements_per_contract_table\": {"]
17929#[doc = " \"description\": \"If present, stores max number of elements in a single contract's table\","]
17930#[doc = " \"type\": ["]
17931#[doc = " \"integer\","]
17932#[doc = " \"null\""]
17933#[doc = " ],"]
17934#[doc = " \"format\": \"uint\","]
17935#[doc = " \"minimum\": 0.0"]
17936#[doc = " },"]
17937#[doc = " \"max_functions_number_per_contract\": {"]
17938#[doc = " \"description\": \"If present, stores max number of functions in one contract\","]
17939#[doc = " \"type\": ["]
17940#[doc = " \"integer\","]
17941#[doc = " \"null\""]
17942#[doc = " ],"]
17943#[doc = " \"format\": \"uint64\","]
17944#[doc = " \"minimum\": 0.0"]
17945#[doc = " },"]
17946#[doc = " \"max_gas_burnt\": {"]
17947#[doc = " \"description\": \"Max amount of gas that can be used, excluding gas attached to promises.\","]
17948#[doc = " \"allOf\": ["]
17949#[doc = " {"]
17950#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
17951#[doc = " }"]
17952#[doc = " ]"]
17953#[doc = " },"]
17954#[doc = " \"max_length_method_name\": {"]
17955#[doc = " \"description\": \"Max length of any method name (without terminating character).\","]
17956#[doc = " \"type\": \"integer\","]
17957#[doc = " \"format\": \"uint64\","]
17958#[doc = " \"minimum\": 0.0"]
17959#[doc = " },"]
17960#[doc = " \"max_length_returned_data\": {"]
17961#[doc = " \"description\": \"Max length of returned data\","]
17962#[doc = " \"type\": \"integer\","]
17963#[doc = " \"format\": \"uint64\","]
17964#[doc = " \"minimum\": 0.0"]
17965#[doc = " },"]
17966#[doc = " \"max_length_storage_key\": {"]
17967#[doc = " \"description\": \"Max storage key size\","]
17968#[doc = " \"type\": \"integer\","]
17969#[doc = " \"format\": \"uint64\","]
17970#[doc = " \"minimum\": 0.0"]
17971#[doc = " },"]
17972#[doc = " \"max_length_storage_value\": {"]
17973#[doc = " \"description\": \"Max storage value size\","]
17974#[doc = " \"type\": \"integer\","]
17975#[doc = " \"format\": \"uint64\","]
17976#[doc = " \"minimum\": 0.0"]
17977#[doc = " },"]
17978#[doc = " \"max_locals_per_contract\": {"]
17979#[doc = " \"description\": \"If present, stores max number of locals declared globally in one contract\","]
17980#[doc = " \"type\": ["]
17981#[doc = " \"integer\","]
17982#[doc = " \"null\""]
17983#[doc = " ],"]
17984#[doc = " \"format\": \"uint64\","]
17985#[doc = " \"minimum\": 0.0"]
17986#[doc = " },"]
17987#[doc = " \"max_memory_pages\": {"]
17988#[doc = " \"description\": \"What is the maximal memory pages amount is allowed to have for a contract.\","]
17989#[doc = " \"type\": \"integer\","]
17990#[doc = " \"format\": \"uint32\","]
17991#[doc = " \"minimum\": 0.0"]
17992#[doc = " },"]
17993#[doc = " \"max_number_bytes_method_names\": {"]
17994#[doc = " \"description\": \"Max total length of all method names (including terminating character) for a function call\\npermission access key.\","]
17995#[doc = " \"type\": \"integer\","]
17996#[doc = " \"format\": \"uint64\","]
17997#[doc = " \"minimum\": 0.0"]
17998#[doc = " },"]
17999#[doc = " \"max_number_input_data_dependencies\": {"]
18000#[doc = " \"description\": \"Max number of input data dependencies\","]
18001#[doc = " \"type\": \"integer\","]
18002#[doc = " \"format\": \"uint64\","]
18003#[doc = " \"minimum\": 0.0"]
18004#[doc = " },"]
18005#[doc = " \"max_number_logs\": {"]
18006#[doc = " \"description\": \"Maximum number of log entries.\","]
18007#[doc = " \"type\": \"integer\","]
18008#[doc = " \"format\": \"uint64\","]
18009#[doc = " \"minimum\": 0.0"]
18010#[doc = " },"]
18011#[doc = " \"max_number_registers\": {"]
18012#[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.\","]
18013#[doc = " \"type\": \"integer\","]
18014#[doc = " \"format\": \"uint64\","]
18015#[doc = " \"minimum\": 0.0"]
18016#[doc = " },"]
18017#[doc = " \"max_promises_per_function_call_action\": {"]
18018#[doc = " \"description\": \"Max number of promises that a function call can create\","]
18019#[doc = " \"type\": \"integer\","]
18020#[doc = " \"format\": \"uint64\","]
18021#[doc = " \"minimum\": 0.0"]
18022#[doc = " },"]
18023#[doc = " \"max_receipt_size\": {"]
18024#[doc = " \"description\": \"Max receipt size\","]
18025#[doc = " \"type\": \"integer\","]
18026#[doc = " \"format\": \"uint64\","]
18027#[doc = " \"minimum\": 0.0"]
18028#[doc = " },"]
18029#[doc = " \"max_register_size\": {"]
18030#[doc = " \"description\": \"Maximum number of bytes that can be stored in a single register.\","]
18031#[doc = " \"type\": \"integer\","]
18032#[doc = " \"format\": \"uint64\","]
18033#[doc = " \"minimum\": 0.0"]
18034#[doc = " },"]
18035#[doc = " \"max_stack_height\": {"]
18036#[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.\","]
18037#[doc = " \"type\": \"integer\","]
18038#[doc = " \"format\": \"uint32\","]
18039#[doc = " \"minimum\": 0.0"]
18040#[doc = " },"]
18041#[doc = " \"max_tables_per_contract\": {"]
18042#[doc = " \"description\": \"If present, stores max number of tables declared globally in one contract\","]
18043#[doc = " \"type\": ["]
18044#[doc = " \"integer\","]
18045#[doc = " \"null\""]
18046#[doc = " ],"]
18047#[doc = " \"format\": \"uint32\","]
18048#[doc = " \"minimum\": 0.0"]
18049#[doc = " },"]
18050#[doc = " \"max_total_log_length\": {"]
18051#[doc = " \"description\": \"Maximum total length in bytes of all log messages.\","]
18052#[doc = " \"type\": \"integer\","]
18053#[doc = " \"format\": \"uint64\","]
18054#[doc = " \"minimum\": 0.0"]
18055#[doc = " },"]
18056#[doc = " \"max_total_prepaid_gas\": {"]
18057#[doc = " \"description\": \"Max total prepaid gas for all function call actions per receipt.\","]
18058#[doc = " \"allOf\": ["]
18059#[doc = " {"]
18060#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
18061#[doc = " }"]
18062#[doc = " ]"]
18063#[doc = " },"]
18064#[doc = " \"max_transaction_size\": {"]
18065#[doc = " \"description\": \"Max transaction size\","]
18066#[doc = " \"type\": \"integer\","]
18067#[doc = " \"format\": \"uint64\","]
18068#[doc = " \"minimum\": 0.0"]
18069#[doc = " },"]
18070#[doc = " \"max_yield_payload_size\": {"]
18071#[doc = " \"description\": \"Maximum number of bytes for payload passed over a yield resume.\","]
18072#[doc = " \"type\": \"integer\","]
18073#[doc = " \"format\": \"uint64\","]
18074#[doc = " \"minimum\": 0.0"]
18075#[doc = " },"]
18076#[doc = " \"per_receipt_storage_proof_size_limit\": {"]
18077#[doc = " \"description\": \"Hard limit on the size of storage proof generated while executing a single receipt.\","]
18078#[doc = " \"type\": \"integer\","]
18079#[doc = " \"format\": \"uint\","]
18080#[doc = " \"minimum\": 0.0"]
18081#[doc = " },"]
18082#[doc = " \"registers_memory_limit\": {"]
18083#[doc = " \"description\": \"Limit of memory used by registers.\","]
18084#[doc = " \"type\": \"integer\","]
18085#[doc = " \"format\": \"uint64\","]
18086#[doc = " \"minimum\": 0.0"]
18087#[doc = " },"]
18088#[doc = " \"yield_timeout_length_in_blocks\": {"]
18089#[doc = " \"description\": \"Number of blocks after which a yielded promise times out.\","]
18090#[doc = " \"type\": \"integer\","]
18091#[doc = " \"format\": \"uint64\","]
18092#[doc = " \"minimum\": 0.0"]
18093#[doc = " }"]
18094#[doc = " }"]
18095#[doc = "}"]
18096#[doc = r" ```"]
18097#[doc = r" </details>"]
18098#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18099pub struct LimitConfig {
18100 #[doc = "Whether to enforce account_id well-formed-ness where it wasn't enforced\nhistorically."]
18101 #[serde(default = "defaults::limit_config_account_id_validity_rules_version")]
18102 pub account_id_validity_rules_version: AccountIdValidityRulesVersion,
18103 #[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."]
18104 pub initial_memory_pages: u32,
18105 #[doc = "Max number of actions per receipt."]
18106 pub max_actions_per_receipt: u64,
18107 #[doc = "Max length of arguments in a function call action."]
18108 pub max_arguments_length: u64,
18109 #[doc = "Max contract size"]
18110 pub max_contract_size: u64,
18111 #[doc = "If present, stores max number of elements in a single contract's table"]
18112 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18113 pub max_elements_per_contract_table: ::std::option::Option<u32>,
18114 #[doc = "If present, stores max number of functions in one contract"]
18115 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18116 pub max_functions_number_per_contract: ::std::option::Option<u64>,
18117 #[doc = "Max amount of gas that can be used, excluding gas attached to promises."]
18118 pub max_gas_burnt: NearGas,
18119 #[doc = "Max length of any method name (without terminating character)."]
18120 pub max_length_method_name: u64,
18121 #[doc = "Max length of returned data"]
18122 pub max_length_returned_data: u64,
18123 #[doc = "Max storage key size"]
18124 pub max_length_storage_key: u64,
18125 #[doc = "Max storage value size"]
18126 pub max_length_storage_value: u64,
18127 #[doc = "If present, stores max number of locals declared globally in one contract"]
18128 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18129 pub max_locals_per_contract: ::std::option::Option<u64>,
18130 #[doc = "What is the maximal memory pages amount is allowed to have for a contract."]
18131 pub max_memory_pages: u32,
18132 #[doc = "Max total length of all method names (including terminating character) for a function call\npermission access key."]
18133 pub max_number_bytes_method_names: u64,
18134 #[doc = "Max number of input data dependencies"]
18135 pub max_number_input_data_dependencies: u64,
18136 #[doc = "Maximum number of log entries."]
18137 pub max_number_logs: u64,
18138 #[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."]
18139 pub max_number_registers: u64,
18140 #[doc = "Max number of promises that a function call can create"]
18141 pub max_promises_per_function_call_action: u64,
18142 #[doc = "Max receipt size"]
18143 pub max_receipt_size: u64,
18144 #[doc = "Maximum number of bytes that can be stored in a single register."]
18145 pub max_register_size: u64,
18146 #[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."]
18147 pub max_stack_height: u32,
18148 #[doc = "If present, stores max number of tables declared globally in one contract"]
18149 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18150 pub max_tables_per_contract: ::std::option::Option<u32>,
18151 #[doc = "Maximum total length in bytes of all log messages."]
18152 pub max_total_log_length: u64,
18153 #[doc = "Max total prepaid gas for all function call actions per receipt."]
18154 pub max_total_prepaid_gas: NearGas,
18155 #[doc = "Max transaction size"]
18156 pub max_transaction_size: u64,
18157 #[doc = "Maximum number of bytes for payload passed over a yield resume."]
18158 pub max_yield_payload_size: u64,
18159 #[doc = "Hard limit on the size of storage proof generated while executing a single receipt."]
18160 pub per_receipt_storage_proof_size_limit: u32,
18161 #[doc = "Limit of memory used by registers."]
18162 pub registers_memory_limit: u64,
18163 #[doc = "Number of blocks after which a yielded promise times out."]
18164 pub yield_timeout_length_in_blocks: u64,
18165}
18166impl ::std::convert::From<&LimitConfig> for LimitConfig {
18167 fn from(value: &LimitConfig) -> Self {
18168 value.clone()
18169 }
18170}
18171#[doc = "`LogSummaryStyle`"]
18172#[doc = r""]
18173#[doc = r" <details><summary>JSON schema</summary>"]
18174#[doc = r""]
18175#[doc = r" ```json"]
18176#[doc = "{"]
18177#[doc = " \"type\": \"string\","]
18178#[doc = " \"enum\": ["]
18179#[doc = " \"plain\","]
18180#[doc = " \"colored\""]
18181#[doc = " ]"]
18182#[doc = "}"]
18183#[doc = r" ```"]
18184#[doc = r" </details>"]
18185#[derive(
18186 :: serde :: Deserialize,
18187 :: serde :: Serialize,
18188 Clone,
18189 Copy,
18190 Debug,
18191 Eq,
18192 Hash,
18193 Ord,
18194 PartialEq,
18195 PartialOrd,
18196)]
18197pub enum LogSummaryStyle {
18198 #[serde(rename = "plain")]
18199 Plain,
18200 #[serde(rename = "colored")]
18201 Colored,
18202}
18203impl ::std::convert::From<&Self> for LogSummaryStyle {
18204 fn from(value: &LogSummaryStyle) -> Self {
18205 value.clone()
18206 }
18207}
18208impl ::std::fmt::Display for LogSummaryStyle {
18209 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18210 match *self {
18211 Self::Plain => f.write_str("plain"),
18212 Self::Colored => f.write_str("colored"),
18213 }
18214 }
18215}
18216impl ::std::str::FromStr for LogSummaryStyle {
18217 type Err = self::error::ConversionError;
18218 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18219 match value {
18220 "plain" => Ok(Self::Plain),
18221 "colored" => Ok(Self::Colored),
18222 _ => Err("invalid value".into()),
18223 }
18224 }
18225}
18226impl ::std::convert::TryFrom<&str> for LogSummaryStyle {
18227 type Error = self::error::ConversionError;
18228 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18229 value.parse()
18230 }
18231}
18232impl ::std::convert::TryFrom<&::std::string::String> for LogSummaryStyle {
18233 type Error = self::error::ConversionError;
18234 fn try_from(
18235 value: &::std::string::String,
18236 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18237 value.parse()
18238 }
18239}
18240impl ::std::convert::TryFrom<::std::string::String> for LogSummaryStyle {
18241 type Error = self::error::ConversionError;
18242 fn try_from(
18243 value: ::std::string::String,
18244 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18245 value.parse()
18246 }
18247}
18248#[doc = "`MerklePathItem`"]
18249#[doc = r""]
18250#[doc = r" <details><summary>JSON schema</summary>"]
18251#[doc = r""]
18252#[doc = r" ```json"]
18253#[doc = "{"]
18254#[doc = " \"type\": \"object\","]
18255#[doc = " \"required\": ["]
18256#[doc = " \"direction\","]
18257#[doc = " \"hash\""]
18258#[doc = " ],"]
18259#[doc = " \"properties\": {"]
18260#[doc = " \"direction\": {"]
18261#[doc = " \"$ref\": \"#/components/schemas/Direction\""]
18262#[doc = " },"]
18263#[doc = " \"hash\": {"]
18264#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18265#[doc = " }"]
18266#[doc = " }"]
18267#[doc = "}"]
18268#[doc = r" ```"]
18269#[doc = r" </details>"]
18270#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18271pub struct MerklePathItem {
18272 pub direction: Direction,
18273 pub hash: CryptoHash,
18274}
18275impl ::std::convert::From<&MerklePathItem> for MerklePathItem {
18276 fn from(value: &MerklePathItem) -> Self {
18277 value.clone()
18278 }
18279}
18280#[doc = "`MethodResolveError`"]
18281#[doc = r""]
18282#[doc = r" <details><summary>JSON schema</summary>"]
18283#[doc = r""]
18284#[doc = r" ```json"]
18285#[doc = "{"]
18286#[doc = " \"type\": \"string\","]
18287#[doc = " \"enum\": ["]
18288#[doc = " \"MethodEmptyName\","]
18289#[doc = " \"MethodNotFound\","]
18290#[doc = " \"MethodInvalidSignature\""]
18291#[doc = " ]"]
18292#[doc = "}"]
18293#[doc = r" ```"]
18294#[doc = r" </details>"]
18295#[derive(
18296 :: serde :: Deserialize,
18297 :: serde :: Serialize,
18298 Clone,
18299 Copy,
18300 Debug,
18301 Eq,
18302 Hash,
18303 Ord,
18304 PartialEq,
18305 PartialOrd,
18306 thiserror::Error,
18307)]
18308pub enum MethodResolveError {
18309 MethodEmptyName,
18310 MethodNotFound,
18311 MethodInvalidSignature,
18312}
18313impl ::std::convert::From<&Self> for MethodResolveError {
18314 fn from(value: &MethodResolveError) -> Self {
18315 value.clone()
18316 }
18317}
18318impl ::std::fmt::Display for MethodResolveError {
18319 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18320 match *self {
18321 Self::MethodEmptyName => f.write_str("MethodEmptyName"),
18322 Self::MethodNotFound => f.write_str("MethodNotFound"),
18323 Self::MethodInvalidSignature => f.write_str("MethodInvalidSignature"),
18324 }
18325 }
18326}
18327impl ::std::str::FromStr for MethodResolveError {
18328 type Err = self::error::ConversionError;
18329 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18330 match value {
18331 "MethodEmptyName" => Ok(Self::MethodEmptyName),
18332 "MethodNotFound" => Ok(Self::MethodNotFound),
18333 "MethodInvalidSignature" => Ok(Self::MethodInvalidSignature),
18334 _ => Err("invalid value".into()),
18335 }
18336 }
18337}
18338impl ::std::convert::TryFrom<&str> for MethodResolveError {
18339 type Error = self::error::ConversionError;
18340 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18341 value.parse()
18342 }
18343}
18344impl ::std::convert::TryFrom<&::std::string::String> for MethodResolveError {
18345 type Error = self::error::ConversionError;
18346 fn try_from(
18347 value: &::std::string::String,
18348 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18349 value.parse()
18350 }
18351}
18352impl ::std::convert::TryFrom<::std::string::String> for MethodResolveError {
18353 type Error = self::error::ConversionError;
18354 fn try_from(
18355 value: ::std::string::String,
18356 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18357 value.parse()
18358 }
18359}
18360#[doc = "`MissingTrieValue`"]
18361#[doc = r""]
18362#[doc = r" <details><summary>JSON schema</summary>"]
18363#[doc = r""]
18364#[doc = r" ```json"]
18365#[doc = "{"]
18366#[doc = " \"type\": \"object\","]
18367#[doc = " \"required\": ["]
18368#[doc = " \"context\","]
18369#[doc = " \"hash\""]
18370#[doc = " ],"]
18371#[doc = " \"properties\": {"]
18372#[doc = " \"context\": {"]
18373#[doc = " \"$ref\": \"#/components/schemas/MissingTrieValueContext\""]
18374#[doc = " },"]
18375#[doc = " \"hash\": {"]
18376#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18377#[doc = " }"]
18378#[doc = " }"]
18379#[doc = "}"]
18380#[doc = r" ```"]
18381#[doc = r" </details>"]
18382#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18383pub struct MissingTrieValue {
18384 pub context: MissingTrieValueContext,
18385 pub hash: CryptoHash,
18386}
18387impl ::std::convert::From<&MissingTrieValue> for MissingTrieValue {
18388 fn from(value: &MissingTrieValue) -> Self {
18389 value.clone()
18390 }
18391}
18392#[doc = "Contexts in which `StorageError::MissingTrieValue` error might occur."]
18393#[doc = r""]
18394#[doc = r" <details><summary>JSON schema</summary>"]
18395#[doc = r""]
18396#[doc = r" ```json"]
18397#[doc = "{"]
18398#[doc = " \"description\": \"Contexts in which `StorageError::MissingTrieValue` error might occur.\","]
18399#[doc = " \"oneOf\": ["]
18400#[doc = " {"]
18401#[doc = " \"description\": \"Missing trie value when reading from TrieIterator.\","]
18402#[doc = " \"type\": \"string\","]
18403#[doc = " \"enum\": ["]
18404#[doc = " \"TrieIterator\""]
18405#[doc = " ]"]
18406#[doc = " },"]
18407#[doc = " {"]
18408#[doc = " \"description\": \"Missing trie value when reading from TriePrefetchingStorage.\","]
18409#[doc = " \"type\": \"string\","]
18410#[doc = " \"enum\": ["]
18411#[doc = " \"TriePrefetchingStorage\""]
18412#[doc = " ]"]
18413#[doc = " },"]
18414#[doc = " {"]
18415#[doc = " \"description\": \"Missing trie value when reading from TrieMemoryPartialStorage.\","]
18416#[doc = " \"type\": \"string\","]
18417#[doc = " \"enum\": ["]
18418#[doc = " \"TrieMemoryPartialStorage\""]
18419#[doc = " ]"]
18420#[doc = " },"]
18421#[doc = " {"]
18422#[doc = " \"description\": \"Missing trie value when reading from TrieStorage.\","]
18423#[doc = " \"type\": \"string\","]
18424#[doc = " \"enum\": ["]
18425#[doc = " \"TrieStorage\""]
18426#[doc = " ]"]
18427#[doc = " }"]
18428#[doc = " ]"]
18429#[doc = "}"]
18430#[doc = r" ```"]
18431#[doc = r" </details>"]
18432#[derive(
18433 :: serde :: Deserialize,
18434 :: serde :: Serialize,
18435 Clone,
18436 Copy,
18437 Debug,
18438 Eq,
18439 Hash,
18440 Ord,
18441 PartialEq,
18442 PartialOrd,
18443)]
18444pub enum MissingTrieValueContext {
18445 #[doc = "Missing trie value when reading from TrieIterator."]
18446 TrieIterator,
18447 #[doc = "Missing trie value when reading from TriePrefetchingStorage."]
18448 TriePrefetchingStorage,
18449 #[doc = "Missing trie value when reading from TrieMemoryPartialStorage."]
18450 TrieMemoryPartialStorage,
18451 #[doc = "Missing trie value when reading from TrieStorage."]
18452 TrieStorage,
18453}
18454impl ::std::convert::From<&Self> for MissingTrieValueContext {
18455 fn from(value: &MissingTrieValueContext) -> Self {
18456 value.clone()
18457 }
18458}
18459impl ::std::fmt::Display for MissingTrieValueContext {
18460 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18461 match *self {
18462 Self::TrieIterator => f.write_str("TrieIterator"),
18463 Self::TriePrefetchingStorage => f.write_str("TriePrefetchingStorage"),
18464 Self::TrieMemoryPartialStorage => f.write_str("TrieMemoryPartialStorage"),
18465 Self::TrieStorage => f.write_str("TrieStorage"),
18466 }
18467 }
18468}
18469impl ::std::str::FromStr for MissingTrieValueContext {
18470 type Err = self::error::ConversionError;
18471 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18472 match value {
18473 "TrieIterator" => Ok(Self::TrieIterator),
18474 "TriePrefetchingStorage" => Ok(Self::TriePrefetchingStorage),
18475 "TrieMemoryPartialStorage" => Ok(Self::TrieMemoryPartialStorage),
18476 "TrieStorage" => Ok(Self::TrieStorage),
18477 _ => Err("invalid value".into()),
18478 }
18479 }
18480}
18481impl ::std::convert::TryFrom<&str> for MissingTrieValueContext {
18482 type Error = self::error::ConversionError;
18483 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18484 value.parse()
18485 }
18486}
18487impl ::std::convert::TryFrom<&::std::string::String> for MissingTrieValueContext {
18488 type Error = self::error::ConversionError;
18489 fn try_from(
18490 value: &::std::string::String,
18491 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18492 value.parse()
18493 }
18494}
18495impl ::std::convert::TryFrom<::std::string::String> for MissingTrieValueContext {
18496 type Error = self::error::ConversionError;
18497 fn try_from(
18498 value: ::std::string::String,
18499 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18500 value.parse()
18501 }
18502}
18503#[doc = "`MutableConfigValue`"]
18504#[doc = r""]
18505#[doc = r" <details><summary>JSON schema</summary>"]
18506#[doc = r""]
18507#[doc = r" ```json"]
18508#[doc = "{"]
18509#[doc = " \"type\": \"string\""]
18510#[doc = "}"]
18511#[doc = r" ```"]
18512#[doc = r" </details>"]
18513#[derive(
18514 :: serde :: Deserialize,
18515 :: serde :: Serialize,
18516 Clone,
18517 Debug,
18518 Eq,
18519 Hash,
18520 Ord,
18521 PartialEq,
18522 PartialOrd,
18523)]
18524#[serde(transparent)]
18525pub struct MutableConfigValue(pub ::std::string::String);
18526impl ::std::ops::Deref for MutableConfigValue {
18527 type Target = ::std::string::String;
18528 fn deref(&self) -> &::std::string::String {
18529 &self.0
18530 }
18531}
18532impl ::std::convert::From<MutableConfigValue> for ::std::string::String {
18533 fn from(value: MutableConfigValue) -> Self {
18534 value.0
18535 }
18536}
18537impl ::std::convert::From<&MutableConfigValue> for MutableConfigValue {
18538 fn from(value: &MutableConfigValue) -> Self {
18539 value.clone()
18540 }
18541}
18542impl ::std::convert::From<::std::string::String> for MutableConfigValue {
18543 fn from(value: ::std::string::String) -> Self {
18544 Self(value)
18545 }
18546}
18547impl ::std::str::FromStr for MutableConfigValue {
18548 type Err = ::std::convert::Infallible;
18549 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
18550 Ok(Self(value.to_string()))
18551 }
18552}
18553impl ::std::fmt::Display for MutableConfigValue {
18554 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18555 self.0.fmt(f)
18556 }
18557}
18558#[doc = "`NetworkInfoView`"]
18559#[doc = r""]
18560#[doc = r" <details><summary>JSON schema</summary>"]
18561#[doc = r""]
18562#[doc = r" ```json"]
18563#[doc = "{"]
18564#[doc = " \"type\": \"object\","]
18565#[doc = " \"required\": ["]
18566#[doc = " \"connected_peers\","]
18567#[doc = " \"known_producers\","]
18568#[doc = " \"num_connected_peers\","]
18569#[doc = " \"peer_max_count\","]
18570#[doc = " \"tier1_accounts_data\","]
18571#[doc = " \"tier1_accounts_keys\","]
18572#[doc = " \"tier1_connections\""]
18573#[doc = " ],"]
18574#[doc = " \"properties\": {"]
18575#[doc = " \"connected_peers\": {"]
18576#[doc = " \"type\": \"array\","]
18577#[doc = " \"items\": {"]
18578#[doc = " \"$ref\": \"#/components/schemas/PeerInfoView\""]
18579#[doc = " }"]
18580#[doc = " },"]
18581#[doc = " \"known_producers\": {"]
18582#[doc = " \"type\": \"array\","]
18583#[doc = " \"items\": {"]
18584#[doc = " \"$ref\": \"#/components/schemas/KnownProducerView\""]
18585#[doc = " }"]
18586#[doc = " },"]
18587#[doc = " \"num_connected_peers\": {"]
18588#[doc = " \"type\": \"integer\","]
18589#[doc = " \"format\": \"uint\","]
18590#[doc = " \"minimum\": 0.0"]
18591#[doc = " },"]
18592#[doc = " \"peer_max_count\": {"]
18593#[doc = " \"type\": \"integer\","]
18594#[doc = " \"format\": \"uint32\","]
18595#[doc = " \"minimum\": 0.0"]
18596#[doc = " },"]
18597#[doc = " \"tier1_accounts_data\": {"]
18598#[doc = " \"type\": \"array\","]
18599#[doc = " \"items\": {"]
18600#[doc = " \"$ref\": \"#/components/schemas/AccountDataView\""]
18601#[doc = " }"]
18602#[doc = " },"]
18603#[doc = " \"tier1_accounts_keys\": {"]
18604#[doc = " \"type\": \"array\","]
18605#[doc = " \"items\": {"]
18606#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
18607#[doc = " }"]
18608#[doc = " },"]
18609#[doc = " \"tier1_connections\": {"]
18610#[doc = " \"type\": \"array\","]
18611#[doc = " \"items\": {"]
18612#[doc = " \"$ref\": \"#/components/schemas/PeerInfoView\""]
18613#[doc = " }"]
18614#[doc = " }"]
18615#[doc = " }"]
18616#[doc = "}"]
18617#[doc = r" ```"]
18618#[doc = r" </details>"]
18619#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18620pub struct NetworkInfoView {
18621 pub connected_peers: ::std::vec::Vec<PeerInfoView>,
18622 pub known_producers: ::std::vec::Vec<KnownProducerView>,
18623 pub num_connected_peers: u32,
18624 pub peer_max_count: u32,
18625 pub tier1_accounts_data: ::std::vec::Vec<AccountDataView>,
18626 pub tier1_accounts_keys: ::std::vec::Vec<PublicKey>,
18627 pub tier1_connections: ::std::vec::Vec<PeerInfoView>,
18628}
18629impl ::std::convert::From<&NetworkInfoView> for NetworkInfoView {
18630 fn from(value: &NetworkInfoView) -> Self {
18631 value.clone()
18632 }
18633}
18634#[doc = "`NextEpochValidatorInfo`"]
18635#[doc = r""]
18636#[doc = r" <details><summary>JSON schema</summary>"]
18637#[doc = r""]
18638#[doc = r" ```json"]
18639#[doc = "{"]
18640#[doc = " \"type\": \"object\","]
18641#[doc = " \"required\": ["]
18642#[doc = " \"account_id\","]
18643#[doc = " \"public_key\","]
18644#[doc = " \"shards\","]
18645#[doc = " \"stake\""]
18646#[doc = " ],"]
18647#[doc = " \"properties\": {"]
18648#[doc = " \"account_id\": {"]
18649#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
18650#[doc = " },"]
18651#[doc = " \"public_key\": {"]
18652#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
18653#[doc = " },"]
18654#[doc = " \"shards\": {"]
18655#[doc = " \"type\": \"array\","]
18656#[doc = " \"items\": {"]
18657#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
18658#[doc = " }"]
18659#[doc = " },"]
18660#[doc = " \"stake\": {"]
18661#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
18662#[doc = " }"]
18663#[doc = " }"]
18664#[doc = "}"]
18665#[doc = r" ```"]
18666#[doc = r" </details>"]
18667#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18668pub struct NextEpochValidatorInfo {
18669 pub account_id: AccountId,
18670 pub public_key: PublicKey,
18671 pub shards: ::std::vec::Vec<ShardId>,
18672 pub stake: NearToken,
18673}
18674impl ::std::convert::From<&NextEpochValidatorInfo> for NextEpochValidatorInfo {
18675 fn from(value: &NextEpochValidatorInfo) -> Self {
18676 value.clone()
18677 }
18678}
18679#[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."]
18680#[doc = r""]
18681#[doc = r" <details><summary>JSON schema</summary>"]
18682#[doc = r""]
18683#[doc = r" ```json"]
18684#[doc = "{"]
18685#[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.\","]
18686#[doc = " \"oneOf\": ["]
18687#[doc = " {"]
18688#[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>.\","]
18689#[doc = " \"type\": \"object\","]
18690#[doc = " \"required\": ["]
18691#[doc = " \"CreateAccount\""]
18692#[doc = " ],"]
18693#[doc = " \"properties\": {"]
18694#[doc = " \"CreateAccount\": {"]
18695#[doc = " \"$ref\": \"#/components/schemas/CreateAccountAction\""]
18696#[doc = " }"]
18697#[doc = " },"]
18698#[doc = " \"additionalProperties\": false"]
18699#[doc = " },"]
18700#[doc = " {"]
18701#[doc = " \"description\": \"Sets a Wasm code to a receiver_id\","]
18702#[doc = " \"type\": \"object\","]
18703#[doc = " \"required\": ["]
18704#[doc = " \"DeployContract\""]
18705#[doc = " ],"]
18706#[doc = " \"properties\": {"]
18707#[doc = " \"DeployContract\": {"]
18708#[doc = " \"$ref\": \"#/components/schemas/DeployContractAction\""]
18709#[doc = " }"]
18710#[doc = " },"]
18711#[doc = " \"additionalProperties\": false"]
18712#[doc = " },"]
18713#[doc = " {"]
18714#[doc = " \"type\": \"object\","]
18715#[doc = " \"required\": ["]
18716#[doc = " \"FunctionCall\""]
18717#[doc = " ],"]
18718#[doc = " \"properties\": {"]
18719#[doc = " \"FunctionCall\": {"]
18720#[doc = " \"$ref\": \"#/components/schemas/FunctionCallAction\""]
18721#[doc = " }"]
18722#[doc = " },"]
18723#[doc = " \"additionalProperties\": false"]
18724#[doc = " },"]
18725#[doc = " {"]
18726#[doc = " \"type\": \"object\","]
18727#[doc = " \"required\": ["]
18728#[doc = " \"Transfer\""]
18729#[doc = " ],"]
18730#[doc = " \"properties\": {"]
18731#[doc = " \"Transfer\": {"]
18732#[doc = " \"$ref\": \"#/components/schemas/TransferAction\""]
18733#[doc = " }"]
18734#[doc = " },"]
18735#[doc = " \"additionalProperties\": false"]
18736#[doc = " },"]
18737#[doc = " {"]
18738#[doc = " \"type\": \"object\","]
18739#[doc = " \"required\": ["]
18740#[doc = " \"Stake\""]
18741#[doc = " ],"]
18742#[doc = " \"properties\": {"]
18743#[doc = " \"Stake\": {"]
18744#[doc = " \"$ref\": \"#/components/schemas/StakeAction\""]
18745#[doc = " }"]
18746#[doc = " },"]
18747#[doc = " \"additionalProperties\": false"]
18748#[doc = " },"]
18749#[doc = " {"]
18750#[doc = " \"type\": \"object\","]
18751#[doc = " \"required\": ["]
18752#[doc = " \"AddKey\""]
18753#[doc = " ],"]
18754#[doc = " \"properties\": {"]
18755#[doc = " \"AddKey\": {"]
18756#[doc = " \"$ref\": \"#/components/schemas/AddKeyAction\""]
18757#[doc = " }"]
18758#[doc = " },"]
18759#[doc = " \"additionalProperties\": false"]
18760#[doc = " },"]
18761#[doc = " {"]
18762#[doc = " \"type\": \"object\","]
18763#[doc = " \"required\": ["]
18764#[doc = " \"DeleteKey\""]
18765#[doc = " ],"]
18766#[doc = " \"properties\": {"]
18767#[doc = " \"DeleteKey\": {"]
18768#[doc = " \"$ref\": \"#/components/schemas/DeleteKeyAction\""]
18769#[doc = " }"]
18770#[doc = " },"]
18771#[doc = " \"additionalProperties\": false"]
18772#[doc = " },"]
18773#[doc = " {"]
18774#[doc = " \"type\": \"object\","]
18775#[doc = " \"required\": ["]
18776#[doc = " \"DeleteAccount\""]
18777#[doc = " ],"]
18778#[doc = " \"properties\": {"]
18779#[doc = " \"DeleteAccount\": {"]
18780#[doc = " \"$ref\": \"#/components/schemas/DeleteAccountAction\""]
18781#[doc = " }"]
18782#[doc = " },"]
18783#[doc = " \"additionalProperties\": false"]
18784#[doc = " },"]
18785#[doc = " {"]
18786#[doc = " \"type\": \"object\","]
18787#[doc = " \"required\": ["]
18788#[doc = " \"DeployGlobalContract\""]
18789#[doc = " ],"]
18790#[doc = " \"properties\": {"]
18791#[doc = " \"DeployGlobalContract\": {"]
18792#[doc = " \"$ref\": \"#/components/schemas/DeployGlobalContractAction\""]
18793#[doc = " }"]
18794#[doc = " },"]
18795#[doc = " \"additionalProperties\": false"]
18796#[doc = " },"]
18797#[doc = " {"]
18798#[doc = " \"type\": \"object\","]
18799#[doc = " \"required\": ["]
18800#[doc = " \"UseGlobalContract\""]
18801#[doc = " ],"]
18802#[doc = " \"properties\": {"]
18803#[doc = " \"UseGlobalContract\": {"]
18804#[doc = " \"$ref\": \"#/components/schemas/UseGlobalContractAction\""]
18805#[doc = " }"]
18806#[doc = " },"]
18807#[doc = " \"additionalProperties\": false"]
18808#[doc = " },"]
18809#[doc = " {"]
18810#[doc = " \"type\": \"object\","]
18811#[doc = " \"required\": ["]
18812#[doc = " \"DeterministicStateInit\""]
18813#[doc = " ],"]
18814#[doc = " \"properties\": {"]
18815#[doc = " \"DeterministicStateInit\": {"]
18816#[doc = " \"$ref\": \"#/components/schemas/DeterministicStateInitAction\""]
18817#[doc = " }"]
18818#[doc = " },"]
18819#[doc = " \"additionalProperties\": false"]
18820#[doc = " },"]
18821#[doc = " {"]
18822#[doc = " \"type\": \"object\","]
18823#[doc = " \"required\": ["]
18824#[doc = " \"AddGasKey\""]
18825#[doc = " ],"]
18826#[doc = " \"properties\": {"]
18827#[doc = " \"AddGasKey\": {"]
18828#[doc = " \"$ref\": \"#/components/schemas/AddGasKeyAction\""]
18829#[doc = " }"]
18830#[doc = " },"]
18831#[doc = " \"additionalProperties\": false"]
18832#[doc = " },"]
18833#[doc = " {"]
18834#[doc = " \"type\": \"object\","]
18835#[doc = " \"required\": ["]
18836#[doc = " \"DeleteGasKey\""]
18837#[doc = " ],"]
18838#[doc = " \"properties\": {"]
18839#[doc = " \"DeleteGasKey\": {"]
18840#[doc = " \"$ref\": \"#/components/schemas/DeleteGasKeyAction\""]
18841#[doc = " }"]
18842#[doc = " },"]
18843#[doc = " \"additionalProperties\": false"]
18844#[doc = " },"]
18845#[doc = " {"]
18846#[doc = " \"type\": \"object\","]
18847#[doc = " \"required\": ["]
18848#[doc = " \"TransferToGasKey\""]
18849#[doc = " ],"]
18850#[doc = " \"properties\": {"]
18851#[doc = " \"TransferToGasKey\": {"]
18852#[doc = " \"$ref\": \"#/components/schemas/TransferToGasKeyAction\""]
18853#[doc = " }"]
18854#[doc = " },"]
18855#[doc = " \"additionalProperties\": false"]
18856#[doc = " }"]
18857#[doc = " ]"]
18858#[doc = "}"]
18859#[doc = r" ```"]
18860#[doc = r" </details>"]
18861#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18862pub enum NonDelegateAction {
18863 #[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>."]
18864 CreateAccount(CreateAccountAction),
18865 #[doc = "Sets a Wasm code to a receiver_id"]
18866 DeployContract(DeployContractAction),
18867 FunctionCall(FunctionCallAction),
18868 Transfer(TransferAction),
18869 Stake(StakeAction),
18870 AddKey(AddKeyAction),
18871 DeleteKey(DeleteKeyAction),
18872 DeleteAccount(DeleteAccountAction),
18873 DeployGlobalContract(DeployGlobalContractAction),
18874 UseGlobalContract(UseGlobalContractAction),
18875 DeterministicStateInit(DeterministicStateInitAction),
18876 AddGasKey(AddGasKeyAction),
18877 DeleteGasKey(DeleteGasKeyAction),
18878 TransferToGasKey(TransferToGasKeyAction),
18879}
18880impl ::std::convert::From<&Self> for NonDelegateAction {
18881 fn from(value: &NonDelegateAction) -> Self {
18882 value.clone()
18883 }
18884}
18885impl ::std::convert::From<CreateAccountAction> for NonDelegateAction {
18886 fn from(value: CreateAccountAction) -> Self {
18887 Self::CreateAccount(value)
18888 }
18889}
18890impl ::std::convert::From<DeployContractAction> for NonDelegateAction {
18891 fn from(value: DeployContractAction) -> Self {
18892 Self::DeployContract(value)
18893 }
18894}
18895impl ::std::convert::From<FunctionCallAction> for NonDelegateAction {
18896 fn from(value: FunctionCallAction) -> Self {
18897 Self::FunctionCall(value)
18898 }
18899}
18900impl ::std::convert::From<TransferAction> for NonDelegateAction {
18901 fn from(value: TransferAction) -> Self {
18902 Self::Transfer(value)
18903 }
18904}
18905impl ::std::convert::From<StakeAction> for NonDelegateAction {
18906 fn from(value: StakeAction) -> Self {
18907 Self::Stake(value)
18908 }
18909}
18910impl ::std::convert::From<AddKeyAction> for NonDelegateAction {
18911 fn from(value: AddKeyAction) -> Self {
18912 Self::AddKey(value)
18913 }
18914}
18915impl ::std::convert::From<DeleteKeyAction> for NonDelegateAction {
18916 fn from(value: DeleteKeyAction) -> Self {
18917 Self::DeleteKey(value)
18918 }
18919}
18920impl ::std::convert::From<DeleteAccountAction> for NonDelegateAction {
18921 fn from(value: DeleteAccountAction) -> Self {
18922 Self::DeleteAccount(value)
18923 }
18924}
18925impl ::std::convert::From<DeployGlobalContractAction> for NonDelegateAction {
18926 fn from(value: DeployGlobalContractAction) -> Self {
18927 Self::DeployGlobalContract(value)
18928 }
18929}
18930impl ::std::convert::From<UseGlobalContractAction> for NonDelegateAction {
18931 fn from(value: UseGlobalContractAction) -> Self {
18932 Self::UseGlobalContract(value)
18933 }
18934}
18935impl ::std::convert::From<DeterministicStateInitAction> for NonDelegateAction {
18936 fn from(value: DeterministicStateInitAction) -> Self {
18937 Self::DeterministicStateInit(value)
18938 }
18939}
18940impl ::std::convert::From<AddGasKeyAction> for NonDelegateAction {
18941 fn from(value: AddGasKeyAction) -> Self {
18942 Self::AddGasKey(value)
18943 }
18944}
18945impl ::std::convert::From<DeleteGasKeyAction> for NonDelegateAction {
18946 fn from(value: DeleteGasKeyAction) -> Self {
18947 Self::DeleteGasKey(value)
18948 }
18949}
18950impl ::std::convert::From<TransferToGasKeyAction> for NonDelegateAction {
18951 fn from(value: TransferToGasKeyAction) -> Self {
18952 Self::TransferToGasKey(value)
18953 }
18954}
18955#[doc = "Peer id is the public key."]
18956#[doc = r""]
18957#[doc = r" <details><summary>JSON schema</summary>"]
18958#[doc = r""]
18959#[doc = r" ```json"]
18960#[doc = "{"]
18961#[doc = " \"description\": \"Peer id is the public key.\","]
18962#[doc = " \"allOf\": ["]
18963#[doc = " {"]
18964#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
18965#[doc = " }"]
18966#[doc = " ]"]
18967#[doc = "}"]
18968#[doc = r" ```"]
18969#[doc = r" </details>"]
18970#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18971#[serde(transparent)]
18972pub struct PeerId(pub PublicKey);
18973impl ::std::ops::Deref for PeerId {
18974 type Target = PublicKey;
18975 fn deref(&self) -> &PublicKey {
18976 &self.0
18977 }
18978}
18979impl ::std::convert::From<PeerId> for PublicKey {
18980 fn from(value: PeerId) -> Self {
18981 value.0
18982 }
18983}
18984impl ::std::convert::From<&PeerId> for PeerId {
18985 fn from(value: &PeerId) -> Self {
18986 value.clone()
18987 }
18988}
18989impl ::std::convert::From<PublicKey> for PeerId {
18990 fn from(value: PublicKey) -> Self {
18991 Self(value)
18992 }
18993}
18994impl ::std::str::FromStr for PeerId {
18995 type Err = <PublicKey as ::std::str::FromStr>::Err;
18996 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
18997 Ok(Self(value.parse()?))
18998 }
18999}
19000impl ::std::convert::TryFrom<&str> for PeerId {
19001 type Error = <PublicKey as ::std::str::FromStr>::Err;
19002 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
19003 value.parse()
19004 }
19005}
19006impl ::std::convert::TryFrom<&String> for PeerId {
19007 type Error = <PublicKey as ::std::str::FromStr>::Err;
19008 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
19009 value.parse()
19010 }
19011}
19012impl ::std::convert::TryFrom<String> for PeerId {
19013 type Error = <PublicKey as ::std::str::FromStr>::Err;
19014 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
19015 value.parse()
19016 }
19017}
19018impl ::std::fmt::Display for PeerId {
19019 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19020 self.0.fmt(f)
19021 }
19022}
19023#[doc = "`PeerInfoView`"]
19024#[doc = r""]
19025#[doc = r" <details><summary>JSON schema</summary>"]
19026#[doc = r""]
19027#[doc = r" ```json"]
19028#[doc = "{"]
19029#[doc = " \"type\": \"object\","]
19030#[doc = " \"required\": ["]
19031#[doc = " \"addr\","]
19032#[doc = " \"archival\","]
19033#[doc = " \"connection_established_time_millis\","]
19034#[doc = " \"is_highest_block_invalid\","]
19035#[doc = " \"is_outbound_peer\","]
19036#[doc = " \"last_time_peer_requested_millis\","]
19037#[doc = " \"last_time_received_message_millis\","]
19038#[doc = " \"nonce\","]
19039#[doc = " \"peer_id\","]
19040#[doc = " \"received_bytes_per_sec\","]
19041#[doc = " \"sent_bytes_per_sec\","]
19042#[doc = " \"tracked_shards\""]
19043#[doc = " ],"]
19044#[doc = " \"properties\": {"]
19045#[doc = " \"account_id\": {"]
19046#[doc = " \"anyOf\": ["]
19047#[doc = " {"]
19048#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19049#[doc = " },"]
19050#[doc = " {"]
19051#[doc = " \"type\": \"null\""]
19052#[doc = " }"]
19053#[doc = " ]"]
19054#[doc = " },"]
19055#[doc = " \"addr\": {"]
19056#[doc = " \"type\": \"string\""]
19057#[doc = " },"]
19058#[doc = " \"archival\": {"]
19059#[doc = " \"type\": \"boolean\""]
19060#[doc = " },"]
19061#[doc = " \"block_hash\": {"]
19062#[doc = " \"anyOf\": ["]
19063#[doc = " {"]
19064#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
19065#[doc = " },"]
19066#[doc = " {"]
19067#[doc = " \"type\": \"null\""]
19068#[doc = " }"]
19069#[doc = " ]"]
19070#[doc = " },"]
19071#[doc = " \"connection_established_time_millis\": {"]
19072#[doc = " \"type\": \"integer\","]
19073#[doc = " \"format\": \"uint64\","]
19074#[doc = " \"minimum\": 0.0"]
19075#[doc = " },"]
19076#[doc = " \"height\": {"]
19077#[doc = " \"type\": ["]
19078#[doc = " \"integer\","]
19079#[doc = " \"null\""]
19080#[doc = " ],"]
19081#[doc = " \"format\": \"uint64\","]
19082#[doc = " \"minimum\": 0.0"]
19083#[doc = " },"]
19084#[doc = " \"is_highest_block_invalid\": {"]
19085#[doc = " \"type\": \"boolean\""]
19086#[doc = " },"]
19087#[doc = " \"is_outbound_peer\": {"]
19088#[doc = " \"type\": \"boolean\""]
19089#[doc = " },"]
19090#[doc = " \"last_time_peer_requested_millis\": {"]
19091#[doc = " \"type\": \"integer\","]
19092#[doc = " \"format\": \"uint64\","]
19093#[doc = " \"minimum\": 0.0"]
19094#[doc = " },"]
19095#[doc = " \"last_time_received_message_millis\": {"]
19096#[doc = " \"type\": \"integer\","]
19097#[doc = " \"format\": \"uint64\","]
19098#[doc = " \"minimum\": 0.0"]
19099#[doc = " },"]
19100#[doc = " \"nonce\": {"]
19101#[doc = " \"description\": \"Connection nonce.\","]
19102#[doc = " \"type\": \"integer\","]
19103#[doc = " \"format\": \"uint64\","]
19104#[doc = " \"minimum\": 0.0"]
19105#[doc = " },"]
19106#[doc = " \"peer_id\": {"]
19107#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
19108#[doc = " },"]
19109#[doc = " \"received_bytes_per_sec\": {"]
19110#[doc = " \"type\": \"integer\","]
19111#[doc = " \"format\": \"uint64\","]
19112#[doc = " \"minimum\": 0.0"]
19113#[doc = " },"]
19114#[doc = " \"sent_bytes_per_sec\": {"]
19115#[doc = " \"type\": \"integer\","]
19116#[doc = " \"format\": \"uint64\","]
19117#[doc = " \"minimum\": 0.0"]
19118#[doc = " },"]
19119#[doc = " \"tracked_shards\": {"]
19120#[doc = " \"type\": \"array\","]
19121#[doc = " \"items\": {"]
19122#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
19123#[doc = " }"]
19124#[doc = " }"]
19125#[doc = " }"]
19126#[doc = "}"]
19127#[doc = r" ```"]
19128#[doc = r" </details>"]
19129#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19130pub struct PeerInfoView {
19131 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19132 pub account_id: ::std::option::Option<AccountId>,
19133 pub addr: ::std::string::String,
19134 pub archival: bool,
19135 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19136 pub block_hash: ::std::option::Option<CryptoHash>,
19137 pub connection_established_time_millis: u64,
19138 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19139 pub height: ::std::option::Option<u64>,
19140 pub is_highest_block_invalid: bool,
19141 pub is_outbound_peer: bool,
19142 pub last_time_peer_requested_millis: u64,
19143 pub last_time_received_message_millis: u64,
19144 #[doc = "Connection nonce."]
19145 pub nonce: u64,
19146 pub peer_id: PublicKey,
19147 pub received_bytes_per_sec: u64,
19148 pub sent_bytes_per_sec: u64,
19149 pub tracked_shards: ::std::vec::Vec<ShardId>,
19150}
19151impl ::std::convert::From<&PeerInfoView> for PeerInfoView {
19152 fn from(value: &PeerInfoView) -> Self {
19153 value.clone()
19154 }
19155}
19156#[doc = "Error that can occur while preparing or executing Wasm smart-contract."]
19157#[doc = r""]
19158#[doc = r" <details><summary>JSON schema</summary>"]
19159#[doc = r""]
19160#[doc = r" ```json"]
19161#[doc = "{"]
19162#[doc = " \"description\": \"Error that can occur while preparing or executing Wasm smart-contract.\","]
19163#[doc = " \"oneOf\": ["]
19164#[doc = " {"]
19165#[doc = " \"description\": \"Error happened while serializing the module.\","]
19166#[doc = " \"type\": \"string\","]
19167#[doc = " \"enum\": ["]
19168#[doc = " \"Serialization\""]
19169#[doc = " ]"]
19170#[doc = " },"]
19171#[doc = " {"]
19172#[doc = " \"description\": \"Error happened while deserializing the module.\","]
19173#[doc = " \"type\": \"string\","]
19174#[doc = " \"enum\": ["]
19175#[doc = " \"Deserialization\""]
19176#[doc = " ]"]
19177#[doc = " },"]
19178#[doc = " {"]
19179#[doc = " \"description\": \"Internal memory declaration has been found in the module.\","]
19180#[doc = " \"type\": \"string\","]
19181#[doc = " \"enum\": ["]
19182#[doc = " \"InternalMemoryDeclared\""]
19183#[doc = " ]"]
19184#[doc = " },"]
19185#[doc = " {"]
19186#[doc = " \"description\": \"Gas instrumentation failed.\\n\\nThis most likely indicates the module isn't valid.\","]
19187#[doc = " \"type\": \"string\","]
19188#[doc = " \"enum\": ["]
19189#[doc = " \"GasInstrumentation\""]
19190#[doc = " ]"]
19191#[doc = " },"]
19192#[doc = " {"]
19193#[doc = " \"description\": \"Stack instrumentation failed.\\n\\nThis most likely indicates the module isn't valid.\","]
19194#[doc = " \"type\": \"string\","]
19195#[doc = " \"enum\": ["]
19196#[doc = " \"StackHeightInstrumentation\""]
19197#[doc = " ]"]
19198#[doc = " },"]
19199#[doc = " {"]
19200#[doc = " \"description\": \"Error happened during instantiation.\\n\\nThis might indicate that `start` function trapped, or module isn't\\ninstantiable and/or un-linkable.\","]
19201#[doc = " \"type\": \"string\","]
19202#[doc = " \"enum\": ["]
19203#[doc = " \"Instantiate\""]
19204#[doc = " ]"]
19205#[doc = " },"]
19206#[doc = " {"]
19207#[doc = " \"description\": \"Error creating memory.\","]
19208#[doc = " \"type\": \"string\","]
19209#[doc = " \"enum\": ["]
19210#[doc = " \"Memory\""]
19211#[doc = " ]"]
19212#[doc = " },"]
19213#[doc = " {"]
19214#[doc = " \"description\": \"Contract contains too many functions.\","]
19215#[doc = " \"type\": \"string\","]
19216#[doc = " \"enum\": ["]
19217#[doc = " \"TooManyFunctions\""]
19218#[doc = " ]"]
19219#[doc = " },"]
19220#[doc = " {"]
19221#[doc = " \"description\": \"Contract contains too many locals.\","]
19222#[doc = " \"type\": \"string\","]
19223#[doc = " \"enum\": ["]
19224#[doc = " \"TooManyLocals\""]
19225#[doc = " ]"]
19226#[doc = " },"]
19227#[doc = " {"]
19228#[doc = " \"description\": \"Contract contains too many tables.\","]
19229#[doc = " \"type\": \"string\","]
19230#[doc = " \"enum\": ["]
19231#[doc = " \"TooManyTables\""]
19232#[doc = " ]"]
19233#[doc = " },"]
19234#[doc = " {"]
19235#[doc = " \"description\": \"Contract contains too many table elements.\","]
19236#[doc = " \"type\": \"string\","]
19237#[doc = " \"enum\": ["]
19238#[doc = " \"TooManyTableElements\""]
19239#[doc = " ]"]
19240#[doc = " }"]
19241#[doc = " ]"]
19242#[doc = "}"]
19243#[doc = r" ```"]
19244#[doc = r" </details>"]
19245#[derive(
19246 :: serde :: Deserialize,
19247 :: serde :: Serialize,
19248 Clone,
19249 Copy,
19250 Debug,
19251 Eq,
19252 Hash,
19253 Ord,
19254 PartialEq,
19255 PartialOrd,
19256 thiserror::Error,
19257)]
19258pub enum PrepareError {
19259 #[doc = "Error happened while serializing the module."]
19260 Serialization,
19261 #[doc = "Error happened while deserializing the module."]
19262 Deserialization,
19263 #[doc = "Internal memory declaration has been found in the module."]
19264 InternalMemoryDeclared,
19265 #[doc = "Gas instrumentation failed.\n\nThis most likely indicates the module isn't valid."]
19266 GasInstrumentation,
19267 #[doc = "Stack instrumentation failed.\n\nThis most likely indicates the module isn't valid."]
19268 StackHeightInstrumentation,
19269 #[doc = "Error happened during instantiation.\n\nThis might indicate that `start` function trapped, or module isn't\ninstantiable and/or un-linkable."]
19270 Instantiate,
19271 #[doc = "Error creating memory."]
19272 Memory,
19273 #[doc = "Contract contains too many functions."]
19274 TooManyFunctions,
19275 #[doc = "Contract contains too many locals."]
19276 TooManyLocals,
19277 #[doc = "Contract contains too many tables."]
19278 TooManyTables,
19279 #[doc = "Contract contains too many table elements."]
19280 TooManyTableElements,
19281}
19282impl ::std::convert::From<&Self> for PrepareError {
19283 fn from(value: &PrepareError) -> Self {
19284 value.clone()
19285 }
19286}
19287impl ::std::fmt::Display for PrepareError {
19288 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19289 match *self {
19290 Self::Serialization => f.write_str("Serialization"),
19291 Self::Deserialization => f.write_str("Deserialization"),
19292 Self::InternalMemoryDeclared => f.write_str("InternalMemoryDeclared"),
19293 Self::GasInstrumentation => f.write_str("GasInstrumentation"),
19294 Self::StackHeightInstrumentation => f.write_str("StackHeightInstrumentation"),
19295 Self::Instantiate => f.write_str("Instantiate"),
19296 Self::Memory => f.write_str("Memory"),
19297 Self::TooManyFunctions => f.write_str("TooManyFunctions"),
19298 Self::TooManyLocals => f.write_str("TooManyLocals"),
19299 Self::TooManyTables => f.write_str("TooManyTables"),
19300 Self::TooManyTableElements => f.write_str("TooManyTableElements"),
19301 }
19302 }
19303}
19304impl ::std::str::FromStr for PrepareError {
19305 type Err = self::error::ConversionError;
19306 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19307 match value {
19308 "Serialization" => Ok(Self::Serialization),
19309 "Deserialization" => Ok(Self::Deserialization),
19310 "InternalMemoryDeclared" => Ok(Self::InternalMemoryDeclared),
19311 "GasInstrumentation" => Ok(Self::GasInstrumentation),
19312 "StackHeightInstrumentation" => Ok(Self::StackHeightInstrumentation),
19313 "Instantiate" => Ok(Self::Instantiate),
19314 "Memory" => Ok(Self::Memory),
19315 "TooManyFunctions" => Ok(Self::TooManyFunctions),
19316 "TooManyLocals" => Ok(Self::TooManyLocals),
19317 "TooManyTables" => Ok(Self::TooManyTables),
19318 "TooManyTableElements" => Ok(Self::TooManyTableElements),
19319 _ => Err("invalid value".into()),
19320 }
19321 }
19322}
19323impl ::std::convert::TryFrom<&str> for PrepareError {
19324 type Error = self::error::ConversionError;
19325 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19326 value.parse()
19327 }
19328}
19329impl ::std::convert::TryFrom<&::std::string::String> for PrepareError {
19330 type Error = self::error::ConversionError;
19331 fn try_from(
19332 value: &::std::string::String,
19333 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19334 value.parse()
19335 }
19336}
19337impl ::std::convert::TryFrom<::std::string::String> for PrepareError {
19338 type Error = self::error::ConversionError;
19339 fn try_from(
19340 value: ::std::string::String,
19341 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19342 value.parse()
19343 }
19344}
19345#[doc = "Configures whether the node checks the next or the next next epoch for network version compatibility."]
19346#[doc = r""]
19347#[doc = r" <details><summary>JSON schema</summary>"]
19348#[doc = r""]
19349#[doc = r" ```json"]
19350#[doc = "{"]
19351#[doc = " \"description\": \"Configures whether the node checks the next or the next next epoch for network version compatibility.\","]
19352#[doc = " \"type\": \"string\","]
19353#[doc = " \"enum\": ["]
19354#[doc = " \"Next\","]
19355#[doc = " \"NextNext\""]
19356#[doc = " ]"]
19357#[doc = "}"]
19358#[doc = r" ```"]
19359#[doc = r" </details>"]
19360#[derive(
19361 :: serde :: Deserialize,
19362 :: serde :: Serialize,
19363 Clone,
19364 Copy,
19365 Debug,
19366 Eq,
19367 Hash,
19368 Ord,
19369 PartialEq,
19370 PartialOrd,
19371)]
19372pub enum ProtocolVersionCheckConfig {
19373 Next,
19374 NextNext,
19375}
19376impl ::std::convert::From<&Self> for ProtocolVersionCheckConfig {
19377 fn from(value: &ProtocolVersionCheckConfig) -> Self {
19378 value.clone()
19379 }
19380}
19381impl ::std::fmt::Display for ProtocolVersionCheckConfig {
19382 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19383 match *self {
19384 Self::Next => f.write_str("Next"),
19385 Self::NextNext => f.write_str("NextNext"),
19386 }
19387 }
19388}
19389impl ::std::str::FromStr for ProtocolVersionCheckConfig {
19390 type Err = self::error::ConversionError;
19391 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19392 match value {
19393 "Next" => Ok(Self::Next),
19394 "NextNext" => Ok(Self::NextNext),
19395 _ => Err("invalid value".into()),
19396 }
19397 }
19398}
19399impl ::std::convert::TryFrom<&str> for ProtocolVersionCheckConfig {
19400 type Error = self::error::ConversionError;
19401 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19402 value.parse()
19403 }
19404}
19405impl ::std::convert::TryFrom<&::std::string::String> for ProtocolVersionCheckConfig {
19406 type Error = self::error::ConversionError;
19407 fn try_from(
19408 value: &::std::string::String,
19409 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19410 value.parse()
19411 }
19412}
19413impl ::std::convert::TryFrom<::std::string::String> for ProtocolVersionCheckConfig {
19414 type Error = self::error::ConversionError;
19415 fn try_from(
19416 value: ::std::string::String,
19417 ) -> ::std::result::Result<Self, self::error::ConversionError> {
19418 value.parse()
19419 }
19420}
19421#[doc = "`PublicKey`"]
19422#[doc = r""]
19423#[doc = r" <details><summary>JSON schema</summary>"]
19424#[doc = r""]
19425#[doc = r" ```json"]
19426#[doc = "{"]
19427#[doc = " \"type\": \"string\""]
19428#[doc = "}"]
19429#[doc = r" ```"]
19430#[doc = r" </details>"]
19431#[derive(
19432 :: serde :: Deserialize,
19433 :: serde :: Serialize,
19434 Clone,
19435 Debug,
19436 Eq,
19437 Hash,
19438 Ord,
19439 PartialEq,
19440 PartialOrd,
19441)]
19442#[serde(transparent)]
19443pub struct PublicKey(pub ::std::string::String);
19444impl ::std::ops::Deref for PublicKey {
19445 type Target = ::std::string::String;
19446 fn deref(&self) -> &::std::string::String {
19447 &self.0
19448 }
19449}
19450impl ::std::convert::From<PublicKey> for ::std::string::String {
19451 fn from(value: PublicKey) -> Self {
19452 value.0
19453 }
19454}
19455impl ::std::convert::From<&PublicKey> for PublicKey {
19456 fn from(value: &PublicKey) -> Self {
19457 value.clone()
19458 }
19459}
19460impl ::std::convert::From<::std::string::String> for PublicKey {
19461 fn from(value: ::std::string::String) -> Self {
19462 Self(value)
19463 }
19464}
19465impl ::std::str::FromStr for PublicKey {
19466 type Err = ::std::convert::Infallible;
19467 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
19468 Ok(Self(value.to_string()))
19469 }
19470}
19471impl ::std::fmt::Display for PublicKey {
19472 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19473 self.0.fmt(f)
19474 }
19475}
19476#[doc = "`RangeOfUint64`"]
19477#[doc = r""]
19478#[doc = r" <details><summary>JSON schema</summary>"]
19479#[doc = r""]
19480#[doc = r" ```json"]
19481#[doc = "{"]
19482#[doc = " \"type\": \"object\","]
19483#[doc = " \"required\": ["]
19484#[doc = " \"end\","]
19485#[doc = " \"start\""]
19486#[doc = " ],"]
19487#[doc = " \"properties\": {"]
19488#[doc = " \"end\": {"]
19489#[doc = " \"type\": \"integer\","]
19490#[doc = " \"format\": \"uint64\","]
19491#[doc = " \"minimum\": 0.0"]
19492#[doc = " },"]
19493#[doc = " \"start\": {"]
19494#[doc = " \"type\": \"integer\","]
19495#[doc = " \"format\": \"uint64\","]
19496#[doc = " \"minimum\": 0.0"]
19497#[doc = " }"]
19498#[doc = " }"]
19499#[doc = "}"]
19500#[doc = r" ```"]
19501#[doc = r" </details>"]
19502#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19503pub struct RangeOfUint64 {
19504 pub end: u64,
19505 pub start: u64,
19506}
19507impl ::std::convert::From<&RangeOfUint64> for RangeOfUint64 {
19508 fn from(value: &RangeOfUint64) -> Self {
19509 value.clone()
19510 }
19511}
19512#[doc = "`ReceiptEnumView`"]
19513#[doc = r""]
19514#[doc = r" <details><summary>JSON schema</summary>"]
19515#[doc = r""]
19516#[doc = r" ```json"]
19517#[doc = "{"]
19518#[doc = " \"oneOf\": ["]
19519#[doc = " {"]
19520#[doc = " \"type\": \"object\","]
19521#[doc = " \"required\": ["]
19522#[doc = " \"Action\""]
19523#[doc = " ],"]
19524#[doc = " \"properties\": {"]
19525#[doc = " \"Action\": {"]
19526#[doc = " \"type\": \"object\","]
19527#[doc = " \"required\": ["]
19528#[doc = " \"actions\","]
19529#[doc = " \"gas_price\","]
19530#[doc = " \"input_data_ids\","]
19531#[doc = " \"output_data_receivers\","]
19532#[doc = " \"signer_id\","]
19533#[doc = " \"signer_public_key\""]
19534#[doc = " ],"]
19535#[doc = " \"properties\": {"]
19536#[doc = " \"actions\": {"]
19537#[doc = " \"type\": \"array\","]
19538#[doc = " \"items\": {"]
19539#[doc = " \"$ref\": \"#/components/schemas/ActionView\""]
19540#[doc = " }"]
19541#[doc = " },"]
19542#[doc = " \"gas_price\": {"]
19543#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
19544#[doc = " },"]
19545#[doc = " \"input_data_ids\": {"]
19546#[doc = " \"type\": \"array\","]
19547#[doc = " \"items\": {"]
19548#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
19549#[doc = " }"]
19550#[doc = " },"]
19551#[doc = " \"is_promise_yield\": {"]
19552#[doc = " \"default\": false,"]
19553#[doc = " \"type\": \"boolean\""]
19554#[doc = " },"]
19555#[doc = " \"output_data_receivers\": {"]
19556#[doc = " \"type\": \"array\","]
19557#[doc = " \"items\": {"]
19558#[doc = " \"$ref\": \"#/components/schemas/DataReceiverView\""]
19559#[doc = " }"]
19560#[doc = " },"]
19561#[doc = " \"signer_id\": {"]
19562#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19563#[doc = " },"]
19564#[doc = " \"signer_public_key\": {"]
19565#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
19566#[doc = " }"]
19567#[doc = " }"]
19568#[doc = " }"]
19569#[doc = " },"]
19570#[doc = " \"additionalProperties\": false"]
19571#[doc = " },"]
19572#[doc = " {"]
19573#[doc = " \"type\": \"object\","]
19574#[doc = " \"required\": ["]
19575#[doc = " \"Data\""]
19576#[doc = " ],"]
19577#[doc = " \"properties\": {"]
19578#[doc = " \"Data\": {"]
19579#[doc = " \"type\": \"object\","]
19580#[doc = " \"required\": ["]
19581#[doc = " \"data_id\""]
19582#[doc = " ],"]
19583#[doc = " \"properties\": {"]
19584#[doc = " \"data\": {"]
19585#[doc = " \"type\": ["]
19586#[doc = " \"string\","]
19587#[doc = " \"null\""]
19588#[doc = " ]"]
19589#[doc = " },"]
19590#[doc = " \"data_id\": {"]
19591#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
19592#[doc = " },"]
19593#[doc = " \"is_promise_resume\": {"]
19594#[doc = " \"default\": false,"]
19595#[doc = " \"type\": \"boolean\""]
19596#[doc = " }"]
19597#[doc = " }"]
19598#[doc = " }"]
19599#[doc = " },"]
19600#[doc = " \"additionalProperties\": false"]
19601#[doc = " },"]
19602#[doc = " {"]
19603#[doc = " \"type\": \"object\","]
19604#[doc = " \"required\": ["]
19605#[doc = " \"GlobalContractDistribution\""]
19606#[doc = " ],"]
19607#[doc = " \"properties\": {"]
19608#[doc = " \"GlobalContractDistribution\": {"]
19609#[doc = " \"type\": \"object\","]
19610#[doc = " \"required\": ["]
19611#[doc = " \"already_delivered_shards\","]
19612#[doc = " \"code\","]
19613#[doc = " \"id\","]
19614#[doc = " \"target_shard\""]
19615#[doc = " ],"]
19616#[doc = " \"properties\": {"]
19617#[doc = " \"already_delivered_shards\": {"]
19618#[doc = " \"type\": \"array\","]
19619#[doc = " \"items\": {"]
19620#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
19621#[doc = " }"]
19622#[doc = " },"]
19623#[doc = " \"code\": {"]
19624#[doc = " \"type\": \"string\""]
19625#[doc = " },"]
19626#[doc = " \"id\": {"]
19627#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
19628#[doc = " },"]
19629#[doc = " \"target_shard\": {"]
19630#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
19631#[doc = " }"]
19632#[doc = " }"]
19633#[doc = " }"]
19634#[doc = " },"]
19635#[doc = " \"additionalProperties\": false"]
19636#[doc = " }"]
19637#[doc = " ]"]
19638#[doc = "}"]
19639#[doc = r" ```"]
19640#[doc = r" </details>"]
19641#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19642pub enum ReceiptEnumView {
19643 Action {
19644 actions: ::std::vec::Vec<ActionView>,
19645 gas_price: NearToken,
19646 input_data_ids: ::std::vec::Vec<CryptoHash>,
19647 #[serde(default)]
19648 is_promise_yield: bool,
19649 output_data_receivers: ::std::vec::Vec<DataReceiverView>,
19650 signer_id: AccountId,
19651 signer_public_key: PublicKey,
19652 },
19653 Data {
19654 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
19655 data: ::std::option::Option<::std::string::String>,
19656 data_id: CryptoHash,
19657 #[serde(default)]
19658 is_promise_resume: bool,
19659 },
19660 GlobalContractDistribution {
19661 already_delivered_shards: ::std::vec::Vec<ShardId>,
19662 code: ::std::string::String,
19663 id: GlobalContractIdentifier,
19664 target_shard: ShardId,
19665 },
19666}
19667impl ::std::convert::From<&Self> for ReceiptEnumView {
19668 fn from(value: &ReceiptEnumView) -> Self {
19669 value.clone()
19670 }
19671}
19672#[doc = "Describes the error for validating a receipt."]
19673#[doc = r""]
19674#[doc = r" <details><summary>JSON schema</summary>"]
19675#[doc = r""]
19676#[doc = r" ```json"]
19677#[doc = "{"]
19678#[doc = " \"description\": \"Describes the error for validating a receipt.\","]
19679#[doc = " \"oneOf\": ["]
19680#[doc = " {"]
19681#[doc = " \"description\": \"The `predecessor_id` of a Receipt is not valid.\","]
19682#[doc = " \"type\": \"object\","]
19683#[doc = " \"required\": ["]
19684#[doc = " \"InvalidPredecessorId\""]
19685#[doc = " ],"]
19686#[doc = " \"properties\": {"]
19687#[doc = " \"InvalidPredecessorId\": {"]
19688#[doc = " \"type\": \"object\","]
19689#[doc = " \"required\": ["]
19690#[doc = " \"account_id\""]
19691#[doc = " ],"]
19692#[doc = " \"properties\": {"]
19693#[doc = " \"account_id\": {"]
19694#[doc = " \"type\": \"string\""]
19695#[doc = " }"]
19696#[doc = " }"]
19697#[doc = " }"]
19698#[doc = " },"]
19699#[doc = " \"additionalProperties\": false"]
19700#[doc = " },"]
19701#[doc = " {"]
19702#[doc = " \"description\": \"The `receiver_id` of a Receipt is not valid.\","]
19703#[doc = " \"type\": \"object\","]
19704#[doc = " \"required\": ["]
19705#[doc = " \"InvalidReceiverId\""]
19706#[doc = " ],"]
19707#[doc = " \"properties\": {"]
19708#[doc = " \"InvalidReceiverId\": {"]
19709#[doc = " \"type\": \"object\","]
19710#[doc = " \"required\": ["]
19711#[doc = " \"account_id\""]
19712#[doc = " ],"]
19713#[doc = " \"properties\": {"]
19714#[doc = " \"account_id\": {"]
19715#[doc = " \"type\": \"string\""]
19716#[doc = " }"]
19717#[doc = " }"]
19718#[doc = " }"]
19719#[doc = " },"]
19720#[doc = " \"additionalProperties\": false"]
19721#[doc = " },"]
19722#[doc = " {"]
19723#[doc = " \"description\": \"The `signer_id` of an ActionReceipt is not valid.\","]
19724#[doc = " \"type\": \"object\","]
19725#[doc = " \"required\": ["]
19726#[doc = " \"InvalidSignerId\""]
19727#[doc = " ],"]
19728#[doc = " \"properties\": {"]
19729#[doc = " \"InvalidSignerId\": {"]
19730#[doc = " \"type\": \"object\","]
19731#[doc = " \"required\": ["]
19732#[doc = " \"account_id\""]
19733#[doc = " ],"]
19734#[doc = " \"properties\": {"]
19735#[doc = " \"account_id\": {"]
19736#[doc = " \"type\": \"string\""]
19737#[doc = " }"]
19738#[doc = " }"]
19739#[doc = " }"]
19740#[doc = " },"]
19741#[doc = " \"additionalProperties\": false"]
19742#[doc = " },"]
19743#[doc = " {"]
19744#[doc = " \"description\": \"The `receiver_id` of a DataReceiver within an ActionReceipt is not valid.\","]
19745#[doc = " \"type\": \"object\","]
19746#[doc = " \"required\": ["]
19747#[doc = " \"InvalidDataReceiverId\""]
19748#[doc = " ],"]
19749#[doc = " \"properties\": {"]
19750#[doc = " \"InvalidDataReceiverId\": {"]
19751#[doc = " \"type\": \"object\","]
19752#[doc = " \"required\": ["]
19753#[doc = " \"account_id\""]
19754#[doc = " ],"]
19755#[doc = " \"properties\": {"]
19756#[doc = " \"account_id\": {"]
19757#[doc = " \"type\": \"string\""]
19758#[doc = " }"]
19759#[doc = " }"]
19760#[doc = " }"]
19761#[doc = " },"]
19762#[doc = " \"additionalProperties\": false"]
19763#[doc = " },"]
19764#[doc = " {"]
19765#[doc = " \"description\": \"The length of the returned data exceeded the limit in a DataReceipt.\","]
19766#[doc = " \"type\": \"object\","]
19767#[doc = " \"required\": ["]
19768#[doc = " \"ReturnedValueLengthExceeded\""]
19769#[doc = " ],"]
19770#[doc = " \"properties\": {"]
19771#[doc = " \"ReturnedValueLengthExceeded\": {"]
19772#[doc = " \"type\": \"object\","]
19773#[doc = " \"required\": ["]
19774#[doc = " \"length\","]
19775#[doc = " \"limit\""]
19776#[doc = " ],"]
19777#[doc = " \"properties\": {"]
19778#[doc = " \"length\": {"]
19779#[doc = " \"type\": \"integer\","]
19780#[doc = " \"format\": \"uint64\","]
19781#[doc = " \"minimum\": 0.0"]
19782#[doc = " },"]
19783#[doc = " \"limit\": {"]
19784#[doc = " \"type\": \"integer\","]
19785#[doc = " \"format\": \"uint64\","]
19786#[doc = " \"minimum\": 0.0"]
19787#[doc = " }"]
19788#[doc = " }"]
19789#[doc = " }"]
19790#[doc = " },"]
19791#[doc = " \"additionalProperties\": false"]
19792#[doc = " },"]
19793#[doc = " {"]
19794#[doc = " \"description\": \"The number of input data dependencies exceeds the limit in an ActionReceipt.\","]
19795#[doc = " \"type\": \"object\","]
19796#[doc = " \"required\": ["]
19797#[doc = " \"NumberInputDataDependenciesExceeded\""]
19798#[doc = " ],"]
19799#[doc = " \"properties\": {"]
19800#[doc = " \"NumberInputDataDependenciesExceeded\": {"]
19801#[doc = " \"type\": \"object\","]
19802#[doc = " \"required\": ["]
19803#[doc = " \"limit\","]
19804#[doc = " \"number_of_input_data_dependencies\""]
19805#[doc = " ],"]
19806#[doc = " \"properties\": {"]
19807#[doc = " \"limit\": {"]
19808#[doc = " \"type\": \"integer\","]
19809#[doc = " \"format\": \"uint64\","]
19810#[doc = " \"minimum\": 0.0"]
19811#[doc = " },"]
19812#[doc = " \"number_of_input_data_dependencies\": {"]
19813#[doc = " \"type\": \"integer\","]
19814#[doc = " \"format\": \"uint64\","]
19815#[doc = " \"minimum\": 0.0"]
19816#[doc = " }"]
19817#[doc = " }"]
19818#[doc = " }"]
19819#[doc = " },"]
19820#[doc = " \"additionalProperties\": false"]
19821#[doc = " },"]
19822#[doc = " {"]
19823#[doc = " \"description\": \"An error occurred while validating actions of an ActionReceipt.\","]
19824#[doc = " \"type\": \"object\","]
19825#[doc = " \"required\": ["]
19826#[doc = " \"ActionsValidation\""]
19827#[doc = " ],"]
19828#[doc = " \"properties\": {"]
19829#[doc = " \"ActionsValidation\": {"]
19830#[doc = " \"$ref\": \"#/components/schemas/ActionsValidationError\""]
19831#[doc = " }"]
19832#[doc = " },"]
19833#[doc = " \"additionalProperties\": false"]
19834#[doc = " },"]
19835#[doc = " {"]
19836#[doc = " \"description\": \"Receipt is bigger than the limit.\","]
19837#[doc = " \"type\": \"object\","]
19838#[doc = " \"required\": ["]
19839#[doc = " \"ReceiptSizeExceeded\""]
19840#[doc = " ],"]
19841#[doc = " \"properties\": {"]
19842#[doc = " \"ReceiptSizeExceeded\": {"]
19843#[doc = " \"type\": \"object\","]
19844#[doc = " \"required\": ["]
19845#[doc = " \"limit\","]
19846#[doc = " \"size\""]
19847#[doc = " ],"]
19848#[doc = " \"properties\": {"]
19849#[doc = " \"limit\": {"]
19850#[doc = " \"type\": \"integer\","]
19851#[doc = " \"format\": \"uint64\","]
19852#[doc = " \"minimum\": 0.0"]
19853#[doc = " },"]
19854#[doc = " \"size\": {"]
19855#[doc = " \"type\": \"integer\","]
19856#[doc = " \"format\": \"uint64\","]
19857#[doc = " \"minimum\": 0.0"]
19858#[doc = " }"]
19859#[doc = " }"]
19860#[doc = " }"]
19861#[doc = " },"]
19862#[doc = " \"additionalProperties\": false"]
19863#[doc = " },"]
19864#[doc = " {"]
19865#[doc = " \"description\": \"The `refund_to` of an ActionReceipt is not valid.\","]
19866#[doc = " \"type\": \"object\","]
19867#[doc = " \"required\": ["]
19868#[doc = " \"InvalidRefundTo\""]
19869#[doc = " ],"]
19870#[doc = " \"properties\": {"]
19871#[doc = " \"InvalidRefundTo\": {"]
19872#[doc = " \"type\": \"object\","]
19873#[doc = " \"required\": ["]
19874#[doc = " \"account_id\""]
19875#[doc = " ],"]
19876#[doc = " \"properties\": {"]
19877#[doc = " \"account_id\": {"]
19878#[doc = " \"type\": \"string\""]
19879#[doc = " }"]
19880#[doc = " }"]
19881#[doc = " }"]
19882#[doc = " },"]
19883#[doc = " \"additionalProperties\": false"]
19884#[doc = " }"]
19885#[doc = " ]"]
19886#[doc = "}"]
19887#[doc = r" ```"]
19888#[doc = r" </details>"]
19889#[derive(
19890 :: serde :: Deserialize,
19891 :: serde :: Serialize,
19892 Clone,
19893 Debug,
19894 thiserror::Error,
19895 strum_macros::Display,
19896)]
19897pub enum ReceiptValidationError {
19898 #[doc = "The `predecessor_id` of a Receipt is not valid."]
19899 InvalidPredecessorId { account_id: ::std::string::String },
19900 #[doc = "The `receiver_id` of a Receipt is not valid."]
19901 InvalidReceiverId { account_id: ::std::string::String },
19902 #[doc = "The `signer_id` of an ActionReceipt is not valid."]
19903 InvalidSignerId { account_id: ::std::string::String },
19904 #[doc = "The `receiver_id` of a DataReceiver within an ActionReceipt is not valid."]
19905 InvalidDataReceiverId { account_id: ::std::string::String },
19906 #[doc = "The length of the returned data exceeded the limit in a DataReceipt."]
19907 ReturnedValueLengthExceeded { length: u64, limit: u64 },
19908 #[doc = "The number of input data dependencies exceeds the limit in an ActionReceipt."]
19909 NumberInputDataDependenciesExceeded {
19910 limit: u64,
19911 number_of_input_data_dependencies: u64,
19912 },
19913 #[doc = "An error occurred while validating actions of an ActionReceipt."]
19914 ActionsValidation(ActionsValidationError),
19915 #[doc = "Receipt is bigger than the limit."]
19916 ReceiptSizeExceeded { limit: u64, size: u64 },
19917 #[doc = "The `refund_to` of an ActionReceipt is not valid."]
19918 InvalidRefundTo { account_id: ::std::string::String },
19919}
19920impl ::std::convert::From<&Self> for ReceiptValidationError {
19921 fn from(value: &ReceiptValidationError) -> Self {
19922 value.clone()
19923 }
19924}
19925impl ::std::convert::From<ActionsValidationError> for ReceiptValidationError {
19926 fn from(value: ActionsValidationError) -> Self {
19927 Self::ActionsValidation(value)
19928 }
19929}
19930#[doc = "`ReceiptView`"]
19931#[doc = r""]
19932#[doc = r" <details><summary>JSON schema</summary>"]
19933#[doc = r""]
19934#[doc = r" ```json"]
19935#[doc = "{"]
19936#[doc = " \"type\": \"object\","]
19937#[doc = " \"required\": ["]
19938#[doc = " \"predecessor_id\","]
19939#[doc = " \"receipt\","]
19940#[doc = " \"receipt_id\","]
19941#[doc = " \"receiver_id\""]
19942#[doc = " ],"]
19943#[doc = " \"properties\": {"]
19944#[doc = " \"predecessor_id\": {"]
19945#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19946#[doc = " },"]
19947#[doc = " \"priority\": {"]
19948#[doc = " \"default\": 0,"]
19949#[doc = " \"type\": \"integer\","]
19950#[doc = " \"format\": \"uint64\","]
19951#[doc = " \"minimum\": 0.0"]
19952#[doc = " },"]
19953#[doc = " \"receipt\": {"]
19954#[doc = " \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
19955#[doc = " },"]
19956#[doc = " \"receipt_id\": {"]
19957#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
19958#[doc = " },"]
19959#[doc = " \"receiver_id\": {"]
19960#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19961#[doc = " }"]
19962#[doc = " }"]
19963#[doc = "}"]
19964#[doc = r" ```"]
19965#[doc = r" </details>"]
19966#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19967pub struct ReceiptView {
19968 pub predecessor_id: AccountId,
19969 #[serde(default)]
19970 pub priority: u64,
19971 pub receipt: ReceiptEnumView,
19972 pub receipt_id: CryptoHash,
19973 pub receiver_id: AccountId,
19974}
19975impl ::std::convert::From<&ReceiptView> for ReceiptView {
19976 fn from(value: &ReceiptView) -> Self {
19977 value.clone()
19978 }
19979}
19980#[doc = "`RpcBlockError`"]
19981#[doc = r""]
19982#[doc = r" <details><summary>JSON schema</summary>"]
19983#[doc = r""]
19984#[doc = r" ```json"]
19985#[doc = "{"]
19986#[doc = " \"oneOf\": ["]
19987#[doc = " {"]
19988#[doc = " \"type\": \"object\","]
19989#[doc = " \"required\": ["]
19990#[doc = " \"info\","]
19991#[doc = " \"name\""]
19992#[doc = " ],"]
19993#[doc = " \"properties\": {"]
19994#[doc = " \"info\": {"]
19995#[doc = " \"type\": \"object\""]
19996#[doc = " },"]
19997#[doc = " \"name\": {"]
19998#[doc = " \"type\": \"string\","]
19999#[doc = " \"enum\": ["]
20000#[doc = " \"UNKNOWN_BLOCK\""]
20001#[doc = " ]"]
20002#[doc = " }"]
20003#[doc = " }"]
20004#[doc = " },"]
20005#[doc = " {"]
20006#[doc = " \"type\": \"object\","]
20007#[doc = " \"required\": ["]
20008#[doc = " \"name\""]
20009#[doc = " ],"]
20010#[doc = " \"properties\": {"]
20011#[doc = " \"name\": {"]
20012#[doc = " \"type\": \"string\","]
20013#[doc = " \"enum\": ["]
20014#[doc = " \"NOT_SYNCED_YET\""]
20015#[doc = " ]"]
20016#[doc = " }"]
20017#[doc = " }"]
20018#[doc = " },"]
20019#[doc = " {"]
20020#[doc = " \"type\": \"object\","]
20021#[doc = " \"required\": ["]
20022#[doc = " \"info\","]
20023#[doc = " \"name\""]
20024#[doc = " ],"]
20025#[doc = " \"properties\": {"]
20026#[doc = " \"info\": {"]
20027#[doc = " \"type\": \"object\","]
20028#[doc = " \"required\": ["]
20029#[doc = " \"error_message\""]
20030#[doc = " ],"]
20031#[doc = " \"properties\": {"]
20032#[doc = " \"error_message\": {"]
20033#[doc = " \"type\": \"string\""]
20034#[doc = " }"]
20035#[doc = " }"]
20036#[doc = " },"]
20037#[doc = " \"name\": {"]
20038#[doc = " \"type\": \"string\","]
20039#[doc = " \"enum\": ["]
20040#[doc = " \"INTERNAL_ERROR\""]
20041#[doc = " ]"]
20042#[doc = " }"]
20043#[doc = " }"]
20044#[doc = " }"]
20045#[doc = " ]"]
20046#[doc = "}"]
20047#[doc = r" ```"]
20048#[doc = r" </details>"]
20049#[derive(
20050 :: serde :: Deserialize,
20051 :: serde :: Serialize,
20052 Clone,
20053 Debug,
20054 thiserror::Error,
20055 strum_macros::Display,
20056)]
20057#[serde(tag = "name", content = "info")]
20058pub enum RpcBlockError {
20059 #[serde(rename = "UNKNOWN_BLOCK")]
20060 UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
20061 #[serde(rename = "NOT_SYNCED_YET")]
20062 NotSyncedYet,
20063 #[serde(rename = "INTERNAL_ERROR")]
20064 InternalError {
20065 error_message: ::std::string::String,
20066 },
20067}
20068impl ::std::convert::From<&Self> for RpcBlockError {
20069 fn from(value: &RpcBlockError) -> Self {
20070 value.clone()
20071 }
20072}
20073impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
20074 for RpcBlockError
20075{
20076 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
20077 Self::UnknownBlock(value)
20078 }
20079}
20080#[doc = "`RpcBlockRequest`"]
20081#[doc = r""]
20082#[doc = r" <details><summary>JSON schema</summary>"]
20083#[doc = r""]
20084#[doc = r" ```json"]
20085#[doc = "{"]
20086#[doc = " \"title\": \"RpcBlockRequest\","]
20087#[doc = " \"type\": \"object\","]
20088#[doc = " \"oneOf\": ["]
20089#[doc = " {"]
20090#[doc = " \"type\": \"object\","]
20091#[doc = " \"required\": ["]
20092#[doc = " \"block_id\""]
20093#[doc = " ],"]
20094#[doc = " \"properties\": {"]
20095#[doc = " \"block_id\": {"]
20096#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20097#[doc = " }"]
20098#[doc = " }"]
20099#[doc = " },"]
20100#[doc = " {"]
20101#[doc = " \"type\": \"object\","]
20102#[doc = " \"required\": ["]
20103#[doc = " \"finality\""]
20104#[doc = " ],"]
20105#[doc = " \"properties\": {"]
20106#[doc = " \"finality\": {"]
20107#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
20108#[doc = " }"]
20109#[doc = " }"]
20110#[doc = " },"]
20111#[doc = " {"]
20112#[doc = " \"type\": \"object\","]
20113#[doc = " \"required\": ["]
20114#[doc = " \"sync_checkpoint\""]
20115#[doc = " ],"]
20116#[doc = " \"properties\": {"]
20117#[doc = " \"sync_checkpoint\": {"]
20118#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
20119#[doc = " }"]
20120#[doc = " }"]
20121#[doc = " }"]
20122#[doc = " ]"]
20123#[doc = "}"]
20124#[doc = r" ```"]
20125#[doc = r" </details>"]
20126#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20127pub enum RpcBlockRequest {
20128 #[serde(rename = "block_id")]
20129 BlockId(BlockId),
20130 #[serde(rename = "finality")]
20131 Finality(Finality),
20132 #[serde(rename = "sync_checkpoint")]
20133 SyncCheckpoint(SyncCheckpoint),
20134}
20135impl ::std::convert::From<&Self> for RpcBlockRequest {
20136 fn from(value: &RpcBlockRequest) -> Self {
20137 value.clone()
20138 }
20139}
20140impl ::std::convert::From<BlockId> for RpcBlockRequest {
20141 fn from(value: BlockId) -> Self {
20142 Self::BlockId(value)
20143 }
20144}
20145impl ::std::convert::From<Finality> for RpcBlockRequest {
20146 fn from(value: Finality) -> Self {
20147 Self::Finality(value)
20148 }
20149}
20150impl ::std::convert::From<SyncCheckpoint> for RpcBlockRequest {
20151 fn from(value: SyncCheckpoint) -> Self {
20152 Self::SyncCheckpoint(value)
20153 }
20154}
20155#[doc = "`RpcBlockResponse`"]
20156#[doc = r""]
20157#[doc = r" <details><summary>JSON schema</summary>"]
20158#[doc = r""]
20159#[doc = r" ```json"]
20160#[doc = "{"]
20161#[doc = " \"type\": \"object\","]
20162#[doc = " \"required\": ["]
20163#[doc = " \"author\","]
20164#[doc = " \"chunks\","]
20165#[doc = " \"header\""]
20166#[doc = " ],"]
20167#[doc = " \"properties\": {"]
20168#[doc = " \"author\": {"]
20169#[doc = " \"description\": \"The AccountId of the author of the Block\","]
20170#[doc = " \"allOf\": ["]
20171#[doc = " {"]
20172#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20173#[doc = " }"]
20174#[doc = " ]"]
20175#[doc = " },"]
20176#[doc = " \"chunks\": {"]
20177#[doc = " \"type\": \"array\","]
20178#[doc = " \"items\": {"]
20179#[doc = " \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
20180#[doc = " }"]
20181#[doc = " },"]
20182#[doc = " \"header\": {"]
20183#[doc = " \"$ref\": \"#/components/schemas/BlockHeaderView\""]
20184#[doc = " }"]
20185#[doc = " }"]
20186#[doc = "}"]
20187#[doc = r" ```"]
20188#[doc = r" </details>"]
20189#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20190pub struct RpcBlockResponse {
20191 #[doc = "The AccountId of the author of the Block"]
20192 pub author: AccountId,
20193 pub chunks: ::std::vec::Vec<ChunkHeaderView>,
20194 pub header: BlockHeaderView,
20195}
20196impl ::std::convert::From<&RpcBlockResponse> for RpcBlockResponse {
20197 fn from(value: &RpcBlockResponse) -> Self {
20198 value.clone()
20199 }
20200}
20201#[doc = "`RpcChunkError`"]
20202#[doc = r""]
20203#[doc = r" <details><summary>JSON schema</summary>"]
20204#[doc = r""]
20205#[doc = r" ```json"]
20206#[doc = "{"]
20207#[doc = " \"oneOf\": ["]
20208#[doc = " {"]
20209#[doc = " \"type\": \"object\","]
20210#[doc = " \"required\": ["]
20211#[doc = " \"info\","]
20212#[doc = " \"name\""]
20213#[doc = " ],"]
20214#[doc = " \"properties\": {"]
20215#[doc = " \"info\": {"]
20216#[doc = " \"type\": \"object\","]
20217#[doc = " \"required\": ["]
20218#[doc = " \"error_message\""]
20219#[doc = " ],"]
20220#[doc = " \"properties\": {"]
20221#[doc = " \"error_message\": {"]
20222#[doc = " \"type\": \"string\""]
20223#[doc = " }"]
20224#[doc = " }"]
20225#[doc = " },"]
20226#[doc = " \"name\": {"]
20227#[doc = " \"type\": \"string\","]
20228#[doc = " \"enum\": ["]
20229#[doc = " \"INTERNAL_ERROR\""]
20230#[doc = " ]"]
20231#[doc = " }"]
20232#[doc = " }"]
20233#[doc = " },"]
20234#[doc = " {"]
20235#[doc = " \"type\": \"object\","]
20236#[doc = " \"required\": ["]
20237#[doc = " \"info\","]
20238#[doc = " \"name\""]
20239#[doc = " ],"]
20240#[doc = " \"properties\": {"]
20241#[doc = " \"info\": {"]
20242#[doc = " \"type\": \"object\""]
20243#[doc = " },"]
20244#[doc = " \"name\": {"]
20245#[doc = " \"type\": \"string\","]
20246#[doc = " \"enum\": ["]
20247#[doc = " \"UNKNOWN_BLOCK\""]
20248#[doc = " ]"]
20249#[doc = " }"]
20250#[doc = " }"]
20251#[doc = " },"]
20252#[doc = " {"]
20253#[doc = " \"type\": \"object\","]
20254#[doc = " \"required\": ["]
20255#[doc = " \"info\","]
20256#[doc = " \"name\""]
20257#[doc = " ],"]
20258#[doc = " \"properties\": {"]
20259#[doc = " \"info\": {"]
20260#[doc = " \"type\": \"object\","]
20261#[doc = " \"required\": ["]
20262#[doc = " \"shard_id\""]
20263#[doc = " ],"]
20264#[doc = " \"properties\": {"]
20265#[doc = " \"shard_id\": {"]
20266#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
20267#[doc = " }"]
20268#[doc = " }"]
20269#[doc = " },"]
20270#[doc = " \"name\": {"]
20271#[doc = " \"type\": \"string\","]
20272#[doc = " \"enum\": ["]
20273#[doc = " \"INVALID_SHARD_ID\""]
20274#[doc = " ]"]
20275#[doc = " }"]
20276#[doc = " }"]
20277#[doc = " },"]
20278#[doc = " {"]
20279#[doc = " \"type\": \"object\","]
20280#[doc = " \"required\": ["]
20281#[doc = " \"info\","]
20282#[doc = " \"name\""]
20283#[doc = " ],"]
20284#[doc = " \"properties\": {"]
20285#[doc = " \"info\": {"]
20286#[doc = " \"type\": \"object\","]
20287#[doc = " \"required\": ["]
20288#[doc = " \"chunk_hash\""]
20289#[doc = " ],"]
20290#[doc = " \"properties\": {"]
20291#[doc = " \"chunk_hash\": {"]
20292#[doc = " \"$ref\": \"#/components/schemas/ChunkHash\""]
20293#[doc = " }"]
20294#[doc = " }"]
20295#[doc = " },"]
20296#[doc = " \"name\": {"]
20297#[doc = " \"type\": \"string\","]
20298#[doc = " \"enum\": ["]
20299#[doc = " \"UNKNOWN_CHUNK\""]
20300#[doc = " ]"]
20301#[doc = " }"]
20302#[doc = " }"]
20303#[doc = " }"]
20304#[doc = " ]"]
20305#[doc = "}"]
20306#[doc = r" ```"]
20307#[doc = r" </details>"]
20308#[derive(
20309 :: serde :: Deserialize,
20310 :: serde :: Serialize,
20311 Clone,
20312 Debug,
20313 thiserror::Error,
20314 strum_macros::Display,
20315)]
20316#[serde(tag = "name", content = "info")]
20317pub enum RpcChunkError {
20318 #[serde(rename = "INTERNAL_ERROR")]
20319 InternalError {
20320 error_message: ::std::string::String,
20321 },
20322 #[serde(rename = "UNKNOWN_BLOCK")]
20323 UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
20324 #[serde(rename = "INVALID_SHARD_ID")]
20325 InvalidShardId { shard_id: ShardId },
20326 #[serde(rename = "UNKNOWN_CHUNK")]
20327 UnknownChunk { chunk_hash: ChunkHash },
20328}
20329impl ::std::convert::From<&Self> for RpcChunkError {
20330 fn from(value: &RpcChunkError) -> Self {
20331 value.clone()
20332 }
20333}
20334impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
20335 for RpcChunkError
20336{
20337 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
20338 Self::UnknownBlock(value)
20339 }
20340}
20341#[doc = "`RpcChunkRequest`"]
20342#[doc = r""]
20343#[doc = r" <details><summary>JSON schema</summary>"]
20344#[doc = r""]
20345#[doc = r" ```json"]
20346#[doc = "{"]
20347#[doc = " \"title\": \"RpcChunkRequest\","]
20348#[doc = " \"type\": \"object\","]
20349#[doc = " \"anyOf\": ["]
20350#[doc = " {"]
20351#[doc = " \"title\": \"block_shard_id\","]
20352#[doc = " \"type\": \"object\","]
20353#[doc = " \"required\": ["]
20354#[doc = " \"block_id\","]
20355#[doc = " \"shard_id\""]
20356#[doc = " ],"]
20357#[doc = " \"properties\": {"]
20358#[doc = " \"block_id\": {"]
20359#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20360#[doc = " },"]
20361#[doc = " \"shard_id\": {"]
20362#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
20363#[doc = " }"]
20364#[doc = " }"]
20365#[doc = " },"]
20366#[doc = " {"]
20367#[doc = " \"title\": \"chunk_hash\","]
20368#[doc = " \"type\": \"object\","]
20369#[doc = " \"required\": ["]
20370#[doc = " \"chunk_id\""]
20371#[doc = " ],"]
20372#[doc = " \"properties\": {"]
20373#[doc = " \"chunk_id\": {"]
20374#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
20375#[doc = " }"]
20376#[doc = " }"]
20377#[doc = " }"]
20378#[doc = " ]"]
20379#[doc = "}"]
20380#[doc = r" ```"]
20381#[doc = r" </details>"]
20382#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20383#[serde(untagged)]
20384pub enum RpcChunkRequest {
20385 BlockShardId {
20386 block_id: BlockId,
20387 shard_id: ShardId,
20388 },
20389 ChunkHash {
20390 chunk_id: CryptoHash,
20391 },
20392}
20393impl ::std::convert::From<&Self> for RpcChunkRequest {
20394 fn from(value: &RpcChunkRequest) -> Self {
20395 value.clone()
20396 }
20397}
20398#[doc = "`RpcChunkResponse`"]
20399#[doc = r""]
20400#[doc = r" <details><summary>JSON schema</summary>"]
20401#[doc = r""]
20402#[doc = r" ```json"]
20403#[doc = "{"]
20404#[doc = " \"type\": \"object\","]
20405#[doc = " \"required\": ["]
20406#[doc = " \"author\","]
20407#[doc = " \"header\","]
20408#[doc = " \"receipts\","]
20409#[doc = " \"transactions\""]
20410#[doc = " ],"]
20411#[doc = " \"properties\": {"]
20412#[doc = " \"author\": {"]
20413#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20414#[doc = " },"]
20415#[doc = " \"header\": {"]
20416#[doc = " \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
20417#[doc = " },"]
20418#[doc = " \"receipts\": {"]
20419#[doc = " \"type\": \"array\","]
20420#[doc = " \"items\": {"]
20421#[doc = " \"$ref\": \"#/components/schemas/ReceiptView\""]
20422#[doc = " }"]
20423#[doc = " },"]
20424#[doc = " \"transactions\": {"]
20425#[doc = " \"type\": \"array\","]
20426#[doc = " \"items\": {"]
20427#[doc = " \"$ref\": \"#/components/schemas/SignedTransactionView\""]
20428#[doc = " }"]
20429#[doc = " }"]
20430#[doc = " }"]
20431#[doc = "}"]
20432#[doc = r" ```"]
20433#[doc = r" </details>"]
20434#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20435pub struct RpcChunkResponse {
20436 pub author: AccountId,
20437 pub header: ChunkHeaderView,
20438 pub receipts: ::std::vec::Vec<ReceiptView>,
20439 pub transactions: ::std::vec::Vec<SignedTransactionView>,
20440}
20441impl ::std::convert::From<&RpcChunkResponse> for RpcChunkResponse {
20442 fn from(value: &RpcChunkResponse) -> Self {
20443 value.clone()
20444 }
20445}
20446#[doc = "`RpcClientConfigError`"]
20447#[doc = r""]
20448#[doc = r" <details><summary>JSON schema</summary>"]
20449#[doc = r""]
20450#[doc = r" ```json"]
20451#[doc = "{"]
20452#[doc = " \"oneOf\": ["]
20453#[doc = " {"]
20454#[doc = " \"type\": \"object\","]
20455#[doc = " \"required\": ["]
20456#[doc = " \"info\","]
20457#[doc = " \"name\""]
20458#[doc = " ],"]
20459#[doc = " \"properties\": {"]
20460#[doc = " \"info\": {"]
20461#[doc = " \"type\": \"object\","]
20462#[doc = " \"required\": ["]
20463#[doc = " \"error_message\""]
20464#[doc = " ],"]
20465#[doc = " \"properties\": {"]
20466#[doc = " \"error_message\": {"]
20467#[doc = " \"type\": \"string\""]
20468#[doc = " }"]
20469#[doc = " }"]
20470#[doc = " },"]
20471#[doc = " \"name\": {"]
20472#[doc = " \"type\": \"string\","]
20473#[doc = " \"enum\": ["]
20474#[doc = " \"INTERNAL_ERROR\""]
20475#[doc = " ]"]
20476#[doc = " }"]
20477#[doc = " }"]
20478#[doc = " }"]
20479#[doc = " ]"]
20480#[doc = "}"]
20481#[doc = r" ```"]
20482#[doc = r" </details>"]
20483#[derive(
20484 :: serde :: Deserialize,
20485 :: serde :: Serialize,
20486 Clone,
20487 Debug,
20488 thiserror::Error,
20489 strum_macros::Display,
20490)]
20491#[serde(tag = "name", content = "info")]
20492pub enum RpcClientConfigError {
20493 #[serde(rename = "INTERNAL_ERROR")]
20494 InternalError {
20495 error_message: ::std::string::String,
20496 },
20497}
20498impl ::std::convert::From<&Self> for RpcClientConfigError {
20499 fn from(value: &RpcClientConfigError) -> Self {
20500 value.clone()
20501 }
20502}
20503#[doc = "`RpcClientConfigRequest`"]
20504#[doc = r""]
20505#[doc = r" <details><summary>JSON schema</summary>"]
20506#[doc = r""]
20507#[doc = r" ```json"]
20508#[doc = "{"]
20509#[doc = " \"title\": \"RpcClientConfigRequest\","]
20510#[doc = " \"type\": \"null\""]
20511#[doc = "}"]
20512#[doc = r" ```"]
20513#[doc = r" </details>"]
20514#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20515#[serde(transparent)]
20516pub struct RpcClientConfigRequest(pub ());
20517impl ::std::ops::Deref for RpcClientConfigRequest {
20518 type Target = ();
20519 fn deref(&self) -> &() {
20520 &self.0
20521 }
20522}
20523impl ::std::convert::From<RpcClientConfigRequest> for () {
20524 fn from(value: RpcClientConfigRequest) -> Self {
20525 value.0
20526 }
20527}
20528impl ::std::convert::From<&RpcClientConfigRequest> for RpcClientConfigRequest {
20529 fn from(value: &RpcClientConfigRequest) -> Self {
20530 value.clone()
20531 }
20532}
20533impl ::std::convert::From<()> for RpcClientConfigRequest {
20534 fn from(value: ()) -> Self {
20535 Self(value)
20536 }
20537}
20538#[doc = "ClientConfig where some fields can be updated at runtime."]
20539#[doc = r""]
20540#[doc = r" <details><summary>JSON schema</summary>"]
20541#[doc = r""]
20542#[doc = r" ```json"]
20543#[doc = "{"]
20544#[doc = " \"description\": \"ClientConfig where some fields can be updated at runtime.\","]
20545#[doc = " \"type\": \"object\","]
20546#[doc = " \"required\": ["]
20547#[doc = " \"archive\","]
20548#[doc = " \"block_fetch_horizon\","]
20549#[doc = " \"block_header_fetch_horizon\","]
20550#[doc = " \"block_production_tracking_delay\","]
20551#[doc = " \"catchup_step_period\","]
20552#[doc = " \"chain_id\","]
20553#[doc = " \"chunk_request_retry_period\","]
20554#[doc = " \"chunk_validation_threads\","]
20555#[doc = " \"chunk_wait_mult\","]
20556#[doc = " \"client_background_migration_threads\","]
20557#[doc = " \"doomslug_step_period\","]
20558#[doc = " \"dynamic_resharding_dry_run\","]
20559#[doc = " \"enable_early_prepare_transactions\","]
20560#[doc = " \"enable_multiline_logging\","]
20561#[doc = " \"enable_statistics_export\","]
20562#[doc = " \"epoch_length\","]
20563#[doc = " \"epoch_sync\","]
20564#[doc = " \"expected_shutdown\","]
20565#[doc = " \"gc\","]
20566#[doc = " \"header_sync_expected_height_per_second\","]
20567#[doc = " \"header_sync_initial_timeout\","]
20568#[doc = " \"header_sync_progress_timeout\","]
20569#[doc = " \"header_sync_stall_ban_timeout\","]
20570#[doc = " \"log_summary_period\","]
20571#[doc = " \"log_summary_style\","]
20572#[doc = " \"max_block_production_delay\","]
20573#[doc = " \"max_block_wait_delay\","]
20574#[doc = " \"min_block_production_delay\","]
20575#[doc = " \"min_num_peers\","]
20576#[doc = " \"num_block_producer_seats\","]
20577#[doc = " \"orphan_state_witness_max_size\","]
20578#[doc = " \"orphan_state_witness_pool_size\","]
20579#[doc = " \"produce_chunk_add_transactions_time_limit\","]
20580#[doc = " \"produce_empty_blocks\","]
20581#[doc = " \"protocol_version_check\","]
20582#[doc = " \"resharding_config\","]
20583#[doc = " \"save_invalid_witnesses\","]
20584#[doc = " \"save_latest_witnesses\","]
20585#[doc = " \"save_trie_changes\","]
20586#[doc = " \"save_tx_outcomes\","]
20587#[doc = " \"save_untracked_partial_chunks_parts\","]
20588#[doc = " \"skip_sync_wait\","]
20589#[doc = " \"state_request_server_threads\","]
20590#[doc = " \"state_request_throttle_period\","]
20591#[doc = " \"state_requests_per_throttle_period\","]
20592#[doc = " \"state_sync\","]
20593#[doc = " \"state_sync_enabled\","]
20594#[doc = " \"state_sync_external_backoff\","]
20595#[doc = " \"state_sync_external_timeout\","]
20596#[doc = " \"state_sync_p2p_timeout\","]
20597#[doc = " \"state_sync_retry_backoff\","]
20598#[doc = " \"sync_check_period\","]
20599#[doc = " \"sync_height_threshold\","]
20600#[doc = " \"sync_max_block_requests\","]
20601#[doc = " \"sync_step_period\","]
20602#[doc = " \"tracked_shards_config\","]
20603#[doc = " \"transaction_request_handler_threads\","]
20604#[doc = " \"ttl_account_id_router\","]
20605#[doc = " \"tx_routing_height_horizon\","]
20606#[doc = " \"version\","]
20607#[doc = " \"view_client_threads\""]
20608#[doc = " ],"]
20609#[doc = " \"properties\": {"]
20610#[doc = " \"archive\": {"]
20611#[doc = " \"description\": \"Not clear old data, set `true` for archive nodes.\","]
20612#[doc = " \"type\": \"boolean\""]
20613#[doc = " },"]
20614#[doc = " \"block_fetch_horizon\": {"]
20615#[doc = " \"description\": \"Horizon at which instead of fetching block, fetch full state.\","]
20616#[doc = " \"type\": \"integer\","]
20617#[doc = " \"format\": \"uint64\","]
20618#[doc = " \"minimum\": 0.0"]
20619#[doc = " },"]
20620#[doc = " \"block_header_fetch_horizon\": {"]
20621#[doc = " \"description\": \"Behind this horizon header fetch kicks in.\","]
20622#[doc = " \"type\": \"integer\","]
20623#[doc = " \"format\": \"uint64\","]
20624#[doc = " \"minimum\": 0.0"]
20625#[doc = " },"]
20626#[doc = " \"block_production_tracking_delay\": {"]
20627#[doc = " \"description\": \"Duration to check for producing / skipping block.\","]
20628#[doc = " \"type\": \"array\","]
20629#[doc = " \"items\": {"]
20630#[doc = " \"type\": \"integer\","]
20631#[doc = " \"format\": \"uint64\","]
20632#[doc = " \"minimum\": 0.0"]
20633#[doc = " },"]
20634#[doc = " \"maxItems\": 2,"]
20635#[doc = " \"minItems\": 2"]
20636#[doc = " },"]
20637#[doc = " \"catchup_step_period\": {"]
20638#[doc = " \"description\": \"Time between check to perform catchup.\","]
20639#[doc = " \"type\": \"array\","]
20640#[doc = " \"items\": {"]
20641#[doc = " \"type\": \"integer\","]
20642#[doc = " \"format\": \"uint64\","]
20643#[doc = " \"minimum\": 0.0"]
20644#[doc = " },"]
20645#[doc = " \"maxItems\": 2,"]
20646#[doc = " \"minItems\": 2"]
20647#[doc = " },"]
20648#[doc = " \"chain_id\": {"]
20649#[doc = " \"description\": \"Chain id for status.\","]
20650#[doc = " \"type\": \"string\""]
20651#[doc = " },"]
20652#[doc = " \"chunk_distribution_network\": {"]
20653#[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.\","]
20654#[doc = " \"anyOf\": ["]
20655#[doc = " {"]
20656#[doc = " \"$ref\": \"#/components/schemas/ChunkDistributionNetworkConfig\""]
20657#[doc = " },"]
20658#[doc = " {"]
20659#[doc = " \"type\": \"null\""]
20660#[doc = " }"]
20661#[doc = " ]"]
20662#[doc = " },"]
20663#[doc = " \"chunk_request_retry_period\": {"]
20664#[doc = " \"description\": \"Time between checking to re-request chunks.\","]
20665#[doc = " \"type\": \"array\","]
20666#[doc = " \"items\": {"]
20667#[doc = " \"type\": \"integer\","]
20668#[doc = " \"format\": \"uint64\","]
20669#[doc = " \"minimum\": 0.0"]
20670#[doc = " },"]
20671#[doc = " \"maxItems\": 2,"]
20672#[doc = " \"minItems\": 2"]
20673#[doc = " },"]
20674#[doc = " \"chunk_validation_threads\": {"]
20675#[doc = " \"description\": \"Number of threads for ChunkValidationActor pool.\","]
20676#[doc = " \"type\": \"integer\","]
20677#[doc = " \"format\": \"uint\","]
20678#[doc = " \"minimum\": 0.0"]
20679#[doc = " },"]
20680#[doc = " \"chunk_wait_mult\": {"]
20681#[doc = " \"description\": \"Multiplier for the wait time for all chunks to be received.\","]
20682#[doc = " \"type\": \"array\","]
20683#[doc = " \"items\": {"]
20684#[doc = " \"type\": \"integer\","]
20685#[doc = " \"format\": \"int32\""]
20686#[doc = " },"]
20687#[doc = " \"maxItems\": 2,"]
20688#[doc = " \"minItems\": 2"]
20689#[doc = " },"]
20690#[doc = " \"client_background_migration_threads\": {"]
20691#[doc = " \"description\": \"Number of threads to execute background migration work in client.\","]
20692#[doc = " \"type\": \"integer\","]
20693#[doc = " \"format\": \"uint\","]
20694#[doc = " \"minimum\": 0.0"]
20695#[doc = " },"]
20696#[doc = " \"cloud_archival_writer\": {"]
20697#[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.\","]
20698#[doc = " \"anyOf\": ["]
20699#[doc = " {"]
20700#[doc = " \"$ref\": \"#/components/schemas/CloudArchivalWriterConfig\""]
20701#[doc = " },"]
20702#[doc = " {"]
20703#[doc = " \"type\": \"null\""]
20704#[doc = " }"]
20705#[doc = " ]"]
20706#[doc = " },"]
20707#[doc = " \"doomslug_step_period\": {"]
20708#[doc = " \"description\": \"Time between running doomslug timer.\","]
20709#[doc = " \"type\": \"array\","]
20710#[doc = " \"items\": {"]
20711#[doc = " \"type\": \"integer\","]
20712#[doc = " \"format\": \"uint64\","]
20713#[doc = " \"minimum\": 0.0"]
20714#[doc = " },"]
20715#[doc = " \"maxItems\": 2,"]
20716#[doc = " \"minItems\": 2"]
20717#[doc = " },"]
20718#[doc = " \"dynamic_resharding_dry_run\": {"]
20719#[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.\","]
20720#[doc = " \"type\": \"boolean\""]
20721#[doc = " },"]
20722#[doc = " \"enable_early_prepare_transactions\": {"]
20723#[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.\","]
20724#[doc = " \"type\": \"boolean\""]
20725#[doc = " },"]
20726#[doc = " \"enable_multiline_logging\": {"]
20727#[doc = " \"type\": \"boolean\""]
20728#[doc = " },"]
20729#[doc = " \"enable_statistics_export\": {"]
20730#[doc = " \"description\": \"Re-export storage layer statistics as prometheus metrics.\","]
20731#[doc = " \"type\": \"boolean\""]
20732#[doc = " },"]
20733#[doc = " \"epoch_length\": {"]
20734#[doc = " \"description\": \"Epoch length.\","]
20735#[doc = " \"type\": \"integer\","]
20736#[doc = " \"format\": \"uint64\","]
20737#[doc = " \"minimum\": 0.0"]
20738#[doc = " },"]
20739#[doc = " \"epoch_sync\": {"]
20740#[doc = " \"description\": \"Options for epoch sync.\","]
20741#[doc = " \"allOf\": ["]
20742#[doc = " {"]
20743#[doc = " \"$ref\": \"#/components/schemas/EpochSyncConfig\""]
20744#[doc = " }"]
20745#[doc = " ]"]
20746#[doc = " },"]
20747#[doc = " \"expected_shutdown\": {"]
20748#[doc = " \"description\": \"Graceful shutdown at expected block height.\","]
20749#[doc = " \"allOf\": ["]
20750#[doc = " {"]
20751#[doc = " \"$ref\": \"#/components/schemas/MutableConfigValue\""]
20752#[doc = " }"]
20753#[doc = " ]"]
20754#[doc = " },"]
20755#[doc = " \"gc\": {"]
20756#[doc = " \"description\": \"Garbage collection configuration.\","]
20757#[doc = " \"allOf\": ["]
20758#[doc = " {"]
20759#[doc = " \"$ref\": \"#/components/schemas/GCConfig\""]
20760#[doc = " }"]
20761#[doc = " ]"]
20762#[doc = " },"]
20763#[doc = " \"header_sync_expected_height_per_second\": {"]
20764#[doc = " \"description\": \"Expected increase of header head height per second during header sync\","]
20765#[doc = " \"type\": \"integer\","]
20766#[doc = " \"format\": \"uint64\","]
20767#[doc = " \"minimum\": 0.0"]
20768#[doc = " },"]
20769#[doc = " \"header_sync_initial_timeout\": {"]
20770#[doc = " \"description\": \"How much time to wait after initial header sync\","]
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 = " \"header_sync_progress_timeout\": {"]
20781#[doc = " \"description\": \"How much time to wait after some progress is made in header sync\","]
20782#[doc = " \"type\": \"array\","]
20783#[doc = " \"items\": {"]
20784#[doc = " \"type\": \"integer\","]
20785#[doc = " \"format\": \"uint64\","]
20786#[doc = " \"minimum\": 0.0"]
20787#[doc = " },"]
20788#[doc = " \"maxItems\": 2,"]
20789#[doc = " \"minItems\": 2"]
20790#[doc = " },"]
20791#[doc = " \"header_sync_stall_ban_timeout\": {"]
20792#[doc = " \"description\": \"How much time to wait before banning a peer in header sync if sync is too slow\","]
20793#[doc = " \"type\": \"array\","]
20794#[doc = " \"items\": {"]
20795#[doc = " \"type\": \"integer\","]
20796#[doc = " \"format\": \"uint64\","]
20797#[doc = " \"minimum\": 0.0"]
20798#[doc = " },"]
20799#[doc = " \"maxItems\": 2,"]
20800#[doc = " \"minItems\": 2"]
20801#[doc = " },"]
20802#[doc = " \"log_summary_period\": {"]
20803#[doc = " \"description\": \"Period between logging summary information.\","]
20804#[doc = " \"type\": \"array\","]
20805#[doc = " \"items\": {"]
20806#[doc = " \"type\": \"integer\","]
20807#[doc = " \"format\": \"uint64\","]
20808#[doc = " \"minimum\": 0.0"]
20809#[doc = " },"]
20810#[doc = " \"maxItems\": 2,"]
20811#[doc = " \"minItems\": 2"]
20812#[doc = " },"]
20813#[doc = " \"log_summary_style\": {"]
20814#[doc = " \"description\": \"Enable coloring of the logs\","]
20815#[doc = " \"allOf\": ["]
20816#[doc = " {"]
20817#[doc = " \"$ref\": \"#/components/schemas/LogSummaryStyle\""]
20818#[doc = " }"]
20819#[doc = " ]"]
20820#[doc = " },"]
20821#[doc = " \"max_block_production_delay\": {"]
20822#[doc = " \"description\": \"Maximum wait for approvals before producing block.\","]
20823#[doc = " \"type\": \"array\","]
20824#[doc = " \"items\": {"]
20825#[doc = " \"type\": \"integer\","]
20826#[doc = " \"format\": \"uint64\","]
20827#[doc = " \"minimum\": 0.0"]
20828#[doc = " },"]
20829#[doc = " \"maxItems\": 2,"]
20830#[doc = " \"minItems\": 2"]
20831#[doc = " },"]
20832#[doc = " \"max_block_wait_delay\": {"]
20833#[doc = " \"description\": \"Maximum duration before skipping given height.\","]
20834#[doc = " \"type\": \"array\","]
20835#[doc = " \"items\": {"]
20836#[doc = " \"type\": \"integer\","]
20837#[doc = " \"format\": \"uint64\","]
20838#[doc = " \"minimum\": 0.0"]
20839#[doc = " },"]
20840#[doc = " \"maxItems\": 2,"]
20841#[doc = " \"minItems\": 2"]
20842#[doc = " },"]
20843#[doc = " \"max_gas_burnt_view\": {"]
20844#[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.\","]
20845#[doc = " \"anyOf\": ["]
20846#[doc = " {"]
20847#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
20848#[doc = " },"]
20849#[doc = " {"]
20850#[doc = " \"type\": \"null\""]
20851#[doc = " }"]
20852#[doc = " ]"]
20853#[doc = " },"]
20854#[doc = " \"min_block_production_delay\": {"]
20855#[doc = " \"description\": \"Minimum duration before producing block.\","]
20856#[doc = " \"type\": \"array\","]
20857#[doc = " \"items\": {"]
20858#[doc = " \"type\": \"integer\","]
20859#[doc = " \"format\": \"uint64\","]
20860#[doc = " \"minimum\": 0.0"]
20861#[doc = " },"]
20862#[doc = " \"maxItems\": 2,"]
20863#[doc = " \"minItems\": 2"]
20864#[doc = " },"]
20865#[doc = " \"min_num_peers\": {"]
20866#[doc = " \"description\": \"Minimum number of peers to start syncing.\","]
20867#[doc = " \"type\": \"integer\","]
20868#[doc = " \"format\": \"uint\","]
20869#[doc = " \"minimum\": 0.0"]
20870#[doc = " },"]
20871#[doc = " \"num_block_producer_seats\": {"]
20872#[doc = " \"description\": \"Number of block producer seats\","]
20873#[doc = " \"type\": \"integer\","]
20874#[doc = " \"format\": \"uint64\","]
20875#[doc = " \"minimum\": 0.0"]
20876#[doc = " },"]
20877#[doc = " \"orphan_state_witness_max_size\": {"]
20878#[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.\","]
20879#[doc = " \"type\": \"integer\","]
20880#[doc = " \"format\": \"uint64\","]
20881#[doc = " \"minimum\": 0.0"]
20882#[doc = " },"]
20883#[doc = " \"orphan_state_witness_pool_size\": {"]
20884#[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.\","]
20885#[doc = " \"type\": \"integer\","]
20886#[doc = " \"format\": \"uint\","]
20887#[doc = " \"minimum\": 0.0"]
20888#[doc = " },"]
20889#[doc = " \"produce_chunk_add_transactions_time_limit\": {"]
20890#[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.\","]
20891#[doc = " \"type\": \"string\""]
20892#[doc = " },"]
20893#[doc = " \"produce_empty_blocks\": {"]
20894#[doc = " \"description\": \"Produce empty blocks, use `false` for testing.\","]
20895#[doc = " \"type\": \"boolean\""]
20896#[doc = " },"]
20897#[doc = " \"protocol_version_check\": {"]
20898#[doc = " \"description\": \"Determines whether client should exit if the protocol version is not supported\\nfor the next or next next epoch.\","]
20899#[doc = " \"allOf\": ["]
20900#[doc = " {"]
20901#[doc = " \"$ref\": \"#/components/schemas/ProtocolVersionCheckConfig\""]
20902#[doc = " }"]
20903#[doc = " ]"]
20904#[doc = " },"]
20905#[doc = " \"resharding_config\": {"]
20906#[doc = " \"$ref\": \"#/components/schemas/MutableConfigValue\""]
20907#[doc = " },"]
20908#[doc = " \"rpc_addr\": {"]
20909#[doc = " \"description\": \"Listening rpc port for status.\","]
20910#[doc = " \"type\": ["]
20911#[doc = " \"string\","]
20912#[doc = " \"null\""]
20913#[doc = " ]"]
20914#[doc = " },"]
20915#[doc = " \"save_invalid_witnesses\": {"]
20916#[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.\","]
20917#[doc = " \"type\": \"boolean\""]
20918#[doc = " },"]
20919#[doc = " \"save_latest_witnesses\": {"]
20920#[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.\","]
20921#[doc = " \"type\": \"boolean\""]
20922#[doc = " },"]
20923#[doc = " \"save_trie_changes\": {"]
20924#[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.\","]
20925#[doc = " \"type\": \"boolean\""]
20926#[doc = " },"]
20927#[doc = " \"save_tx_outcomes\": {"]
20928#[doc = " \"description\": \"Whether to persist transaction outcomes to disk or not.\","]
20929#[doc = " \"type\": \"boolean\""]
20930#[doc = " },"]
20931#[doc = " \"save_untracked_partial_chunks_parts\": {"]
20932#[doc = " \"description\": \"Whether to persist partial chunk parts for untracked shards or not.\","]
20933#[doc = " \"type\": \"boolean\""]
20934#[doc = " },"]
20935#[doc = " \"skip_sync_wait\": {"]
20936#[doc = " \"description\": \"Skip waiting for sync (for testing or single node testnet).\","]
20937#[doc = " \"type\": \"boolean\""]
20938#[doc = " },"]
20939#[doc = " \"state_request_server_threads\": {"]
20940#[doc = " \"description\": \"Number of threads for StateRequestActor pool.\","]
20941#[doc = " \"type\": \"integer\","]
20942#[doc = " \"format\": \"uint\","]
20943#[doc = " \"minimum\": 0.0"]
20944#[doc = " },"]
20945#[doc = " \"state_request_throttle_period\": {"]
20946#[doc = " \"description\": \"Number of seconds between state requests for view client.\\nThrottling window for state requests (headers and parts).\","]
20947#[doc = " \"type\": \"array\","]
20948#[doc = " \"items\": {"]
20949#[doc = " \"type\": \"integer\","]
20950#[doc = " \"format\": \"uint64\","]
20951#[doc = " \"minimum\": 0.0"]
20952#[doc = " },"]
20953#[doc = " \"maxItems\": 2,"]
20954#[doc = " \"minItems\": 2"]
20955#[doc = " },"]
20956#[doc = " \"state_requests_per_throttle_period\": {"]
20957#[doc = " \"description\": \"Maximum number of state requests served per throttle period\","]
20958#[doc = " \"type\": \"integer\","]
20959#[doc = " \"format\": \"uint\","]
20960#[doc = " \"minimum\": 0.0"]
20961#[doc = " },"]
20962#[doc = " \"state_sync\": {"]
20963#[doc = " \"description\": \"Options for syncing state.\","]
20964#[doc = " \"allOf\": ["]
20965#[doc = " {"]
20966#[doc = " \"$ref\": \"#/components/schemas/StateSyncConfig\""]
20967#[doc = " }"]
20968#[doc = " ]"]
20969#[doc = " },"]
20970#[doc = " \"state_sync_enabled\": {"]
20971#[doc = " \"description\": \"Whether to use the State Sync mechanism.\\nIf disabled, the node will do Block Sync instead of State Sync.\","]
20972#[doc = " \"type\": \"boolean\""]
20973#[doc = " },"]
20974#[doc = " \"state_sync_external_backoff\": {"]
20975#[doc = " \"description\": \"Additional waiting period after a failed request to external storage\","]
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 = " \"state_sync_external_timeout\": {"]
20986#[doc = " \"description\": \"How long to wait for a response from centralized state sync\","]
20987#[doc = " \"type\": \"array\","]
20988#[doc = " \"items\": {"]
20989#[doc = " \"type\": \"integer\","]
20990#[doc = " \"format\": \"uint64\","]
20991#[doc = " \"minimum\": 0.0"]
20992#[doc = " },"]
20993#[doc = " \"maxItems\": 2,"]
20994#[doc = " \"minItems\": 2"]
20995#[doc = " },"]
20996#[doc = " \"state_sync_p2p_timeout\": {"]
20997#[doc = " \"description\": \"How long to wait for a response from p2p state sync\","]
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 = " \"state_sync_retry_backoff\": {"]
21008#[doc = " \"description\": \"How long to wait after a failed state sync request\","]
21009#[doc = " \"type\": \"array\","]
21010#[doc = " \"items\": {"]
21011#[doc = " \"type\": \"integer\","]
21012#[doc = " \"format\": \"uint64\","]
21013#[doc = " \"minimum\": 0.0"]
21014#[doc = " },"]
21015#[doc = " \"maxItems\": 2,"]
21016#[doc = " \"minItems\": 2"]
21017#[doc = " },"]
21018#[doc = " \"sync_check_period\": {"]
21019#[doc = " \"description\": \"How often to check that we are not out of sync.\","]
21020#[doc = " \"type\": \"array\","]
21021#[doc = " \"items\": {"]
21022#[doc = " \"type\": \"integer\","]
21023#[doc = " \"format\": \"uint64\","]
21024#[doc = " \"minimum\": 0.0"]
21025#[doc = " },"]
21026#[doc = " \"maxItems\": 2,"]
21027#[doc = " \"minItems\": 2"]
21028#[doc = " },"]
21029#[doc = " \"sync_height_threshold\": {"]
21030#[doc = " \"description\": \"Sync height threshold: below this difference in height don't start syncing.\","]
21031#[doc = " \"type\": \"integer\","]
21032#[doc = " \"format\": \"uint64\","]
21033#[doc = " \"minimum\": 0.0"]
21034#[doc = " },"]
21035#[doc = " \"sync_max_block_requests\": {"]
21036#[doc = " \"description\": \"Maximum number of block requests to send to peers to sync\","]
21037#[doc = " \"type\": \"integer\","]
21038#[doc = " \"format\": \"uint\","]
21039#[doc = " \"minimum\": 0.0"]
21040#[doc = " },"]
21041#[doc = " \"sync_step_period\": {"]
21042#[doc = " \"description\": \"While syncing, how long to check for each step.\","]
21043#[doc = " \"type\": \"array\","]
21044#[doc = " \"items\": {"]
21045#[doc = " \"type\": \"integer\","]
21046#[doc = " \"format\": \"uint64\","]
21047#[doc = " \"minimum\": 0.0"]
21048#[doc = " },"]
21049#[doc = " \"maxItems\": 2,"]
21050#[doc = " \"minItems\": 2"]
21051#[doc = " },"]
21052#[doc = " \"tracked_shards_config\": {"]
21053#[doc = " \"$ref\": \"#/components/schemas/TrackedShardsConfig\""]
21054#[doc = " },"]
21055#[doc = " \"transaction_pool_size_limit\": {"]
21056#[doc = " \"description\": \"Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\\nwill be unbounded.\","]
21057#[doc = " \"type\": ["]
21058#[doc = " \"integer\","]
21059#[doc = " \"null\""]
21060#[doc = " ],"]
21061#[doc = " \"format\": \"uint64\","]
21062#[doc = " \"minimum\": 0.0"]
21063#[doc = " },"]
21064#[doc = " \"transaction_request_handler_threads\": {"]
21065#[doc = " \"type\": \"integer\","]
21066#[doc = " \"format\": \"uint\","]
21067#[doc = " \"minimum\": 0.0"]
21068#[doc = " },"]
21069#[doc = " \"trie_viewer_state_size_limit\": {"]
21070#[doc = " \"description\": \"Upper bound of the byte size of contract state that is still viewable. None is no limit\","]
21071#[doc = " \"type\": ["]
21072#[doc = " \"integer\","]
21073#[doc = " \"null\""]
21074#[doc = " ],"]
21075#[doc = " \"format\": \"uint64\","]
21076#[doc = " \"minimum\": 0.0"]
21077#[doc = " },"]
21078#[doc = " \"ttl_account_id_router\": {"]
21079#[doc = " \"description\": \"Time to persist Accounts Id in the router without removing them.\","]
21080#[doc = " \"type\": \"array\","]
21081#[doc = " \"items\": {"]
21082#[doc = " \"type\": \"integer\","]
21083#[doc = " \"format\": \"uint64\","]
21084#[doc = " \"minimum\": 0.0"]
21085#[doc = " },"]
21086#[doc = " \"maxItems\": 2,"]
21087#[doc = " \"minItems\": 2"]
21088#[doc = " },"]
21089#[doc = " \"tx_routing_height_horizon\": {"]
21090#[doc = " \"description\": \"If the node is not a chunk producer within that many blocks, then route\\nto upcoming chunk producers.\","]
21091#[doc = " \"type\": \"integer\","]
21092#[doc = " \"format\": \"uint64\","]
21093#[doc = " \"minimum\": 0.0"]
21094#[doc = " },"]
21095#[doc = " \"version\": {"]
21096#[doc = " \"description\": \"Version of the binary.\","]
21097#[doc = " \"allOf\": ["]
21098#[doc = " {"]
21099#[doc = " \"$ref\": \"#/components/schemas/Version\""]
21100#[doc = " }"]
21101#[doc = " ]"]
21102#[doc = " },"]
21103#[doc = " \"view_client_threads\": {"]
21104#[doc = " \"description\": \"Number of threads for ViewClientActor pool.\","]
21105#[doc = " \"type\": \"integer\","]
21106#[doc = " \"format\": \"uint\","]
21107#[doc = " \"minimum\": 0.0"]
21108#[doc = " }"]
21109#[doc = " }"]
21110#[doc = "}"]
21111#[doc = r" ```"]
21112#[doc = r" </details>"]
21113#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21114pub struct RpcClientConfigResponse {
21115 #[doc = "Not clear old data, set `true` for archive nodes."]
21116 pub archive: bool,
21117 #[doc = "Horizon at which instead of fetching block, fetch full state."]
21118 pub block_fetch_horizon: u64,
21119 #[doc = "Behind this horizon header fetch kicks in."]
21120 pub block_header_fetch_horizon: u64,
21121 #[doc = "Duration to check for producing / skipping block."]
21122 pub block_production_tracking_delay: [u64; 2usize],
21123 #[doc = "Time between check to perform catchup."]
21124 pub catchup_step_period: [u64; 2usize],
21125 #[doc = "Chain id for status."]
21126 pub chain_id: ::std::string::String,
21127 #[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."]
21128 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21129 pub chunk_distribution_network: ::std::option::Option<ChunkDistributionNetworkConfig>,
21130 #[doc = "Time between checking to re-request chunks."]
21131 pub chunk_request_retry_period: [u64; 2usize],
21132 #[doc = "Number of threads for ChunkValidationActor pool."]
21133 pub chunk_validation_threads: u32,
21134 #[doc = "Multiplier for the wait time for all chunks to be received."]
21135 pub chunk_wait_mult: [i32; 2usize],
21136 #[doc = "Number of threads to execute background migration work in client."]
21137 pub client_background_migration_threads: u32,
21138 #[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."]
21139 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21140 pub cloud_archival_writer: ::std::option::Option<CloudArchivalWriterConfig>,
21141 #[doc = "Time between running doomslug timer."]
21142 pub doomslug_step_period: [u64; 2usize],
21143 #[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."]
21144 pub dynamic_resharding_dry_run: bool,
21145 #[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."]
21146 pub enable_early_prepare_transactions: bool,
21147 pub enable_multiline_logging: bool,
21148 #[doc = "Re-export storage layer statistics as prometheus metrics."]
21149 pub enable_statistics_export: bool,
21150 #[doc = "Epoch length."]
21151 pub epoch_length: u64,
21152 #[doc = "Options for epoch sync."]
21153 pub epoch_sync: EpochSyncConfig,
21154 #[doc = "Graceful shutdown at expected block height."]
21155 pub expected_shutdown: MutableConfigValue,
21156 #[doc = "Garbage collection configuration."]
21157 pub gc: GcConfig,
21158 #[doc = "Expected increase of header head height per second during header sync"]
21159 pub header_sync_expected_height_per_second: u64,
21160 #[doc = "How much time to wait after initial header sync"]
21161 pub header_sync_initial_timeout: [u64; 2usize],
21162 #[doc = "How much time to wait after some progress is made in header sync"]
21163 pub header_sync_progress_timeout: [u64; 2usize],
21164 #[doc = "How much time to wait before banning a peer in header sync if sync is too slow"]
21165 pub header_sync_stall_ban_timeout: [u64; 2usize],
21166 #[doc = "Period between logging summary information."]
21167 pub log_summary_period: [u64; 2usize],
21168 #[doc = "Enable coloring of the logs"]
21169 pub log_summary_style: LogSummaryStyle,
21170 #[doc = "Maximum wait for approvals before producing block."]
21171 pub max_block_production_delay: [u64; 2usize],
21172 #[doc = "Maximum duration before skipping given height."]
21173 pub max_block_wait_delay: [u64; 2usize],
21174 #[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."]
21175 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21176 pub max_gas_burnt_view: ::std::option::Option<NearGas>,
21177 #[doc = "Minimum duration before producing block."]
21178 pub min_block_production_delay: [u64; 2usize],
21179 #[doc = "Minimum number of peers to start syncing."]
21180 pub min_num_peers: u32,
21181 #[doc = "Number of block producer seats"]
21182 pub num_block_producer_seats: u64,
21183 #[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."]
21184 pub orphan_state_witness_max_size: u64,
21185 #[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."]
21186 pub orphan_state_witness_pool_size: u32,
21187 #[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."]
21188 pub produce_chunk_add_transactions_time_limit: ::std::string::String,
21189 #[doc = "Produce empty blocks, use `false` for testing."]
21190 pub produce_empty_blocks: bool,
21191 #[doc = "Determines whether client should exit if the protocol version is not supported\nfor the next or next next epoch."]
21192 pub protocol_version_check: ProtocolVersionCheckConfig,
21193 pub resharding_config: MutableConfigValue,
21194 #[doc = "Listening rpc port for status."]
21195 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21196 pub rpc_addr: ::std::option::Option<::std::string::String>,
21197 #[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."]
21198 pub save_invalid_witnesses: bool,
21199 #[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."]
21200 pub save_latest_witnesses: bool,
21201 #[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."]
21202 pub save_trie_changes: bool,
21203 #[doc = "Whether to persist transaction outcomes to disk or not."]
21204 pub save_tx_outcomes: bool,
21205 #[doc = "Whether to persist partial chunk parts for untracked shards or not."]
21206 pub save_untracked_partial_chunks_parts: bool,
21207 #[doc = "Skip waiting for sync (for testing or single node testnet)."]
21208 pub skip_sync_wait: bool,
21209 #[doc = "Number of threads for StateRequestActor pool."]
21210 pub state_request_server_threads: u32,
21211 #[doc = "Number of seconds between state requests for view client.\nThrottling window for state requests (headers and parts)."]
21212 pub state_request_throttle_period: [u64; 2usize],
21213 #[doc = "Maximum number of state requests served per throttle period"]
21214 pub state_requests_per_throttle_period: u32,
21215 #[doc = "Options for syncing state."]
21216 pub state_sync: StateSyncConfig,
21217 #[doc = "Whether to use the State Sync mechanism.\nIf disabled, the node will do Block Sync instead of State Sync."]
21218 pub state_sync_enabled: bool,
21219 #[doc = "Additional waiting period after a failed request to external storage"]
21220 pub state_sync_external_backoff: [u64; 2usize],
21221 #[doc = "How long to wait for a response from centralized state sync"]
21222 pub state_sync_external_timeout: [u64; 2usize],
21223 #[doc = "How long to wait for a response from p2p state sync"]
21224 pub state_sync_p2p_timeout: [u64; 2usize],
21225 #[doc = "How long to wait after a failed state sync request"]
21226 pub state_sync_retry_backoff: [u64; 2usize],
21227 #[doc = "How often to check that we are not out of sync."]
21228 pub sync_check_period: [u64; 2usize],
21229 #[doc = "Sync height threshold: below this difference in height don't start syncing."]
21230 pub sync_height_threshold: u64,
21231 #[doc = "Maximum number of block requests to send to peers to sync"]
21232 pub sync_max_block_requests: u32,
21233 #[doc = "While syncing, how long to check for each step."]
21234 pub sync_step_period: [u64; 2usize],
21235 pub tracked_shards_config: TrackedShardsConfig,
21236 #[doc = "Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\nwill be unbounded."]
21237 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21238 pub transaction_pool_size_limit: ::std::option::Option<u64>,
21239 pub transaction_request_handler_threads: u32,
21240 #[doc = "Upper bound of the byte size of contract state that is still viewable. None is no limit"]
21241 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21242 pub trie_viewer_state_size_limit: ::std::option::Option<u64>,
21243 #[doc = "Time to persist Accounts Id in the router without removing them."]
21244 pub ttl_account_id_router: [u64; 2usize],
21245 #[doc = "If the node is not a chunk producer within that many blocks, then route\nto upcoming chunk producers."]
21246 pub tx_routing_height_horizon: u64,
21247 #[doc = "Version of the binary."]
21248 pub version: Version,
21249 #[doc = "Number of threads for ViewClientActor pool."]
21250 pub view_client_threads: u32,
21251}
21252impl ::std::convert::From<&RpcClientConfigResponse> for RpcClientConfigResponse {
21253 fn from(value: &RpcClientConfigResponse) -> Self {
21254 value.clone()
21255 }
21256}
21257#[doc = "`RpcCongestionLevelRequest`"]
21258#[doc = r""]
21259#[doc = r" <details><summary>JSON schema</summary>"]
21260#[doc = r""]
21261#[doc = r" ```json"]
21262#[doc = "{"]
21263#[doc = " \"title\": \"RpcCongestionLevelRequest\","]
21264#[doc = " \"type\": \"object\","]
21265#[doc = " \"anyOf\": ["]
21266#[doc = " {"]
21267#[doc = " \"title\": \"block_shard_id\","]
21268#[doc = " \"type\": \"object\","]
21269#[doc = " \"required\": ["]
21270#[doc = " \"block_id\","]
21271#[doc = " \"shard_id\""]
21272#[doc = " ],"]
21273#[doc = " \"properties\": {"]
21274#[doc = " \"block_id\": {"]
21275#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
21276#[doc = " },"]
21277#[doc = " \"shard_id\": {"]
21278#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
21279#[doc = " }"]
21280#[doc = " }"]
21281#[doc = " },"]
21282#[doc = " {"]
21283#[doc = " \"title\": \"chunk_hash\","]
21284#[doc = " \"type\": \"object\","]
21285#[doc = " \"required\": ["]
21286#[doc = " \"chunk_id\""]
21287#[doc = " ],"]
21288#[doc = " \"properties\": {"]
21289#[doc = " \"chunk_id\": {"]
21290#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21291#[doc = " }"]
21292#[doc = " }"]
21293#[doc = " }"]
21294#[doc = " ]"]
21295#[doc = "}"]
21296#[doc = r" ```"]
21297#[doc = r" </details>"]
21298#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21299#[serde(untagged)]
21300pub enum RpcCongestionLevelRequest {
21301 BlockShardId {
21302 block_id: BlockId,
21303 shard_id: ShardId,
21304 },
21305 ChunkHash {
21306 chunk_id: CryptoHash,
21307 },
21308}
21309impl ::std::convert::From<&Self> for RpcCongestionLevelRequest {
21310 fn from(value: &RpcCongestionLevelRequest) -> Self {
21311 value.clone()
21312 }
21313}
21314#[doc = "`RpcCongestionLevelResponse`"]
21315#[doc = r""]
21316#[doc = r" <details><summary>JSON schema</summary>"]
21317#[doc = r""]
21318#[doc = r" ```json"]
21319#[doc = "{"]
21320#[doc = " \"type\": \"object\","]
21321#[doc = " \"required\": ["]
21322#[doc = " \"congestion_level\""]
21323#[doc = " ],"]
21324#[doc = " \"properties\": {"]
21325#[doc = " \"congestion_level\": {"]
21326#[doc = " \"type\": \"number\","]
21327#[doc = " \"format\": \"double\""]
21328#[doc = " }"]
21329#[doc = " }"]
21330#[doc = "}"]
21331#[doc = r" ```"]
21332#[doc = r" </details>"]
21333#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21334pub struct RpcCongestionLevelResponse {
21335 pub congestion_level: f64,
21336}
21337impl ::std::convert::From<&RpcCongestionLevelResponse> for RpcCongestionLevelResponse {
21338 fn from(value: &RpcCongestionLevelResponse) -> Self {
21339 value.clone()
21340 }
21341}
21342#[doc = "`RpcGasPriceError`"]
21343#[doc = r""]
21344#[doc = r" <details><summary>JSON schema</summary>"]
21345#[doc = r""]
21346#[doc = r" ```json"]
21347#[doc = "{"]
21348#[doc = " \"oneOf\": ["]
21349#[doc = " {"]
21350#[doc = " \"type\": \"object\","]
21351#[doc = " \"required\": ["]
21352#[doc = " \"info\","]
21353#[doc = " \"name\""]
21354#[doc = " ],"]
21355#[doc = " \"properties\": {"]
21356#[doc = " \"info\": {"]
21357#[doc = " \"type\": \"object\","]
21358#[doc = " \"required\": ["]
21359#[doc = " \"error_message\""]
21360#[doc = " ],"]
21361#[doc = " \"properties\": {"]
21362#[doc = " \"error_message\": {"]
21363#[doc = " \"type\": \"string\""]
21364#[doc = " }"]
21365#[doc = " }"]
21366#[doc = " },"]
21367#[doc = " \"name\": {"]
21368#[doc = " \"type\": \"string\","]
21369#[doc = " \"enum\": ["]
21370#[doc = " \"INTERNAL_ERROR\""]
21371#[doc = " ]"]
21372#[doc = " }"]
21373#[doc = " }"]
21374#[doc = " },"]
21375#[doc = " {"]
21376#[doc = " \"type\": \"object\","]
21377#[doc = " \"required\": ["]
21378#[doc = " \"info\","]
21379#[doc = " \"name\""]
21380#[doc = " ],"]
21381#[doc = " \"properties\": {"]
21382#[doc = " \"info\": {"]
21383#[doc = " \"type\": \"object\""]
21384#[doc = " },"]
21385#[doc = " \"name\": {"]
21386#[doc = " \"type\": \"string\","]
21387#[doc = " \"enum\": ["]
21388#[doc = " \"UNKNOWN_BLOCK\""]
21389#[doc = " ]"]
21390#[doc = " }"]
21391#[doc = " }"]
21392#[doc = " }"]
21393#[doc = " ]"]
21394#[doc = "}"]
21395#[doc = r" ```"]
21396#[doc = r" </details>"]
21397#[derive(
21398 :: serde :: Deserialize,
21399 :: serde :: Serialize,
21400 Clone,
21401 Debug,
21402 thiserror::Error,
21403 strum_macros::Display,
21404)]
21405#[serde(tag = "name", content = "info")]
21406pub enum RpcGasPriceError {
21407 #[serde(rename = "INTERNAL_ERROR")]
21408 InternalError {
21409 error_message: ::std::string::String,
21410 },
21411 #[serde(rename = "UNKNOWN_BLOCK")]
21412 UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
21413}
21414impl ::std::convert::From<&Self> for RpcGasPriceError {
21415 fn from(value: &RpcGasPriceError) -> Self {
21416 value.clone()
21417 }
21418}
21419impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
21420 for RpcGasPriceError
21421{
21422 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
21423 Self::UnknownBlock(value)
21424 }
21425}
21426#[doc = "`RpcGasPriceRequest`"]
21427#[doc = r""]
21428#[doc = r" <details><summary>JSON schema</summary>"]
21429#[doc = r""]
21430#[doc = r" ```json"]
21431#[doc = "{"]
21432#[doc = " \"title\": \"RpcGasPriceRequest\","]
21433#[doc = " \"type\": \"object\","]
21434#[doc = " \"properties\": {"]
21435#[doc = " \"block_id\": {"]
21436#[doc = " \"anyOf\": ["]
21437#[doc = " {"]
21438#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
21439#[doc = " },"]
21440#[doc = " {"]
21441#[doc = " \"type\": \"null\""]
21442#[doc = " }"]
21443#[doc = " ]"]
21444#[doc = " }"]
21445#[doc = " }"]
21446#[doc = "}"]
21447#[doc = r" ```"]
21448#[doc = r" </details>"]
21449#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21450pub struct RpcGasPriceRequest {
21451 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21452 pub block_id: ::std::option::Option<BlockId>,
21453}
21454impl ::std::convert::From<&RpcGasPriceRequest> for RpcGasPriceRequest {
21455 fn from(value: &RpcGasPriceRequest) -> Self {
21456 value.clone()
21457 }
21458}
21459impl ::std::default::Default for RpcGasPriceRequest {
21460 fn default() -> Self {
21461 Self {
21462 block_id: Default::default(),
21463 }
21464 }
21465}
21466#[doc = "`RpcGasPriceResponse`"]
21467#[doc = r""]
21468#[doc = r" <details><summary>JSON schema</summary>"]
21469#[doc = r""]
21470#[doc = r" ```json"]
21471#[doc = "{"]
21472#[doc = " \"type\": \"object\","]
21473#[doc = " \"required\": ["]
21474#[doc = " \"gas_price\""]
21475#[doc = " ],"]
21476#[doc = " \"properties\": {"]
21477#[doc = " \"gas_price\": {"]
21478#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
21479#[doc = " }"]
21480#[doc = " }"]
21481#[doc = "}"]
21482#[doc = r" ```"]
21483#[doc = r" </details>"]
21484#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21485pub struct RpcGasPriceResponse {
21486 pub gas_price: NearToken,
21487}
21488impl ::std::convert::From<&RpcGasPriceResponse> for RpcGasPriceResponse {
21489 fn from(value: &RpcGasPriceResponse) -> Self {
21490 value.clone()
21491 }
21492}
21493#[doc = "`RpcHealthRequest`"]
21494#[doc = r""]
21495#[doc = r" <details><summary>JSON schema</summary>"]
21496#[doc = r""]
21497#[doc = r" ```json"]
21498#[doc = "{"]
21499#[doc = " \"title\": \"RpcHealthRequest\","]
21500#[doc = " \"type\": \"null\""]
21501#[doc = "}"]
21502#[doc = r" ```"]
21503#[doc = r" </details>"]
21504#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21505#[serde(transparent)]
21506pub struct RpcHealthRequest(pub ());
21507impl ::std::ops::Deref for RpcHealthRequest {
21508 type Target = ();
21509 fn deref(&self) -> &() {
21510 &self.0
21511 }
21512}
21513impl ::std::convert::From<RpcHealthRequest> for () {
21514 fn from(value: RpcHealthRequest) -> Self {
21515 value.0
21516 }
21517}
21518impl ::std::convert::From<&RpcHealthRequest> for RpcHealthRequest {
21519 fn from(value: &RpcHealthRequest) -> Self {
21520 value.clone()
21521 }
21522}
21523impl ::std::convert::From<()> for RpcHealthRequest {
21524 fn from(value: ()) -> Self {
21525 Self(value)
21526 }
21527}
21528#[doc = "`RpcHealthResponse`"]
21529#[doc = r""]
21530#[doc = r" <details><summary>JSON schema</summary>"]
21531#[doc = r""]
21532#[doc = r" ```json"]
21533#[doc = "{"]
21534#[doc = " \"type\": \"null\""]
21535#[doc = "}"]
21536#[doc = r" ```"]
21537#[doc = r" </details>"]
21538#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21539#[serde(transparent)]
21540pub struct RpcHealthResponse(pub ());
21541impl ::std::ops::Deref for RpcHealthResponse {
21542 type Target = ();
21543 fn deref(&self) -> &() {
21544 &self.0
21545 }
21546}
21547impl ::std::convert::From<RpcHealthResponse> for () {
21548 fn from(value: RpcHealthResponse) -> Self {
21549 value.0
21550 }
21551}
21552impl ::std::convert::From<&RpcHealthResponse> for RpcHealthResponse {
21553 fn from(value: &RpcHealthResponse) -> Self {
21554 value.clone()
21555 }
21556}
21557impl ::std::convert::From<()> for RpcHealthResponse {
21558 fn from(value: ()) -> Self {
21559 Self(value)
21560 }
21561}
21562#[doc = "`RpcKnownProducer`"]
21563#[doc = r""]
21564#[doc = r" <details><summary>JSON schema</summary>"]
21565#[doc = r""]
21566#[doc = r" ```json"]
21567#[doc = "{"]
21568#[doc = " \"type\": \"object\","]
21569#[doc = " \"required\": ["]
21570#[doc = " \"account_id\","]
21571#[doc = " \"peer_id\""]
21572#[doc = " ],"]
21573#[doc = " \"properties\": {"]
21574#[doc = " \"account_id\": {"]
21575#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21576#[doc = " },"]
21577#[doc = " \"addr\": {"]
21578#[doc = " \"type\": ["]
21579#[doc = " \"string\","]
21580#[doc = " \"null\""]
21581#[doc = " ]"]
21582#[doc = " },"]
21583#[doc = " \"peer_id\": {"]
21584#[doc = " \"$ref\": \"#/components/schemas/PeerId\""]
21585#[doc = " }"]
21586#[doc = " }"]
21587#[doc = "}"]
21588#[doc = r" ```"]
21589#[doc = r" </details>"]
21590#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21591pub struct RpcKnownProducer {
21592 pub account_id: AccountId,
21593 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21594 pub addr: ::std::option::Option<::std::string::String>,
21595 pub peer_id: PeerId,
21596}
21597impl ::std::convert::From<&RpcKnownProducer> for RpcKnownProducer {
21598 fn from(value: &RpcKnownProducer) -> Self {
21599 value.clone()
21600 }
21601}
21602#[doc = "`RpcLightClientBlockProofRequest`"]
21603#[doc = r""]
21604#[doc = r" <details><summary>JSON schema</summary>"]
21605#[doc = r""]
21606#[doc = r" ```json"]
21607#[doc = "{"]
21608#[doc = " \"title\": \"RpcLightClientBlockProofRequest\","]
21609#[doc = " \"type\": \"object\","]
21610#[doc = " \"required\": ["]
21611#[doc = " \"block_hash\","]
21612#[doc = " \"light_client_head\""]
21613#[doc = " ],"]
21614#[doc = " \"properties\": {"]
21615#[doc = " \"block_hash\": {"]
21616#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21617#[doc = " },"]
21618#[doc = " \"light_client_head\": {"]
21619#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21620#[doc = " }"]
21621#[doc = " }"]
21622#[doc = "}"]
21623#[doc = r" ```"]
21624#[doc = r" </details>"]
21625#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21626pub struct RpcLightClientBlockProofRequest {
21627 pub block_hash: CryptoHash,
21628 pub light_client_head: CryptoHash,
21629}
21630impl ::std::convert::From<&RpcLightClientBlockProofRequest> for RpcLightClientBlockProofRequest {
21631 fn from(value: &RpcLightClientBlockProofRequest) -> Self {
21632 value.clone()
21633 }
21634}
21635#[doc = "`RpcLightClientBlockProofResponse`"]
21636#[doc = r""]
21637#[doc = r" <details><summary>JSON schema</summary>"]
21638#[doc = r""]
21639#[doc = r" ```json"]
21640#[doc = "{"]
21641#[doc = " \"type\": \"object\","]
21642#[doc = " \"required\": ["]
21643#[doc = " \"block_header_lite\","]
21644#[doc = " \"block_proof\""]
21645#[doc = " ],"]
21646#[doc = " \"properties\": {"]
21647#[doc = " \"block_header_lite\": {"]
21648#[doc = " \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
21649#[doc = " },"]
21650#[doc = " \"block_proof\": {"]
21651#[doc = " \"type\": \"array\","]
21652#[doc = " \"items\": {"]
21653#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
21654#[doc = " }"]
21655#[doc = " }"]
21656#[doc = " }"]
21657#[doc = "}"]
21658#[doc = r" ```"]
21659#[doc = r" </details>"]
21660#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21661pub struct RpcLightClientBlockProofResponse {
21662 pub block_header_lite: LightClientBlockLiteView,
21663 pub block_proof: ::std::vec::Vec<MerklePathItem>,
21664}
21665impl ::std::convert::From<&RpcLightClientBlockProofResponse> for RpcLightClientBlockProofResponse {
21666 fn from(value: &RpcLightClientBlockProofResponse) -> Self {
21667 value.clone()
21668 }
21669}
21670#[doc = "`RpcLightClientExecutionProofRequest`"]
21671#[doc = r""]
21672#[doc = r" <details><summary>JSON schema</summary>"]
21673#[doc = r""]
21674#[doc = r" ```json"]
21675#[doc = "{"]
21676#[doc = " \"title\": \"RpcLightClientExecutionProofRequest\","]
21677#[doc = " \"type\": \"object\","]
21678#[doc = " \"oneOf\": ["]
21679#[doc = " {"]
21680#[doc = " \"type\": \"object\","]
21681#[doc = " \"required\": ["]
21682#[doc = " \"sender_id\","]
21683#[doc = " \"transaction_hash\","]
21684#[doc = " \"type\""]
21685#[doc = " ],"]
21686#[doc = " \"properties\": {"]
21687#[doc = " \"sender_id\": {"]
21688#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21689#[doc = " },"]
21690#[doc = " \"transaction_hash\": {"]
21691#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21692#[doc = " },"]
21693#[doc = " \"type\": {"]
21694#[doc = " \"type\": \"string\","]
21695#[doc = " \"enum\": ["]
21696#[doc = " \"transaction\""]
21697#[doc = " ]"]
21698#[doc = " }"]
21699#[doc = " }"]
21700#[doc = " },"]
21701#[doc = " {"]
21702#[doc = " \"type\": \"object\","]
21703#[doc = " \"required\": ["]
21704#[doc = " \"receipt_id\","]
21705#[doc = " \"receiver_id\","]
21706#[doc = " \"type\""]
21707#[doc = " ],"]
21708#[doc = " \"properties\": {"]
21709#[doc = " \"receipt_id\": {"]
21710#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21711#[doc = " },"]
21712#[doc = " \"receiver_id\": {"]
21713#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21714#[doc = " },"]
21715#[doc = " \"type\": {"]
21716#[doc = " \"type\": \"string\","]
21717#[doc = " \"enum\": ["]
21718#[doc = " \"receipt\""]
21719#[doc = " ]"]
21720#[doc = " }"]
21721#[doc = " }"]
21722#[doc = " }"]
21723#[doc = " ],"]
21724#[doc = " \"required\": ["]
21725#[doc = " \"light_client_head\""]
21726#[doc = " ],"]
21727#[doc = " \"properties\": {"]
21728#[doc = " \"light_client_head\": {"]
21729#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21730#[doc = " }"]
21731#[doc = " }"]
21732#[doc = "}"]
21733#[doc = r" ```"]
21734#[doc = r" </details>"]
21735#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21736#[serde(untagged)]
21737pub enum RpcLightClientExecutionProofRequest {
21738 Variant0 {
21739 light_client_head: CryptoHash,
21740 sender_id: AccountId,
21741 transaction_hash: CryptoHash,
21742 #[serde(rename = "type")]
21743 type_: RpcLightClientExecutionProofRequestVariant0Type,
21744 },
21745 Variant1 {
21746 light_client_head: CryptoHash,
21747 receipt_id: CryptoHash,
21748 receiver_id: AccountId,
21749 #[serde(rename = "type")]
21750 type_: RpcLightClientExecutionProofRequestVariant1Type,
21751 },
21752}
21753impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequest {
21754 fn from(value: &RpcLightClientExecutionProofRequest) -> Self {
21755 value.clone()
21756 }
21757}
21758#[doc = "`RpcLightClientExecutionProofRequestVariant0Type`"]
21759#[doc = r""]
21760#[doc = r" <details><summary>JSON schema</summary>"]
21761#[doc = r""]
21762#[doc = r" ```json"]
21763#[doc = "{"]
21764#[doc = " \"type\": \"string\","]
21765#[doc = " \"enum\": ["]
21766#[doc = " \"transaction\""]
21767#[doc = " ]"]
21768#[doc = "}"]
21769#[doc = r" ```"]
21770#[doc = r" </details>"]
21771#[derive(
21772 :: serde :: Deserialize,
21773 :: serde :: Serialize,
21774 Clone,
21775 Copy,
21776 Debug,
21777 Eq,
21778 Hash,
21779 Ord,
21780 PartialEq,
21781 PartialOrd,
21782)]
21783pub enum RpcLightClientExecutionProofRequestVariant0Type {
21784 #[serde(rename = "transaction")]
21785 Transaction,
21786}
21787impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant0Type {
21788 fn from(value: &RpcLightClientExecutionProofRequestVariant0Type) -> Self {
21789 value.clone()
21790 }
21791}
21792impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant0Type {
21793 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21794 match *self {
21795 Self::Transaction => f.write_str("transaction"),
21796 }
21797 }
21798}
21799impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant0Type {
21800 type Err = self::error::ConversionError;
21801 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21802 match value {
21803 "transaction" => Ok(Self::Transaction),
21804 _ => Err("invalid value".into()),
21805 }
21806 }
21807}
21808impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant0Type {
21809 type Error = self::error::ConversionError;
21810 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21811 value.parse()
21812 }
21813}
21814impl ::std::convert::TryFrom<&::std::string::String>
21815 for RpcLightClientExecutionProofRequestVariant0Type
21816{
21817 type Error = self::error::ConversionError;
21818 fn try_from(
21819 value: &::std::string::String,
21820 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21821 value.parse()
21822 }
21823}
21824impl ::std::convert::TryFrom<::std::string::String>
21825 for RpcLightClientExecutionProofRequestVariant0Type
21826{
21827 type Error = self::error::ConversionError;
21828 fn try_from(
21829 value: ::std::string::String,
21830 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21831 value.parse()
21832 }
21833}
21834#[doc = "`RpcLightClientExecutionProofRequestVariant1Type`"]
21835#[doc = r""]
21836#[doc = r" <details><summary>JSON schema</summary>"]
21837#[doc = r""]
21838#[doc = r" ```json"]
21839#[doc = "{"]
21840#[doc = " \"type\": \"string\","]
21841#[doc = " \"enum\": ["]
21842#[doc = " \"receipt\""]
21843#[doc = " ]"]
21844#[doc = "}"]
21845#[doc = r" ```"]
21846#[doc = r" </details>"]
21847#[derive(
21848 :: serde :: Deserialize,
21849 :: serde :: Serialize,
21850 Clone,
21851 Copy,
21852 Debug,
21853 Eq,
21854 Hash,
21855 Ord,
21856 PartialEq,
21857 PartialOrd,
21858)]
21859pub enum RpcLightClientExecutionProofRequestVariant1Type {
21860 #[serde(rename = "receipt")]
21861 Receipt,
21862}
21863impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant1Type {
21864 fn from(value: &RpcLightClientExecutionProofRequestVariant1Type) -> Self {
21865 value.clone()
21866 }
21867}
21868impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant1Type {
21869 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21870 match *self {
21871 Self::Receipt => f.write_str("receipt"),
21872 }
21873 }
21874}
21875impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant1Type {
21876 type Err = self::error::ConversionError;
21877 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21878 match value {
21879 "receipt" => Ok(Self::Receipt),
21880 _ => Err("invalid value".into()),
21881 }
21882 }
21883}
21884impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant1Type {
21885 type Error = self::error::ConversionError;
21886 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21887 value.parse()
21888 }
21889}
21890impl ::std::convert::TryFrom<&::std::string::String>
21891 for RpcLightClientExecutionProofRequestVariant1Type
21892{
21893 type Error = self::error::ConversionError;
21894 fn try_from(
21895 value: &::std::string::String,
21896 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21897 value.parse()
21898 }
21899}
21900impl ::std::convert::TryFrom<::std::string::String>
21901 for RpcLightClientExecutionProofRequestVariant1Type
21902{
21903 type Error = self::error::ConversionError;
21904 fn try_from(
21905 value: ::std::string::String,
21906 ) -> ::std::result::Result<Self, self::error::ConversionError> {
21907 value.parse()
21908 }
21909}
21910#[doc = "`RpcLightClientExecutionProofResponse`"]
21911#[doc = r""]
21912#[doc = r" <details><summary>JSON schema</summary>"]
21913#[doc = r""]
21914#[doc = r" ```json"]
21915#[doc = "{"]
21916#[doc = " \"type\": \"object\","]
21917#[doc = " \"required\": ["]
21918#[doc = " \"block_header_lite\","]
21919#[doc = " \"block_proof\","]
21920#[doc = " \"outcome_proof\","]
21921#[doc = " \"outcome_root_proof\""]
21922#[doc = " ],"]
21923#[doc = " \"properties\": {"]
21924#[doc = " \"block_header_lite\": {"]
21925#[doc = " \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
21926#[doc = " },"]
21927#[doc = " \"block_proof\": {"]
21928#[doc = " \"type\": \"array\","]
21929#[doc = " \"items\": {"]
21930#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
21931#[doc = " }"]
21932#[doc = " },"]
21933#[doc = " \"outcome_proof\": {"]
21934#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
21935#[doc = " },"]
21936#[doc = " \"outcome_root_proof\": {"]
21937#[doc = " \"type\": \"array\","]
21938#[doc = " \"items\": {"]
21939#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
21940#[doc = " }"]
21941#[doc = " }"]
21942#[doc = " }"]
21943#[doc = "}"]
21944#[doc = r" ```"]
21945#[doc = r" </details>"]
21946#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21947pub struct RpcLightClientExecutionProofResponse {
21948 pub block_header_lite: LightClientBlockLiteView,
21949 pub block_proof: ::std::vec::Vec<MerklePathItem>,
21950 pub outcome_proof: ExecutionOutcomeWithIdView,
21951 pub outcome_root_proof: ::std::vec::Vec<MerklePathItem>,
21952}
21953impl ::std::convert::From<&RpcLightClientExecutionProofResponse>
21954 for RpcLightClientExecutionProofResponse
21955{
21956 fn from(value: &RpcLightClientExecutionProofResponse) -> Self {
21957 value.clone()
21958 }
21959}
21960#[doc = "`RpcLightClientNextBlockError`"]
21961#[doc = r""]
21962#[doc = r" <details><summary>JSON schema</summary>"]
21963#[doc = r""]
21964#[doc = r" ```json"]
21965#[doc = "{"]
21966#[doc = " \"oneOf\": ["]
21967#[doc = " {"]
21968#[doc = " \"type\": \"object\","]
21969#[doc = " \"required\": ["]
21970#[doc = " \"info\","]
21971#[doc = " \"name\""]
21972#[doc = " ],"]
21973#[doc = " \"properties\": {"]
21974#[doc = " \"info\": {"]
21975#[doc = " \"type\": \"object\","]
21976#[doc = " \"required\": ["]
21977#[doc = " \"error_message\""]
21978#[doc = " ],"]
21979#[doc = " \"properties\": {"]
21980#[doc = " \"error_message\": {"]
21981#[doc = " \"type\": \"string\""]
21982#[doc = " }"]
21983#[doc = " }"]
21984#[doc = " },"]
21985#[doc = " \"name\": {"]
21986#[doc = " \"type\": \"string\","]
21987#[doc = " \"enum\": ["]
21988#[doc = " \"INTERNAL_ERROR\""]
21989#[doc = " ]"]
21990#[doc = " }"]
21991#[doc = " }"]
21992#[doc = " },"]
21993#[doc = " {"]
21994#[doc = " \"type\": \"object\","]
21995#[doc = " \"required\": ["]
21996#[doc = " \"info\","]
21997#[doc = " \"name\""]
21998#[doc = " ],"]
21999#[doc = " \"properties\": {"]
22000#[doc = " \"info\": {"]
22001#[doc = " \"type\": \"object\""]
22002#[doc = " },"]
22003#[doc = " \"name\": {"]
22004#[doc = " \"type\": \"string\","]
22005#[doc = " \"enum\": ["]
22006#[doc = " \"UNKNOWN_BLOCK\""]
22007#[doc = " ]"]
22008#[doc = " }"]
22009#[doc = " }"]
22010#[doc = " },"]
22011#[doc = " {"]
22012#[doc = " \"type\": \"object\","]
22013#[doc = " \"required\": ["]
22014#[doc = " \"info\","]
22015#[doc = " \"name\""]
22016#[doc = " ],"]
22017#[doc = " \"properties\": {"]
22018#[doc = " \"info\": {"]
22019#[doc = " \"type\": \"object\","]
22020#[doc = " \"required\": ["]
22021#[doc = " \"epoch_id\""]
22022#[doc = " ],"]
22023#[doc = " \"properties\": {"]
22024#[doc = " \"epoch_id\": {"]
22025#[doc = " \"$ref\": \"#/components/schemas/EpochId\""]
22026#[doc = " }"]
22027#[doc = " }"]
22028#[doc = " },"]
22029#[doc = " \"name\": {"]
22030#[doc = " \"type\": \"string\","]
22031#[doc = " \"enum\": ["]
22032#[doc = " \"EPOCH_OUT_OF_BOUNDS\""]
22033#[doc = " ]"]
22034#[doc = " }"]
22035#[doc = " }"]
22036#[doc = " }"]
22037#[doc = " ]"]
22038#[doc = "}"]
22039#[doc = r" ```"]
22040#[doc = r" </details>"]
22041#[derive(
22042 :: serde :: Deserialize,
22043 :: serde :: Serialize,
22044 Clone,
22045 Debug,
22046 thiserror::Error,
22047 strum_macros::Display,
22048)]
22049#[serde(tag = "name", content = "info")]
22050pub enum RpcLightClientNextBlockError {
22051 #[serde(rename = "INTERNAL_ERROR")]
22052 InternalError {
22053 error_message: ::std::string::String,
22054 },
22055 #[serde(rename = "UNKNOWN_BLOCK")]
22056 UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
22057 #[serde(rename = "EPOCH_OUT_OF_BOUNDS")]
22058 EpochOutOfBounds { epoch_id: EpochId },
22059}
22060impl ::std::convert::From<&Self> for RpcLightClientNextBlockError {
22061 fn from(value: &RpcLightClientNextBlockError) -> Self {
22062 value.clone()
22063 }
22064}
22065impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
22066 for RpcLightClientNextBlockError
22067{
22068 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
22069 Self::UnknownBlock(value)
22070 }
22071}
22072#[doc = "`RpcLightClientNextBlockRequest`"]
22073#[doc = r""]
22074#[doc = r" <details><summary>JSON schema</summary>"]
22075#[doc = r""]
22076#[doc = r" ```json"]
22077#[doc = "{"]
22078#[doc = " \"title\": \"RpcLightClientNextBlockRequest\","]
22079#[doc = " \"type\": \"object\","]
22080#[doc = " \"required\": ["]
22081#[doc = " \"last_block_hash\""]
22082#[doc = " ],"]
22083#[doc = " \"properties\": {"]
22084#[doc = " \"last_block_hash\": {"]
22085#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22086#[doc = " }"]
22087#[doc = " }"]
22088#[doc = "}"]
22089#[doc = r" ```"]
22090#[doc = r" </details>"]
22091#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22092pub struct RpcLightClientNextBlockRequest {
22093 pub last_block_hash: CryptoHash,
22094}
22095impl ::std::convert::From<&RpcLightClientNextBlockRequest> for RpcLightClientNextBlockRequest {
22096 fn from(value: &RpcLightClientNextBlockRequest) -> Self {
22097 value.clone()
22098 }
22099}
22100#[doc = "A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
22101#[doc = r""]
22102#[doc = r" <details><summary>JSON schema</summary>"]
22103#[doc = r""]
22104#[doc = r" ```json"]
22105#[doc = "{"]
22106#[doc = " \"description\": \"A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
22107#[doc = " \"type\": \"object\","]
22108#[doc = " \"properties\": {"]
22109#[doc = " \"approvals_after_next\": {"]
22110#[doc = " \"type\": \"array\","]
22111#[doc = " \"items\": {"]
22112#[doc = " \"anyOf\": ["]
22113#[doc = " {"]
22114#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
22115#[doc = " },"]
22116#[doc = " {"]
22117#[doc = " \"type\": \"null\""]
22118#[doc = " }"]
22119#[doc = " ]"]
22120#[doc = " }"]
22121#[doc = " },"]
22122#[doc = " \"inner_lite\": {"]
22123#[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\","]
22124#[doc = " \"allOf\": ["]
22125#[doc = " {"]
22126#[doc = " \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
22127#[doc = " }"]
22128#[doc = " ]"]
22129#[doc = " },"]
22130#[doc = " \"inner_rest_hash\": {"]
22131#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22132#[doc = " },"]
22133#[doc = " \"next_block_inner_hash\": {"]
22134#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22135#[doc = " },"]
22136#[doc = " \"next_bps\": {"]
22137#[doc = " \"type\": ["]
22138#[doc = " \"array\","]
22139#[doc = " \"null\""]
22140#[doc = " ],"]
22141#[doc = " \"items\": {"]
22142#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
22143#[doc = " }"]
22144#[doc = " },"]
22145#[doc = " \"prev_block_hash\": {"]
22146#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22147#[doc = " }"]
22148#[doc = " }"]
22149#[doc = "}"]
22150#[doc = r" ```"]
22151#[doc = r" </details>"]
22152#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22153pub struct RpcLightClientNextBlockResponse {
22154 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
22155 pub approvals_after_next: ::std::vec::Vec<::std::option::Option<Signature>>,
22156 #[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"]
22157 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22158 pub inner_lite: ::std::option::Option<BlockHeaderInnerLiteView>,
22159 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22160 pub inner_rest_hash: ::std::option::Option<CryptoHash>,
22161 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22162 pub next_block_inner_hash: ::std::option::Option<CryptoHash>,
22163 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22164 pub next_bps: ::std::option::Option<::std::vec::Vec<ValidatorStakeView>>,
22165 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22166 pub prev_block_hash: ::std::option::Option<CryptoHash>,
22167}
22168impl ::std::convert::From<&RpcLightClientNextBlockResponse> for RpcLightClientNextBlockResponse {
22169 fn from(value: &RpcLightClientNextBlockResponse) -> Self {
22170 value.clone()
22171 }
22172}
22173impl ::std::default::Default for RpcLightClientNextBlockResponse {
22174 fn default() -> Self {
22175 Self {
22176 approvals_after_next: Default::default(),
22177 inner_lite: Default::default(),
22178 inner_rest_hash: Default::default(),
22179 next_block_inner_hash: Default::default(),
22180 next_bps: Default::default(),
22181 prev_block_hash: Default::default(),
22182 }
22183 }
22184}
22185#[doc = "`RpcLightClientProofError`"]
22186#[doc = r""]
22187#[doc = r" <details><summary>JSON schema</summary>"]
22188#[doc = r""]
22189#[doc = r" ```json"]
22190#[doc = "{"]
22191#[doc = " \"oneOf\": ["]
22192#[doc = " {"]
22193#[doc = " \"type\": \"object\","]
22194#[doc = " \"required\": ["]
22195#[doc = " \"info\","]
22196#[doc = " \"name\""]
22197#[doc = " ],"]
22198#[doc = " \"properties\": {"]
22199#[doc = " \"info\": {"]
22200#[doc = " \"type\": \"object\""]
22201#[doc = " },"]
22202#[doc = " \"name\": {"]
22203#[doc = " \"type\": \"string\","]
22204#[doc = " \"enum\": ["]
22205#[doc = " \"UNKNOWN_BLOCK\""]
22206#[doc = " ]"]
22207#[doc = " }"]
22208#[doc = " }"]
22209#[doc = " },"]
22210#[doc = " {"]
22211#[doc = " \"type\": \"object\","]
22212#[doc = " \"required\": ["]
22213#[doc = " \"info\","]
22214#[doc = " \"name\""]
22215#[doc = " ],"]
22216#[doc = " \"properties\": {"]
22217#[doc = " \"info\": {"]
22218#[doc = " \"type\": \"object\","]
22219#[doc = " \"required\": ["]
22220#[doc = " \"execution_outcome_shard_id\","]
22221#[doc = " \"number_or_shards\""]
22222#[doc = " ],"]
22223#[doc = " \"properties\": {"]
22224#[doc = " \"execution_outcome_shard_id\": {"]
22225#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22226#[doc = " },"]
22227#[doc = " \"number_or_shards\": {"]
22228#[doc = " \"type\": \"integer\","]
22229#[doc = " \"format\": \"uint\","]
22230#[doc = " \"minimum\": 0.0"]
22231#[doc = " }"]
22232#[doc = " }"]
22233#[doc = " },"]
22234#[doc = " \"name\": {"]
22235#[doc = " \"type\": \"string\","]
22236#[doc = " \"enum\": ["]
22237#[doc = " \"INCONSISTENT_STATE\""]
22238#[doc = " ]"]
22239#[doc = " }"]
22240#[doc = " }"]
22241#[doc = " },"]
22242#[doc = " {"]
22243#[doc = " \"type\": \"object\","]
22244#[doc = " \"required\": ["]
22245#[doc = " \"info\","]
22246#[doc = " \"name\""]
22247#[doc = " ],"]
22248#[doc = " \"properties\": {"]
22249#[doc = " \"info\": {"]
22250#[doc = " \"type\": \"object\","]
22251#[doc = " \"required\": ["]
22252#[doc = " \"transaction_or_receipt_id\""]
22253#[doc = " ],"]
22254#[doc = " \"properties\": {"]
22255#[doc = " \"transaction_or_receipt_id\": {"]
22256#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22257#[doc = " }"]
22258#[doc = " }"]
22259#[doc = " },"]
22260#[doc = " \"name\": {"]
22261#[doc = " \"type\": \"string\","]
22262#[doc = " \"enum\": ["]
22263#[doc = " \"NOT_CONFIRMED\""]
22264#[doc = " ]"]
22265#[doc = " }"]
22266#[doc = " }"]
22267#[doc = " },"]
22268#[doc = " {"]
22269#[doc = " \"type\": \"object\","]
22270#[doc = " \"required\": ["]
22271#[doc = " \"info\","]
22272#[doc = " \"name\""]
22273#[doc = " ],"]
22274#[doc = " \"properties\": {"]
22275#[doc = " \"info\": {"]
22276#[doc = " \"type\": \"object\","]
22277#[doc = " \"required\": ["]
22278#[doc = " \"transaction_or_receipt_id\""]
22279#[doc = " ],"]
22280#[doc = " \"properties\": {"]
22281#[doc = " \"transaction_or_receipt_id\": {"]
22282#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22283#[doc = " }"]
22284#[doc = " }"]
22285#[doc = " },"]
22286#[doc = " \"name\": {"]
22287#[doc = " \"type\": \"string\","]
22288#[doc = " \"enum\": ["]
22289#[doc = " \"UNKNOWN_TRANSACTION_OR_RECEIPT\""]
22290#[doc = " ]"]
22291#[doc = " }"]
22292#[doc = " }"]
22293#[doc = " },"]
22294#[doc = " {"]
22295#[doc = " \"type\": \"object\","]
22296#[doc = " \"required\": ["]
22297#[doc = " \"info\","]
22298#[doc = " \"name\""]
22299#[doc = " ],"]
22300#[doc = " \"properties\": {"]
22301#[doc = " \"info\": {"]
22302#[doc = " \"type\": \"object\","]
22303#[doc = " \"required\": ["]
22304#[doc = " \"shard_id\","]
22305#[doc = " \"transaction_or_receipt_id\""]
22306#[doc = " ],"]
22307#[doc = " \"properties\": {"]
22308#[doc = " \"shard_id\": {"]
22309#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22310#[doc = " },"]
22311#[doc = " \"transaction_or_receipt_id\": {"]
22312#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22313#[doc = " }"]
22314#[doc = " }"]
22315#[doc = " },"]
22316#[doc = " \"name\": {"]
22317#[doc = " \"type\": \"string\","]
22318#[doc = " \"enum\": ["]
22319#[doc = " \"UNAVAILABLE_SHARD\""]
22320#[doc = " ]"]
22321#[doc = " }"]
22322#[doc = " }"]
22323#[doc = " },"]
22324#[doc = " {"]
22325#[doc = " \"type\": \"object\","]
22326#[doc = " \"required\": ["]
22327#[doc = " \"info\","]
22328#[doc = " \"name\""]
22329#[doc = " ],"]
22330#[doc = " \"properties\": {"]
22331#[doc = " \"info\": {"]
22332#[doc = " \"type\": \"object\","]
22333#[doc = " \"required\": ["]
22334#[doc = " \"error_message\""]
22335#[doc = " ],"]
22336#[doc = " \"properties\": {"]
22337#[doc = " \"error_message\": {"]
22338#[doc = " \"type\": \"string\""]
22339#[doc = " }"]
22340#[doc = " }"]
22341#[doc = " },"]
22342#[doc = " \"name\": {"]
22343#[doc = " \"type\": \"string\","]
22344#[doc = " \"enum\": ["]
22345#[doc = " \"INTERNAL_ERROR\""]
22346#[doc = " ]"]
22347#[doc = " }"]
22348#[doc = " }"]
22349#[doc = " }"]
22350#[doc = " ]"]
22351#[doc = "}"]
22352#[doc = r" ```"]
22353#[doc = r" </details>"]
22354#[derive(
22355 :: serde :: Deserialize,
22356 :: serde :: Serialize,
22357 Clone,
22358 Debug,
22359 thiserror::Error,
22360 strum_macros::Display,
22361)]
22362#[serde(tag = "name", content = "info")]
22363pub enum RpcLightClientProofError {
22364 #[serde(rename = "UNKNOWN_BLOCK")]
22365 UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
22366 #[serde(rename = "INCONSISTENT_STATE")]
22367 InconsistentState {
22368 execution_outcome_shard_id: ShardId,
22369 number_or_shards: u32,
22370 },
22371 #[serde(rename = "NOT_CONFIRMED")]
22372 NotConfirmed {
22373 transaction_or_receipt_id: CryptoHash,
22374 },
22375 #[serde(rename = "UNKNOWN_TRANSACTION_OR_RECEIPT")]
22376 UnknownTransactionOrReceipt {
22377 transaction_or_receipt_id: CryptoHash,
22378 },
22379 #[serde(rename = "UNAVAILABLE_SHARD")]
22380 UnavailableShard {
22381 shard_id: ShardId,
22382 transaction_or_receipt_id: CryptoHash,
22383 },
22384 #[serde(rename = "INTERNAL_ERROR")]
22385 InternalError {
22386 error_message: ::std::string::String,
22387 },
22388}
22389impl ::std::convert::From<&Self> for RpcLightClientProofError {
22390 fn from(value: &RpcLightClientProofError) -> Self {
22391 value.clone()
22392 }
22393}
22394impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
22395 for RpcLightClientProofError
22396{
22397 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
22398 Self::UnknownBlock(value)
22399 }
22400}
22401#[doc = "`RpcMaintenanceWindowsError`"]
22402#[doc = r""]
22403#[doc = r" <details><summary>JSON schema</summary>"]
22404#[doc = r""]
22405#[doc = r" ```json"]
22406#[doc = "{"]
22407#[doc = " \"oneOf\": ["]
22408#[doc = " {"]
22409#[doc = " \"type\": \"object\","]
22410#[doc = " \"required\": ["]
22411#[doc = " \"info\","]
22412#[doc = " \"name\""]
22413#[doc = " ],"]
22414#[doc = " \"properties\": {"]
22415#[doc = " \"info\": {"]
22416#[doc = " \"type\": \"object\","]
22417#[doc = " \"required\": ["]
22418#[doc = " \"error_message\""]
22419#[doc = " ],"]
22420#[doc = " \"properties\": {"]
22421#[doc = " \"error_message\": {"]
22422#[doc = " \"type\": \"string\""]
22423#[doc = " }"]
22424#[doc = " }"]
22425#[doc = " },"]
22426#[doc = " \"name\": {"]
22427#[doc = " \"type\": \"string\","]
22428#[doc = " \"enum\": ["]
22429#[doc = " \"INTERNAL_ERROR\""]
22430#[doc = " ]"]
22431#[doc = " }"]
22432#[doc = " }"]
22433#[doc = " }"]
22434#[doc = " ]"]
22435#[doc = "}"]
22436#[doc = r" ```"]
22437#[doc = r" </details>"]
22438#[derive(
22439 :: serde :: Deserialize,
22440 :: serde :: Serialize,
22441 Clone,
22442 Debug,
22443 thiserror::Error,
22444 strum_macros::Display,
22445)]
22446#[serde(tag = "name", content = "info")]
22447pub enum RpcMaintenanceWindowsError {
22448 #[serde(rename = "INTERNAL_ERROR")]
22449 InternalError {
22450 error_message: ::std::string::String,
22451 },
22452}
22453impl ::std::convert::From<&Self> for RpcMaintenanceWindowsError {
22454 fn from(value: &RpcMaintenanceWindowsError) -> Self {
22455 value.clone()
22456 }
22457}
22458#[doc = "`RpcMaintenanceWindowsRequest`"]
22459#[doc = r""]
22460#[doc = r" <details><summary>JSON schema</summary>"]
22461#[doc = r""]
22462#[doc = r" ```json"]
22463#[doc = "{"]
22464#[doc = " \"title\": \"RpcMaintenanceWindowsRequest\","]
22465#[doc = " \"type\": \"object\","]
22466#[doc = " \"required\": ["]
22467#[doc = " \"account_id\""]
22468#[doc = " ],"]
22469#[doc = " \"properties\": {"]
22470#[doc = " \"account_id\": {"]
22471#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
22472#[doc = " }"]
22473#[doc = " }"]
22474#[doc = "}"]
22475#[doc = r" ```"]
22476#[doc = r" </details>"]
22477#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22478pub struct RpcMaintenanceWindowsRequest {
22479 pub account_id: AccountId,
22480}
22481impl ::std::convert::From<&RpcMaintenanceWindowsRequest> for RpcMaintenanceWindowsRequest {
22482 fn from(value: &RpcMaintenanceWindowsRequest) -> Self {
22483 value.clone()
22484 }
22485}
22486#[doc = "`RpcNetworkInfoError`"]
22487#[doc = r""]
22488#[doc = r" <details><summary>JSON schema</summary>"]
22489#[doc = r""]
22490#[doc = r" ```json"]
22491#[doc = "{"]
22492#[doc = " \"oneOf\": ["]
22493#[doc = " {"]
22494#[doc = " \"type\": \"object\","]
22495#[doc = " \"required\": ["]
22496#[doc = " \"info\","]
22497#[doc = " \"name\""]
22498#[doc = " ],"]
22499#[doc = " \"properties\": {"]
22500#[doc = " \"info\": {"]
22501#[doc = " \"type\": \"object\","]
22502#[doc = " \"required\": ["]
22503#[doc = " \"error_message\""]
22504#[doc = " ],"]
22505#[doc = " \"properties\": {"]
22506#[doc = " \"error_message\": {"]
22507#[doc = " \"type\": \"string\""]
22508#[doc = " }"]
22509#[doc = " }"]
22510#[doc = " },"]
22511#[doc = " \"name\": {"]
22512#[doc = " \"type\": \"string\","]
22513#[doc = " \"enum\": ["]
22514#[doc = " \"INTERNAL_ERROR\""]
22515#[doc = " ]"]
22516#[doc = " }"]
22517#[doc = " }"]
22518#[doc = " }"]
22519#[doc = " ]"]
22520#[doc = "}"]
22521#[doc = r" ```"]
22522#[doc = r" </details>"]
22523#[derive(
22524 :: serde :: Deserialize,
22525 :: serde :: Serialize,
22526 Clone,
22527 Debug,
22528 thiserror::Error,
22529 strum_macros::Display,
22530)]
22531#[serde(tag = "name", content = "info")]
22532pub enum RpcNetworkInfoError {
22533 #[serde(rename = "INTERNAL_ERROR")]
22534 InternalError {
22535 error_message: ::std::string::String,
22536 },
22537}
22538impl ::std::convert::From<&Self> for RpcNetworkInfoError {
22539 fn from(value: &RpcNetworkInfoError) -> Self {
22540 value.clone()
22541 }
22542}
22543#[doc = "`RpcNetworkInfoRequest`"]
22544#[doc = r""]
22545#[doc = r" <details><summary>JSON schema</summary>"]
22546#[doc = r""]
22547#[doc = r" ```json"]
22548#[doc = "{"]
22549#[doc = " \"title\": \"RpcNetworkInfoRequest\","]
22550#[doc = " \"type\": \"null\""]
22551#[doc = "}"]
22552#[doc = r" ```"]
22553#[doc = r" </details>"]
22554#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22555#[serde(transparent)]
22556pub struct RpcNetworkInfoRequest(pub ());
22557impl ::std::ops::Deref for RpcNetworkInfoRequest {
22558 type Target = ();
22559 fn deref(&self) -> &() {
22560 &self.0
22561 }
22562}
22563impl ::std::convert::From<RpcNetworkInfoRequest> for () {
22564 fn from(value: RpcNetworkInfoRequest) -> Self {
22565 value.0
22566 }
22567}
22568impl ::std::convert::From<&RpcNetworkInfoRequest> for RpcNetworkInfoRequest {
22569 fn from(value: &RpcNetworkInfoRequest) -> Self {
22570 value.clone()
22571 }
22572}
22573impl ::std::convert::From<()> for RpcNetworkInfoRequest {
22574 fn from(value: ()) -> Self {
22575 Self(value)
22576 }
22577}
22578#[doc = "`RpcNetworkInfoResponse`"]
22579#[doc = r""]
22580#[doc = r" <details><summary>JSON schema</summary>"]
22581#[doc = r""]
22582#[doc = r" ```json"]
22583#[doc = "{"]
22584#[doc = " \"type\": \"object\","]
22585#[doc = " \"required\": ["]
22586#[doc = " \"active_peers\","]
22587#[doc = " \"known_producers\","]
22588#[doc = " \"num_active_peers\","]
22589#[doc = " \"peer_max_count\","]
22590#[doc = " \"received_bytes_per_sec\","]
22591#[doc = " \"sent_bytes_per_sec\""]
22592#[doc = " ],"]
22593#[doc = " \"properties\": {"]
22594#[doc = " \"active_peers\": {"]
22595#[doc = " \"type\": \"array\","]
22596#[doc = " \"items\": {"]
22597#[doc = " \"$ref\": \"#/components/schemas/RpcPeerInfo\""]
22598#[doc = " }"]
22599#[doc = " },"]
22600#[doc = " \"known_producers\": {"]
22601#[doc = " \"description\": \"Accounts of known block and chunk producers from routing table.\","]
22602#[doc = " \"type\": \"array\","]
22603#[doc = " \"items\": {"]
22604#[doc = " \"$ref\": \"#/components/schemas/RpcKnownProducer\""]
22605#[doc = " }"]
22606#[doc = " },"]
22607#[doc = " \"num_active_peers\": {"]
22608#[doc = " \"type\": \"integer\","]
22609#[doc = " \"format\": \"uint\","]
22610#[doc = " \"minimum\": 0.0"]
22611#[doc = " },"]
22612#[doc = " \"peer_max_count\": {"]
22613#[doc = " \"type\": \"integer\","]
22614#[doc = " \"format\": \"uint32\","]
22615#[doc = " \"minimum\": 0.0"]
22616#[doc = " },"]
22617#[doc = " \"received_bytes_per_sec\": {"]
22618#[doc = " \"type\": \"integer\","]
22619#[doc = " \"format\": \"uint64\","]
22620#[doc = " \"minimum\": 0.0"]
22621#[doc = " },"]
22622#[doc = " \"sent_bytes_per_sec\": {"]
22623#[doc = " \"type\": \"integer\","]
22624#[doc = " \"format\": \"uint64\","]
22625#[doc = " \"minimum\": 0.0"]
22626#[doc = " }"]
22627#[doc = " }"]
22628#[doc = "}"]
22629#[doc = r" ```"]
22630#[doc = r" </details>"]
22631#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22632pub struct RpcNetworkInfoResponse {
22633 pub active_peers: ::std::vec::Vec<RpcPeerInfo>,
22634 #[doc = "Accounts of known block and chunk producers from routing table."]
22635 pub known_producers: ::std::vec::Vec<RpcKnownProducer>,
22636 pub num_active_peers: u32,
22637 pub peer_max_count: u32,
22638 pub received_bytes_per_sec: u64,
22639 pub sent_bytes_per_sec: u64,
22640}
22641impl ::std::convert::From<&RpcNetworkInfoResponse> for RpcNetworkInfoResponse {
22642 fn from(value: &RpcNetworkInfoResponse) -> Self {
22643 value.clone()
22644 }
22645}
22646#[doc = "`RpcPeerInfo`"]
22647#[doc = r""]
22648#[doc = r" <details><summary>JSON schema</summary>"]
22649#[doc = r""]
22650#[doc = r" ```json"]
22651#[doc = "{"]
22652#[doc = " \"type\": \"object\","]
22653#[doc = " \"required\": ["]
22654#[doc = " \"id\""]
22655#[doc = " ],"]
22656#[doc = " \"properties\": {"]
22657#[doc = " \"account_id\": {"]
22658#[doc = " \"anyOf\": ["]
22659#[doc = " {"]
22660#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
22661#[doc = " },"]
22662#[doc = " {"]
22663#[doc = " \"type\": \"null\""]
22664#[doc = " }"]
22665#[doc = " ]"]
22666#[doc = " },"]
22667#[doc = " \"addr\": {"]
22668#[doc = " \"type\": ["]
22669#[doc = " \"string\","]
22670#[doc = " \"null\""]
22671#[doc = " ]"]
22672#[doc = " },"]
22673#[doc = " \"id\": {"]
22674#[doc = " \"$ref\": \"#/components/schemas/PeerId\""]
22675#[doc = " }"]
22676#[doc = " }"]
22677#[doc = "}"]
22678#[doc = r" ```"]
22679#[doc = r" </details>"]
22680#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22681pub struct RpcPeerInfo {
22682 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22683 pub account_id: ::std::option::Option<AccountId>,
22684 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22685 pub addr: ::std::option::Option<::std::string::String>,
22686 pub id: PeerId,
22687}
22688impl ::std::convert::From<&RpcPeerInfo> for RpcPeerInfo {
22689 fn from(value: &RpcPeerInfo) -> Self {
22690 value.clone()
22691 }
22692}
22693#[doc = "`RpcProtocolConfigError`"]
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 = " },"]
22710#[doc = " \"name\": {"]
22711#[doc = " \"type\": \"string\","]
22712#[doc = " \"enum\": ["]
22713#[doc = " \"UNKNOWN_BLOCK\""]
22714#[doc = " ]"]
22715#[doc = " }"]
22716#[doc = " }"]
22717#[doc = " },"]
22718#[doc = " {"]
22719#[doc = " \"type\": \"object\","]
22720#[doc = " \"required\": ["]
22721#[doc = " \"info\","]
22722#[doc = " \"name\""]
22723#[doc = " ],"]
22724#[doc = " \"properties\": {"]
22725#[doc = " \"info\": {"]
22726#[doc = " \"type\": \"object\","]
22727#[doc = " \"required\": ["]
22728#[doc = " \"error_message\""]
22729#[doc = " ],"]
22730#[doc = " \"properties\": {"]
22731#[doc = " \"error_message\": {"]
22732#[doc = " \"type\": \"string\""]
22733#[doc = " }"]
22734#[doc = " }"]
22735#[doc = " },"]
22736#[doc = " \"name\": {"]
22737#[doc = " \"type\": \"string\","]
22738#[doc = " \"enum\": ["]
22739#[doc = " \"INTERNAL_ERROR\""]
22740#[doc = " ]"]
22741#[doc = " }"]
22742#[doc = " }"]
22743#[doc = " }"]
22744#[doc = " ]"]
22745#[doc = "}"]
22746#[doc = r" ```"]
22747#[doc = r" </details>"]
22748#[derive(
22749 :: serde :: Deserialize,
22750 :: serde :: Serialize,
22751 Clone,
22752 Debug,
22753 thiserror::Error,
22754 strum_macros::Display,
22755)]
22756#[serde(tag = "name", content = "info")]
22757pub enum RpcProtocolConfigError {
22758 #[serde(rename = "UNKNOWN_BLOCK")]
22759 UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
22760 #[serde(rename = "INTERNAL_ERROR")]
22761 InternalError {
22762 error_message: ::std::string::String,
22763 },
22764}
22765impl ::std::convert::From<&Self> for RpcProtocolConfigError {
22766 fn from(value: &RpcProtocolConfigError) -> Self {
22767 value.clone()
22768 }
22769}
22770impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
22771 for RpcProtocolConfigError
22772{
22773 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
22774 Self::UnknownBlock(value)
22775 }
22776}
22777#[doc = "`RpcProtocolConfigRequest`"]
22778#[doc = r""]
22779#[doc = r" <details><summary>JSON schema</summary>"]
22780#[doc = r""]
22781#[doc = r" ```json"]
22782#[doc = "{"]
22783#[doc = " \"title\": \"RpcProtocolConfigRequest\","]
22784#[doc = " \"type\": \"object\","]
22785#[doc = " \"oneOf\": ["]
22786#[doc = " {"]
22787#[doc = " \"type\": \"object\","]
22788#[doc = " \"required\": ["]
22789#[doc = " \"block_id\""]
22790#[doc = " ],"]
22791#[doc = " \"properties\": {"]
22792#[doc = " \"block_id\": {"]
22793#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
22794#[doc = " }"]
22795#[doc = " }"]
22796#[doc = " },"]
22797#[doc = " {"]
22798#[doc = " \"type\": \"object\","]
22799#[doc = " \"required\": ["]
22800#[doc = " \"finality\""]
22801#[doc = " ],"]
22802#[doc = " \"properties\": {"]
22803#[doc = " \"finality\": {"]
22804#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
22805#[doc = " }"]
22806#[doc = " }"]
22807#[doc = " },"]
22808#[doc = " {"]
22809#[doc = " \"type\": \"object\","]
22810#[doc = " \"required\": ["]
22811#[doc = " \"sync_checkpoint\""]
22812#[doc = " ],"]
22813#[doc = " \"properties\": {"]
22814#[doc = " \"sync_checkpoint\": {"]
22815#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
22816#[doc = " }"]
22817#[doc = " }"]
22818#[doc = " }"]
22819#[doc = " ]"]
22820#[doc = "}"]
22821#[doc = r" ```"]
22822#[doc = r" </details>"]
22823#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22824pub enum RpcProtocolConfigRequest {
22825 #[serde(rename = "block_id")]
22826 BlockId(BlockId),
22827 #[serde(rename = "finality")]
22828 Finality(Finality),
22829 #[serde(rename = "sync_checkpoint")]
22830 SyncCheckpoint(SyncCheckpoint),
22831}
22832impl ::std::convert::From<&Self> for RpcProtocolConfigRequest {
22833 fn from(value: &RpcProtocolConfigRequest) -> Self {
22834 value.clone()
22835 }
22836}
22837impl ::std::convert::From<BlockId> for RpcProtocolConfigRequest {
22838 fn from(value: BlockId) -> Self {
22839 Self::BlockId(value)
22840 }
22841}
22842impl ::std::convert::From<Finality> for RpcProtocolConfigRequest {
22843 fn from(value: Finality) -> Self {
22844 Self::Finality(value)
22845 }
22846}
22847impl ::std::convert::From<SyncCheckpoint> for RpcProtocolConfigRequest {
22848 fn from(value: SyncCheckpoint) -> Self {
22849 Self::SyncCheckpoint(value)
22850 }
22851}
22852#[doc = "`RpcProtocolConfigResponse`"]
22853#[doc = r""]
22854#[doc = r" <details><summary>JSON schema</summary>"]
22855#[doc = r""]
22856#[doc = r" ```json"]
22857#[doc = "{"]
22858#[doc = " \"type\": \"object\","]
22859#[doc = " \"required\": ["]
22860#[doc = " \"avg_hidden_validator_seats_per_shard\","]
22861#[doc = " \"block_producer_kickout_threshold\","]
22862#[doc = " \"chain_id\","]
22863#[doc = " \"chunk_producer_kickout_threshold\","]
22864#[doc = " \"chunk_validator_only_kickout_threshold\","]
22865#[doc = " \"dynamic_resharding\","]
22866#[doc = " \"epoch_length\","]
22867#[doc = " \"fishermen_threshold\","]
22868#[doc = " \"gas_limit\","]
22869#[doc = " \"gas_price_adjustment_rate\","]
22870#[doc = " \"genesis_height\","]
22871#[doc = " \"genesis_time\","]
22872#[doc = " \"max_gas_price\","]
22873#[doc = " \"max_inflation_rate\","]
22874#[doc = " \"max_kickout_stake_perc\","]
22875#[doc = " \"min_gas_price\","]
22876#[doc = " \"minimum_stake_divisor\","]
22877#[doc = " \"minimum_stake_ratio\","]
22878#[doc = " \"minimum_validators_per_shard\","]
22879#[doc = " \"num_block_producer_seats\","]
22880#[doc = " \"num_block_producer_seats_per_shard\","]
22881#[doc = " \"num_blocks_per_year\","]
22882#[doc = " \"online_max_threshold\","]
22883#[doc = " \"online_min_threshold\","]
22884#[doc = " \"protocol_reward_rate\","]
22885#[doc = " \"protocol_treasury_account\","]
22886#[doc = " \"protocol_upgrade_stake_threshold\","]
22887#[doc = " \"protocol_version\","]
22888#[doc = " \"runtime_config\","]
22889#[doc = " \"shard_layout\","]
22890#[doc = " \"shuffle_shard_assignment_for_chunk_producers\","]
22891#[doc = " \"target_validator_mandates_per_shard\","]
22892#[doc = " \"transaction_validity_period\""]
22893#[doc = " ],"]
22894#[doc = " \"properties\": {"]
22895#[doc = " \"avg_hidden_validator_seats_per_shard\": {"]
22896#[doc = " \"description\": \"Expected number of hidden validators per shard.\","]
22897#[doc = " \"type\": \"array\","]
22898#[doc = " \"items\": {"]
22899#[doc = " \"type\": \"integer\","]
22900#[doc = " \"format\": \"uint64\","]
22901#[doc = " \"minimum\": 0.0"]
22902#[doc = " }"]
22903#[doc = " },"]
22904#[doc = " \"block_producer_kickout_threshold\": {"]
22905#[doc = " \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
22906#[doc = " \"type\": \"integer\","]
22907#[doc = " \"format\": \"uint8\","]
22908#[doc = " \"maximum\": 255.0,"]
22909#[doc = " \"minimum\": 0.0"]
22910#[doc = " },"]
22911#[doc = " \"chain_id\": {"]
22912#[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.\","]
22913#[doc = " \"type\": \"string\""]
22914#[doc = " },"]
22915#[doc = " \"chunk_producer_kickout_threshold\": {"]
22916#[doc = " \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
22917#[doc = " \"type\": \"integer\","]
22918#[doc = " \"format\": \"uint8\","]
22919#[doc = " \"maximum\": 255.0,"]
22920#[doc = " \"minimum\": 0.0"]
22921#[doc = " },"]
22922#[doc = " \"chunk_validator_only_kickout_threshold\": {"]
22923#[doc = " \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
22924#[doc = " \"type\": \"integer\","]
22925#[doc = " \"format\": \"uint8\","]
22926#[doc = " \"maximum\": 255.0,"]
22927#[doc = " \"minimum\": 0.0"]
22928#[doc = " },"]
22929#[doc = " \"dynamic_resharding\": {"]
22930#[doc = " \"description\": \"Enable dynamic re-sharding.\","]
22931#[doc = " \"type\": \"boolean\""]
22932#[doc = " },"]
22933#[doc = " \"epoch_length\": {"]
22934#[doc = " \"description\": \"Epoch length counted in block heights.\","]
22935#[doc = " \"type\": \"integer\","]
22936#[doc = " \"format\": \"uint64\","]
22937#[doc = " \"minimum\": 0.0"]
22938#[doc = " },"]
22939#[doc = " \"fishermen_threshold\": {"]
22940#[doc = " \"description\": \"Fishermen stake threshold.\","]
22941#[doc = " \"allOf\": ["]
22942#[doc = " {"]
22943#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
22944#[doc = " }"]
22945#[doc = " ]"]
22946#[doc = " },"]
22947#[doc = " \"gas_limit\": {"]
22948#[doc = " \"description\": \"Initial gas limit.\","]
22949#[doc = " \"allOf\": ["]
22950#[doc = " {"]
22951#[doc = " \"$ref\": \"#/components/schemas/NearGas\""]
22952#[doc = " }"]
22953#[doc = " ]"]
22954#[doc = " },"]
22955#[doc = " \"gas_price_adjustment_rate\": {"]
22956#[doc = " \"description\": \"Gas price adjustment rate\","]
22957#[doc = " \"type\": \"array\","]
22958#[doc = " \"items\": {"]
22959#[doc = " \"type\": \"integer\","]
22960#[doc = " \"format\": \"int32\""]
22961#[doc = " },"]
22962#[doc = " \"maxItems\": 2,"]
22963#[doc = " \"minItems\": 2"]
22964#[doc = " },"]
22965#[doc = " \"genesis_height\": {"]
22966#[doc = " \"description\": \"Height of genesis block.\","]
22967#[doc = " \"type\": \"integer\","]
22968#[doc = " \"format\": \"uint64\","]
22969#[doc = " \"minimum\": 0.0"]
22970#[doc = " },"]
22971#[doc = " \"genesis_time\": {"]
22972#[doc = " \"description\": \"Official time of blockchain start.\","]
22973#[doc = " \"type\": \"string\","]
22974#[doc = " \"format\": \"date-time\""]
22975#[doc = " },"]
22976#[doc = " \"max_gas_price\": {"]
22977#[doc = " \"description\": \"Maximum gas price.\","]
22978#[doc = " \"allOf\": ["]
22979#[doc = " {"]
22980#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
22981#[doc = " }"]
22982#[doc = " ]"]
22983#[doc = " },"]
22984#[doc = " \"max_inflation_rate\": {"]
22985#[doc = " \"description\": \"Maximum inflation on the total supply every epoch.\","]
22986#[doc = " \"type\": \"array\","]
22987#[doc = " \"items\": {"]
22988#[doc = " \"type\": \"integer\","]
22989#[doc = " \"format\": \"int32\""]
22990#[doc = " },"]
22991#[doc = " \"maxItems\": 2,"]
22992#[doc = " \"minItems\": 2"]
22993#[doc = " },"]
22994#[doc = " \"max_kickout_stake_perc\": {"]
22995#[doc = " \"description\": \"Max stake percentage of the validators we will kick out.\","]
22996#[doc = " \"type\": \"integer\","]
22997#[doc = " \"format\": \"uint8\","]
22998#[doc = " \"maximum\": 255.0,"]
22999#[doc = " \"minimum\": 0.0"]
23000#[doc = " },"]
23001#[doc = " \"min_gas_price\": {"]
23002#[doc = " \"description\": \"Minimum gas price. It is also the initial gas price.\","]
23003#[doc = " \"allOf\": ["]
23004#[doc = " {"]
23005#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
23006#[doc = " }"]
23007#[doc = " ]"]
23008#[doc = " },"]
23009#[doc = " \"minimum_stake_divisor\": {"]
23010#[doc = " \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
23011#[doc = " \"type\": \"integer\","]
23012#[doc = " \"format\": \"uint64\","]
23013#[doc = " \"minimum\": 0.0"]
23014#[doc = " },"]
23015#[doc = " \"minimum_stake_ratio\": {"]
23016#[doc = " \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
23017#[doc = " \"type\": \"array\","]
23018#[doc = " \"items\": {"]
23019#[doc = " \"type\": \"integer\","]
23020#[doc = " \"format\": \"int32\""]
23021#[doc = " },"]
23022#[doc = " \"maxItems\": 2,"]
23023#[doc = " \"minItems\": 2"]
23024#[doc = " },"]
23025#[doc = " \"minimum_validators_per_shard\": {"]
23026#[doc = " \"description\": \"The minimum number of validators each shard must have\","]
23027#[doc = " \"type\": \"integer\","]
23028#[doc = " \"format\": \"uint64\","]
23029#[doc = " \"minimum\": 0.0"]
23030#[doc = " },"]
23031#[doc = " \"num_block_producer_seats\": {"]
23032#[doc = " \"description\": \"Number of block producer seats at genesis.\","]
23033#[doc = " \"type\": \"integer\","]
23034#[doc = " \"format\": \"uint64\","]
23035#[doc = " \"minimum\": 0.0"]
23036#[doc = " },"]
23037#[doc = " \"num_block_producer_seats_per_shard\": {"]
23038#[doc = " \"description\": \"Defines number of shards and number of block producer seats per each shard at genesis.\","]
23039#[doc = " \"type\": \"array\","]
23040#[doc = " \"items\": {"]
23041#[doc = " \"type\": \"integer\","]
23042#[doc = " \"format\": \"uint64\","]
23043#[doc = " \"minimum\": 0.0"]
23044#[doc = " }"]
23045#[doc = " },"]
23046#[doc = " \"num_blocks_per_year\": {"]
23047#[doc = " \"description\": \"Expected number of blocks per year\","]
23048#[doc = " \"type\": \"integer\","]
23049#[doc = " \"format\": \"uint64\","]
23050#[doc = " \"minimum\": 0.0"]
23051#[doc = " },"]
23052#[doc = " \"online_max_threshold\": {"]
23053#[doc = " \"description\": \"Online maximum threshold above which validator gets full reward.\","]
23054#[doc = " \"type\": \"array\","]
23055#[doc = " \"items\": {"]
23056#[doc = " \"type\": \"integer\","]
23057#[doc = " \"format\": \"int32\""]
23058#[doc = " },"]
23059#[doc = " \"maxItems\": 2,"]
23060#[doc = " \"minItems\": 2"]
23061#[doc = " },"]
23062#[doc = " \"online_min_threshold\": {"]
23063#[doc = " \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
23064#[doc = " \"type\": \"array\","]
23065#[doc = " \"items\": {"]
23066#[doc = " \"type\": \"integer\","]
23067#[doc = " \"format\": \"int32\""]
23068#[doc = " },"]
23069#[doc = " \"maxItems\": 2,"]
23070#[doc = " \"minItems\": 2"]
23071#[doc = " },"]
23072#[doc = " \"protocol_reward_rate\": {"]
23073#[doc = " \"description\": \"Protocol treasury rate\","]
23074#[doc = " \"type\": \"array\","]
23075#[doc = " \"items\": {"]
23076#[doc = " \"type\": \"integer\","]
23077#[doc = " \"format\": \"int32\""]
23078#[doc = " },"]
23079#[doc = " \"maxItems\": 2,"]
23080#[doc = " \"minItems\": 2"]
23081#[doc = " },"]
23082#[doc = " \"protocol_treasury_account\": {"]
23083#[doc = " \"description\": \"Protocol treasury account\","]
23084#[doc = " \"allOf\": ["]
23085#[doc = " {"]
23086#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23087#[doc = " }"]
23088#[doc = " ]"]
23089#[doc = " },"]
23090#[doc = " \"protocol_upgrade_stake_threshold\": {"]
23091#[doc = " \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
23092#[doc = " \"type\": \"array\","]
23093#[doc = " \"items\": {"]
23094#[doc = " \"type\": \"integer\","]
23095#[doc = " \"format\": \"int32\""]
23096#[doc = " },"]
23097#[doc = " \"maxItems\": 2,"]
23098#[doc = " \"minItems\": 2"]
23099#[doc = " },"]
23100#[doc = " \"protocol_version\": {"]
23101#[doc = " \"description\": \"Current Protocol Version\","]
23102#[doc = " \"type\": \"integer\","]
23103#[doc = " \"format\": \"uint32\","]
23104#[doc = " \"minimum\": 0.0"]
23105#[doc = " },"]
23106#[doc = " \"runtime_config\": {"]
23107#[doc = " \"description\": \"Runtime configuration (mostly economics constants).\","]
23108#[doc = " \"allOf\": ["]
23109#[doc = " {"]
23110#[doc = " \"$ref\": \"#/components/schemas/RuntimeConfigView\""]
23111#[doc = " }"]
23112#[doc = " ]"]
23113#[doc = " },"]
23114#[doc = " \"shard_layout\": {"]
23115#[doc = " \"description\": \"Layout information regarding how to split accounts to shards\","]
23116#[doc = " \"allOf\": ["]
23117#[doc = " {"]
23118#[doc = " \"$ref\": \"#/components/schemas/ShardLayout\""]
23119#[doc = " }"]
23120#[doc = " ]"]
23121#[doc = " },"]
23122#[doc = " \"shuffle_shard_assignment_for_chunk_producers\": {"]
23123#[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]`.\","]
23124#[doc = " \"type\": \"boolean\""]
23125#[doc = " },"]
23126#[doc = " \"target_validator_mandates_per_shard\": {"]
23127#[doc = " \"description\": \"Number of target chunk validator mandates for each shard.\","]
23128#[doc = " \"type\": \"integer\","]
23129#[doc = " \"format\": \"uint64\","]
23130#[doc = " \"minimum\": 0.0"]
23131#[doc = " },"]
23132#[doc = " \"transaction_validity_period\": {"]
23133#[doc = " \"description\": \"Number of blocks for which a given transaction is valid\","]
23134#[doc = " \"type\": \"integer\","]
23135#[doc = " \"format\": \"uint64\","]
23136#[doc = " \"minimum\": 0.0"]
23137#[doc = " }"]
23138#[doc = " }"]
23139#[doc = "}"]
23140#[doc = r" ```"]
23141#[doc = r" </details>"]
23142#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23143pub struct RpcProtocolConfigResponse {
23144 #[doc = "Expected number of hidden validators per shard."]
23145 pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
23146 #[doc = "Threshold for kicking out block producers, between 0 and 100."]
23147 pub block_producer_kickout_threshold: u8,
23148 #[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."]
23149 pub chain_id: ::std::string::String,
23150 #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
23151 pub chunk_producer_kickout_threshold: u8,
23152 #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
23153 pub chunk_validator_only_kickout_threshold: u8,
23154 #[doc = "Enable dynamic re-sharding."]
23155 pub dynamic_resharding: bool,
23156 #[doc = "Epoch length counted in block heights."]
23157 pub epoch_length: u64,
23158 #[doc = "Fishermen stake threshold."]
23159 pub fishermen_threshold: NearToken,
23160 #[doc = "Initial gas limit."]
23161 pub gas_limit: NearGas,
23162 #[doc = "Gas price adjustment rate"]
23163 pub gas_price_adjustment_rate: [i32; 2usize],
23164 #[doc = "Height of genesis block."]
23165 pub genesis_height: u64,
23166 #[doc = "Official time of blockchain start."]
23167 pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
23168 #[doc = "Maximum gas price."]
23169 pub max_gas_price: NearToken,
23170 #[doc = "Maximum inflation on the total supply every epoch."]
23171 pub max_inflation_rate: [i32; 2usize],
23172 #[doc = "Max stake percentage of the validators we will kick out."]
23173 pub max_kickout_stake_perc: u8,
23174 #[doc = "Minimum gas price. It is also the initial gas price."]
23175 pub min_gas_price: NearToken,
23176 #[doc = "The minimum stake required for staking is last seat price divided by this number."]
23177 pub minimum_stake_divisor: u64,
23178 #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
23179 pub minimum_stake_ratio: [i32; 2usize],
23180 #[doc = "The minimum number of validators each shard must have"]
23181 pub minimum_validators_per_shard: u64,
23182 #[doc = "Number of block producer seats at genesis."]
23183 pub num_block_producer_seats: u64,
23184 #[doc = "Defines number of shards and number of block producer seats per each shard at genesis."]
23185 pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
23186 #[doc = "Expected number of blocks per year"]
23187 pub num_blocks_per_year: u64,
23188 #[doc = "Online maximum threshold above which validator gets full reward."]
23189 pub online_max_threshold: [i32; 2usize],
23190 #[doc = "Online minimum threshold below which validator doesn't receive reward."]
23191 pub online_min_threshold: [i32; 2usize],
23192 #[doc = "Protocol treasury rate"]
23193 pub protocol_reward_rate: [i32; 2usize],
23194 #[doc = "Protocol treasury account"]
23195 pub protocol_treasury_account: AccountId,
23196 #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
23197 pub protocol_upgrade_stake_threshold: [i32; 2usize],
23198 #[doc = "Current Protocol Version"]
23199 pub protocol_version: u32,
23200 #[doc = "Runtime configuration (mostly economics constants)."]
23201 pub runtime_config: RuntimeConfigView,
23202 #[doc = "Layout information regarding how to split accounts to shards"]
23203 pub shard_layout: ShardLayout,
23204 #[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]`."]
23205 pub shuffle_shard_assignment_for_chunk_producers: bool,
23206 #[doc = "Number of target chunk validator mandates for each shard."]
23207 pub target_validator_mandates_per_shard: u64,
23208 #[doc = "Number of blocks for which a given transaction is valid"]
23209 pub transaction_validity_period: u64,
23210}
23211impl ::std::convert::From<&RpcProtocolConfigResponse> for RpcProtocolConfigResponse {
23212 fn from(value: &RpcProtocolConfigResponse) -> Self {
23213 value.clone()
23214 }
23215}
23216#[doc = "`RpcQueryError`"]
23217#[doc = r""]
23218#[doc = r" <details><summary>JSON schema</summary>"]
23219#[doc = r""]
23220#[doc = r" ```json"]
23221#[doc = "{"]
23222#[doc = " \"oneOf\": ["]
23223#[doc = " {"]
23224#[doc = " \"type\": \"object\","]
23225#[doc = " \"required\": ["]
23226#[doc = " \"name\""]
23227#[doc = " ],"]
23228#[doc = " \"properties\": {"]
23229#[doc = " \"name\": {"]
23230#[doc = " \"type\": \"string\","]
23231#[doc = " \"enum\": ["]
23232#[doc = " \"NO_SYNCED_BLOCKS\""]
23233#[doc = " ]"]
23234#[doc = " }"]
23235#[doc = " }"]
23236#[doc = " },"]
23237#[doc = " {"]
23238#[doc = " \"type\": \"object\","]
23239#[doc = " \"required\": ["]
23240#[doc = " \"info\","]
23241#[doc = " \"name\""]
23242#[doc = " ],"]
23243#[doc = " \"properties\": {"]
23244#[doc = " \"info\": {"]
23245#[doc = " \"type\": \"object\","]
23246#[doc = " \"required\": ["]
23247#[doc = " \"requested_shard_id\""]
23248#[doc = " ],"]
23249#[doc = " \"properties\": {"]
23250#[doc = " \"requested_shard_id\": {"]
23251#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
23252#[doc = " }"]
23253#[doc = " }"]
23254#[doc = " },"]
23255#[doc = " \"name\": {"]
23256#[doc = " \"type\": \"string\","]
23257#[doc = " \"enum\": ["]
23258#[doc = " \"UNAVAILABLE_SHARD\""]
23259#[doc = " ]"]
23260#[doc = " }"]
23261#[doc = " }"]
23262#[doc = " },"]
23263#[doc = " {"]
23264#[doc = " \"type\": \"object\","]
23265#[doc = " \"required\": ["]
23266#[doc = " \"info\","]
23267#[doc = " \"name\""]
23268#[doc = " ],"]
23269#[doc = " \"properties\": {"]
23270#[doc = " \"info\": {"]
23271#[doc = " \"type\": \"object\","]
23272#[doc = " \"required\": ["]
23273#[doc = " \"block_hash\","]
23274#[doc = " \"block_height\""]
23275#[doc = " ],"]
23276#[doc = " \"properties\": {"]
23277#[doc = " \"block_hash\": {"]
23278#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23279#[doc = " },"]
23280#[doc = " \"block_height\": {"]
23281#[doc = " \"type\": \"integer\","]
23282#[doc = " \"format\": \"uint64\","]
23283#[doc = " \"minimum\": 0.0"]
23284#[doc = " }"]
23285#[doc = " }"]
23286#[doc = " },"]
23287#[doc = " \"name\": {"]
23288#[doc = " \"type\": \"string\","]
23289#[doc = " \"enum\": ["]
23290#[doc = " \"GARBAGE_COLLECTED_BLOCK\""]
23291#[doc = " ]"]
23292#[doc = " }"]
23293#[doc = " }"]
23294#[doc = " },"]
23295#[doc = " {"]
23296#[doc = " \"type\": \"object\","]
23297#[doc = " \"required\": ["]
23298#[doc = " \"info\","]
23299#[doc = " \"name\""]
23300#[doc = " ],"]
23301#[doc = " \"properties\": {"]
23302#[doc = " \"info\": {"]
23303#[doc = " \"type\": \"object\","]
23304#[doc = " \"required\": ["]
23305#[doc = " \"block_reference\""]
23306#[doc = " ],"]
23307#[doc = " \"properties\": {"]
23308#[doc = " \"block_reference\": {"]
23309#[doc = " \"$ref\": \"#/components/schemas/BlockReference\""]
23310#[doc = " }"]
23311#[doc = " }"]
23312#[doc = " },"]
23313#[doc = " \"name\": {"]
23314#[doc = " \"type\": \"string\","]
23315#[doc = " \"enum\": ["]
23316#[doc = " \"UNKNOWN_BLOCK\""]
23317#[doc = " ]"]
23318#[doc = " }"]
23319#[doc = " }"]
23320#[doc = " },"]
23321#[doc = " {"]
23322#[doc = " \"type\": \"object\","]
23323#[doc = " \"required\": ["]
23324#[doc = " \"info\","]
23325#[doc = " \"name\""]
23326#[doc = " ],"]
23327#[doc = " \"properties\": {"]
23328#[doc = " \"info\": {"]
23329#[doc = " \"type\": \"object\","]
23330#[doc = " \"required\": ["]
23331#[doc = " \"block_hash\","]
23332#[doc = " \"block_height\","]
23333#[doc = " \"requested_account_id\""]
23334#[doc = " ],"]
23335#[doc = " \"properties\": {"]
23336#[doc = " \"block_hash\": {"]
23337#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23338#[doc = " },"]
23339#[doc = " \"block_height\": {"]
23340#[doc = " \"type\": \"integer\","]
23341#[doc = " \"format\": \"uint64\","]
23342#[doc = " \"minimum\": 0.0"]
23343#[doc = " },"]
23344#[doc = " \"requested_account_id\": {"]
23345#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23346#[doc = " }"]
23347#[doc = " }"]
23348#[doc = " },"]
23349#[doc = " \"name\": {"]
23350#[doc = " \"type\": \"string\","]
23351#[doc = " \"enum\": ["]
23352#[doc = " \"INVALID_ACCOUNT\""]
23353#[doc = " ]"]
23354#[doc = " }"]
23355#[doc = " }"]
23356#[doc = " },"]
23357#[doc = " {"]
23358#[doc = " \"type\": \"object\","]
23359#[doc = " \"required\": ["]
23360#[doc = " \"info\","]
23361#[doc = " \"name\""]
23362#[doc = " ],"]
23363#[doc = " \"properties\": {"]
23364#[doc = " \"info\": {"]
23365#[doc = " \"type\": \"object\","]
23366#[doc = " \"required\": ["]
23367#[doc = " \"block_hash\","]
23368#[doc = " \"block_height\","]
23369#[doc = " \"requested_account_id\""]
23370#[doc = " ],"]
23371#[doc = " \"properties\": {"]
23372#[doc = " \"block_hash\": {"]
23373#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23374#[doc = " },"]
23375#[doc = " \"block_height\": {"]
23376#[doc = " \"type\": \"integer\","]
23377#[doc = " \"format\": \"uint64\","]
23378#[doc = " \"minimum\": 0.0"]
23379#[doc = " },"]
23380#[doc = " \"requested_account_id\": {"]
23381#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23382#[doc = " }"]
23383#[doc = " }"]
23384#[doc = " },"]
23385#[doc = " \"name\": {"]
23386#[doc = " \"type\": \"string\","]
23387#[doc = " \"enum\": ["]
23388#[doc = " \"UNKNOWN_ACCOUNT\""]
23389#[doc = " ]"]
23390#[doc = " }"]
23391#[doc = " }"]
23392#[doc = " },"]
23393#[doc = " {"]
23394#[doc = " \"type\": \"object\","]
23395#[doc = " \"required\": ["]
23396#[doc = " \"info\","]
23397#[doc = " \"name\""]
23398#[doc = " ],"]
23399#[doc = " \"properties\": {"]
23400#[doc = " \"info\": {"]
23401#[doc = " \"type\": \"object\","]
23402#[doc = " \"required\": ["]
23403#[doc = " \"block_hash\","]
23404#[doc = " \"block_height\","]
23405#[doc = " \"contract_account_id\""]
23406#[doc = " ],"]
23407#[doc = " \"properties\": {"]
23408#[doc = " \"block_hash\": {"]
23409#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23410#[doc = " },"]
23411#[doc = " \"block_height\": {"]
23412#[doc = " \"type\": \"integer\","]
23413#[doc = " \"format\": \"uint64\","]
23414#[doc = " \"minimum\": 0.0"]
23415#[doc = " },"]
23416#[doc = " \"contract_account_id\": {"]
23417#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23418#[doc = " }"]
23419#[doc = " }"]
23420#[doc = " },"]
23421#[doc = " \"name\": {"]
23422#[doc = " \"type\": \"string\","]
23423#[doc = " \"enum\": ["]
23424#[doc = " \"NO_CONTRACT_CODE\""]
23425#[doc = " ]"]
23426#[doc = " }"]
23427#[doc = " }"]
23428#[doc = " },"]
23429#[doc = " {"]
23430#[doc = " \"type\": \"object\","]
23431#[doc = " \"required\": ["]
23432#[doc = " \"info\","]
23433#[doc = " \"name\""]
23434#[doc = " ],"]
23435#[doc = " \"properties\": {"]
23436#[doc = " \"info\": {"]
23437#[doc = " \"type\": \"object\","]
23438#[doc = " \"required\": ["]
23439#[doc = " \"block_hash\","]
23440#[doc = " \"block_height\","]
23441#[doc = " \"contract_account_id\""]
23442#[doc = " ],"]
23443#[doc = " \"properties\": {"]
23444#[doc = " \"block_hash\": {"]
23445#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23446#[doc = " },"]
23447#[doc = " \"block_height\": {"]
23448#[doc = " \"type\": \"integer\","]
23449#[doc = " \"format\": \"uint64\","]
23450#[doc = " \"minimum\": 0.0"]
23451#[doc = " },"]
23452#[doc = " \"contract_account_id\": {"]
23453#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23454#[doc = " }"]
23455#[doc = " }"]
23456#[doc = " },"]
23457#[doc = " \"name\": {"]
23458#[doc = " \"type\": \"string\","]
23459#[doc = " \"enum\": ["]
23460#[doc = " \"TOO_LARGE_CONTRACT_STATE\""]
23461#[doc = " ]"]
23462#[doc = " }"]
23463#[doc = " }"]
23464#[doc = " },"]
23465#[doc = " {"]
23466#[doc = " \"type\": \"object\","]
23467#[doc = " \"required\": ["]
23468#[doc = " \"info\","]
23469#[doc = " \"name\""]
23470#[doc = " ],"]
23471#[doc = " \"properties\": {"]
23472#[doc = " \"info\": {"]
23473#[doc = " \"type\": \"object\","]
23474#[doc = " \"required\": ["]
23475#[doc = " \"block_hash\","]
23476#[doc = " \"block_height\","]
23477#[doc = " \"public_key\""]
23478#[doc = " ],"]
23479#[doc = " \"properties\": {"]
23480#[doc = " \"block_hash\": {"]
23481#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23482#[doc = " },"]
23483#[doc = " \"block_height\": {"]
23484#[doc = " \"type\": \"integer\","]
23485#[doc = " \"format\": \"uint64\","]
23486#[doc = " \"minimum\": 0.0"]
23487#[doc = " },"]
23488#[doc = " \"public_key\": {"]
23489#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23490#[doc = " }"]
23491#[doc = " }"]
23492#[doc = " },"]
23493#[doc = " \"name\": {"]
23494#[doc = " \"type\": \"string\","]
23495#[doc = " \"enum\": ["]
23496#[doc = " \"UNKNOWN_ACCESS_KEY\""]
23497#[doc = " ]"]
23498#[doc = " }"]
23499#[doc = " }"]
23500#[doc = " },"]
23501#[doc = " {"]
23502#[doc = " \"type\": \"object\","]
23503#[doc = " \"required\": ["]
23504#[doc = " \"info\","]
23505#[doc = " \"name\""]
23506#[doc = " ],"]
23507#[doc = " \"properties\": {"]
23508#[doc = " \"info\": {"]
23509#[doc = " \"type\": \"object\","]
23510#[doc = " \"required\": ["]
23511#[doc = " \"block_hash\","]
23512#[doc = " \"block_height\","]
23513#[doc = " \"public_key\""]
23514#[doc = " ],"]
23515#[doc = " \"properties\": {"]
23516#[doc = " \"block_hash\": {"]
23517#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23518#[doc = " },"]
23519#[doc = " \"block_height\": {"]
23520#[doc = " \"type\": \"integer\","]
23521#[doc = " \"format\": \"uint64\","]
23522#[doc = " \"minimum\": 0.0"]
23523#[doc = " },"]
23524#[doc = " \"public_key\": {"]
23525#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23526#[doc = " }"]
23527#[doc = " }"]
23528#[doc = " },"]
23529#[doc = " \"name\": {"]
23530#[doc = " \"type\": \"string\","]
23531#[doc = " \"enum\": ["]
23532#[doc = " \"UNKNOWN_GAS_KEY\""]
23533#[doc = " ]"]
23534#[doc = " }"]
23535#[doc = " }"]
23536#[doc = " },"]
23537#[doc = " {"]
23538#[doc = " \"type\": \"object\","]
23539#[doc = " \"required\": ["]
23540#[doc = " \"info\","]
23541#[doc = " \"name\""]
23542#[doc = " ],"]
23543#[doc = " \"properties\": {"]
23544#[doc = " \"info\": {"]
23545#[doc = " \"type\": \"object\","]
23546#[doc = " \"required\": ["]
23547#[doc = " \"block_hash\","]
23548#[doc = " \"block_height\","]
23549#[doc = " \"vm_error\""]
23550#[doc = " ],"]
23551#[doc = " \"properties\": {"]
23552#[doc = " \"block_hash\": {"]
23553#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23554#[doc = " },"]
23555#[doc = " \"block_height\": {"]
23556#[doc = " \"type\": \"integer\","]
23557#[doc = " \"format\": \"uint64\","]
23558#[doc = " \"minimum\": 0.0"]
23559#[doc = " },"]
23560#[doc = " \"vm_error\": {"]
23561#[doc = " \"type\": \"string\""]
23562#[doc = " }"]
23563#[doc = " }"]
23564#[doc = " },"]
23565#[doc = " \"name\": {"]
23566#[doc = " \"type\": \"string\","]
23567#[doc = " \"enum\": ["]
23568#[doc = " \"CONTRACT_EXECUTION_ERROR\""]
23569#[doc = " ]"]
23570#[doc = " }"]
23571#[doc = " }"]
23572#[doc = " },"]
23573#[doc = " {"]
23574#[doc = " \"type\": \"object\","]
23575#[doc = " \"required\": ["]
23576#[doc = " \"info\","]
23577#[doc = " \"name\""]
23578#[doc = " ],"]
23579#[doc = " \"properties\": {"]
23580#[doc = " \"info\": {"]
23581#[doc = " \"type\": \"object\","]
23582#[doc = " \"required\": ["]
23583#[doc = " \"block_hash\","]
23584#[doc = " \"block_height\","]
23585#[doc = " \"identifier\""]
23586#[doc = " ],"]
23587#[doc = " \"properties\": {"]
23588#[doc = " \"block_hash\": {"]
23589#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23590#[doc = " },"]
23591#[doc = " \"block_height\": {"]
23592#[doc = " \"type\": \"integer\","]
23593#[doc = " \"format\": \"uint64\","]
23594#[doc = " \"minimum\": 0.0"]
23595#[doc = " },"]
23596#[doc = " \"identifier\": {"]
23597#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
23598#[doc = " }"]
23599#[doc = " }"]
23600#[doc = " },"]
23601#[doc = " \"name\": {"]
23602#[doc = " \"type\": \"string\","]
23603#[doc = " \"enum\": ["]
23604#[doc = " \"NO_GLOBAL_CONTRACT_CODE\""]
23605#[doc = " ]"]
23606#[doc = " }"]
23607#[doc = " }"]
23608#[doc = " },"]
23609#[doc = " {"]
23610#[doc = " \"type\": \"object\","]
23611#[doc = " \"required\": ["]
23612#[doc = " \"info\","]
23613#[doc = " \"name\""]
23614#[doc = " ],"]
23615#[doc = " \"properties\": {"]
23616#[doc = " \"info\": {"]
23617#[doc = " \"type\": \"object\","]
23618#[doc = " \"required\": ["]
23619#[doc = " \"error_message\""]
23620#[doc = " ],"]
23621#[doc = " \"properties\": {"]
23622#[doc = " \"error_message\": {"]
23623#[doc = " \"type\": \"string\""]
23624#[doc = " }"]
23625#[doc = " }"]
23626#[doc = " },"]
23627#[doc = " \"name\": {"]
23628#[doc = " \"type\": \"string\","]
23629#[doc = " \"enum\": ["]
23630#[doc = " \"INTERNAL_ERROR\""]
23631#[doc = " ]"]
23632#[doc = " }"]
23633#[doc = " }"]
23634#[doc = " }"]
23635#[doc = " ]"]
23636#[doc = "}"]
23637#[doc = r" ```"]
23638#[doc = r" </details>"]
23639#[derive(
23640 :: serde :: Deserialize,
23641 :: serde :: Serialize,
23642 Clone,
23643 Debug,
23644 thiserror::Error,
23645 strum_macros::Display,
23646)]
23647#[serde(tag = "name", content = "info")]
23648pub enum RpcQueryError {
23649 #[serde(rename = "NO_SYNCED_BLOCKS")]
23650 NoSyncedBlocks,
23651 #[serde(rename = "UNAVAILABLE_SHARD")]
23652 UnavailableShard { requested_shard_id: ShardId },
23653 #[serde(rename = "GARBAGE_COLLECTED_BLOCK")]
23654 GarbageCollectedBlock {
23655 block_hash: CryptoHash,
23656 block_height: u64,
23657 },
23658 #[serde(rename = "UNKNOWN_BLOCK")]
23659 UnknownBlock { block_reference: BlockReference },
23660 #[serde(rename = "INVALID_ACCOUNT")]
23661 InvalidAccount {
23662 block_hash: CryptoHash,
23663 block_height: u64,
23664 requested_account_id: AccountId,
23665 },
23666 #[serde(rename = "UNKNOWN_ACCOUNT")]
23667 UnknownAccount {
23668 block_hash: CryptoHash,
23669 block_height: u64,
23670 requested_account_id: AccountId,
23671 },
23672 #[serde(rename = "NO_CONTRACT_CODE")]
23673 NoContractCode {
23674 block_hash: CryptoHash,
23675 block_height: u64,
23676 contract_account_id: AccountId,
23677 },
23678 #[serde(rename = "TOO_LARGE_CONTRACT_STATE")]
23679 TooLargeContractState {
23680 block_hash: CryptoHash,
23681 block_height: u64,
23682 contract_account_id: AccountId,
23683 },
23684 #[serde(rename = "UNKNOWN_ACCESS_KEY")]
23685 UnknownAccessKey {
23686 block_hash: CryptoHash,
23687 block_height: u64,
23688 public_key: PublicKey,
23689 },
23690 #[serde(rename = "UNKNOWN_GAS_KEY")]
23691 UnknownGasKey {
23692 block_hash: CryptoHash,
23693 block_height: u64,
23694 public_key: PublicKey,
23695 },
23696 #[serde(rename = "CONTRACT_EXECUTION_ERROR")]
23697 ContractExecutionError {
23698 block_hash: CryptoHash,
23699 block_height: u64,
23700 vm_error: ::std::string::String,
23701 },
23702 #[serde(rename = "NO_GLOBAL_CONTRACT_CODE")]
23703 NoGlobalContractCode {
23704 block_hash: CryptoHash,
23705 block_height: u64,
23706 identifier: GlobalContractIdentifier,
23707 },
23708 #[serde(rename = "INTERNAL_ERROR")]
23709 InternalError {
23710 error_message: ::std::string::String,
23711 },
23712}
23713impl ::std::convert::From<&Self> for RpcQueryError {
23714 fn from(value: &RpcQueryError) -> Self {
23715 value.clone()
23716 }
23717}
23718#[doc = "`RpcQueryRequest`"]
23719#[doc = r""]
23720#[doc = r" <details><summary>JSON schema</summary>"]
23721#[doc = r""]
23722#[doc = r" ```json"]
23723#[doc = "{"]
23724#[doc = " \"title\": \"RpcQueryRequest\","]
23725#[doc = " \"type\": \"object\","]
23726#[doc = " \"oneOf\": ["]
23727#[doc = " {"]
23728#[doc = " \"title\": \"view_account_by_block_id\","]
23729#[doc = " \"allOf\": ["]
23730#[doc = " {"]
23731#[doc = " \"type\": \"object\","]
23732#[doc = " \"required\": ["]
23733#[doc = " \"block_id\""]
23734#[doc = " ],"]
23735#[doc = " \"properties\": {"]
23736#[doc = " \"block_id\": {"]
23737#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23738#[doc = " }"]
23739#[doc = " }"]
23740#[doc = " },"]
23741#[doc = " {"]
23742#[doc = " \"type\": \"object\","]
23743#[doc = " \"required\": ["]
23744#[doc = " \"account_id\","]
23745#[doc = " \"request_type\""]
23746#[doc = " ],"]
23747#[doc = " \"properties\": {"]
23748#[doc = " \"account_id\": {"]
23749#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23750#[doc = " },"]
23751#[doc = " \"request_type\": {"]
23752#[doc = " \"type\": \"string\","]
23753#[doc = " \"enum\": ["]
23754#[doc = " \"view_account\""]
23755#[doc = " ]"]
23756#[doc = " }"]
23757#[doc = " }"]
23758#[doc = " }"]
23759#[doc = " ]"]
23760#[doc = " },"]
23761#[doc = " {"]
23762#[doc = " \"title\": \"view_code_by_block_id\","]
23763#[doc = " \"allOf\": ["]
23764#[doc = " {"]
23765#[doc = " \"type\": \"object\","]
23766#[doc = " \"required\": ["]
23767#[doc = " \"block_id\""]
23768#[doc = " ],"]
23769#[doc = " \"properties\": {"]
23770#[doc = " \"block_id\": {"]
23771#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23772#[doc = " }"]
23773#[doc = " }"]
23774#[doc = " },"]
23775#[doc = " {"]
23776#[doc = " \"type\": \"object\","]
23777#[doc = " \"required\": ["]
23778#[doc = " \"account_id\","]
23779#[doc = " \"request_type\""]
23780#[doc = " ],"]
23781#[doc = " \"properties\": {"]
23782#[doc = " \"account_id\": {"]
23783#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23784#[doc = " },"]
23785#[doc = " \"request_type\": {"]
23786#[doc = " \"type\": \"string\","]
23787#[doc = " \"enum\": ["]
23788#[doc = " \"view_code\""]
23789#[doc = " ]"]
23790#[doc = " }"]
23791#[doc = " }"]
23792#[doc = " }"]
23793#[doc = " ]"]
23794#[doc = " },"]
23795#[doc = " {"]
23796#[doc = " \"title\": \"view_state_by_block_id\","]
23797#[doc = " \"allOf\": ["]
23798#[doc = " {"]
23799#[doc = " \"type\": \"object\","]
23800#[doc = " \"required\": ["]
23801#[doc = " \"block_id\""]
23802#[doc = " ],"]
23803#[doc = " \"properties\": {"]
23804#[doc = " \"block_id\": {"]
23805#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23806#[doc = " }"]
23807#[doc = " }"]
23808#[doc = " },"]
23809#[doc = " {"]
23810#[doc = " \"type\": \"object\","]
23811#[doc = " \"required\": ["]
23812#[doc = " \"account_id\","]
23813#[doc = " \"prefix_base64\","]
23814#[doc = " \"request_type\""]
23815#[doc = " ],"]
23816#[doc = " \"properties\": {"]
23817#[doc = " \"account_id\": {"]
23818#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23819#[doc = " },"]
23820#[doc = " \"include_proof\": {"]
23821#[doc = " \"type\": \"boolean\""]
23822#[doc = " },"]
23823#[doc = " \"prefix_base64\": {"]
23824#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
23825#[doc = " },"]
23826#[doc = " \"request_type\": {"]
23827#[doc = " \"type\": \"string\","]
23828#[doc = " \"enum\": ["]
23829#[doc = " \"view_state\""]
23830#[doc = " ]"]
23831#[doc = " }"]
23832#[doc = " }"]
23833#[doc = " }"]
23834#[doc = " ]"]
23835#[doc = " },"]
23836#[doc = " {"]
23837#[doc = " \"title\": \"view_access_key_by_block_id\","]
23838#[doc = " \"allOf\": ["]
23839#[doc = " {"]
23840#[doc = " \"type\": \"object\","]
23841#[doc = " \"required\": ["]
23842#[doc = " \"block_id\""]
23843#[doc = " ],"]
23844#[doc = " \"properties\": {"]
23845#[doc = " \"block_id\": {"]
23846#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23847#[doc = " }"]
23848#[doc = " }"]
23849#[doc = " },"]
23850#[doc = " {"]
23851#[doc = " \"type\": \"object\","]
23852#[doc = " \"required\": ["]
23853#[doc = " \"account_id\","]
23854#[doc = " \"public_key\","]
23855#[doc = " \"request_type\""]
23856#[doc = " ],"]
23857#[doc = " \"properties\": {"]
23858#[doc = " \"account_id\": {"]
23859#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23860#[doc = " },"]
23861#[doc = " \"public_key\": {"]
23862#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23863#[doc = " },"]
23864#[doc = " \"request_type\": {"]
23865#[doc = " \"type\": \"string\","]
23866#[doc = " \"enum\": ["]
23867#[doc = " \"view_access_key\""]
23868#[doc = " ]"]
23869#[doc = " }"]
23870#[doc = " }"]
23871#[doc = " }"]
23872#[doc = " ]"]
23873#[doc = " },"]
23874#[doc = " {"]
23875#[doc = " \"title\": \"view_access_key_list_by_block_id\","]
23876#[doc = " \"allOf\": ["]
23877#[doc = " {"]
23878#[doc = " \"type\": \"object\","]
23879#[doc = " \"required\": ["]
23880#[doc = " \"block_id\""]
23881#[doc = " ],"]
23882#[doc = " \"properties\": {"]
23883#[doc = " \"block_id\": {"]
23884#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23885#[doc = " }"]
23886#[doc = " }"]
23887#[doc = " },"]
23888#[doc = " {"]
23889#[doc = " \"type\": \"object\","]
23890#[doc = " \"required\": ["]
23891#[doc = " \"account_id\","]
23892#[doc = " \"request_type\""]
23893#[doc = " ],"]
23894#[doc = " \"properties\": {"]
23895#[doc = " \"account_id\": {"]
23896#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23897#[doc = " },"]
23898#[doc = " \"request_type\": {"]
23899#[doc = " \"type\": \"string\","]
23900#[doc = " \"enum\": ["]
23901#[doc = " \"view_access_key_list\""]
23902#[doc = " ]"]
23903#[doc = " }"]
23904#[doc = " }"]
23905#[doc = " }"]
23906#[doc = " ]"]
23907#[doc = " },"]
23908#[doc = " {"]
23909#[doc = " \"title\": \"view_gas_key_by_block_id\","]
23910#[doc = " \"allOf\": ["]
23911#[doc = " {"]
23912#[doc = " \"type\": \"object\","]
23913#[doc = " \"required\": ["]
23914#[doc = " \"block_id\""]
23915#[doc = " ],"]
23916#[doc = " \"properties\": {"]
23917#[doc = " \"block_id\": {"]
23918#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23919#[doc = " }"]
23920#[doc = " }"]
23921#[doc = " },"]
23922#[doc = " {"]
23923#[doc = " \"type\": \"object\","]
23924#[doc = " \"required\": ["]
23925#[doc = " \"account_id\","]
23926#[doc = " \"public_key\","]
23927#[doc = " \"request_type\""]
23928#[doc = " ],"]
23929#[doc = " \"properties\": {"]
23930#[doc = " \"account_id\": {"]
23931#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23932#[doc = " },"]
23933#[doc = " \"public_key\": {"]
23934#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23935#[doc = " },"]
23936#[doc = " \"request_type\": {"]
23937#[doc = " \"type\": \"string\","]
23938#[doc = " \"enum\": ["]
23939#[doc = " \"view_gas_key\""]
23940#[doc = " ]"]
23941#[doc = " }"]
23942#[doc = " }"]
23943#[doc = " }"]
23944#[doc = " ]"]
23945#[doc = " },"]
23946#[doc = " {"]
23947#[doc = " \"title\": \"view_gas_key_list_by_block_id\","]
23948#[doc = " \"allOf\": ["]
23949#[doc = " {"]
23950#[doc = " \"type\": \"object\","]
23951#[doc = " \"required\": ["]
23952#[doc = " \"block_id\""]
23953#[doc = " ],"]
23954#[doc = " \"properties\": {"]
23955#[doc = " \"block_id\": {"]
23956#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23957#[doc = " }"]
23958#[doc = " }"]
23959#[doc = " },"]
23960#[doc = " {"]
23961#[doc = " \"type\": \"object\","]
23962#[doc = " \"required\": ["]
23963#[doc = " \"account_id\","]
23964#[doc = " \"request_type\""]
23965#[doc = " ],"]
23966#[doc = " \"properties\": {"]
23967#[doc = " \"account_id\": {"]
23968#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23969#[doc = " },"]
23970#[doc = " \"request_type\": {"]
23971#[doc = " \"type\": \"string\","]
23972#[doc = " \"enum\": ["]
23973#[doc = " \"view_gas_key_list\""]
23974#[doc = " ]"]
23975#[doc = " }"]
23976#[doc = " }"]
23977#[doc = " }"]
23978#[doc = " ]"]
23979#[doc = " },"]
23980#[doc = " {"]
23981#[doc = " \"title\": \"call_function_by_block_id\","]
23982#[doc = " \"allOf\": ["]
23983#[doc = " {"]
23984#[doc = " \"type\": \"object\","]
23985#[doc = " \"required\": ["]
23986#[doc = " \"block_id\""]
23987#[doc = " ],"]
23988#[doc = " \"properties\": {"]
23989#[doc = " \"block_id\": {"]
23990#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
23991#[doc = " }"]
23992#[doc = " }"]
23993#[doc = " },"]
23994#[doc = " {"]
23995#[doc = " \"type\": \"object\","]
23996#[doc = " \"required\": ["]
23997#[doc = " \"account_id\","]
23998#[doc = " \"args_base64\","]
23999#[doc = " \"method_name\","]
24000#[doc = " \"request_type\""]
24001#[doc = " ],"]
24002#[doc = " \"properties\": {"]
24003#[doc = " \"account_id\": {"]
24004#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24005#[doc = " },"]
24006#[doc = " \"args_base64\": {"]
24007#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
24008#[doc = " },"]
24009#[doc = " \"method_name\": {"]
24010#[doc = " \"type\": \"string\""]
24011#[doc = " },"]
24012#[doc = " \"request_type\": {"]
24013#[doc = " \"type\": \"string\","]
24014#[doc = " \"enum\": ["]
24015#[doc = " \"call_function\""]
24016#[doc = " ]"]
24017#[doc = " }"]
24018#[doc = " }"]
24019#[doc = " }"]
24020#[doc = " ]"]
24021#[doc = " },"]
24022#[doc = " {"]
24023#[doc = " \"title\": \"view_global_contract_code_by_block_id\","]
24024#[doc = " \"allOf\": ["]
24025#[doc = " {"]
24026#[doc = " \"type\": \"object\","]
24027#[doc = " \"required\": ["]
24028#[doc = " \"block_id\""]
24029#[doc = " ],"]
24030#[doc = " \"properties\": {"]
24031#[doc = " \"block_id\": {"]
24032#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
24033#[doc = " }"]
24034#[doc = " }"]
24035#[doc = " },"]
24036#[doc = " {"]
24037#[doc = " \"type\": \"object\","]
24038#[doc = " \"required\": ["]
24039#[doc = " \"code_hash\","]
24040#[doc = " \"request_type\""]
24041#[doc = " ],"]
24042#[doc = " \"properties\": {"]
24043#[doc = " \"code_hash\": {"]
24044#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
24045#[doc = " },"]
24046#[doc = " \"request_type\": {"]
24047#[doc = " \"type\": \"string\","]
24048#[doc = " \"enum\": ["]
24049#[doc = " \"view_global_contract_code\""]
24050#[doc = " ]"]
24051#[doc = " }"]
24052#[doc = " }"]
24053#[doc = " }"]
24054#[doc = " ]"]
24055#[doc = " },"]
24056#[doc = " {"]
24057#[doc = " \"title\": \"view_global_contract_code_by_account_id_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_global_contract_code_by_account_id\""]
24084#[doc = " ]"]
24085#[doc = " }"]
24086#[doc = " }"]
24087#[doc = " }"]
24088#[doc = " ]"]
24089#[doc = " },"]
24090#[doc = " {"]
24091#[doc = " \"title\": \"view_account_by_finality\","]
24092#[doc = " \"allOf\": ["]
24093#[doc = " {"]
24094#[doc = " \"type\": \"object\","]
24095#[doc = " \"required\": ["]
24096#[doc = " \"finality\""]
24097#[doc = " ],"]
24098#[doc = " \"properties\": {"]
24099#[doc = " \"finality\": {"]
24100#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
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_account\""]
24118#[doc = " ]"]
24119#[doc = " }"]
24120#[doc = " }"]
24121#[doc = " }"]
24122#[doc = " ]"]
24123#[doc = " },"]
24124#[doc = " {"]
24125#[doc = " \"title\": \"view_code_by_finality\","]
24126#[doc = " \"allOf\": ["]
24127#[doc = " {"]
24128#[doc = " \"type\": \"object\","]
24129#[doc = " \"required\": ["]
24130#[doc = " \"finality\""]
24131#[doc = " ],"]
24132#[doc = " \"properties\": {"]
24133#[doc = " \"finality\": {"]
24134#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24135#[doc = " }"]
24136#[doc = " }"]
24137#[doc = " },"]
24138#[doc = " {"]
24139#[doc = " \"type\": \"object\","]
24140#[doc = " \"required\": ["]
24141#[doc = " \"account_id\","]
24142#[doc = " \"request_type\""]
24143#[doc = " ],"]
24144#[doc = " \"properties\": {"]
24145#[doc = " \"account_id\": {"]
24146#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24147#[doc = " },"]
24148#[doc = " \"request_type\": {"]
24149#[doc = " \"type\": \"string\","]
24150#[doc = " \"enum\": ["]
24151#[doc = " \"view_code\""]
24152#[doc = " ]"]
24153#[doc = " }"]
24154#[doc = " }"]
24155#[doc = " }"]
24156#[doc = " ]"]
24157#[doc = " },"]
24158#[doc = " {"]
24159#[doc = " \"title\": \"view_state_by_finality\","]
24160#[doc = " \"allOf\": ["]
24161#[doc = " {"]
24162#[doc = " \"type\": \"object\","]
24163#[doc = " \"required\": ["]
24164#[doc = " \"finality\""]
24165#[doc = " ],"]
24166#[doc = " \"properties\": {"]
24167#[doc = " \"finality\": {"]
24168#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24169#[doc = " }"]
24170#[doc = " }"]
24171#[doc = " },"]
24172#[doc = " {"]
24173#[doc = " \"type\": \"object\","]
24174#[doc = " \"required\": ["]
24175#[doc = " \"account_id\","]
24176#[doc = " \"prefix_base64\","]
24177#[doc = " \"request_type\""]
24178#[doc = " ],"]
24179#[doc = " \"properties\": {"]
24180#[doc = " \"account_id\": {"]
24181#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24182#[doc = " },"]
24183#[doc = " \"include_proof\": {"]
24184#[doc = " \"type\": \"boolean\""]
24185#[doc = " },"]
24186#[doc = " \"prefix_base64\": {"]
24187#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
24188#[doc = " },"]
24189#[doc = " \"request_type\": {"]
24190#[doc = " \"type\": \"string\","]
24191#[doc = " \"enum\": ["]
24192#[doc = " \"view_state\""]
24193#[doc = " ]"]
24194#[doc = " }"]
24195#[doc = " }"]
24196#[doc = " }"]
24197#[doc = " ]"]
24198#[doc = " },"]
24199#[doc = " {"]
24200#[doc = " \"title\": \"view_access_key_by_finality\","]
24201#[doc = " \"allOf\": ["]
24202#[doc = " {"]
24203#[doc = " \"type\": \"object\","]
24204#[doc = " \"required\": ["]
24205#[doc = " \"finality\""]
24206#[doc = " ],"]
24207#[doc = " \"properties\": {"]
24208#[doc = " \"finality\": {"]
24209#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24210#[doc = " }"]
24211#[doc = " }"]
24212#[doc = " },"]
24213#[doc = " {"]
24214#[doc = " \"type\": \"object\","]
24215#[doc = " \"required\": ["]
24216#[doc = " \"account_id\","]
24217#[doc = " \"public_key\","]
24218#[doc = " \"request_type\""]
24219#[doc = " ],"]
24220#[doc = " \"properties\": {"]
24221#[doc = " \"account_id\": {"]
24222#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24223#[doc = " },"]
24224#[doc = " \"public_key\": {"]
24225#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24226#[doc = " },"]
24227#[doc = " \"request_type\": {"]
24228#[doc = " \"type\": \"string\","]
24229#[doc = " \"enum\": ["]
24230#[doc = " \"view_access_key\""]
24231#[doc = " ]"]
24232#[doc = " }"]
24233#[doc = " }"]
24234#[doc = " }"]
24235#[doc = " ]"]
24236#[doc = " },"]
24237#[doc = " {"]
24238#[doc = " \"title\": \"view_access_key_list_by_finality\","]
24239#[doc = " \"allOf\": ["]
24240#[doc = " {"]
24241#[doc = " \"type\": \"object\","]
24242#[doc = " \"required\": ["]
24243#[doc = " \"finality\""]
24244#[doc = " ],"]
24245#[doc = " \"properties\": {"]
24246#[doc = " \"finality\": {"]
24247#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24248#[doc = " }"]
24249#[doc = " }"]
24250#[doc = " },"]
24251#[doc = " {"]
24252#[doc = " \"type\": \"object\","]
24253#[doc = " \"required\": ["]
24254#[doc = " \"account_id\","]
24255#[doc = " \"request_type\""]
24256#[doc = " ],"]
24257#[doc = " \"properties\": {"]
24258#[doc = " \"account_id\": {"]
24259#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24260#[doc = " },"]
24261#[doc = " \"request_type\": {"]
24262#[doc = " \"type\": \"string\","]
24263#[doc = " \"enum\": ["]
24264#[doc = " \"view_access_key_list\""]
24265#[doc = " ]"]
24266#[doc = " }"]
24267#[doc = " }"]
24268#[doc = " }"]
24269#[doc = " ]"]
24270#[doc = " },"]
24271#[doc = " {"]
24272#[doc = " \"title\": \"view_gas_key_by_finality\","]
24273#[doc = " \"allOf\": ["]
24274#[doc = " {"]
24275#[doc = " \"type\": \"object\","]
24276#[doc = " \"required\": ["]
24277#[doc = " \"finality\""]
24278#[doc = " ],"]
24279#[doc = " \"properties\": {"]
24280#[doc = " \"finality\": {"]
24281#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24282#[doc = " }"]
24283#[doc = " }"]
24284#[doc = " },"]
24285#[doc = " {"]
24286#[doc = " \"type\": \"object\","]
24287#[doc = " \"required\": ["]
24288#[doc = " \"account_id\","]
24289#[doc = " \"public_key\","]
24290#[doc = " \"request_type\""]
24291#[doc = " ],"]
24292#[doc = " \"properties\": {"]
24293#[doc = " \"account_id\": {"]
24294#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24295#[doc = " },"]
24296#[doc = " \"public_key\": {"]
24297#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24298#[doc = " },"]
24299#[doc = " \"request_type\": {"]
24300#[doc = " \"type\": \"string\","]
24301#[doc = " \"enum\": ["]
24302#[doc = " \"view_gas_key\""]
24303#[doc = " ]"]
24304#[doc = " }"]
24305#[doc = " }"]
24306#[doc = " }"]
24307#[doc = " ]"]
24308#[doc = " },"]
24309#[doc = " {"]
24310#[doc = " \"title\": \"view_gas_key_list_by_finality\","]
24311#[doc = " \"allOf\": ["]
24312#[doc = " {"]
24313#[doc = " \"type\": \"object\","]
24314#[doc = " \"required\": ["]
24315#[doc = " \"finality\""]
24316#[doc = " ],"]
24317#[doc = " \"properties\": {"]
24318#[doc = " \"finality\": {"]
24319#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24320#[doc = " }"]
24321#[doc = " }"]
24322#[doc = " },"]
24323#[doc = " {"]
24324#[doc = " \"type\": \"object\","]
24325#[doc = " \"required\": ["]
24326#[doc = " \"account_id\","]
24327#[doc = " \"request_type\""]
24328#[doc = " ],"]
24329#[doc = " \"properties\": {"]
24330#[doc = " \"account_id\": {"]
24331#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24332#[doc = " },"]
24333#[doc = " \"request_type\": {"]
24334#[doc = " \"type\": \"string\","]
24335#[doc = " \"enum\": ["]
24336#[doc = " \"view_gas_key_list\""]
24337#[doc = " ]"]
24338#[doc = " }"]
24339#[doc = " }"]
24340#[doc = " }"]
24341#[doc = " ]"]
24342#[doc = " },"]
24343#[doc = " {"]
24344#[doc = " \"title\": \"call_function_by_finality\","]
24345#[doc = " \"allOf\": ["]
24346#[doc = " {"]
24347#[doc = " \"type\": \"object\","]
24348#[doc = " \"required\": ["]
24349#[doc = " \"finality\""]
24350#[doc = " ],"]
24351#[doc = " \"properties\": {"]
24352#[doc = " \"finality\": {"]
24353#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24354#[doc = " }"]
24355#[doc = " }"]
24356#[doc = " },"]
24357#[doc = " {"]
24358#[doc = " \"type\": \"object\","]
24359#[doc = " \"required\": ["]
24360#[doc = " \"account_id\","]
24361#[doc = " \"args_base64\","]
24362#[doc = " \"method_name\","]
24363#[doc = " \"request_type\""]
24364#[doc = " ],"]
24365#[doc = " \"properties\": {"]
24366#[doc = " \"account_id\": {"]
24367#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24368#[doc = " },"]
24369#[doc = " \"args_base64\": {"]
24370#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
24371#[doc = " },"]
24372#[doc = " \"method_name\": {"]
24373#[doc = " \"type\": \"string\""]
24374#[doc = " },"]
24375#[doc = " \"request_type\": {"]
24376#[doc = " \"type\": \"string\","]
24377#[doc = " \"enum\": ["]
24378#[doc = " \"call_function\""]
24379#[doc = " ]"]
24380#[doc = " }"]
24381#[doc = " }"]
24382#[doc = " }"]
24383#[doc = " ]"]
24384#[doc = " },"]
24385#[doc = " {"]
24386#[doc = " \"title\": \"view_global_contract_code_by_finality\","]
24387#[doc = " \"allOf\": ["]
24388#[doc = " {"]
24389#[doc = " \"type\": \"object\","]
24390#[doc = " \"required\": ["]
24391#[doc = " \"finality\""]
24392#[doc = " ],"]
24393#[doc = " \"properties\": {"]
24394#[doc = " \"finality\": {"]
24395#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
24396#[doc = " }"]
24397#[doc = " }"]
24398#[doc = " },"]
24399#[doc = " {"]
24400#[doc = " \"type\": \"object\","]
24401#[doc = " \"required\": ["]
24402#[doc = " \"code_hash\","]
24403#[doc = " \"request_type\""]
24404#[doc = " ],"]
24405#[doc = " \"properties\": {"]
24406#[doc = " \"code_hash\": {"]
24407#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
24408#[doc = " },"]
24409#[doc = " \"request_type\": {"]
24410#[doc = " \"type\": \"string\","]
24411#[doc = " \"enum\": ["]
24412#[doc = " \"view_global_contract_code\""]
24413#[doc = " ]"]
24414#[doc = " }"]
24415#[doc = " }"]
24416#[doc = " }"]
24417#[doc = " ]"]
24418#[doc = " },"]
24419#[doc = " {"]
24420#[doc = " \"title\": \"view_global_contract_code_by_account_id_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_global_contract_code_by_account_id\""]
24447#[doc = " ]"]
24448#[doc = " }"]
24449#[doc = " }"]
24450#[doc = " }"]
24451#[doc = " ]"]
24452#[doc = " },"]
24453#[doc = " {"]
24454#[doc = " \"title\": \"view_account_by_sync_checkpoint\","]
24455#[doc = " \"allOf\": ["]
24456#[doc = " {"]
24457#[doc = " \"type\": \"object\","]
24458#[doc = " \"required\": ["]
24459#[doc = " \"sync_checkpoint\""]
24460#[doc = " ],"]
24461#[doc = " \"properties\": {"]
24462#[doc = " \"sync_checkpoint\": {"]
24463#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
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_account\""]
24481#[doc = " ]"]
24482#[doc = " }"]
24483#[doc = " }"]
24484#[doc = " }"]
24485#[doc = " ]"]
24486#[doc = " },"]
24487#[doc = " {"]
24488#[doc = " \"title\": \"view_code_by_sync_checkpoint\","]
24489#[doc = " \"allOf\": ["]
24490#[doc = " {"]
24491#[doc = " \"type\": \"object\","]
24492#[doc = " \"required\": ["]
24493#[doc = " \"sync_checkpoint\""]
24494#[doc = " ],"]
24495#[doc = " \"properties\": {"]
24496#[doc = " \"sync_checkpoint\": {"]
24497#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24498#[doc = " }"]
24499#[doc = " }"]
24500#[doc = " },"]
24501#[doc = " {"]
24502#[doc = " \"type\": \"object\","]
24503#[doc = " \"required\": ["]
24504#[doc = " \"account_id\","]
24505#[doc = " \"request_type\""]
24506#[doc = " ],"]
24507#[doc = " \"properties\": {"]
24508#[doc = " \"account_id\": {"]
24509#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24510#[doc = " },"]
24511#[doc = " \"request_type\": {"]
24512#[doc = " \"type\": \"string\","]
24513#[doc = " \"enum\": ["]
24514#[doc = " \"view_code\""]
24515#[doc = " ]"]
24516#[doc = " }"]
24517#[doc = " }"]
24518#[doc = " }"]
24519#[doc = " ]"]
24520#[doc = " },"]
24521#[doc = " {"]
24522#[doc = " \"title\": \"view_state_by_sync_checkpoint\","]
24523#[doc = " \"allOf\": ["]
24524#[doc = " {"]
24525#[doc = " \"type\": \"object\","]
24526#[doc = " \"required\": ["]
24527#[doc = " \"sync_checkpoint\""]
24528#[doc = " ],"]
24529#[doc = " \"properties\": {"]
24530#[doc = " \"sync_checkpoint\": {"]
24531#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24532#[doc = " }"]
24533#[doc = " }"]
24534#[doc = " },"]
24535#[doc = " {"]
24536#[doc = " \"type\": \"object\","]
24537#[doc = " \"required\": ["]
24538#[doc = " \"account_id\","]
24539#[doc = " \"prefix_base64\","]
24540#[doc = " \"request_type\""]
24541#[doc = " ],"]
24542#[doc = " \"properties\": {"]
24543#[doc = " \"account_id\": {"]
24544#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24545#[doc = " },"]
24546#[doc = " \"include_proof\": {"]
24547#[doc = " \"type\": \"boolean\""]
24548#[doc = " },"]
24549#[doc = " \"prefix_base64\": {"]
24550#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
24551#[doc = " },"]
24552#[doc = " \"request_type\": {"]
24553#[doc = " \"type\": \"string\","]
24554#[doc = " \"enum\": ["]
24555#[doc = " \"view_state\""]
24556#[doc = " ]"]
24557#[doc = " }"]
24558#[doc = " }"]
24559#[doc = " }"]
24560#[doc = " ]"]
24561#[doc = " },"]
24562#[doc = " {"]
24563#[doc = " \"title\": \"view_access_key_by_sync_checkpoint\","]
24564#[doc = " \"allOf\": ["]
24565#[doc = " {"]
24566#[doc = " \"type\": \"object\","]
24567#[doc = " \"required\": ["]
24568#[doc = " \"sync_checkpoint\""]
24569#[doc = " ],"]
24570#[doc = " \"properties\": {"]
24571#[doc = " \"sync_checkpoint\": {"]
24572#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24573#[doc = " }"]
24574#[doc = " }"]
24575#[doc = " },"]
24576#[doc = " {"]
24577#[doc = " \"type\": \"object\","]
24578#[doc = " \"required\": ["]
24579#[doc = " \"account_id\","]
24580#[doc = " \"public_key\","]
24581#[doc = " \"request_type\""]
24582#[doc = " ],"]
24583#[doc = " \"properties\": {"]
24584#[doc = " \"account_id\": {"]
24585#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24586#[doc = " },"]
24587#[doc = " \"public_key\": {"]
24588#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24589#[doc = " },"]
24590#[doc = " \"request_type\": {"]
24591#[doc = " \"type\": \"string\","]
24592#[doc = " \"enum\": ["]
24593#[doc = " \"view_access_key\""]
24594#[doc = " ]"]
24595#[doc = " }"]
24596#[doc = " }"]
24597#[doc = " }"]
24598#[doc = " ]"]
24599#[doc = " },"]
24600#[doc = " {"]
24601#[doc = " \"title\": \"view_access_key_list_by_sync_checkpoint\","]
24602#[doc = " \"allOf\": ["]
24603#[doc = " {"]
24604#[doc = " \"type\": \"object\","]
24605#[doc = " \"required\": ["]
24606#[doc = " \"sync_checkpoint\""]
24607#[doc = " ],"]
24608#[doc = " \"properties\": {"]
24609#[doc = " \"sync_checkpoint\": {"]
24610#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24611#[doc = " }"]
24612#[doc = " }"]
24613#[doc = " },"]
24614#[doc = " {"]
24615#[doc = " \"type\": \"object\","]
24616#[doc = " \"required\": ["]
24617#[doc = " \"account_id\","]
24618#[doc = " \"request_type\""]
24619#[doc = " ],"]
24620#[doc = " \"properties\": {"]
24621#[doc = " \"account_id\": {"]
24622#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24623#[doc = " },"]
24624#[doc = " \"request_type\": {"]
24625#[doc = " \"type\": \"string\","]
24626#[doc = " \"enum\": ["]
24627#[doc = " \"view_access_key_list\""]
24628#[doc = " ]"]
24629#[doc = " }"]
24630#[doc = " }"]
24631#[doc = " }"]
24632#[doc = " ]"]
24633#[doc = " },"]
24634#[doc = " {"]
24635#[doc = " \"title\": \"view_gas_key_by_sync_checkpoint\","]
24636#[doc = " \"allOf\": ["]
24637#[doc = " {"]
24638#[doc = " \"type\": \"object\","]
24639#[doc = " \"required\": ["]
24640#[doc = " \"sync_checkpoint\""]
24641#[doc = " ],"]
24642#[doc = " \"properties\": {"]
24643#[doc = " \"sync_checkpoint\": {"]
24644#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24645#[doc = " }"]
24646#[doc = " }"]
24647#[doc = " },"]
24648#[doc = " {"]
24649#[doc = " \"type\": \"object\","]
24650#[doc = " \"required\": ["]
24651#[doc = " \"account_id\","]
24652#[doc = " \"public_key\","]
24653#[doc = " \"request_type\""]
24654#[doc = " ],"]
24655#[doc = " \"properties\": {"]
24656#[doc = " \"account_id\": {"]
24657#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24658#[doc = " },"]
24659#[doc = " \"public_key\": {"]
24660#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24661#[doc = " },"]
24662#[doc = " \"request_type\": {"]
24663#[doc = " \"type\": \"string\","]
24664#[doc = " \"enum\": ["]
24665#[doc = " \"view_gas_key\""]
24666#[doc = " ]"]
24667#[doc = " }"]
24668#[doc = " }"]
24669#[doc = " }"]
24670#[doc = " ]"]
24671#[doc = " },"]
24672#[doc = " {"]
24673#[doc = " \"title\": \"view_gas_key_list_by_sync_checkpoint\","]
24674#[doc = " \"allOf\": ["]
24675#[doc = " {"]
24676#[doc = " \"type\": \"object\","]
24677#[doc = " \"required\": ["]
24678#[doc = " \"sync_checkpoint\""]
24679#[doc = " ],"]
24680#[doc = " \"properties\": {"]
24681#[doc = " \"sync_checkpoint\": {"]
24682#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24683#[doc = " }"]
24684#[doc = " }"]
24685#[doc = " },"]
24686#[doc = " {"]
24687#[doc = " \"type\": \"object\","]
24688#[doc = " \"required\": ["]
24689#[doc = " \"account_id\","]
24690#[doc = " \"request_type\""]
24691#[doc = " ],"]
24692#[doc = " \"properties\": {"]
24693#[doc = " \"account_id\": {"]
24694#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24695#[doc = " },"]
24696#[doc = " \"request_type\": {"]
24697#[doc = " \"type\": \"string\","]
24698#[doc = " \"enum\": ["]
24699#[doc = " \"view_gas_key_list\""]
24700#[doc = " ]"]
24701#[doc = " }"]
24702#[doc = " }"]
24703#[doc = " }"]
24704#[doc = " ]"]
24705#[doc = " },"]
24706#[doc = " {"]
24707#[doc = " \"title\": \"call_function_by_sync_checkpoint\","]
24708#[doc = " \"allOf\": ["]
24709#[doc = " {"]
24710#[doc = " \"type\": \"object\","]
24711#[doc = " \"required\": ["]
24712#[doc = " \"sync_checkpoint\""]
24713#[doc = " ],"]
24714#[doc = " \"properties\": {"]
24715#[doc = " \"sync_checkpoint\": {"]
24716#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24717#[doc = " }"]
24718#[doc = " }"]
24719#[doc = " },"]
24720#[doc = " {"]
24721#[doc = " \"type\": \"object\","]
24722#[doc = " \"required\": ["]
24723#[doc = " \"account_id\","]
24724#[doc = " \"args_base64\","]
24725#[doc = " \"method_name\","]
24726#[doc = " \"request_type\""]
24727#[doc = " ],"]
24728#[doc = " \"properties\": {"]
24729#[doc = " \"account_id\": {"]
24730#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24731#[doc = " },"]
24732#[doc = " \"args_base64\": {"]
24733#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
24734#[doc = " },"]
24735#[doc = " \"method_name\": {"]
24736#[doc = " \"type\": \"string\""]
24737#[doc = " },"]
24738#[doc = " \"request_type\": {"]
24739#[doc = " \"type\": \"string\","]
24740#[doc = " \"enum\": ["]
24741#[doc = " \"call_function\""]
24742#[doc = " ]"]
24743#[doc = " }"]
24744#[doc = " }"]
24745#[doc = " }"]
24746#[doc = " ]"]
24747#[doc = " },"]
24748#[doc = " {"]
24749#[doc = " \"title\": \"view_global_contract_code_by_sync_checkpoint\","]
24750#[doc = " \"allOf\": ["]
24751#[doc = " {"]
24752#[doc = " \"type\": \"object\","]
24753#[doc = " \"required\": ["]
24754#[doc = " \"sync_checkpoint\""]
24755#[doc = " ],"]
24756#[doc = " \"properties\": {"]
24757#[doc = " \"sync_checkpoint\": {"]
24758#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
24759#[doc = " }"]
24760#[doc = " }"]
24761#[doc = " },"]
24762#[doc = " {"]
24763#[doc = " \"type\": \"object\","]
24764#[doc = " \"required\": ["]
24765#[doc = " \"code_hash\","]
24766#[doc = " \"request_type\""]
24767#[doc = " ],"]
24768#[doc = " \"properties\": {"]
24769#[doc = " \"code_hash\": {"]
24770#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
24771#[doc = " },"]
24772#[doc = " \"request_type\": {"]
24773#[doc = " \"type\": \"string\","]
24774#[doc = " \"enum\": ["]
24775#[doc = " \"view_global_contract_code\""]
24776#[doc = " ]"]
24777#[doc = " }"]
24778#[doc = " }"]
24779#[doc = " }"]
24780#[doc = " ]"]
24781#[doc = " },"]
24782#[doc = " {"]
24783#[doc = " \"title\": \"view_global_contract_code_by_account_id_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_global_contract_code_by_account_id\""]
24810#[doc = " ]"]
24811#[doc = " }"]
24812#[doc = " }"]
24813#[doc = " }"]
24814#[doc = " ]"]
24815#[doc = " }"]
24816#[doc = " ]"]
24817#[doc = "}"]
24818#[doc = r" ```"]
24819#[doc = r" </details>"]
24820#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24821#[serde(untagged)]
24822pub enum RpcQueryRequest {
24823 ViewAccountByBlockId {
24824 account_id: AccountId,
24825 block_id: BlockId,
24826 request_type: ViewAccountByBlockIdRequestType,
24827 },
24828 ViewCodeByBlockId {
24829 account_id: AccountId,
24830 block_id: BlockId,
24831 request_type: ViewCodeByBlockIdRequestType,
24832 },
24833 ViewStateByBlockId {
24834 account_id: AccountId,
24835 block_id: BlockId,
24836 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24837 include_proof: ::std::option::Option<bool>,
24838 prefix_base64: StoreKey,
24839 request_type: ViewStateByBlockIdRequestType,
24840 },
24841 ViewAccessKeyByBlockId {
24842 account_id: AccountId,
24843 block_id: BlockId,
24844 public_key: PublicKey,
24845 request_type: ViewAccessKeyByBlockIdRequestType,
24846 },
24847 ViewAccessKeyListByBlockId {
24848 account_id: AccountId,
24849 block_id: BlockId,
24850 request_type: ViewAccessKeyListByBlockIdRequestType,
24851 },
24852 ViewGasKeyByBlockId {
24853 account_id: AccountId,
24854 block_id: BlockId,
24855 public_key: PublicKey,
24856 request_type: ViewGasKeyByBlockIdRequestType,
24857 },
24858 ViewGasKeyListByBlockId {
24859 account_id: AccountId,
24860 block_id: BlockId,
24861 request_type: ViewGasKeyListByBlockIdRequestType,
24862 },
24863 CallFunctionByBlockId {
24864 account_id: AccountId,
24865 args_base64: FunctionArgs,
24866 block_id: BlockId,
24867 method_name: ::std::string::String,
24868 request_type: CallFunctionByBlockIdRequestType,
24869 },
24870 ViewGlobalContractCodeByBlockId {
24871 block_id: BlockId,
24872 code_hash: CryptoHash,
24873 request_type: ViewGlobalContractCodeByBlockIdRequestType,
24874 },
24875 ViewGlobalContractCodeByAccountIdByBlockId {
24876 account_id: AccountId,
24877 block_id: BlockId,
24878 request_type: ViewGlobalContractCodeByAccountIdByBlockIdRequestType,
24879 },
24880 ViewAccountByFinality {
24881 account_id: AccountId,
24882 finality: Finality,
24883 request_type: ViewAccountByFinalityRequestType,
24884 },
24885 ViewCodeByFinality {
24886 account_id: AccountId,
24887 finality: Finality,
24888 request_type: ViewCodeByFinalityRequestType,
24889 },
24890 ViewStateByFinality {
24891 account_id: AccountId,
24892 finality: Finality,
24893 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24894 include_proof: ::std::option::Option<bool>,
24895 prefix_base64: StoreKey,
24896 request_type: ViewStateByFinalityRequestType,
24897 },
24898 ViewAccessKeyByFinality {
24899 account_id: AccountId,
24900 finality: Finality,
24901 public_key: PublicKey,
24902 request_type: ViewAccessKeyByFinalityRequestType,
24903 },
24904 ViewAccessKeyListByFinality {
24905 account_id: AccountId,
24906 finality: Finality,
24907 request_type: ViewAccessKeyListByFinalityRequestType,
24908 },
24909 ViewGasKeyByFinality {
24910 account_id: AccountId,
24911 finality: Finality,
24912 public_key: PublicKey,
24913 request_type: ViewGasKeyByFinalityRequestType,
24914 },
24915 ViewGasKeyListByFinality {
24916 account_id: AccountId,
24917 finality: Finality,
24918 request_type: ViewGasKeyListByFinalityRequestType,
24919 },
24920 CallFunctionByFinality {
24921 account_id: AccountId,
24922 args_base64: FunctionArgs,
24923 finality: Finality,
24924 method_name: ::std::string::String,
24925 request_type: CallFunctionByFinalityRequestType,
24926 },
24927 ViewGlobalContractCodeByFinality {
24928 code_hash: CryptoHash,
24929 finality: Finality,
24930 request_type: ViewGlobalContractCodeByFinalityRequestType,
24931 },
24932 ViewGlobalContractCodeByAccountIdByFinality {
24933 account_id: AccountId,
24934 finality: Finality,
24935 request_type: ViewGlobalContractCodeByAccountIdByFinalityRequestType,
24936 },
24937 ViewAccountBySyncCheckpoint {
24938 account_id: AccountId,
24939 request_type: ViewAccountBySyncCheckpointRequestType,
24940 sync_checkpoint: SyncCheckpoint,
24941 },
24942 ViewCodeBySyncCheckpoint {
24943 account_id: AccountId,
24944 request_type: ViewCodeBySyncCheckpointRequestType,
24945 sync_checkpoint: SyncCheckpoint,
24946 },
24947 ViewStateBySyncCheckpoint {
24948 account_id: AccountId,
24949 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24950 include_proof: ::std::option::Option<bool>,
24951 prefix_base64: StoreKey,
24952 request_type: ViewStateBySyncCheckpointRequestType,
24953 sync_checkpoint: SyncCheckpoint,
24954 },
24955 ViewAccessKeyBySyncCheckpoint {
24956 account_id: AccountId,
24957 public_key: PublicKey,
24958 request_type: ViewAccessKeyBySyncCheckpointRequestType,
24959 sync_checkpoint: SyncCheckpoint,
24960 },
24961 ViewAccessKeyListBySyncCheckpoint {
24962 account_id: AccountId,
24963 request_type: ViewAccessKeyListBySyncCheckpointRequestType,
24964 sync_checkpoint: SyncCheckpoint,
24965 },
24966 ViewGasKeyBySyncCheckpoint {
24967 account_id: AccountId,
24968 public_key: PublicKey,
24969 request_type: ViewGasKeyBySyncCheckpointRequestType,
24970 sync_checkpoint: SyncCheckpoint,
24971 },
24972 ViewGasKeyListBySyncCheckpoint {
24973 account_id: AccountId,
24974 request_type: ViewGasKeyListBySyncCheckpointRequestType,
24975 sync_checkpoint: SyncCheckpoint,
24976 },
24977 CallFunctionBySyncCheckpoint {
24978 account_id: AccountId,
24979 args_base64: FunctionArgs,
24980 method_name: ::std::string::String,
24981 request_type: CallFunctionBySyncCheckpointRequestType,
24982 sync_checkpoint: SyncCheckpoint,
24983 },
24984 ViewGlobalContractCodeBySyncCheckpoint {
24985 code_hash: CryptoHash,
24986 request_type: ViewGlobalContractCodeBySyncCheckpointRequestType,
24987 sync_checkpoint: SyncCheckpoint,
24988 },
24989 ViewGlobalContractCodeByAccountIdBySyncCheckpoint {
24990 account_id: AccountId,
24991 request_type: ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType,
24992 sync_checkpoint: SyncCheckpoint,
24993 },
24994}
24995impl ::std::convert::From<&Self> for RpcQueryRequest {
24996 fn from(value: &RpcQueryRequest) -> Self {
24997 value.clone()
24998 }
24999}
25000#[doc = "`RpcQueryResponse`"]
25001#[doc = r""]
25002#[doc = r" <details><summary>JSON schema</summary>"]
25003#[doc = r""]
25004#[doc = r" ```json"]
25005#[doc = "{"]
25006#[doc = " \"type\": \"object\","]
25007#[doc = " \"anyOf\": ["]
25008#[doc = " {"]
25009#[doc = " \"$ref\": \"#/components/schemas/AccountView\""]
25010#[doc = " },"]
25011#[doc = " {"]
25012#[doc = " \"$ref\": \"#/components/schemas/ContractCodeView\""]
25013#[doc = " },"]
25014#[doc = " {"]
25015#[doc = " \"$ref\": \"#/components/schemas/ViewStateResult\""]
25016#[doc = " },"]
25017#[doc = " {"]
25018#[doc = " \"$ref\": \"#/components/schemas/CallResult\""]
25019#[doc = " },"]
25020#[doc = " {"]
25021#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
25022#[doc = " },"]
25023#[doc = " {"]
25024#[doc = " \"$ref\": \"#/components/schemas/AccessKeyList\""]
25025#[doc = " },"]
25026#[doc = " {"]
25027#[doc = " \"$ref\": \"#/components/schemas/GasKeyView\""]
25028#[doc = " },"]
25029#[doc = " {"]
25030#[doc = " \"$ref\": \"#/components/schemas/GasKeyList\""]
25031#[doc = " }"]
25032#[doc = " ],"]
25033#[doc = " \"required\": ["]
25034#[doc = " \"block_hash\","]
25035#[doc = " \"block_height\""]
25036#[doc = " ],"]
25037#[doc = " \"properties\": {"]
25038#[doc = " \"block_hash\": {"]
25039#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
25040#[doc = " },"]
25041#[doc = " \"block_height\": {"]
25042#[doc = " \"type\": \"integer\","]
25043#[doc = " \"format\": \"uint64\","]
25044#[doc = " \"minimum\": 0.0"]
25045#[doc = " }"]
25046#[doc = " }"]
25047#[doc = "}"]
25048#[doc = r" ```"]
25049#[doc = r" </details>"]
25050#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25051#[serde(untagged)]
25052pub enum RpcQueryResponse {
25053 Variant0 {
25054 amount: NearToken,
25055 block_hash: CryptoHash,
25056 block_height: u64,
25057 code_hash: CryptoHash,
25058 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25059 global_contract_account_id: ::std::option::Option<AccountId>,
25060 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25061 global_contract_hash: ::std::option::Option<CryptoHash>,
25062 locked: NearToken,
25063 #[doc = "TODO(2271): deprecated."]
25064 #[serde(default)]
25065 storage_paid_at: u64,
25066 storage_usage: u64,
25067 },
25068 Variant1 {
25069 block_hash: CryptoHash,
25070 block_height: u64,
25071 code_base64: ::std::string::String,
25072 hash: CryptoHash,
25073 },
25074 Variant2 {
25075 block_hash: CryptoHash,
25076 block_height: u64,
25077 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
25078 proof: ::std::vec::Vec<::std::string::String>,
25079 values: ::std::vec::Vec<StateItem>,
25080 },
25081 Variant3 {
25082 block_hash: CryptoHash,
25083 block_height: u64,
25084 logs: ::std::vec::Vec<::std::string::String>,
25085 result: ::std::vec::Vec<u8>,
25086 },
25087 Variant4 {
25088 block_hash: CryptoHash,
25089 block_height: u64,
25090 nonce: u64,
25091 permission: AccessKeyPermissionView,
25092 },
25093 Variant5 {
25094 block_hash: CryptoHash,
25095 block_height: u64,
25096 keys: ::std::vec::Vec<AccessKeyInfoView>,
25097 },
25098 Variant6 {
25099 balance: NearToken,
25100 block_hash: CryptoHash,
25101 block_height: u64,
25102 nonces: ::std::vec::Vec<u64>,
25103 num_nonces: u32,
25104 permission: AccessKeyPermissionView,
25105 },
25106 Variant7 {
25107 block_hash: CryptoHash,
25108 block_height: u64,
25109 keys: ::std::vec::Vec<GasKeyInfoView>,
25110 },
25111}
25112impl ::std::convert::From<&Self> for RpcQueryResponse {
25113 fn from(value: &RpcQueryResponse) -> Self {
25114 value.clone()
25115 }
25116}
25117#[doc = "`RpcReceiptError`"]
25118#[doc = r""]
25119#[doc = r" <details><summary>JSON schema</summary>"]
25120#[doc = r""]
25121#[doc = r" ```json"]
25122#[doc = "{"]
25123#[doc = " \"oneOf\": ["]
25124#[doc = " {"]
25125#[doc = " \"type\": \"object\","]
25126#[doc = " \"required\": ["]
25127#[doc = " \"info\","]
25128#[doc = " \"name\""]
25129#[doc = " ],"]
25130#[doc = " \"properties\": {"]
25131#[doc = " \"info\": {"]
25132#[doc = " \"type\": \"object\","]
25133#[doc = " \"required\": ["]
25134#[doc = " \"error_message\""]
25135#[doc = " ],"]
25136#[doc = " \"properties\": {"]
25137#[doc = " \"error_message\": {"]
25138#[doc = " \"type\": \"string\""]
25139#[doc = " }"]
25140#[doc = " }"]
25141#[doc = " },"]
25142#[doc = " \"name\": {"]
25143#[doc = " \"type\": \"string\","]
25144#[doc = " \"enum\": ["]
25145#[doc = " \"INTERNAL_ERROR\""]
25146#[doc = " ]"]
25147#[doc = " }"]
25148#[doc = " }"]
25149#[doc = " },"]
25150#[doc = " {"]
25151#[doc = " \"type\": \"object\","]
25152#[doc = " \"required\": ["]
25153#[doc = " \"info\","]
25154#[doc = " \"name\""]
25155#[doc = " ],"]
25156#[doc = " \"properties\": {"]
25157#[doc = " \"info\": {"]
25158#[doc = " \"type\": \"object\","]
25159#[doc = " \"required\": ["]
25160#[doc = " \"receipt_id\""]
25161#[doc = " ],"]
25162#[doc = " \"properties\": {"]
25163#[doc = " \"receipt_id\": {"]
25164#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
25165#[doc = " }"]
25166#[doc = " }"]
25167#[doc = " },"]
25168#[doc = " \"name\": {"]
25169#[doc = " \"type\": \"string\","]
25170#[doc = " \"enum\": ["]
25171#[doc = " \"UNKNOWN_RECEIPT\""]
25172#[doc = " ]"]
25173#[doc = " }"]
25174#[doc = " }"]
25175#[doc = " }"]
25176#[doc = " ]"]
25177#[doc = "}"]
25178#[doc = r" ```"]
25179#[doc = r" </details>"]
25180#[derive(
25181 :: serde :: Deserialize,
25182 :: serde :: Serialize,
25183 Clone,
25184 Debug,
25185 thiserror::Error,
25186 strum_macros::Display,
25187)]
25188#[serde(tag = "name", content = "info")]
25189pub enum RpcReceiptError {
25190 #[serde(rename = "INTERNAL_ERROR")]
25191 InternalError {
25192 error_message: ::std::string::String,
25193 },
25194 #[serde(rename = "UNKNOWN_RECEIPT")]
25195 UnknownReceipt { receipt_id: CryptoHash },
25196}
25197impl ::std::convert::From<&Self> for RpcReceiptError {
25198 fn from(value: &RpcReceiptError) -> Self {
25199 value.clone()
25200 }
25201}
25202#[doc = "`RpcReceiptRequest`"]
25203#[doc = r""]
25204#[doc = r" <details><summary>JSON schema</summary>"]
25205#[doc = r""]
25206#[doc = r" ```json"]
25207#[doc = "{"]
25208#[doc = " \"title\": \"RpcReceiptRequest\","]
25209#[doc = " \"type\": \"object\","]
25210#[doc = " \"required\": ["]
25211#[doc = " \"receipt_id\""]
25212#[doc = " ],"]
25213#[doc = " \"properties\": {"]
25214#[doc = " \"receipt_id\": {"]
25215#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
25216#[doc = " }"]
25217#[doc = " }"]
25218#[doc = "}"]
25219#[doc = r" ```"]
25220#[doc = r" </details>"]
25221#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25222pub struct RpcReceiptRequest {
25223 pub receipt_id: CryptoHash,
25224}
25225impl ::std::convert::From<&RpcReceiptRequest> for RpcReceiptRequest {
25226 fn from(value: &RpcReceiptRequest) -> Self {
25227 value.clone()
25228 }
25229}
25230#[doc = "`RpcReceiptResponse`"]
25231#[doc = r""]
25232#[doc = r" <details><summary>JSON schema</summary>"]
25233#[doc = r""]
25234#[doc = r" ```json"]
25235#[doc = "{"]
25236#[doc = " \"type\": \"object\","]
25237#[doc = " \"required\": ["]
25238#[doc = " \"predecessor_id\","]
25239#[doc = " \"receipt\","]
25240#[doc = " \"receipt_id\","]
25241#[doc = " \"receiver_id\""]
25242#[doc = " ],"]
25243#[doc = " \"properties\": {"]
25244#[doc = " \"predecessor_id\": {"]
25245#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25246#[doc = " },"]
25247#[doc = " \"priority\": {"]
25248#[doc = " \"default\": 0,"]
25249#[doc = " \"type\": \"integer\","]
25250#[doc = " \"format\": \"uint64\","]
25251#[doc = " \"minimum\": 0.0"]
25252#[doc = " },"]
25253#[doc = " \"receipt\": {"]
25254#[doc = " \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
25255#[doc = " },"]
25256#[doc = " \"receipt_id\": {"]
25257#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
25258#[doc = " },"]
25259#[doc = " \"receiver_id\": {"]
25260#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25261#[doc = " }"]
25262#[doc = " }"]
25263#[doc = "}"]
25264#[doc = r" ```"]
25265#[doc = r" </details>"]
25266#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25267pub struct RpcReceiptResponse {
25268 pub predecessor_id: AccountId,
25269 #[serde(default)]
25270 pub priority: u64,
25271 pub receipt: ReceiptEnumView,
25272 pub receipt_id: CryptoHash,
25273 pub receiver_id: AccountId,
25274}
25275impl ::std::convert::From<&RpcReceiptResponse> for RpcReceiptResponse {
25276 fn from(value: &RpcReceiptResponse) -> Self {
25277 value.clone()
25278 }
25279}
25280#[doc = "`RpcRequestValidationErrorKind`"]
25281#[doc = r""]
25282#[doc = r" <details><summary>JSON schema</summary>"]
25283#[doc = r""]
25284#[doc = r" ```json"]
25285#[doc = "{"]
25286#[doc = " \"oneOf\": ["]
25287#[doc = " {"]
25288#[doc = " \"type\": \"object\","]
25289#[doc = " \"required\": ["]
25290#[doc = " \"info\","]
25291#[doc = " \"name\""]
25292#[doc = " ],"]
25293#[doc = " \"properties\": {"]
25294#[doc = " \"info\": {"]
25295#[doc = " \"type\": \"object\","]
25296#[doc = " \"required\": ["]
25297#[doc = " \"method_name\""]
25298#[doc = " ],"]
25299#[doc = " \"properties\": {"]
25300#[doc = " \"method_name\": {"]
25301#[doc = " \"type\": \"string\""]
25302#[doc = " }"]
25303#[doc = " }"]
25304#[doc = " },"]
25305#[doc = " \"name\": {"]
25306#[doc = " \"type\": \"string\","]
25307#[doc = " \"enum\": ["]
25308#[doc = " \"METHOD_NOT_FOUND\""]
25309#[doc = " ]"]
25310#[doc = " }"]
25311#[doc = " }"]
25312#[doc = " },"]
25313#[doc = " {"]
25314#[doc = " \"type\": \"object\","]
25315#[doc = " \"required\": ["]
25316#[doc = " \"info\","]
25317#[doc = " \"name\""]
25318#[doc = " ],"]
25319#[doc = " \"properties\": {"]
25320#[doc = " \"info\": {"]
25321#[doc = " \"type\": \"object\","]
25322#[doc = " \"required\": ["]
25323#[doc = " \"error_message\""]
25324#[doc = " ],"]
25325#[doc = " \"properties\": {"]
25326#[doc = " \"error_message\": {"]
25327#[doc = " \"type\": \"string\""]
25328#[doc = " }"]
25329#[doc = " }"]
25330#[doc = " },"]
25331#[doc = " \"name\": {"]
25332#[doc = " \"type\": \"string\","]
25333#[doc = " \"enum\": ["]
25334#[doc = " \"PARSE_ERROR\""]
25335#[doc = " ]"]
25336#[doc = " }"]
25337#[doc = " }"]
25338#[doc = " }"]
25339#[doc = " ]"]
25340#[doc = "}"]
25341#[doc = r" ```"]
25342#[doc = r" </details>"]
25343#[derive(
25344 :: serde :: Deserialize,
25345 :: serde :: Serialize,
25346 Clone,
25347 Debug,
25348 thiserror::Error,
25349 strum_macros::Display,
25350)]
25351#[serde(tag = "name", content = "info")]
25352pub enum RpcRequestValidationErrorKind {
25353 #[serde(rename = "METHOD_NOT_FOUND")]
25354 MethodNotFound { method_name: ::std::string::String },
25355 #[serde(rename = "PARSE_ERROR")]
25356 ParseError {
25357 error_message: ::std::string::String,
25358 },
25359}
25360impl ::std::convert::From<&Self> for RpcRequestValidationErrorKind {
25361 fn from(value: &RpcRequestValidationErrorKind) -> Self {
25362 value.clone()
25363 }
25364}
25365#[doc = "`RpcSendTransactionRequest`"]
25366#[doc = r""]
25367#[doc = r" <details><summary>JSON schema</summary>"]
25368#[doc = r""]
25369#[doc = r" ```json"]
25370#[doc = "{"]
25371#[doc = " \"title\": \"RpcSendTransactionRequest\","]
25372#[doc = " \"type\": \"object\","]
25373#[doc = " \"required\": ["]
25374#[doc = " \"signed_tx_base64\""]
25375#[doc = " ],"]
25376#[doc = " \"properties\": {"]
25377#[doc = " \"signed_tx_base64\": {"]
25378#[doc = " \"$ref\": \"#/components/schemas/SignedTransaction\""]
25379#[doc = " },"]
25380#[doc = " \"wait_until\": {"]
25381#[doc = " \"default\": \"EXECUTED_OPTIMISTIC\","]
25382#[doc = " \"allOf\": ["]
25383#[doc = " {"]
25384#[doc = " \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
25385#[doc = " }"]
25386#[doc = " ]"]
25387#[doc = " }"]
25388#[doc = " }"]
25389#[doc = "}"]
25390#[doc = r" ```"]
25391#[doc = r" </details>"]
25392#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25393pub struct RpcSendTransactionRequest {
25394 pub signed_tx_base64: SignedTransaction,
25395 #[serde(default = "defaults::rpc_send_transaction_request_wait_until")]
25396 pub wait_until: TxExecutionStatus,
25397}
25398impl ::std::convert::From<&RpcSendTransactionRequest> for RpcSendTransactionRequest {
25399 fn from(value: &RpcSendTransactionRequest) -> Self {
25400 value.clone()
25401 }
25402}
25403#[doc = "`RpcSplitStorageInfoError`"]
25404#[doc = r""]
25405#[doc = r" <details><summary>JSON schema</summary>"]
25406#[doc = r""]
25407#[doc = r" ```json"]
25408#[doc = "{"]
25409#[doc = " \"oneOf\": ["]
25410#[doc = " {"]
25411#[doc = " \"type\": \"object\","]
25412#[doc = " \"required\": ["]
25413#[doc = " \"info\","]
25414#[doc = " \"name\""]
25415#[doc = " ],"]
25416#[doc = " \"properties\": {"]
25417#[doc = " \"info\": {"]
25418#[doc = " \"type\": \"object\","]
25419#[doc = " \"required\": ["]
25420#[doc = " \"error_message\""]
25421#[doc = " ],"]
25422#[doc = " \"properties\": {"]
25423#[doc = " \"error_message\": {"]
25424#[doc = " \"type\": \"string\""]
25425#[doc = " }"]
25426#[doc = " }"]
25427#[doc = " },"]
25428#[doc = " \"name\": {"]
25429#[doc = " \"type\": \"string\","]
25430#[doc = " \"enum\": ["]
25431#[doc = " \"INTERNAL_ERROR\""]
25432#[doc = " ]"]
25433#[doc = " }"]
25434#[doc = " }"]
25435#[doc = " }"]
25436#[doc = " ]"]
25437#[doc = "}"]
25438#[doc = r" ```"]
25439#[doc = r" </details>"]
25440#[derive(
25441 :: serde :: Deserialize,
25442 :: serde :: Serialize,
25443 Clone,
25444 Debug,
25445 thiserror::Error,
25446 strum_macros::Display,
25447)]
25448#[serde(tag = "name", content = "info")]
25449pub enum RpcSplitStorageInfoError {
25450 #[serde(rename = "INTERNAL_ERROR")]
25451 InternalError {
25452 error_message: ::std::string::String,
25453 },
25454}
25455impl ::std::convert::From<&Self> for RpcSplitStorageInfoError {
25456 fn from(value: &RpcSplitStorageInfoError) -> Self {
25457 value.clone()
25458 }
25459}
25460#[doc = "`RpcSplitStorageInfoRequest`"]
25461#[doc = r""]
25462#[doc = r" <details><summary>JSON schema</summary>"]
25463#[doc = r""]
25464#[doc = r" ```json"]
25465#[doc = "{"]
25466#[doc = " \"title\": \"RpcSplitStorageInfoRequest\","]
25467#[doc = " \"type\": \"object\""]
25468#[doc = "}"]
25469#[doc = r" ```"]
25470#[doc = r" </details>"]
25471#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25472#[serde(transparent)]
25473pub struct RpcSplitStorageInfoRequest(
25474 pub ::serde_json::Map<::std::string::String, ::serde_json::Value>,
25475);
25476impl ::std::ops::Deref for RpcSplitStorageInfoRequest {
25477 type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
25478 fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
25479 &self.0
25480 }
25481}
25482impl ::std::convert::From<RpcSplitStorageInfoRequest>
25483 for ::serde_json::Map<::std::string::String, ::serde_json::Value>
25484{
25485 fn from(value: RpcSplitStorageInfoRequest) -> Self {
25486 value.0
25487 }
25488}
25489impl ::std::convert::From<&RpcSplitStorageInfoRequest> for RpcSplitStorageInfoRequest {
25490 fn from(value: &RpcSplitStorageInfoRequest) -> Self {
25491 value.clone()
25492 }
25493}
25494impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
25495 for RpcSplitStorageInfoRequest
25496{
25497 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
25498 Self(value)
25499 }
25500}
25501#[doc = "Contains the split storage information."]
25502#[doc = r""]
25503#[doc = r" <details><summary>JSON schema</summary>"]
25504#[doc = r""]
25505#[doc = r" ```json"]
25506#[doc = "{"]
25507#[doc = " \"description\": \"Contains the split storage information.\","]
25508#[doc = " \"type\": \"object\","]
25509#[doc = " \"properties\": {"]
25510#[doc = " \"cold_head_height\": {"]
25511#[doc = " \"type\": ["]
25512#[doc = " \"integer\","]
25513#[doc = " \"null\""]
25514#[doc = " ],"]
25515#[doc = " \"format\": \"uint64\","]
25516#[doc = " \"minimum\": 0.0"]
25517#[doc = " },"]
25518#[doc = " \"final_head_height\": {"]
25519#[doc = " \"type\": ["]
25520#[doc = " \"integer\","]
25521#[doc = " \"null\""]
25522#[doc = " ],"]
25523#[doc = " \"format\": \"uint64\","]
25524#[doc = " \"minimum\": 0.0"]
25525#[doc = " },"]
25526#[doc = " \"head_height\": {"]
25527#[doc = " \"type\": ["]
25528#[doc = " \"integer\","]
25529#[doc = " \"null\""]
25530#[doc = " ],"]
25531#[doc = " \"format\": \"uint64\","]
25532#[doc = " \"minimum\": 0.0"]
25533#[doc = " },"]
25534#[doc = " \"hot_db_kind\": {"]
25535#[doc = " \"type\": ["]
25536#[doc = " \"string\","]
25537#[doc = " \"null\""]
25538#[doc = " ]"]
25539#[doc = " }"]
25540#[doc = " }"]
25541#[doc = "}"]
25542#[doc = r" ```"]
25543#[doc = r" </details>"]
25544#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25545pub struct RpcSplitStorageInfoResponse {
25546 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25547 pub cold_head_height: ::std::option::Option<u64>,
25548 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25549 pub final_head_height: ::std::option::Option<u64>,
25550 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25551 pub head_height: ::std::option::Option<u64>,
25552 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25553 pub hot_db_kind: ::std::option::Option<::std::string::String>,
25554}
25555impl ::std::convert::From<&RpcSplitStorageInfoResponse> for RpcSplitStorageInfoResponse {
25556 fn from(value: &RpcSplitStorageInfoResponse) -> Self {
25557 value.clone()
25558 }
25559}
25560impl ::std::default::Default for RpcSplitStorageInfoResponse {
25561 fn default() -> Self {
25562 Self {
25563 cold_head_height: Default::default(),
25564 final_head_height: Default::default(),
25565 head_height: Default::default(),
25566 hot_db_kind: Default::default(),
25567 }
25568 }
25569}
25570#[doc = "`RpcStateChangesError`"]
25571#[doc = r""]
25572#[doc = r" <details><summary>JSON schema</summary>"]
25573#[doc = r""]
25574#[doc = r" ```json"]
25575#[doc = "{"]
25576#[doc = " \"oneOf\": ["]
25577#[doc = " {"]
25578#[doc = " \"type\": \"object\","]
25579#[doc = " \"required\": ["]
25580#[doc = " \"info\","]
25581#[doc = " \"name\""]
25582#[doc = " ],"]
25583#[doc = " \"properties\": {"]
25584#[doc = " \"info\": {"]
25585#[doc = " \"type\": \"object\""]
25586#[doc = " },"]
25587#[doc = " \"name\": {"]
25588#[doc = " \"type\": \"string\","]
25589#[doc = " \"enum\": ["]
25590#[doc = " \"UNKNOWN_BLOCK\""]
25591#[doc = " ]"]
25592#[doc = " }"]
25593#[doc = " }"]
25594#[doc = " },"]
25595#[doc = " {"]
25596#[doc = " \"type\": \"object\","]
25597#[doc = " \"required\": ["]
25598#[doc = " \"name\""]
25599#[doc = " ],"]
25600#[doc = " \"properties\": {"]
25601#[doc = " \"name\": {"]
25602#[doc = " \"type\": \"string\","]
25603#[doc = " \"enum\": ["]
25604#[doc = " \"NOT_SYNCED_YET\""]
25605#[doc = " ]"]
25606#[doc = " }"]
25607#[doc = " }"]
25608#[doc = " },"]
25609#[doc = " {"]
25610#[doc = " \"type\": \"object\","]
25611#[doc = " \"required\": ["]
25612#[doc = " \"info\","]
25613#[doc = " \"name\""]
25614#[doc = " ],"]
25615#[doc = " \"properties\": {"]
25616#[doc = " \"info\": {"]
25617#[doc = " \"type\": \"object\","]
25618#[doc = " \"required\": ["]
25619#[doc = " \"error_message\""]
25620#[doc = " ],"]
25621#[doc = " \"properties\": {"]
25622#[doc = " \"error_message\": {"]
25623#[doc = " \"type\": \"string\""]
25624#[doc = " }"]
25625#[doc = " }"]
25626#[doc = " },"]
25627#[doc = " \"name\": {"]
25628#[doc = " \"type\": \"string\","]
25629#[doc = " \"enum\": ["]
25630#[doc = " \"INTERNAL_ERROR\""]
25631#[doc = " ]"]
25632#[doc = " }"]
25633#[doc = " }"]
25634#[doc = " }"]
25635#[doc = " ]"]
25636#[doc = "}"]
25637#[doc = r" ```"]
25638#[doc = r" </details>"]
25639#[derive(
25640 :: serde :: Deserialize,
25641 :: serde :: Serialize,
25642 Clone,
25643 Debug,
25644 thiserror::Error,
25645 strum_macros::Display,
25646)]
25647#[serde(tag = "name", content = "info")]
25648pub enum RpcStateChangesError {
25649 #[serde(rename = "UNKNOWN_BLOCK")]
25650 UnknownBlock(::serde_json::Map<::std::string::String, ::serde_json::Value>),
25651 #[serde(rename = "NOT_SYNCED_YET")]
25652 NotSyncedYet,
25653 #[serde(rename = "INTERNAL_ERROR")]
25654 InternalError {
25655 error_message: ::std::string::String,
25656 },
25657}
25658impl ::std::convert::From<&Self> for RpcStateChangesError {
25659 fn from(value: &RpcStateChangesError) -> Self {
25660 value.clone()
25661 }
25662}
25663impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
25664 for RpcStateChangesError
25665{
25666 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
25667 Self::UnknownBlock(value)
25668 }
25669}
25670#[doc = "It is a [serializable view] of [`StateChangesRequest`].\n\n[serializable view]: ./index.html\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html"]
25671#[doc = r""]
25672#[doc = r" <details><summary>JSON schema</summary>"]
25673#[doc = r""]
25674#[doc = r" ```json"]
25675#[doc = "{"]
25676#[doc = " \"title\": \"RpcStateChangesInBlockByTypeRequest\","]
25677#[doc = " \"description\": \"It is a [serializable view] of [`StateChangesRequest`].\\n\\n[serializable view]: ./index.html\\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html\","]
25678#[doc = " \"type\": \"object\","]
25679#[doc = " \"oneOf\": ["]
25680#[doc = " {"]
25681#[doc = " \"title\": \"account_changes_by_block_id\","]
25682#[doc = " \"allOf\": ["]
25683#[doc = " {"]
25684#[doc = " \"type\": \"object\","]
25685#[doc = " \"required\": ["]
25686#[doc = " \"block_id\""]
25687#[doc = " ],"]
25688#[doc = " \"properties\": {"]
25689#[doc = " \"block_id\": {"]
25690#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
25691#[doc = " }"]
25692#[doc = " }"]
25693#[doc = " },"]
25694#[doc = " {"]
25695#[doc = " \"type\": \"object\","]
25696#[doc = " \"required\": ["]
25697#[doc = " \"account_ids\","]
25698#[doc = " \"changes_type\""]
25699#[doc = " ],"]
25700#[doc = " \"properties\": {"]
25701#[doc = " \"account_ids\": {"]
25702#[doc = " \"type\": \"array\","]
25703#[doc = " \"items\": {"]
25704#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25705#[doc = " }"]
25706#[doc = " },"]
25707#[doc = " \"changes_type\": {"]
25708#[doc = " \"type\": \"string\","]
25709#[doc = " \"enum\": ["]
25710#[doc = " \"account_changes\""]
25711#[doc = " ]"]
25712#[doc = " }"]
25713#[doc = " }"]
25714#[doc = " }"]
25715#[doc = " ]"]
25716#[doc = " },"]
25717#[doc = " {"]
25718#[doc = " \"title\": \"single_access_key_changes_by_block_id\","]
25719#[doc = " \"allOf\": ["]
25720#[doc = " {"]
25721#[doc = " \"type\": \"object\","]
25722#[doc = " \"required\": ["]
25723#[doc = " \"block_id\""]
25724#[doc = " ],"]
25725#[doc = " \"properties\": {"]
25726#[doc = " \"block_id\": {"]
25727#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
25728#[doc = " }"]
25729#[doc = " }"]
25730#[doc = " },"]
25731#[doc = " {"]
25732#[doc = " \"type\": \"object\","]
25733#[doc = " \"required\": ["]
25734#[doc = " \"changes_type\","]
25735#[doc = " \"keys\""]
25736#[doc = " ],"]
25737#[doc = " \"properties\": {"]
25738#[doc = " \"changes_type\": {"]
25739#[doc = " \"type\": \"string\","]
25740#[doc = " \"enum\": ["]
25741#[doc = " \"single_access_key_changes\""]
25742#[doc = " ]"]
25743#[doc = " },"]
25744#[doc = " \"keys\": {"]
25745#[doc = " \"type\": \"array\","]
25746#[doc = " \"items\": {"]
25747#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
25748#[doc = " }"]
25749#[doc = " }"]
25750#[doc = " }"]
25751#[doc = " }"]
25752#[doc = " ]"]
25753#[doc = " },"]
25754#[doc = " {"]
25755#[doc = " \"title\": \"single_gas_key_changes_by_block_id\","]
25756#[doc = " \"allOf\": ["]
25757#[doc = " {"]
25758#[doc = " \"type\": \"object\","]
25759#[doc = " \"required\": ["]
25760#[doc = " \"block_id\""]
25761#[doc = " ],"]
25762#[doc = " \"properties\": {"]
25763#[doc = " \"block_id\": {"]
25764#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
25765#[doc = " }"]
25766#[doc = " }"]
25767#[doc = " },"]
25768#[doc = " {"]
25769#[doc = " \"type\": \"object\","]
25770#[doc = " \"required\": ["]
25771#[doc = " \"changes_type\","]
25772#[doc = " \"keys\""]
25773#[doc = " ],"]
25774#[doc = " \"properties\": {"]
25775#[doc = " \"changes_type\": {"]
25776#[doc = " \"type\": \"string\","]
25777#[doc = " \"enum\": ["]
25778#[doc = " \"single_gas_key_changes\""]
25779#[doc = " ]"]
25780#[doc = " },"]
25781#[doc = " \"keys\": {"]
25782#[doc = " \"type\": \"array\","]
25783#[doc = " \"items\": {"]
25784#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
25785#[doc = " }"]
25786#[doc = " }"]
25787#[doc = " }"]
25788#[doc = " }"]
25789#[doc = " ]"]
25790#[doc = " },"]
25791#[doc = " {"]
25792#[doc = " \"title\": \"all_access_key_changes_by_block_id\","]
25793#[doc = " \"allOf\": ["]
25794#[doc = " {"]
25795#[doc = " \"type\": \"object\","]
25796#[doc = " \"required\": ["]
25797#[doc = " \"block_id\""]
25798#[doc = " ],"]
25799#[doc = " \"properties\": {"]
25800#[doc = " \"block_id\": {"]
25801#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
25802#[doc = " }"]
25803#[doc = " }"]
25804#[doc = " },"]
25805#[doc = " {"]
25806#[doc = " \"type\": \"object\","]
25807#[doc = " \"required\": ["]
25808#[doc = " \"account_ids\","]
25809#[doc = " \"changes_type\""]
25810#[doc = " ],"]
25811#[doc = " \"properties\": {"]
25812#[doc = " \"account_ids\": {"]
25813#[doc = " \"type\": \"array\","]
25814#[doc = " \"items\": {"]
25815#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25816#[doc = " }"]
25817#[doc = " },"]
25818#[doc = " \"changes_type\": {"]
25819#[doc = " \"type\": \"string\","]
25820#[doc = " \"enum\": ["]
25821#[doc = " \"all_access_key_changes\""]
25822#[doc = " ]"]
25823#[doc = " }"]
25824#[doc = " }"]
25825#[doc = " }"]
25826#[doc = " ]"]
25827#[doc = " },"]
25828#[doc = " {"]
25829#[doc = " \"title\": \"all_gas_key_changes_by_block_id\","]
25830#[doc = " \"allOf\": ["]
25831#[doc = " {"]
25832#[doc = " \"type\": \"object\","]
25833#[doc = " \"required\": ["]
25834#[doc = " \"block_id\""]
25835#[doc = " ],"]
25836#[doc = " \"properties\": {"]
25837#[doc = " \"block_id\": {"]
25838#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
25839#[doc = " }"]
25840#[doc = " }"]
25841#[doc = " },"]
25842#[doc = " {"]
25843#[doc = " \"type\": \"object\","]
25844#[doc = " \"required\": ["]
25845#[doc = " \"account_ids\","]
25846#[doc = " \"changes_type\""]
25847#[doc = " ],"]
25848#[doc = " \"properties\": {"]
25849#[doc = " \"account_ids\": {"]
25850#[doc = " \"type\": \"array\","]
25851#[doc = " \"items\": {"]
25852#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25853#[doc = " }"]
25854#[doc = " },"]
25855#[doc = " \"changes_type\": {"]
25856#[doc = " \"type\": \"string\","]
25857#[doc = " \"enum\": ["]
25858#[doc = " \"all_gas_key_changes\""]
25859#[doc = " ]"]
25860#[doc = " }"]
25861#[doc = " }"]
25862#[doc = " }"]
25863#[doc = " ]"]
25864#[doc = " },"]
25865#[doc = " {"]
25866#[doc = " \"title\": \"contract_code_changes_by_block_id\","]
25867#[doc = " \"allOf\": ["]
25868#[doc = " {"]
25869#[doc = " \"type\": \"object\","]
25870#[doc = " \"required\": ["]
25871#[doc = " \"block_id\""]
25872#[doc = " ],"]
25873#[doc = " \"properties\": {"]
25874#[doc = " \"block_id\": {"]
25875#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
25876#[doc = " }"]
25877#[doc = " }"]
25878#[doc = " },"]
25879#[doc = " {"]
25880#[doc = " \"type\": \"object\","]
25881#[doc = " \"required\": ["]
25882#[doc = " \"account_ids\","]
25883#[doc = " \"changes_type\""]
25884#[doc = " ],"]
25885#[doc = " \"properties\": {"]
25886#[doc = " \"account_ids\": {"]
25887#[doc = " \"type\": \"array\","]
25888#[doc = " \"items\": {"]
25889#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25890#[doc = " }"]
25891#[doc = " },"]
25892#[doc = " \"changes_type\": {"]
25893#[doc = " \"type\": \"string\","]
25894#[doc = " \"enum\": ["]
25895#[doc = " \"contract_code_changes\""]
25896#[doc = " ]"]
25897#[doc = " }"]
25898#[doc = " }"]
25899#[doc = " }"]
25900#[doc = " ]"]
25901#[doc = " },"]
25902#[doc = " {"]
25903#[doc = " \"title\": \"data_changes_by_block_id\","]
25904#[doc = " \"allOf\": ["]
25905#[doc = " {"]
25906#[doc = " \"type\": \"object\","]
25907#[doc = " \"required\": ["]
25908#[doc = " \"block_id\""]
25909#[doc = " ],"]
25910#[doc = " \"properties\": {"]
25911#[doc = " \"block_id\": {"]
25912#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
25913#[doc = " }"]
25914#[doc = " }"]
25915#[doc = " },"]
25916#[doc = " {"]
25917#[doc = " \"type\": \"object\","]
25918#[doc = " \"required\": ["]
25919#[doc = " \"account_ids\","]
25920#[doc = " \"changes_type\","]
25921#[doc = " \"key_prefix_base64\""]
25922#[doc = " ],"]
25923#[doc = " \"properties\": {"]
25924#[doc = " \"account_ids\": {"]
25925#[doc = " \"type\": \"array\","]
25926#[doc = " \"items\": {"]
25927#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25928#[doc = " }"]
25929#[doc = " },"]
25930#[doc = " \"changes_type\": {"]
25931#[doc = " \"type\": \"string\","]
25932#[doc = " \"enum\": ["]
25933#[doc = " \"data_changes\""]
25934#[doc = " ]"]
25935#[doc = " },"]
25936#[doc = " \"key_prefix_base64\": {"]
25937#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
25938#[doc = " }"]
25939#[doc = " }"]
25940#[doc = " }"]
25941#[doc = " ]"]
25942#[doc = " },"]
25943#[doc = " {"]
25944#[doc = " \"title\": \"account_changes_by_finality\","]
25945#[doc = " \"allOf\": ["]
25946#[doc = " {"]
25947#[doc = " \"type\": \"object\","]
25948#[doc = " \"required\": ["]
25949#[doc = " \"finality\""]
25950#[doc = " ],"]
25951#[doc = " \"properties\": {"]
25952#[doc = " \"finality\": {"]
25953#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
25954#[doc = " }"]
25955#[doc = " }"]
25956#[doc = " },"]
25957#[doc = " {"]
25958#[doc = " \"type\": \"object\","]
25959#[doc = " \"required\": ["]
25960#[doc = " \"account_ids\","]
25961#[doc = " \"changes_type\""]
25962#[doc = " ],"]
25963#[doc = " \"properties\": {"]
25964#[doc = " \"account_ids\": {"]
25965#[doc = " \"type\": \"array\","]
25966#[doc = " \"items\": {"]
25967#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25968#[doc = " }"]
25969#[doc = " },"]
25970#[doc = " \"changes_type\": {"]
25971#[doc = " \"type\": \"string\","]
25972#[doc = " \"enum\": ["]
25973#[doc = " \"account_changes\""]
25974#[doc = " ]"]
25975#[doc = " }"]
25976#[doc = " }"]
25977#[doc = " }"]
25978#[doc = " ]"]
25979#[doc = " },"]
25980#[doc = " {"]
25981#[doc = " \"title\": \"single_access_key_changes_by_finality\","]
25982#[doc = " \"allOf\": ["]
25983#[doc = " {"]
25984#[doc = " \"type\": \"object\","]
25985#[doc = " \"required\": ["]
25986#[doc = " \"finality\""]
25987#[doc = " ],"]
25988#[doc = " \"properties\": {"]
25989#[doc = " \"finality\": {"]
25990#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
25991#[doc = " }"]
25992#[doc = " }"]
25993#[doc = " },"]
25994#[doc = " {"]
25995#[doc = " \"type\": \"object\","]
25996#[doc = " \"required\": ["]
25997#[doc = " \"changes_type\","]
25998#[doc = " \"keys\""]
25999#[doc = " ],"]
26000#[doc = " \"properties\": {"]
26001#[doc = " \"changes_type\": {"]
26002#[doc = " \"type\": \"string\","]
26003#[doc = " \"enum\": ["]
26004#[doc = " \"single_access_key_changes\""]
26005#[doc = " ]"]
26006#[doc = " },"]
26007#[doc = " \"keys\": {"]
26008#[doc = " \"type\": \"array\","]
26009#[doc = " \"items\": {"]
26010#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26011#[doc = " }"]
26012#[doc = " }"]
26013#[doc = " }"]
26014#[doc = " }"]
26015#[doc = " ]"]
26016#[doc = " },"]
26017#[doc = " {"]
26018#[doc = " \"title\": \"single_gas_key_changes_by_finality\","]
26019#[doc = " \"allOf\": ["]
26020#[doc = " {"]
26021#[doc = " \"type\": \"object\","]
26022#[doc = " \"required\": ["]
26023#[doc = " \"finality\""]
26024#[doc = " ],"]
26025#[doc = " \"properties\": {"]
26026#[doc = " \"finality\": {"]
26027#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
26028#[doc = " }"]
26029#[doc = " }"]
26030#[doc = " },"]
26031#[doc = " {"]
26032#[doc = " \"type\": \"object\","]
26033#[doc = " \"required\": ["]
26034#[doc = " \"changes_type\","]
26035#[doc = " \"keys\""]
26036#[doc = " ],"]
26037#[doc = " \"properties\": {"]
26038#[doc = " \"changes_type\": {"]
26039#[doc = " \"type\": \"string\","]
26040#[doc = " \"enum\": ["]
26041#[doc = " \"single_gas_key_changes\""]
26042#[doc = " ]"]
26043#[doc = " },"]
26044#[doc = " \"keys\": {"]
26045#[doc = " \"type\": \"array\","]
26046#[doc = " \"items\": {"]
26047#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26048#[doc = " }"]
26049#[doc = " }"]
26050#[doc = " }"]
26051#[doc = " }"]
26052#[doc = " ]"]
26053#[doc = " },"]
26054#[doc = " {"]
26055#[doc = " \"title\": \"all_access_key_changes_by_finality\","]
26056#[doc = " \"allOf\": ["]
26057#[doc = " {"]
26058#[doc = " \"type\": \"object\","]
26059#[doc = " \"required\": ["]
26060#[doc = " \"finality\""]
26061#[doc = " ],"]
26062#[doc = " \"properties\": {"]
26063#[doc = " \"finality\": {"]
26064#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
26065#[doc = " }"]
26066#[doc = " }"]
26067#[doc = " },"]
26068#[doc = " {"]
26069#[doc = " \"type\": \"object\","]
26070#[doc = " \"required\": ["]
26071#[doc = " \"account_ids\","]
26072#[doc = " \"changes_type\""]
26073#[doc = " ],"]
26074#[doc = " \"properties\": {"]
26075#[doc = " \"account_ids\": {"]
26076#[doc = " \"type\": \"array\","]
26077#[doc = " \"items\": {"]
26078#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26079#[doc = " }"]
26080#[doc = " },"]
26081#[doc = " \"changes_type\": {"]
26082#[doc = " \"type\": \"string\","]
26083#[doc = " \"enum\": ["]
26084#[doc = " \"all_access_key_changes\""]
26085#[doc = " ]"]
26086#[doc = " }"]
26087#[doc = " }"]
26088#[doc = " }"]
26089#[doc = " ]"]
26090#[doc = " },"]
26091#[doc = " {"]
26092#[doc = " \"title\": \"all_gas_key_changes_by_finality\","]
26093#[doc = " \"allOf\": ["]
26094#[doc = " {"]
26095#[doc = " \"type\": \"object\","]
26096#[doc = " \"required\": ["]
26097#[doc = " \"finality\""]
26098#[doc = " ],"]
26099#[doc = " \"properties\": {"]
26100#[doc = " \"finality\": {"]
26101#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
26102#[doc = " }"]
26103#[doc = " }"]
26104#[doc = " },"]
26105#[doc = " {"]
26106#[doc = " \"type\": \"object\","]
26107#[doc = " \"required\": ["]
26108#[doc = " \"account_ids\","]
26109#[doc = " \"changes_type\""]
26110#[doc = " ],"]
26111#[doc = " \"properties\": {"]
26112#[doc = " \"account_ids\": {"]
26113#[doc = " \"type\": \"array\","]
26114#[doc = " \"items\": {"]
26115#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26116#[doc = " }"]
26117#[doc = " },"]
26118#[doc = " \"changes_type\": {"]
26119#[doc = " \"type\": \"string\","]
26120#[doc = " \"enum\": ["]
26121#[doc = " \"all_gas_key_changes\""]
26122#[doc = " ]"]
26123#[doc = " }"]
26124#[doc = " }"]
26125#[doc = " }"]
26126#[doc = " ]"]
26127#[doc = " },"]
26128#[doc = " {"]
26129#[doc = " \"title\": \"contract_code_changes_by_finality\","]
26130#[doc = " \"allOf\": ["]
26131#[doc = " {"]
26132#[doc = " \"type\": \"object\","]
26133#[doc = " \"required\": ["]
26134#[doc = " \"finality\""]
26135#[doc = " ],"]
26136#[doc = " \"properties\": {"]
26137#[doc = " \"finality\": {"]
26138#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
26139#[doc = " }"]
26140#[doc = " }"]
26141#[doc = " },"]
26142#[doc = " {"]
26143#[doc = " \"type\": \"object\","]
26144#[doc = " \"required\": ["]
26145#[doc = " \"account_ids\","]
26146#[doc = " \"changes_type\""]
26147#[doc = " ],"]
26148#[doc = " \"properties\": {"]
26149#[doc = " \"account_ids\": {"]
26150#[doc = " \"type\": \"array\","]
26151#[doc = " \"items\": {"]
26152#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26153#[doc = " }"]
26154#[doc = " },"]
26155#[doc = " \"changes_type\": {"]
26156#[doc = " \"type\": \"string\","]
26157#[doc = " \"enum\": ["]
26158#[doc = " \"contract_code_changes\""]
26159#[doc = " ]"]
26160#[doc = " }"]
26161#[doc = " }"]
26162#[doc = " }"]
26163#[doc = " ]"]
26164#[doc = " },"]
26165#[doc = " {"]
26166#[doc = " \"title\": \"data_changes_by_finality\","]
26167#[doc = " \"allOf\": ["]
26168#[doc = " {"]
26169#[doc = " \"type\": \"object\","]
26170#[doc = " \"required\": ["]
26171#[doc = " \"finality\""]
26172#[doc = " ],"]
26173#[doc = " \"properties\": {"]
26174#[doc = " \"finality\": {"]
26175#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
26176#[doc = " }"]
26177#[doc = " }"]
26178#[doc = " },"]
26179#[doc = " {"]
26180#[doc = " \"type\": \"object\","]
26181#[doc = " \"required\": ["]
26182#[doc = " \"account_ids\","]
26183#[doc = " \"changes_type\","]
26184#[doc = " \"key_prefix_base64\""]
26185#[doc = " ],"]
26186#[doc = " \"properties\": {"]
26187#[doc = " \"account_ids\": {"]
26188#[doc = " \"type\": \"array\","]
26189#[doc = " \"items\": {"]
26190#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26191#[doc = " }"]
26192#[doc = " },"]
26193#[doc = " \"changes_type\": {"]
26194#[doc = " \"type\": \"string\","]
26195#[doc = " \"enum\": ["]
26196#[doc = " \"data_changes\""]
26197#[doc = " ]"]
26198#[doc = " },"]
26199#[doc = " \"key_prefix_base64\": {"]
26200#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
26201#[doc = " }"]
26202#[doc = " }"]
26203#[doc = " }"]
26204#[doc = " ]"]
26205#[doc = " },"]
26206#[doc = " {"]
26207#[doc = " \"title\": \"account_changes_by_sync_checkpoint\","]
26208#[doc = " \"allOf\": ["]
26209#[doc = " {"]
26210#[doc = " \"type\": \"object\","]
26211#[doc = " \"required\": ["]
26212#[doc = " \"sync_checkpoint\""]
26213#[doc = " ],"]
26214#[doc = " \"properties\": {"]
26215#[doc = " \"sync_checkpoint\": {"]
26216#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26217#[doc = " }"]
26218#[doc = " }"]
26219#[doc = " },"]
26220#[doc = " {"]
26221#[doc = " \"type\": \"object\","]
26222#[doc = " \"required\": ["]
26223#[doc = " \"account_ids\","]
26224#[doc = " \"changes_type\""]
26225#[doc = " ],"]
26226#[doc = " \"properties\": {"]
26227#[doc = " \"account_ids\": {"]
26228#[doc = " \"type\": \"array\","]
26229#[doc = " \"items\": {"]
26230#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26231#[doc = " }"]
26232#[doc = " },"]
26233#[doc = " \"changes_type\": {"]
26234#[doc = " \"type\": \"string\","]
26235#[doc = " \"enum\": ["]
26236#[doc = " \"account_changes\""]
26237#[doc = " ]"]
26238#[doc = " }"]
26239#[doc = " }"]
26240#[doc = " }"]
26241#[doc = " ]"]
26242#[doc = " },"]
26243#[doc = " {"]
26244#[doc = " \"title\": \"single_access_key_changes_by_sync_checkpoint\","]
26245#[doc = " \"allOf\": ["]
26246#[doc = " {"]
26247#[doc = " \"type\": \"object\","]
26248#[doc = " \"required\": ["]
26249#[doc = " \"sync_checkpoint\""]
26250#[doc = " ],"]
26251#[doc = " \"properties\": {"]
26252#[doc = " \"sync_checkpoint\": {"]
26253#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26254#[doc = " }"]
26255#[doc = " }"]
26256#[doc = " },"]
26257#[doc = " {"]
26258#[doc = " \"type\": \"object\","]
26259#[doc = " \"required\": ["]
26260#[doc = " \"changes_type\","]
26261#[doc = " \"keys\""]
26262#[doc = " ],"]
26263#[doc = " \"properties\": {"]
26264#[doc = " \"changes_type\": {"]
26265#[doc = " \"type\": \"string\","]
26266#[doc = " \"enum\": ["]
26267#[doc = " \"single_access_key_changes\""]
26268#[doc = " ]"]
26269#[doc = " },"]
26270#[doc = " \"keys\": {"]
26271#[doc = " \"type\": \"array\","]
26272#[doc = " \"items\": {"]
26273#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26274#[doc = " }"]
26275#[doc = " }"]
26276#[doc = " }"]
26277#[doc = " }"]
26278#[doc = " ]"]
26279#[doc = " },"]
26280#[doc = " {"]
26281#[doc = " \"title\": \"single_gas_key_changes_by_sync_checkpoint\","]
26282#[doc = " \"allOf\": ["]
26283#[doc = " {"]
26284#[doc = " \"type\": \"object\","]
26285#[doc = " \"required\": ["]
26286#[doc = " \"sync_checkpoint\""]
26287#[doc = " ],"]
26288#[doc = " \"properties\": {"]
26289#[doc = " \"sync_checkpoint\": {"]
26290#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26291#[doc = " }"]
26292#[doc = " }"]
26293#[doc = " },"]
26294#[doc = " {"]
26295#[doc = " \"type\": \"object\","]
26296#[doc = " \"required\": ["]
26297#[doc = " \"changes_type\","]
26298#[doc = " \"keys\""]
26299#[doc = " ],"]
26300#[doc = " \"properties\": {"]
26301#[doc = " \"changes_type\": {"]
26302#[doc = " \"type\": \"string\","]
26303#[doc = " \"enum\": ["]
26304#[doc = " \"single_gas_key_changes\""]
26305#[doc = " ]"]
26306#[doc = " },"]
26307#[doc = " \"keys\": {"]
26308#[doc = " \"type\": \"array\","]
26309#[doc = " \"items\": {"]
26310#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
26311#[doc = " }"]
26312#[doc = " }"]
26313#[doc = " }"]
26314#[doc = " }"]
26315#[doc = " ]"]
26316#[doc = " },"]
26317#[doc = " {"]
26318#[doc = " \"title\": \"all_access_key_changes_by_sync_checkpoint\","]
26319#[doc = " \"allOf\": ["]
26320#[doc = " {"]
26321#[doc = " \"type\": \"object\","]
26322#[doc = " \"required\": ["]
26323#[doc = " \"sync_checkpoint\""]
26324#[doc = " ],"]
26325#[doc = " \"properties\": {"]
26326#[doc = " \"sync_checkpoint\": {"]
26327#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26328#[doc = " }"]
26329#[doc = " }"]
26330#[doc = " },"]
26331#[doc = " {"]
26332#[doc = " \"type\": \"object\","]
26333#[doc = " \"required\": ["]
26334#[doc = " \"account_ids\","]
26335#[doc = " \"changes_type\""]
26336#[doc = " ],"]
26337#[doc = " \"properties\": {"]
26338#[doc = " \"account_ids\": {"]
26339#[doc = " \"type\": \"array\","]
26340#[doc = " \"items\": {"]
26341#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26342#[doc = " }"]
26343#[doc = " },"]
26344#[doc = " \"changes_type\": {"]
26345#[doc = " \"type\": \"string\","]
26346#[doc = " \"enum\": ["]
26347#[doc = " \"all_access_key_changes\""]
26348#[doc = " ]"]
26349#[doc = " }"]
26350#[doc = " }"]
26351#[doc = " }"]
26352#[doc = " ]"]
26353#[doc = " },"]
26354#[doc = " {"]
26355#[doc = " \"title\": \"all_gas_key_changes_by_sync_checkpoint\","]
26356#[doc = " \"allOf\": ["]
26357#[doc = " {"]
26358#[doc = " \"type\": \"object\","]
26359#[doc = " \"required\": ["]
26360#[doc = " \"sync_checkpoint\""]
26361#[doc = " ],"]
26362#[doc = " \"properties\": {"]
26363#[doc = " \"sync_checkpoint\": {"]
26364#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26365#[doc = " }"]
26366#[doc = " }"]
26367#[doc = " },"]
26368#[doc = " {"]
26369#[doc = " \"type\": \"object\","]
26370#[doc = " \"required\": ["]
26371#[doc = " \"account_ids\","]
26372#[doc = " \"changes_type\""]
26373#[doc = " ],"]
26374#[doc = " \"properties\": {"]
26375#[doc = " \"account_ids\": {"]
26376#[doc = " \"type\": \"array\","]
26377#[doc = " \"items\": {"]
26378#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26379#[doc = " }"]
26380#[doc = " },"]
26381#[doc = " \"changes_type\": {"]
26382#[doc = " \"type\": \"string\","]
26383#[doc = " \"enum\": ["]
26384#[doc = " \"all_gas_key_changes\""]
26385#[doc = " ]"]
26386#[doc = " }"]
26387#[doc = " }"]
26388#[doc = " }"]
26389#[doc = " ]"]
26390#[doc = " },"]
26391#[doc = " {"]
26392#[doc = " \"title\": \"contract_code_changes_by_sync_checkpoint\","]
26393#[doc = " \"allOf\": ["]
26394#[doc = " {"]
26395#[doc = " \"type\": \"object\","]
26396#[doc = " \"required\": ["]
26397#[doc = " \"sync_checkpoint\""]
26398#[doc = " ],"]
26399#[doc = " \"properties\": {"]
26400#[doc = " \"sync_checkpoint\": {"]
26401#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26402#[doc = " }"]
26403#[doc = " }"]
26404#[doc = " },"]
26405#[doc = " {"]
26406#[doc = " \"type\": \"object\","]
26407#[doc = " \"required\": ["]
26408#[doc = " \"account_ids\","]
26409#[doc = " \"changes_type\""]
26410#[doc = " ],"]
26411#[doc = " \"properties\": {"]
26412#[doc = " \"account_ids\": {"]
26413#[doc = " \"type\": \"array\","]
26414#[doc = " \"items\": {"]
26415#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26416#[doc = " }"]
26417#[doc = " },"]
26418#[doc = " \"changes_type\": {"]
26419#[doc = " \"type\": \"string\","]
26420#[doc = " \"enum\": ["]
26421#[doc = " \"contract_code_changes\""]
26422#[doc = " ]"]
26423#[doc = " }"]
26424#[doc = " }"]
26425#[doc = " }"]
26426#[doc = " ]"]
26427#[doc = " },"]
26428#[doc = " {"]
26429#[doc = " \"title\": \"data_changes_by_sync_checkpoint\","]
26430#[doc = " \"allOf\": ["]
26431#[doc = " {"]
26432#[doc = " \"type\": \"object\","]
26433#[doc = " \"required\": ["]
26434#[doc = " \"sync_checkpoint\""]
26435#[doc = " ],"]
26436#[doc = " \"properties\": {"]
26437#[doc = " \"sync_checkpoint\": {"]
26438#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26439#[doc = " }"]
26440#[doc = " }"]
26441#[doc = " },"]
26442#[doc = " {"]
26443#[doc = " \"type\": \"object\","]
26444#[doc = " \"required\": ["]
26445#[doc = " \"account_ids\","]
26446#[doc = " \"changes_type\","]
26447#[doc = " \"key_prefix_base64\""]
26448#[doc = " ],"]
26449#[doc = " \"properties\": {"]
26450#[doc = " \"account_ids\": {"]
26451#[doc = " \"type\": \"array\","]
26452#[doc = " \"items\": {"]
26453#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26454#[doc = " }"]
26455#[doc = " },"]
26456#[doc = " \"changes_type\": {"]
26457#[doc = " \"type\": \"string\","]
26458#[doc = " \"enum\": ["]
26459#[doc = " \"data_changes\""]
26460#[doc = " ]"]
26461#[doc = " },"]
26462#[doc = " \"key_prefix_base64\": {"]
26463#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
26464#[doc = " }"]
26465#[doc = " }"]
26466#[doc = " }"]
26467#[doc = " ]"]
26468#[doc = " }"]
26469#[doc = " ]"]
26470#[doc = "}"]
26471#[doc = r" ```"]
26472#[doc = r" </details>"]
26473#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26474#[serde(untagged)]
26475pub enum RpcStateChangesInBlockByTypeRequest {
26476 AccountChangesByBlockId {
26477 account_ids: ::std::vec::Vec<AccountId>,
26478 block_id: BlockId,
26479 changes_type: AccountChangesByBlockIdChangesType,
26480 },
26481 SingleAccessKeyChangesByBlockId {
26482 block_id: BlockId,
26483 changes_type: SingleAccessKeyChangesByBlockIdChangesType,
26484 keys: ::std::vec::Vec<AccountWithPublicKey>,
26485 },
26486 SingleGasKeyChangesByBlockId {
26487 block_id: BlockId,
26488 changes_type: SingleGasKeyChangesByBlockIdChangesType,
26489 keys: ::std::vec::Vec<AccountWithPublicKey>,
26490 },
26491 AllAccessKeyChangesByBlockId {
26492 account_ids: ::std::vec::Vec<AccountId>,
26493 block_id: BlockId,
26494 changes_type: AllAccessKeyChangesByBlockIdChangesType,
26495 },
26496 AllGasKeyChangesByBlockId {
26497 account_ids: ::std::vec::Vec<AccountId>,
26498 block_id: BlockId,
26499 changes_type: AllGasKeyChangesByBlockIdChangesType,
26500 },
26501 ContractCodeChangesByBlockId {
26502 account_ids: ::std::vec::Vec<AccountId>,
26503 block_id: BlockId,
26504 changes_type: ContractCodeChangesByBlockIdChangesType,
26505 },
26506 DataChangesByBlockId {
26507 account_ids: ::std::vec::Vec<AccountId>,
26508 block_id: BlockId,
26509 changes_type: DataChangesByBlockIdChangesType,
26510 key_prefix_base64: StoreKey,
26511 },
26512 AccountChangesByFinality {
26513 account_ids: ::std::vec::Vec<AccountId>,
26514 changes_type: AccountChangesByFinalityChangesType,
26515 finality: Finality,
26516 },
26517 SingleAccessKeyChangesByFinality {
26518 changes_type: SingleAccessKeyChangesByFinalityChangesType,
26519 finality: Finality,
26520 keys: ::std::vec::Vec<AccountWithPublicKey>,
26521 },
26522 SingleGasKeyChangesByFinality {
26523 changes_type: SingleGasKeyChangesByFinalityChangesType,
26524 finality: Finality,
26525 keys: ::std::vec::Vec<AccountWithPublicKey>,
26526 },
26527 AllAccessKeyChangesByFinality {
26528 account_ids: ::std::vec::Vec<AccountId>,
26529 changes_type: AllAccessKeyChangesByFinalityChangesType,
26530 finality: Finality,
26531 },
26532 AllGasKeyChangesByFinality {
26533 account_ids: ::std::vec::Vec<AccountId>,
26534 changes_type: AllGasKeyChangesByFinalityChangesType,
26535 finality: Finality,
26536 },
26537 ContractCodeChangesByFinality {
26538 account_ids: ::std::vec::Vec<AccountId>,
26539 changes_type: ContractCodeChangesByFinalityChangesType,
26540 finality: Finality,
26541 },
26542 DataChangesByFinality {
26543 account_ids: ::std::vec::Vec<AccountId>,
26544 changes_type: DataChangesByFinalityChangesType,
26545 finality: Finality,
26546 key_prefix_base64: StoreKey,
26547 },
26548 AccountChangesBySyncCheckpoint {
26549 account_ids: ::std::vec::Vec<AccountId>,
26550 changes_type: AccountChangesBySyncCheckpointChangesType,
26551 sync_checkpoint: SyncCheckpoint,
26552 },
26553 SingleAccessKeyChangesBySyncCheckpoint {
26554 changes_type: SingleAccessKeyChangesBySyncCheckpointChangesType,
26555 keys: ::std::vec::Vec<AccountWithPublicKey>,
26556 sync_checkpoint: SyncCheckpoint,
26557 },
26558 SingleGasKeyChangesBySyncCheckpoint {
26559 changes_type: SingleGasKeyChangesBySyncCheckpointChangesType,
26560 keys: ::std::vec::Vec<AccountWithPublicKey>,
26561 sync_checkpoint: SyncCheckpoint,
26562 },
26563 AllAccessKeyChangesBySyncCheckpoint {
26564 account_ids: ::std::vec::Vec<AccountId>,
26565 changes_type: AllAccessKeyChangesBySyncCheckpointChangesType,
26566 sync_checkpoint: SyncCheckpoint,
26567 },
26568 AllGasKeyChangesBySyncCheckpoint {
26569 account_ids: ::std::vec::Vec<AccountId>,
26570 changes_type: AllGasKeyChangesBySyncCheckpointChangesType,
26571 sync_checkpoint: SyncCheckpoint,
26572 },
26573 ContractCodeChangesBySyncCheckpoint {
26574 account_ids: ::std::vec::Vec<AccountId>,
26575 changes_type: ContractCodeChangesBySyncCheckpointChangesType,
26576 sync_checkpoint: SyncCheckpoint,
26577 },
26578 DataChangesBySyncCheckpoint {
26579 account_ids: ::std::vec::Vec<AccountId>,
26580 changes_type: DataChangesBySyncCheckpointChangesType,
26581 key_prefix_base64: StoreKey,
26582 sync_checkpoint: SyncCheckpoint,
26583 },
26584}
26585impl ::std::convert::From<&Self> for RpcStateChangesInBlockByTypeRequest {
26586 fn from(value: &RpcStateChangesInBlockByTypeRequest) -> Self {
26587 value.clone()
26588 }
26589}
26590#[doc = "`RpcStateChangesInBlockByTypeResponse`"]
26591#[doc = r""]
26592#[doc = r" <details><summary>JSON schema</summary>"]
26593#[doc = r""]
26594#[doc = r" ```json"]
26595#[doc = "{"]
26596#[doc = " \"type\": \"object\","]
26597#[doc = " \"required\": ["]
26598#[doc = " \"block_hash\","]
26599#[doc = " \"changes\""]
26600#[doc = " ],"]
26601#[doc = " \"properties\": {"]
26602#[doc = " \"block_hash\": {"]
26603#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
26604#[doc = " },"]
26605#[doc = " \"changes\": {"]
26606#[doc = " \"type\": \"array\","]
26607#[doc = " \"items\": {"]
26608#[doc = " \"$ref\": \"#/components/schemas/StateChangeKindView\""]
26609#[doc = " }"]
26610#[doc = " }"]
26611#[doc = " }"]
26612#[doc = "}"]
26613#[doc = r" ```"]
26614#[doc = r" </details>"]
26615#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26616pub struct RpcStateChangesInBlockByTypeResponse {
26617 pub block_hash: CryptoHash,
26618 pub changes: ::std::vec::Vec<StateChangeKindView>,
26619}
26620impl ::std::convert::From<&RpcStateChangesInBlockByTypeResponse>
26621 for RpcStateChangesInBlockByTypeResponse
26622{
26623 fn from(value: &RpcStateChangesInBlockByTypeResponse) -> Self {
26624 value.clone()
26625 }
26626}
26627#[doc = "`RpcStateChangesInBlockRequest`"]
26628#[doc = r""]
26629#[doc = r" <details><summary>JSON schema</summary>"]
26630#[doc = r""]
26631#[doc = r" ```json"]
26632#[doc = "{"]
26633#[doc = " \"title\": \"RpcStateChangesInBlockRequest\","]
26634#[doc = " \"type\": \"object\","]
26635#[doc = " \"oneOf\": ["]
26636#[doc = " {"]
26637#[doc = " \"type\": \"object\","]
26638#[doc = " \"required\": ["]
26639#[doc = " \"block_id\""]
26640#[doc = " ],"]
26641#[doc = " \"properties\": {"]
26642#[doc = " \"block_id\": {"]
26643#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
26644#[doc = " }"]
26645#[doc = " }"]
26646#[doc = " },"]
26647#[doc = " {"]
26648#[doc = " \"type\": \"object\","]
26649#[doc = " \"required\": ["]
26650#[doc = " \"finality\""]
26651#[doc = " ],"]
26652#[doc = " \"properties\": {"]
26653#[doc = " \"finality\": {"]
26654#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
26655#[doc = " }"]
26656#[doc = " }"]
26657#[doc = " },"]
26658#[doc = " {"]
26659#[doc = " \"type\": \"object\","]
26660#[doc = " \"required\": ["]
26661#[doc = " \"sync_checkpoint\""]
26662#[doc = " ],"]
26663#[doc = " \"properties\": {"]
26664#[doc = " \"sync_checkpoint\": {"]
26665#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
26666#[doc = " }"]
26667#[doc = " }"]
26668#[doc = " }"]
26669#[doc = " ]"]
26670#[doc = "}"]
26671#[doc = r" ```"]
26672#[doc = r" </details>"]
26673#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26674pub enum RpcStateChangesInBlockRequest {
26675 #[serde(rename = "block_id")]
26676 BlockId(BlockId),
26677 #[serde(rename = "finality")]
26678 Finality(Finality),
26679 #[serde(rename = "sync_checkpoint")]
26680 SyncCheckpoint(SyncCheckpoint),
26681}
26682impl ::std::convert::From<&Self> for RpcStateChangesInBlockRequest {
26683 fn from(value: &RpcStateChangesInBlockRequest) -> Self {
26684 value.clone()
26685 }
26686}
26687impl ::std::convert::From<BlockId> for RpcStateChangesInBlockRequest {
26688 fn from(value: BlockId) -> Self {
26689 Self::BlockId(value)
26690 }
26691}
26692impl ::std::convert::From<Finality> for RpcStateChangesInBlockRequest {
26693 fn from(value: Finality) -> Self {
26694 Self::Finality(value)
26695 }
26696}
26697impl ::std::convert::From<SyncCheckpoint> for RpcStateChangesInBlockRequest {
26698 fn from(value: SyncCheckpoint) -> Self {
26699 Self::SyncCheckpoint(value)
26700 }
26701}
26702#[doc = "`RpcStateChangesInBlockResponse`"]
26703#[doc = r""]
26704#[doc = r" <details><summary>JSON schema</summary>"]
26705#[doc = r""]
26706#[doc = r" ```json"]
26707#[doc = "{"]
26708#[doc = " \"type\": \"object\","]
26709#[doc = " \"required\": ["]
26710#[doc = " \"block_hash\","]
26711#[doc = " \"changes\""]
26712#[doc = " ],"]
26713#[doc = " \"properties\": {"]
26714#[doc = " \"block_hash\": {"]
26715#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
26716#[doc = " },"]
26717#[doc = " \"changes\": {"]
26718#[doc = " \"type\": \"array\","]
26719#[doc = " \"items\": {"]
26720#[doc = " \"$ref\": \"#/components/schemas/StateChangeWithCauseView\""]
26721#[doc = " }"]
26722#[doc = " }"]
26723#[doc = " }"]
26724#[doc = "}"]
26725#[doc = r" ```"]
26726#[doc = r" </details>"]
26727#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26728pub struct RpcStateChangesInBlockResponse {
26729 pub block_hash: CryptoHash,
26730 pub changes: ::std::vec::Vec<StateChangeWithCauseView>,
26731}
26732impl ::std::convert::From<&RpcStateChangesInBlockResponse> for RpcStateChangesInBlockResponse {
26733 fn from(value: &RpcStateChangesInBlockResponse) -> Self {
26734 value.clone()
26735 }
26736}
26737#[doc = "`RpcStatusError`"]
26738#[doc = r""]
26739#[doc = r" <details><summary>JSON schema</summary>"]
26740#[doc = r""]
26741#[doc = r" ```json"]
26742#[doc = "{"]
26743#[doc = " \"oneOf\": ["]
26744#[doc = " {"]
26745#[doc = " \"type\": \"object\","]
26746#[doc = " \"required\": ["]
26747#[doc = " \"name\""]
26748#[doc = " ],"]
26749#[doc = " \"properties\": {"]
26750#[doc = " \"name\": {"]
26751#[doc = " \"type\": \"string\","]
26752#[doc = " \"enum\": ["]
26753#[doc = " \"NODE_IS_SYNCING\""]
26754#[doc = " ]"]
26755#[doc = " }"]
26756#[doc = " }"]
26757#[doc = " },"]
26758#[doc = " {"]
26759#[doc = " \"type\": \"object\","]
26760#[doc = " \"required\": ["]
26761#[doc = " \"info\","]
26762#[doc = " \"name\""]
26763#[doc = " ],"]
26764#[doc = " \"properties\": {"]
26765#[doc = " \"info\": {"]
26766#[doc = " \"type\": \"object\","]
26767#[doc = " \"required\": ["]
26768#[doc = " \"elapsed\""]
26769#[doc = " ],"]
26770#[doc = " \"properties\": {"]
26771#[doc = " \"elapsed\": {"]
26772#[doc = " \"type\": \"array\","]
26773#[doc = " \"items\": {"]
26774#[doc = " \"type\": \"integer\","]
26775#[doc = " \"format\": \"uint64\","]
26776#[doc = " \"minimum\": 0.0"]
26777#[doc = " },"]
26778#[doc = " \"maxItems\": 2,"]
26779#[doc = " \"minItems\": 2"]
26780#[doc = " }"]
26781#[doc = " }"]
26782#[doc = " },"]
26783#[doc = " \"name\": {"]
26784#[doc = " \"type\": \"string\","]
26785#[doc = " \"enum\": ["]
26786#[doc = " \"NO_NEW_BLOCKS\""]
26787#[doc = " ]"]
26788#[doc = " }"]
26789#[doc = " }"]
26790#[doc = " },"]
26791#[doc = " {"]
26792#[doc = " \"type\": \"object\","]
26793#[doc = " \"required\": ["]
26794#[doc = " \"info\","]
26795#[doc = " \"name\""]
26796#[doc = " ],"]
26797#[doc = " \"properties\": {"]
26798#[doc = " \"info\": {"]
26799#[doc = " \"type\": \"object\","]
26800#[doc = " \"required\": ["]
26801#[doc = " \"epoch_id\""]
26802#[doc = " ],"]
26803#[doc = " \"properties\": {"]
26804#[doc = " \"epoch_id\": {"]
26805#[doc = " \"$ref\": \"#/components/schemas/EpochId\""]
26806#[doc = " }"]
26807#[doc = " }"]
26808#[doc = " },"]
26809#[doc = " \"name\": {"]
26810#[doc = " \"type\": \"string\","]
26811#[doc = " \"enum\": ["]
26812#[doc = " \"EPOCH_OUT_OF_BOUNDS\""]
26813#[doc = " ]"]
26814#[doc = " }"]
26815#[doc = " }"]
26816#[doc = " },"]
26817#[doc = " {"]
26818#[doc = " \"type\": \"object\","]
26819#[doc = " \"required\": ["]
26820#[doc = " \"info\","]
26821#[doc = " \"name\""]
26822#[doc = " ],"]
26823#[doc = " \"properties\": {"]
26824#[doc = " \"info\": {"]
26825#[doc = " \"type\": \"object\","]
26826#[doc = " \"required\": ["]
26827#[doc = " \"error_message\""]
26828#[doc = " ],"]
26829#[doc = " \"properties\": {"]
26830#[doc = " \"error_message\": {"]
26831#[doc = " \"type\": \"string\""]
26832#[doc = " }"]
26833#[doc = " }"]
26834#[doc = " },"]
26835#[doc = " \"name\": {"]
26836#[doc = " \"type\": \"string\","]
26837#[doc = " \"enum\": ["]
26838#[doc = " \"INTERNAL_ERROR\""]
26839#[doc = " ]"]
26840#[doc = " }"]
26841#[doc = " }"]
26842#[doc = " }"]
26843#[doc = " ]"]
26844#[doc = "}"]
26845#[doc = r" ```"]
26846#[doc = r" </details>"]
26847#[derive(
26848 :: serde :: Deserialize,
26849 :: serde :: Serialize,
26850 Clone,
26851 Debug,
26852 thiserror::Error,
26853 strum_macros::Display,
26854)]
26855#[serde(tag = "name", content = "info")]
26856pub enum RpcStatusError {
26857 #[serde(rename = "NODE_IS_SYNCING")]
26858 NodeIsSyncing,
26859 #[serde(rename = "NO_NEW_BLOCKS")]
26860 NoNewBlocks { elapsed: [u64; 2usize] },
26861 #[serde(rename = "EPOCH_OUT_OF_BOUNDS")]
26862 EpochOutOfBounds { epoch_id: EpochId },
26863 #[serde(rename = "INTERNAL_ERROR")]
26864 InternalError {
26865 error_message: ::std::string::String,
26866 },
26867}
26868impl ::std::convert::From<&Self> for RpcStatusError {
26869 fn from(value: &RpcStatusError) -> Self {
26870 value.clone()
26871 }
26872}
26873#[doc = "`RpcStatusRequest`"]
26874#[doc = r""]
26875#[doc = r" <details><summary>JSON schema</summary>"]
26876#[doc = r""]
26877#[doc = r" ```json"]
26878#[doc = "{"]
26879#[doc = " \"title\": \"RpcStatusRequest\","]
26880#[doc = " \"type\": \"null\""]
26881#[doc = "}"]
26882#[doc = r" ```"]
26883#[doc = r" </details>"]
26884#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26885#[serde(transparent)]
26886pub struct RpcStatusRequest(pub ());
26887impl ::std::ops::Deref for RpcStatusRequest {
26888 type Target = ();
26889 fn deref(&self) -> &() {
26890 &self.0
26891 }
26892}
26893impl ::std::convert::From<RpcStatusRequest> for () {
26894 fn from(value: RpcStatusRequest) -> Self {
26895 value.0
26896 }
26897}
26898impl ::std::convert::From<&RpcStatusRequest> for RpcStatusRequest {
26899 fn from(value: &RpcStatusRequest) -> Self {
26900 value.clone()
26901 }
26902}
26903impl ::std::convert::From<()> for RpcStatusRequest {
26904 fn from(value: ()) -> Self {
26905 Self(value)
26906 }
26907}
26908#[doc = "`RpcStatusResponse`"]
26909#[doc = r""]
26910#[doc = r" <details><summary>JSON schema</summary>"]
26911#[doc = r""]
26912#[doc = r" ```json"]
26913#[doc = "{"]
26914#[doc = " \"type\": \"object\","]
26915#[doc = " \"required\": ["]
26916#[doc = " \"chain_id\","]
26917#[doc = " \"genesis_hash\","]
26918#[doc = " \"latest_protocol_version\","]
26919#[doc = " \"node_public_key\","]
26920#[doc = " \"protocol_version\","]
26921#[doc = " \"sync_info\","]
26922#[doc = " \"uptime_sec\","]
26923#[doc = " \"validators\","]
26924#[doc = " \"version\""]
26925#[doc = " ],"]
26926#[doc = " \"properties\": {"]
26927#[doc = " \"chain_id\": {"]
26928#[doc = " \"description\": \"Unique chain id.\","]
26929#[doc = " \"type\": \"string\""]
26930#[doc = " },"]
26931#[doc = " \"detailed_debug_status\": {"]
26932#[doc = " \"description\": \"Information about last blocks, network, epoch and chain & chunk info.\","]
26933#[doc = " \"anyOf\": ["]
26934#[doc = " {"]
26935#[doc = " \"$ref\": \"#/components/schemas/DetailedDebugStatus\""]
26936#[doc = " },"]
26937#[doc = " {"]
26938#[doc = " \"type\": \"null\""]
26939#[doc = " }"]
26940#[doc = " ]"]
26941#[doc = " },"]
26942#[doc = " \"genesis_hash\": {"]
26943#[doc = " \"description\": \"Genesis hash of the chain.\","]
26944#[doc = " \"allOf\": ["]
26945#[doc = " {"]
26946#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
26947#[doc = " }"]
26948#[doc = " ]"]
26949#[doc = " },"]
26950#[doc = " \"latest_protocol_version\": {"]
26951#[doc = " \"description\": \"Latest protocol version that this client supports.\","]
26952#[doc = " \"type\": \"integer\","]
26953#[doc = " \"format\": \"uint32\","]
26954#[doc = " \"minimum\": 0.0"]
26955#[doc = " },"]
26956#[doc = " \"node_key\": {"]
26957#[doc = " \"description\": \"Deprecated; same as `validator_public_key` which you should use instead.\","]
26958#[doc = " \"anyOf\": ["]
26959#[doc = " {"]
26960#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
26961#[doc = " },"]
26962#[doc = " {"]
26963#[doc = " \"type\": \"null\""]
26964#[doc = " }"]
26965#[doc = " ]"]
26966#[doc = " },"]
26967#[doc = " \"node_public_key\": {"]
26968#[doc = " \"description\": \"Public key of the node.\","]
26969#[doc = " \"allOf\": ["]
26970#[doc = " {"]
26971#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
26972#[doc = " }"]
26973#[doc = " ]"]
26974#[doc = " },"]
26975#[doc = " \"protocol_version\": {"]
26976#[doc = " \"description\": \"Currently active protocol version.\","]
26977#[doc = " \"type\": \"integer\","]
26978#[doc = " \"format\": \"uint32\","]
26979#[doc = " \"minimum\": 0.0"]
26980#[doc = " },"]
26981#[doc = " \"rpc_addr\": {"]
26982#[doc = " \"description\": \"Address for RPC server. None if node doesn't have RPC endpoint enabled.\","]
26983#[doc = " \"type\": ["]
26984#[doc = " \"string\","]
26985#[doc = " \"null\""]
26986#[doc = " ]"]
26987#[doc = " },"]
26988#[doc = " \"sync_info\": {"]
26989#[doc = " \"description\": \"Sync status of the node.\","]
26990#[doc = " \"allOf\": ["]
26991#[doc = " {"]
26992#[doc = " \"$ref\": \"#/components/schemas/StatusSyncInfo\""]
26993#[doc = " }"]
26994#[doc = " ]"]
26995#[doc = " },"]
26996#[doc = " \"uptime_sec\": {"]
26997#[doc = " \"description\": \"Uptime of the node.\","]
26998#[doc = " \"type\": \"integer\","]
26999#[doc = " \"format\": \"int64\""]
27000#[doc = " },"]
27001#[doc = " \"validator_account_id\": {"]
27002#[doc = " \"description\": \"Validator id of the node\","]
27003#[doc = " \"anyOf\": ["]
27004#[doc = " {"]
27005#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
27006#[doc = " },"]
27007#[doc = " {"]
27008#[doc = " \"type\": \"null\""]
27009#[doc = " }"]
27010#[doc = " ]"]
27011#[doc = " },"]
27012#[doc = " \"validator_public_key\": {"]
27013#[doc = " \"description\": \"Public key of the validator.\","]
27014#[doc = " \"anyOf\": ["]
27015#[doc = " {"]
27016#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
27017#[doc = " },"]
27018#[doc = " {"]
27019#[doc = " \"type\": \"null\""]
27020#[doc = " }"]
27021#[doc = " ]"]
27022#[doc = " },"]
27023#[doc = " \"validators\": {"]
27024#[doc = " \"description\": \"Current epoch validators.\","]
27025#[doc = " \"type\": \"array\","]
27026#[doc = " \"items\": {"]
27027#[doc = " \"$ref\": \"#/components/schemas/ValidatorInfo\""]
27028#[doc = " }"]
27029#[doc = " },"]
27030#[doc = " \"version\": {"]
27031#[doc = " \"description\": \"Binary version.\","]
27032#[doc = " \"allOf\": ["]
27033#[doc = " {"]
27034#[doc = " \"$ref\": \"#/components/schemas/Version\""]
27035#[doc = " }"]
27036#[doc = " ]"]
27037#[doc = " }"]
27038#[doc = " }"]
27039#[doc = "}"]
27040#[doc = r" ```"]
27041#[doc = r" </details>"]
27042#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27043pub struct RpcStatusResponse {
27044 #[doc = "Unique chain id."]
27045 pub chain_id: ::std::string::String,
27046 #[doc = "Information about last blocks, network, epoch and chain & chunk info."]
27047 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27048 pub detailed_debug_status: ::std::option::Option<DetailedDebugStatus>,
27049 #[doc = "Genesis hash of the chain."]
27050 pub genesis_hash: CryptoHash,
27051 #[doc = "Latest protocol version that this client supports."]
27052 pub latest_protocol_version: u32,
27053 #[doc = "Deprecated; same as `validator_public_key` which you should use instead."]
27054 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27055 pub node_key: ::std::option::Option<PublicKey>,
27056 #[doc = "Public key of the node."]
27057 pub node_public_key: PublicKey,
27058 #[doc = "Currently active protocol version."]
27059 pub protocol_version: u32,
27060 #[doc = "Address for RPC server. None if node doesn't have RPC endpoint enabled."]
27061 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27062 pub rpc_addr: ::std::option::Option<::std::string::String>,
27063 #[doc = "Sync status of the node."]
27064 pub sync_info: StatusSyncInfo,
27065 #[doc = "Uptime of the node."]
27066 pub uptime_sec: i64,
27067 #[doc = "Validator id of the node"]
27068 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27069 pub validator_account_id: ::std::option::Option<AccountId>,
27070 #[doc = "Public key of the validator."]
27071 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27072 pub validator_public_key: ::std::option::Option<PublicKey>,
27073 #[doc = "Current epoch validators."]
27074 pub validators: ::std::vec::Vec<ValidatorInfo>,
27075 #[doc = "Binary version."]
27076 pub version: Version,
27077}
27078impl ::std::convert::From<&RpcStatusResponse> for RpcStatusResponse {
27079 fn from(value: &RpcStatusResponse) -> Self {
27080 value.clone()
27081 }
27082}
27083#[doc = "`RpcTransactionError`"]
27084#[doc = r""]
27085#[doc = r" <details><summary>JSON schema</summary>"]
27086#[doc = r""]
27087#[doc = r" ```json"]
27088#[doc = "{"]
27089#[doc = " \"oneOf\": ["]
27090#[doc = " {"]
27091#[doc = " \"type\": \"object\","]
27092#[doc = " \"required\": ["]
27093#[doc = " \"info\","]
27094#[doc = " \"name\""]
27095#[doc = " ],"]
27096#[doc = " \"properties\": {"]
27097#[doc = " \"info\": {"]
27098#[doc = " \"type\": \"object\""]
27099#[doc = " },"]
27100#[doc = " \"name\": {"]
27101#[doc = " \"type\": \"string\","]
27102#[doc = " \"enum\": ["]
27103#[doc = " \"INVALID_TRANSACTION\""]
27104#[doc = " ]"]
27105#[doc = " }"]
27106#[doc = " }"]
27107#[doc = " },"]
27108#[doc = " {"]
27109#[doc = " \"type\": \"object\","]
27110#[doc = " \"required\": ["]
27111#[doc = " \"name\""]
27112#[doc = " ],"]
27113#[doc = " \"properties\": {"]
27114#[doc = " \"name\": {"]
27115#[doc = " \"type\": \"string\","]
27116#[doc = " \"enum\": ["]
27117#[doc = " \"DOES_NOT_TRACK_SHARD\""]
27118#[doc = " ]"]
27119#[doc = " }"]
27120#[doc = " }"]
27121#[doc = " },"]
27122#[doc = " {"]
27123#[doc = " \"type\": \"object\","]
27124#[doc = " \"required\": ["]
27125#[doc = " \"info\","]
27126#[doc = " \"name\""]
27127#[doc = " ],"]
27128#[doc = " \"properties\": {"]
27129#[doc = " \"info\": {"]
27130#[doc = " \"type\": \"object\","]
27131#[doc = " \"required\": ["]
27132#[doc = " \"transaction_hash\""]
27133#[doc = " ],"]
27134#[doc = " \"properties\": {"]
27135#[doc = " \"transaction_hash\": {"]
27136#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
27137#[doc = " }"]
27138#[doc = " }"]
27139#[doc = " },"]
27140#[doc = " \"name\": {"]
27141#[doc = " \"type\": \"string\","]
27142#[doc = " \"enum\": ["]
27143#[doc = " \"REQUEST_ROUTED\""]
27144#[doc = " ]"]
27145#[doc = " }"]
27146#[doc = " }"]
27147#[doc = " },"]
27148#[doc = " {"]
27149#[doc = " \"type\": \"object\","]
27150#[doc = " \"required\": ["]
27151#[doc = " \"info\","]
27152#[doc = " \"name\""]
27153#[doc = " ],"]
27154#[doc = " \"properties\": {"]
27155#[doc = " \"info\": {"]
27156#[doc = " \"type\": \"object\","]
27157#[doc = " \"required\": ["]
27158#[doc = " \"requested_transaction_hash\""]
27159#[doc = " ],"]
27160#[doc = " \"properties\": {"]
27161#[doc = " \"requested_transaction_hash\": {"]
27162#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
27163#[doc = " }"]
27164#[doc = " }"]
27165#[doc = " },"]
27166#[doc = " \"name\": {"]
27167#[doc = " \"type\": \"string\","]
27168#[doc = " \"enum\": ["]
27169#[doc = " \"UNKNOWN_TRANSACTION\""]
27170#[doc = " ]"]
27171#[doc = " }"]
27172#[doc = " }"]
27173#[doc = " },"]
27174#[doc = " {"]
27175#[doc = " \"type\": \"object\","]
27176#[doc = " \"required\": ["]
27177#[doc = " \"info\","]
27178#[doc = " \"name\""]
27179#[doc = " ],"]
27180#[doc = " \"properties\": {"]
27181#[doc = " \"info\": {"]
27182#[doc = " \"type\": \"object\","]
27183#[doc = " \"required\": ["]
27184#[doc = " \"debug_info\""]
27185#[doc = " ],"]
27186#[doc = " \"properties\": {"]
27187#[doc = " \"debug_info\": {"]
27188#[doc = " \"type\": \"string\""]
27189#[doc = " }"]
27190#[doc = " }"]
27191#[doc = " },"]
27192#[doc = " \"name\": {"]
27193#[doc = " \"type\": \"string\","]
27194#[doc = " \"enum\": ["]
27195#[doc = " \"INTERNAL_ERROR\""]
27196#[doc = " ]"]
27197#[doc = " }"]
27198#[doc = " }"]
27199#[doc = " },"]
27200#[doc = " {"]
27201#[doc = " \"type\": \"object\","]
27202#[doc = " \"required\": ["]
27203#[doc = " \"name\""]
27204#[doc = " ],"]
27205#[doc = " \"properties\": {"]
27206#[doc = " \"name\": {"]
27207#[doc = " \"type\": \"string\","]
27208#[doc = " \"enum\": ["]
27209#[doc = " \"TIMEOUT_ERROR\""]
27210#[doc = " ]"]
27211#[doc = " }"]
27212#[doc = " }"]
27213#[doc = " }"]
27214#[doc = " ]"]
27215#[doc = "}"]
27216#[doc = r" ```"]
27217#[doc = r" </details>"]
27218#[derive(
27219 :: serde :: Deserialize,
27220 :: serde :: Serialize,
27221 Clone,
27222 Debug,
27223 thiserror::Error,
27224 strum_macros::Display,
27225)]
27226#[serde(tag = "name", content = "info")]
27227pub enum RpcTransactionError {
27228 #[serde(rename = "INVALID_TRANSACTION")]
27229 InvalidTransaction(::serde_json::Map<::std::string::String, ::serde_json::Value>),
27230 #[serde(rename = "DOES_NOT_TRACK_SHARD")]
27231 DoesNotTrackShard,
27232 #[serde(rename = "REQUEST_ROUTED")]
27233 RequestRouted { transaction_hash: CryptoHash },
27234 #[serde(rename = "UNKNOWN_TRANSACTION")]
27235 UnknownTransaction {
27236 requested_transaction_hash: CryptoHash,
27237 },
27238 #[serde(rename = "INTERNAL_ERROR")]
27239 InternalError { debug_info: ::std::string::String },
27240 #[serde(rename = "TIMEOUT_ERROR")]
27241 TimeoutError,
27242}
27243impl ::std::convert::From<&Self> for RpcTransactionError {
27244 fn from(value: &RpcTransactionError) -> Self {
27245 value.clone()
27246 }
27247}
27248impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
27249 for RpcTransactionError
27250{
27251 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
27252 Self::InvalidTransaction(value)
27253 }
27254}
27255#[doc = "`RpcTransactionResponse`"]
27256#[doc = r""]
27257#[doc = r" <details><summary>JSON schema</summary>"]
27258#[doc = r""]
27259#[doc = r" ```json"]
27260#[doc = "{"]
27261#[doc = " \"type\": \"object\","]
27262#[doc = " \"anyOf\": ["]
27263#[doc = " {"]
27264#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionOutcomeWithReceiptView\""]
27265#[doc = " },"]
27266#[doc = " {"]
27267#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionOutcomeView\""]
27268#[doc = " }"]
27269#[doc = " ],"]
27270#[doc = " \"required\": ["]
27271#[doc = " \"final_execution_status\""]
27272#[doc = " ],"]
27273#[doc = " \"properties\": {"]
27274#[doc = " \"final_execution_status\": {"]
27275#[doc = " \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
27276#[doc = " }"]
27277#[doc = " }"]
27278#[doc = "}"]
27279#[doc = r" ```"]
27280#[doc = r" </details>"]
27281#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27282#[serde(untagged)]
27283pub enum RpcTransactionResponse {
27284 Variant0 {
27285 final_execution_status: TxExecutionStatus,
27286 #[doc = "Receipts generated from the transaction"]
27287 receipts: ::std::vec::Vec<ReceiptView>,
27288 #[doc = "The execution outcome of receipts."]
27289 receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
27290 #[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"]
27291 status: FinalExecutionStatus,
27292 #[doc = "Signed Transaction"]
27293 transaction: SignedTransactionView,
27294 #[doc = "The execution outcome of the signed transaction."]
27295 transaction_outcome: ExecutionOutcomeWithIdView,
27296 },
27297 Variant1 {
27298 final_execution_status: TxExecutionStatus,
27299 #[doc = "The execution outcome of receipts."]
27300 receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
27301 #[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"]
27302 status: FinalExecutionStatus,
27303 #[doc = "Signed Transaction"]
27304 transaction: SignedTransactionView,
27305 #[doc = "The execution outcome of the signed transaction."]
27306 transaction_outcome: ExecutionOutcomeWithIdView,
27307 },
27308}
27309impl ::std::convert::From<&Self> for RpcTransactionResponse {
27310 fn from(value: &RpcTransactionResponse) -> Self {
27311 value.clone()
27312 }
27313}
27314#[doc = "`RpcTransactionStatusRequest`"]
27315#[doc = r""]
27316#[doc = r" <details><summary>JSON schema</summary>"]
27317#[doc = r""]
27318#[doc = r" ```json"]
27319#[doc = "{"]
27320#[doc = " \"title\": \"RpcTransactionStatusRequest\","]
27321#[doc = " \"type\": \"object\","]
27322#[doc = " \"anyOf\": ["]
27323#[doc = " {"]
27324#[doc = " \"type\": \"object\","]
27325#[doc = " \"required\": ["]
27326#[doc = " \"signed_tx_base64\""]
27327#[doc = " ],"]
27328#[doc = " \"properties\": {"]
27329#[doc = " \"signed_tx_base64\": {"]
27330#[doc = " \"$ref\": \"#/components/schemas/SignedTransaction\""]
27331#[doc = " }"]
27332#[doc = " }"]
27333#[doc = " },"]
27334#[doc = " {"]
27335#[doc = " \"type\": \"object\","]
27336#[doc = " \"required\": ["]
27337#[doc = " \"sender_account_id\","]
27338#[doc = " \"tx_hash\""]
27339#[doc = " ],"]
27340#[doc = " \"properties\": {"]
27341#[doc = " \"sender_account_id\": {"]
27342#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
27343#[doc = " },"]
27344#[doc = " \"tx_hash\": {"]
27345#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
27346#[doc = " }"]
27347#[doc = " }"]
27348#[doc = " }"]
27349#[doc = " ],"]
27350#[doc = " \"properties\": {"]
27351#[doc = " \"wait_until\": {"]
27352#[doc = " \"default\": \"EXECUTED_OPTIMISTIC\","]
27353#[doc = " \"allOf\": ["]
27354#[doc = " {"]
27355#[doc = " \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
27356#[doc = " }"]
27357#[doc = " ]"]
27358#[doc = " }"]
27359#[doc = " }"]
27360#[doc = "}"]
27361#[doc = r" ```"]
27362#[doc = r" </details>"]
27363#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27364#[serde(untagged)]
27365pub enum RpcTransactionStatusRequest {
27366 Variant0 {
27367 signed_tx_base64: SignedTransaction,
27368 #[serde(default = "defaults::rpc_transaction_status_request_variant0_wait_until")]
27369 wait_until: TxExecutionStatus,
27370 },
27371 Variant1 {
27372 sender_account_id: AccountId,
27373 tx_hash: CryptoHash,
27374 #[serde(default = "defaults::rpc_transaction_status_request_variant1_wait_until")]
27375 wait_until: TxExecutionStatus,
27376 },
27377}
27378impl ::std::convert::From<&Self> for RpcTransactionStatusRequest {
27379 fn from(value: &RpcTransactionStatusRequest) -> Self {
27380 value.clone()
27381 }
27382}
27383#[doc = "`RpcValidatorError`"]
27384#[doc = r""]
27385#[doc = r" <details><summary>JSON schema</summary>"]
27386#[doc = r""]
27387#[doc = r" ```json"]
27388#[doc = "{"]
27389#[doc = " \"oneOf\": ["]
27390#[doc = " {"]
27391#[doc = " \"type\": \"object\","]
27392#[doc = " \"required\": ["]
27393#[doc = " \"name\""]
27394#[doc = " ],"]
27395#[doc = " \"properties\": {"]
27396#[doc = " \"name\": {"]
27397#[doc = " \"type\": \"string\","]
27398#[doc = " \"enum\": ["]
27399#[doc = " \"UNKNOWN_EPOCH\""]
27400#[doc = " ]"]
27401#[doc = " }"]
27402#[doc = " }"]
27403#[doc = " },"]
27404#[doc = " {"]
27405#[doc = " \"type\": \"object\","]
27406#[doc = " \"required\": ["]
27407#[doc = " \"name\""]
27408#[doc = " ],"]
27409#[doc = " \"properties\": {"]
27410#[doc = " \"name\": {"]
27411#[doc = " \"type\": \"string\","]
27412#[doc = " \"enum\": ["]
27413#[doc = " \"VALIDATOR_INFO_UNAVAILABLE\""]
27414#[doc = " ]"]
27415#[doc = " }"]
27416#[doc = " }"]
27417#[doc = " },"]
27418#[doc = " {"]
27419#[doc = " \"type\": \"object\","]
27420#[doc = " \"required\": ["]
27421#[doc = " \"info\","]
27422#[doc = " \"name\""]
27423#[doc = " ],"]
27424#[doc = " \"properties\": {"]
27425#[doc = " \"info\": {"]
27426#[doc = " \"type\": \"object\","]
27427#[doc = " \"required\": ["]
27428#[doc = " \"error_message\""]
27429#[doc = " ],"]
27430#[doc = " \"properties\": {"]
27431#[doc = " \"error_message\": {"]
27432#[doc = " \"type\": \"string\""]
27433#[doc = " }"]
27434#[doc = " }"]
27435#[doc = " },"]
27436#[doc = " \"name\": {"]
27437#[doc = " \"type\": \"string\","]
27438#[doc = " \"enum\": ["]
27439#[doc = " \"INTERNAL_ERROR\""]
27440#[doc = " ]"]
27441#[doc = " }"]
27442#[doc = " }"]
27443#[doc = " }"]
27444#[doc = " ]"]
27445#[doc = "}"]
27446#[doc = r" ```"]
27447#[doc = r" </details>"]
27448#[derive(
27449 :: serde :: Deserialize,
27450 :: serde :: Serialize,
27451 Clone,
27452 Debug,
27453 thiserror::Error,
27454 strum_macros::Display,
27455)]
27456#[serde(tag = "name", content = "info")]
27457pub enum RpcValidatorError {
27458 #[serde(rename = "UNKNOWN_EPOCH")]
27459 UnknownEpoch,
27460 #[serde(rename = "VALIDATOR_INFO_UNAVAILABLE")]
27461 ValidatorInfoUnavailable,
27462 #[serde(rename = "INTERNAL_ERROR")]
27463 InternalError {
27464 error_message: ::std::string::String,
27465 },
27466}
27467impl ::std::convert::From<&Self> for RpcValidatorError {
27468 fn from(value: &RpcValidatorError) -> Self {
27469 value.clone()
27470 }
27471}
27472#[doc = "`RpcValidatorRequest`"]
27473#[doc = r""]
27474#[doc = r" <details><summary>JSON schema</summary>"]
27475#[doc = r""]
27476#[doc = r" ```json"]
27477#[doc = "{"]
27478#[doc = " \"title\": \"RpcValidatorRequest\","]
27479#[doc = " \"type\": \"object\","]
27480#[doc = " \"oneOf\": ["]
27481#[doc = " {"]
27482#[doc = " \"type\": \"string\","]
27483#[doc = " \"enum\": ["]
27484#[doc = " \"latest\""]
27485#[doc = " ]"]
27486#[doc = " },"]
27487#[doc = " {"]
27488#[doc = " \"type\": \"object\","]
27489#[doc = " \"required\": ["]
27490#[doc = " \"epoch_id\""]
27491#[doc = " ],"]
27492#[doc = " \"properties\": {"]
27493#[doc = " \"epoch_id\": {"]
27494#[doc = " \"$ref\": \"#/components/schemas/EpochId\""]
27495#[doc = " }"]
27496#[doc = " }"]
27497#[doc = " },"]
27498#[doc = " {"]
27499#[doc = " \"type\": \"object\","]
27500#[doc = " \"required\": ["]
27501#[doc = " \"block_id\""]
27502#[doc = " ],"]
27503#[doc = " \"properties\": {"]
27504#[doc = " \"block_id\": {"]
27505#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
27506#[doc = " }"]
27507#[doc = " }"]
27508#[doc = " }"]
27509#[doc = " ]"]
27510#[doc = "}"]
27511#[doc = r" ```"]
27512#[doc = r" </details>"]
27513#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27514pub enum RpcValidatorRequest {
27515 #[serde(rename = "latest")]
27516 Latest,
27517 #[serde(rename = "epoch_id")]
27518 EpochId(EpochId),
27519 #[serde(rename = "block_id")]
27520 BlockId(BlockId),
27521}
27522impl ::std::convert::From<&Self> for RpcValidatorRequest {
27523 fn from(value: &RpcValidatorRequest) -> Self {
27524 value.clone()
27525 }
27526}
27527impl ::std::convert::From<EpochId> for RpcValidatorRequest {
27528 fn from(value: EpochId) -> Self {
27529 Self::EpochId(value)
27530 }
27531}
27532impl ::std::convert::From<BlockId> for RpcValidatorRequest {
27533 fn from(value: BlockId) -> Self {
27534 Self::BlockId(value)
27535 }
27536}
27537#[doc = "Information about this epoch validators and next epoch validators"]
27538#[doc = r""]
27539#[doc = r" <details><summary>JSON schema</summary>"]
27540#[doc = r""]
27541#[doc = r" ```json"]
27542#[doc = "{"]
27543#[doc = " \"description\": \"Information about this epoch validators and next epoch validators\","]
27544#[doc = " \"type\": \"object\","]
27545#[doc = " \"required\": ["]
27546#[doc = " \"current_fishermen\","]
27547#[doc = " \"current_proposals\","]
27548#[doc = " \"current_validators\","]
27549#[doc = " \"epoch_height\","]
27550#[doc = " \"epoch_start_height\","]
27551#[doc = " \"next_fishermen\","]
27552#[doc = " \"next_validators\","]
27553#[doc = " \"prev_epoch_kickout\""]
27554#[doc = " ],"]
27555#[doc = " \"properties\": {"]
27556#[doc = " \"current_fishermen\": {"]
27557#[doc = " \"description\": \"Fishermen for the current epoch\","]
27558#[doc = " \"type\": \"array\","]
27559#[doc = " \"items\": {"]
27560#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
27561#[doc = " }"]
27562#[doc = " },"]
27563#[doc = " \"current_proposals\": {"]
27564#[doc = " \"description\": \"Proposals in the current epoch\","]
27565#[doc = " \"type\": \"array\","]
27566#[doc = " \"items\": {"]
27567#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
27568#[doc = " }"]
27569#[doc = " },"]
27570#[doc = " \"current_validators\": {"]
27571#[doc = " \"description\": \"Validators for the current epoch\","]
27572#[doc = " \"type\": \"array\","]
27573#[doc = " \"items\": {"]
27574#[doc = " \"$ref\": \"#/components/schemas/CurrentEpochValidatorInfo\""]
27575#[doc = " }"]
27576#[doc = " },"]
27577#[doc = " \"epoch_height\": {"]
27578#[doc = " \"description\": \"Epoch height\","]
27579#[doc = " \"type\": \"integer\","]
27580#[doc = " \"format\": \"uint64\","]
27581#[doc = " \"minimum\": 0.0"]
27582#[doc = " },"]
27583#[doc = " \"epoch_start_height\": {"]
27584#[doc = " \"description\": \"Epoch start block height\","]
27585#[doc = " \"type\": \"integer\","]
27586#[doc = " \"format\": \"uint64\","]
27587#[doc = " \"minimum\": 0.0"]
27588#[doc = " },"]
27589#[doc = " \"next_fishermen\": {"]
27590#[doc = " \"description\": \"Fishermen for the next epoch\","]
27591#[doc = " \"type\": \"array\","]
27592#[doc = " \"items\": {"]
27593#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
27594#[doc = " }"]
27595#[doc = " },"]
27596#[doc = " \"next_validators\": {"]
27597#[doc = " \"description\": \"Validators for the next epoch\","]
27598#[doc = " \"type\": \"array\","]
27599#[doc = " \"items\": {"]
27600#[doc = " \"$ref\": \"#/components/schemas/NextEpochValidatorInfo\""]
27601#[doc = " }"]
27602#[doc = " },"]
27603#[doc = " \"prev_epoch_kickout\": {"]
27604#[doc = " \"description\": \"Kickout in the previous epoch\","]
27605#[doc = " \"type\": \"array\","]
27606#[doc = " \"items\": {"]
27607#[doc = " \"$ref\": \"#/components/schemas/ValidatorKickoutView\""]
27608#[doc = " }"]
27609#[doc = " }"]
27610#[doc = " }"]
27611#[doc = "}"]
27612#[doc = r" ```"]
27613#[doc = r" </details>"]
27614#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27615pub struct RpcValidatorResponse {
27616 #[doc = "Fishermen for the current epoch"]
27617 pub current_fishermen: ::std::vec::Vec<ValidatorStakeView>,
27618 #[doc = "Proposals in the current epoch"]
27619 pub current_proposals: ::std::vec::Vec<ValidatorStakeView>,
27620 #[doc = "Validators for the current epoch"]
27621 pub current_validators: ::std::vec::Vec<CurrentEpochValidatorInfo>,
27622 #[doc = "Epoch height"]
27623 pub epoch_height: u64,
27624 #[doc = "Epoch start block height"]
27625 pub epoch_start_height: u64,
27626 #[doc = "Fishermen for the next epoch"]
27627 pub next_fishermen: ::std::vec::Vec<ValidatorStakeView>,
27628 #[doc = "Validators for the next epoch"]
27629 pub next_validators: ::std::vec::Vec<NextEpochValidatorInfo>,
27630 #[doc = "Kickout in the previous epoch"]
27631 pub prev_epoch_kickout: ::std::vec::Vec<ValidatorKickoutView>,
27632}
27633impl ::std::convert::From<&RpcValidatorResponse> for RpcValidatorResponse {
27634 fn from(value: &RpcValidatorResponse) -> Self {
27635 value.clone()
27636 }
27637}
27638#[doc = "`RpcValidatorsOrderedRequest`"]
27639#[doc = r""]
27640#[doc = r" <details><summary>JSON schema</summary>"]
27641#[doc = r""]
27642#[doc = r" ```json"]
27643#[doc = "{"]
27644#[doc = " \"title\": \"RpcValidatorsOrderedRequest\","]
27645#[doc = " \"type\": \"object\","]
27646#[doc = " \"properties\": {"]
27647#[doc = " \"block_id\": {"]
27648#[doc = " \"anyOf\": ["]
27649#[doc = " {"]
27650#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
27651#[doc = " },"]
27652#[doc = " {"]
27653#[doc = " \"type\": \"null\""]
27654#[doc = " }"]
27655#[doc = " ]"]
27656#[doc = " }"]
27657#[doc = " }"]
27658#[doc = "}"]
27659#[doc = r" ```"]
27660#[doc = r" </details>"]
27661#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27662pub struct RpcValidatorsOrderedRequest {
27663 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
27664 pub block_id: ::std::option::Option<BlockId>,
27665}
27666impl ::std::convert::From<&RpcValidatorsOrderedRequest> for RpcValidatorsOrderedRequest {
27667 fn from(value: &RpcValidatorsOrderedRequest) -> Self {
27668 value.clone()
27669 }
27670}
27671impl ::std::default::Default for RpcValidatorsOrderedRequest {
27672 fn default() -> Self {
27673 Self {
27674 block_id: Default::default(),
27675 }
27676 }
27677}
27678#[doc = "View that preserves JSON format of the runtime config."]
27679#[doc = r""]
27680#[doc = r" <details><summary>JSON schema</summary>"]
27681#[doc = r""]
27682#[doc = r" ```json"]
27683#[doc = "{"]
27684#[doc = " \"description\": \"View that preserves JSON format of the runtime config.\","]
27685#[doc = " \"type\": \"object\","]
27686#[doc = " \"required\": ["]
27687#[doc = " \"account_creation_config\","]
27688#[doc = " \"congestion_control_config\","]
27689#[doc = " \"storage_amount_per_byte\","]
27690#[doc = " \"transaction_costs\","]
27691#[doc = " \"wasm_config\","]
27692#[doc = " \"witness_config\""]
27693#[doc = " ],"]
27694#[doc = " \"properties\": {"]
27695#[doc = " \"account_creation_config\": {"]
27696#[doc = " \"description\": \"Config that defines rules for account creation.\","]
27697#[doc = " \"allOf\": ["]
27698#[doc = " {"]
27699#[doc = " \"$ref\": \"#/components/schemas/AccountCreationConfigView\""]
27700#[doc = " }"]
27701#[doc = " ]"]
27702#[doc = " },"]
27703#[doc = " \"congestion_control_config\": {"]
27704#[doc = " \"description\": \"The configuration for congestion control.\","]
27705#[doc = " \"allOf\": ["]
27706#[doc = " {"]
27707#[doc = " \"$ref\": \"#/components/schemas/CongestionControlConfigView\""]
27708#[doc = " }"]
27709#[doc = " ]"]
27710#[doc = " },"]
27711#[doc = " \"storage_amount_per_byte\": {"]
27712#[doc = " \"description\": \"Amount of yN per byte required to have on the account. See\\n<https://nomicon.io/Economics/Economic#state-stake> for details.\","]
27713#[doc = " \"allOf\": ["]
27714#[doc = " {"]
27715#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
27716#[doc = " }"]
27717#[doc = " ]"]
27718#[doc = " },"]
27719#[doc = " \"transaction_costs\": {"]
27720#[doc = " \"description\": \"Costs of different actions that need to be performed when sending and\\nprocessing transaction and receipts.\","]
27721#[doc = " \"allOf\": ["]
27722#[doc = " {"]
27723#[doc = " \"$ref\": \"#/components/schemas/RuntimeFeesConfigView\""]
27724#[doc = " }"]
27725#[doc = " ]"]
27726#[doc = " },"]
27727#[doc = " \"wasm_config\": {"]
27728#[doc = " \"description\": \"Config of wasm operations.\","]
27729#[doc = " \"allOf\": ["]
27730#[doc = " {"]
27731#[doc = " \"$ref\": \"#/components/schemas/VMConfigView\""]
27732#[doc = " }"]
27733#[doc = " ]"]
27734#[doc = " },"]
27735#[doc = " \"witness_config\": {"]
27736#[doc = " \"description\": \"Configuration specific to ChunkStateWitness.\","]
27737#[doc = " \"allOf\": ["]
27738#[doc = " {"]
27739#[doc = " \"$ref\": \"#/components/schemas/WitnessConfigView\""]
27740#[doc = " }"]
27741#[doc = " ]"]
27742#[doc = " }"]
27743#[doc = " }"]
27744#[doc = "}"]
27745#[doc = r" ```"]
27746#[doc = r" </details>"]
27747#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27748pub struct RuntimeConfigView {
27749 #[doc = "Config that defines rules for account creation."]
27750 pub account_creation_config: AccountCreationConfigView,
27751 #[doc = "The configuration for congestion control."]
27752 pub congestion_control_config: CongestionControlConfigView,
27753 #[doc = "Amount of yN per byte required to have on the account. See\n<https://nomicon.io/Economics/Economic#state-stake> for details."]
27754 pub storage_amount_per_byte: NearToken,
27755 #[doc = "Costs of different actions that need to be performed when sending and\nprocessing transaction and receipts."]
27756 pub transaction_costs: RuntimeFeesConfigView,
27757 #[doc = "Config of wasm operations."]
27758 pub wasm_config: VmConfigView,
27759 #[doc = "Configuration specific to ChunkStateWitness."]
27760 pub witness_config: WitnessConfigView,
27761}
27762impl ::std::convert::From<&RuntimeConfigView> for RuntimeConfigView {
27763 fn from(value: &RuntimeConfigView) -> Self {
27764 value.clone()
27765 }
27766}
27767#[doc = "Describes different fees for the runtime"]
27768#[doc = r""]
27769#[doc = r" <details><summary>JSON schema</summary>"]
27770#[doc = r""]
27771#[doc = r" ```json"]
27772#[doc = "{"]
27773#[doc = " \"description\": \"Describes different fees for the runtime\","]
27774#[doc = " \"type\": \"object\","]
27775#[doc = " \"required\": ["]
27776#[doc = " \"action_creation_config\","]
27777#[doc = " \"action_receipt_creation_config\","]
27778#[doc = " \"burnt_gas_reward\","]
27779#[doc = " \"data_receipt_creation_config\","]
27780#[doc = " \"pessimistic_gas_price_inflation_ratio\","]
27781#[doc = " \"storage_usage_config\""]
27782#[doc = " ],"]
27783#[doc = " \"properties\": {"]
27784#[doc = " \"action_creation_config\": {"]
27785#[doc = " \"description\": \"Describes the cost of creating a certain action, `Action`. Includes all variants.\","]
27786#[doc = " \"allOf\": ["]
27787#[doc = " {"]
27788#[doc = " \"$ref\": \"#/components/schemas/ActionCreationConfigView\""]
27789#[doc = " }"]
27790#[doc = " ]"]
27791#[doc = " },"]
27792#[doc = " \"action_receipt_creation_config\": {"]
27793#[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.\","]
27794#[doc = " \"allOf\": ["]
27795#[doc = " {"]
27796#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
27797#[doc = " }"]
27798#[doc = " ]"]
27799#[doc = " },"]
27800#[doc = " \"burnt_gas_reward\": {"]
27801#[doc = " \"description\": \"Fraction of the burnt gas to reward to the contract account for execution.\","]
27802#[doc = " \"type\": \"array\","]
27803#[doc = " \"items\": {"]
27804#[doc = " \"type\": \"integer\","]
27805#[doc = " \"format\": \"int32\""]
27806#[doc = " },"]
27807#[doc = " \"maxItems\": 2,"]
27808#[doc = " \"minItems\": 2"]
27809#[doc = " },"]
27810#[doc = " \"data_receipt_creation_config\": {"]
27811#[doc = " \"description\": \"Describes the cost of creating a data receipt, `DataReceipt`.\","]
27812#[doc = " \"allOf\": ["]
27813#[doc = " {"]
27814#[doc = " \"$ref\": \"#/components/schemas/DataReceiptCreationConfigView\""]
27815#[doc = " }"]
27816#[doc = " ]"]
27817#[doc = " },"]
27818#[doc = " \"pessimistic_gas_price_inflation_ratio\": {"]
27819#[doc = " \"description\": \"Pessimistic gas price inflation ratio.\","]
27820#[doc = " \"type\": \"array\","]
27821#[doc = " \"items\": {"]
27822#[doc = " \"type\": \"integer\","]
27823#[doc = " \"format\": \"int32\""]
27824#[doc = " },"]
27825#[doc = " \"maxItems\": 2,"]
27826#[doc = " \"minItems\": 2"]
27827#[doc = " },"]
27828#[doc = " \"storage_usage_config\": {"]
27829#[doc = " \"description\": \"Describes fees for storage.\","]
27830#[doc = " \"allOf\": ["]
27831#[doc = " {"]
27832#[doc = " \"$ref\": \"#/components/schemas/StorageUsageConfigView\""]
27833#[doc = " }"]
27834#[doc = " ]"]
27835#[doc = " }"]
27836#[doc = " }"]
27837#[doc = "}"]
27838#[doc = r" ```"]
27839#[doc = r" </details>"]
27840#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27841pub struct RuntimeFeesConfigView {
27842 #[doc = "Describes the cost of creating a certain action, `Action`. Includes all variants."]
27843 pub action_creation_config: ActionCreationConfigView,
27844 #[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."]
27845 pub action_receipt_creation_config: Fee,
27846 #[doc = "Fraction of the burnt gas to reward to the contract account for execution."]
27847 pub burnt_gas_reward: [i32; 2usize],
27848 #[doc = "Describes the cost of creating a data receipt, `DataReceipt`."]
27849 pub data_receipt_creation_config: DataReceiptCreationConfigView,
27850 #[doc = "Pessimistic gas price inflation ratio."]
27851 pub pessimistic_gas_price_inflation_ratio: [i32; 2usize],
27852 #[doc = "Describes fees for storage."]
27853 pub storage_usage_config: StorageUsageConfigView,
27854}
27855impl ::std::convert::From<&RuntimeFeesConfigView> for RuntimeFeesConfigView {
27856 fn from(value: &RuntimeFeesConfigView) -> Self {
27857 value.clone()
27858 }
27859}
27860#[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."]
27861#[doc = r""]
27862#[doc = r" <details><summary>JSON schema</summary>"]
27863#[doc = r""]
27864#[doc = r" ```json"]
27865#[doc = "{"]
27866#[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.\","]
27867#[doc = " \"type\": \"integer\","]
27868#[doc = " \"format\": \"uint64\","]
27869#[doc = " \"minimum\": 0.0"]
27870#[doc = "}"]
27871#[doc = r" ```"]
27872#[doc = r" </details>"]
27873#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27874#[serde(transparent)]
27875pub struct ShardId(pub u64);
27876impl ::std::ops::Deref for ShardId {
27877 type Target = u64;
27878 fn deref(&self) -> &u64 {
27879 &self.0
27880 }
27881}
27882impl ::std::convert::From<ShardId> for u64 {
27883 fn from(value: ShardId) -> Self {
27884 value.0
27885 }
27886}
27887impl ::std::convert::From<&ShardId> for ShardId {
27888 fn from(value: &ShardId) -> Self {
27889 value.clone()
27890 }
27891}
27892impl ::std::convert::From<u64> for ShardId {
27893 fn from(value: u64) -> Self {
27894 Self(value)
27895 }
27896}
27897impl ::std::str::FromStr for ShardId {
27898 type Err = <u64 as ::std::str::FromStr>::Err;
27899 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
27900 Ok(Self(value.parse()?))
27901 }
27902}
27903impl ::std::convert::TryFrom<&str> for ShardId {
27904 type Error = <u64 as ::std::str::FromStr>::Err;
27905 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
27906 value.parse()
27907 }
27908}
27909impl ::std::convert::TryFrom<&String> for ShardId {
27910 type Error = <u64 as ::std::str::FromStr>::Err;
27911 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
27912 value.parse()
27913 }
27914}
27915impl ::std::convert::TryFrom<String> for ShardId {
27916 type Error = <u64 as ::std::str::FromStr>::Err;
27917 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
27918 value.parse()
27919 }
27920}
27921impl ::std::fmt::Display for ShardId {
27922 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27923 self.0.fmt(f)
27924 }
27925}
27926#[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."]
27927#[doc = r""]
27928#[doc = r" <details><summary>JSON schema</summary>"]
27929#[doc = r""]
27930#[doc = r" ```json"]
27931#[doc = "{"]
27932#[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.\","]
27933#[doc = " \"oneOf\": ["]
27934#[doc = " {"]
27935#[doc = " \"type\": \"object\","]
27936#[doc = " \"required\": ["]
27937#[doc = " \"V0\""]
27938#[doc = " ],"]
27939#[doc = " \"properties\": {"]
27940#[doc = " \"V0\": {"]
27941#[doc = " \"$ref\": \"#/components/schemas/ShardLayoutV0\""]
27942#[doc = " }"]
27943#[doc = " },"]
27944#[doc = " \"additionalProperties\": false"]
27945#[doc = " },"]
27946#[doc = " {"]
27947#[doc = " \"type\": \"object\","]
27948#[doc = " \"required\": ["]
27949#[doc = " \"V1\""]
27950#[doc = " ],"]
27951#[doc = " \"properties\": {"]
27952#[doc = " \"V1\": {"]
27953#[doc = " \"$ref\": \"#/components/schemas/ShardLayoutV1\""]
27954#[doc = " }"]
27955#[doc = " },"]
27956#[doc = " \"additionalProperties\": false"]
27957#[doc = " },"]
27958#[doc = " {"]
27959#[doc = " \"type\": \"object\","]
27960#[doc = " \"required\": ["]
27961#[doc = " \"V2\""]
27962#[doc = " ],"]
27963#[doc = " \"properties\": {"]
27964#[doc = " \"V2\": {"]
27965#[doc = " \"$ref\": \"#/components/schemas/ShardLayoutV2\""]
27966#[doc = " }"]
27967#[doc = " },"]
27968#[doc = " \"additionalProperties\": false"]
27969#[doc = " }"]
27970#[doc = " ]"]
27971#[doc = "}"]
27972#[doc = r" ```"]
27973#[doc = r" </details>"]
27974#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27975pub enum ShardLayout {
27976 V0(ShardLayoutV0),
27977 V1(ShardLayoutV1),
27978 V2(ShardLayoutV2),
27979}
27980impl ::std::convert::From<&Self> for ShardLayout {
27981 fn from(value: &ShardLayout) -> Self {
27982 value.clone()
27983 }
27984}
27985impl ::std::convert::From<ShardLayoutV0> for ShardLayout {
27986 fn from(value: ShardLayoutV0) -> Self {
27987 Self::V0(value)
27988 }
27989}
27990impl ::std::convert::From<ShardLayoutV1> for ShardLayout {
27991 fn from(value: ShardLayoutV1) -> Self {
27992 Self::V1(value)
27993 }
27994}
27995impl ::std::convert::From<ShardLayoutV2> for ShardLayout {
27996 fn from(value: ShardLayoutV2) -> Self {
27997 Self::V2(value)
27998 }
27999}
28000#[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."]
28001#[doc = r""]
28002#[doc = r" <details><summary>JSON schema</summary>"]
28003#[doc = r""]
28004#[doc = r" ```json"]
28005#[doc = "{"]
28006#[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.\","]
28007#[doc = " \"type\": \"object\","]
28008#[doc = " \"required\": ["]
28009#[doc = " \"num_shards\","]
28010#[doc = " \"version\""]
28011#[doc = " ],"]
28012#[doc = " \"properties\": {"]
28013#[doc = " \"num_shards\": {"]
28014#[doc = " \"description\": \"Map accounts evenly across all shards\","]
28015#[doc = " \"type\": \"integer\","]
28016#[doc = " \"format\": \"uint64\","]
28017#[doc = " \"minimum\": 0.0"]
28018#[doc = " },"]
28019#[doc = " \"version\": {"]
28020#[doc = " \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
28021#[doc = " \"type\": \"integer\","]
28022#[doc = " \"format\": \"uint32\","]
28023#[doc = " \"minimum\": 0.0"]
28024#[doc = " }"]
28025#[doc = " }"]
28026#[doc = "}"]
28027#[doc = r" ```"]
28028#[doc = r" </details>"]
28029#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28030pub struct ShardLayoutV0 {
28031 #[doc = "Map accounts evenly across all shards"]
28032 pub num_shards: u64,
28033 #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
28034 pub version: u32,
28035}
28036impl ::std::convert::From<&ShardLayoutV0> for ShardLayoutV0 {
28037 fn from(value: &ShardLayoutV0) -> Self {
28038 value.clone()
28039 }
28040}
28041#[doc = "`ShardLayoutV1`"]
28042#[doc = r""]
28043#[doc = r" <details><summary>JSON schema</summary>"]
28044#[doc = r""]
28045#[doc = r" ```json"]
28046#[doc = "{"]
28047#[doc = " \"type\": \"object\","]
28048#[doc = " \"required\": ["]
28049#[doc = " \"boundary_accounts\","]
28050#[doc = " \"version\""]
28051#[doc = " ],"]
28052#[doc = " \"properties\": {"]
28053#[doc = " \"boundary_accounts\": {"]
28054#[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.\","]
28055#[doc = " \"type\": \"array\","]
28056#[doc = " \"items\": {"]
28057#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
28058#[doc = " }"]
28059#[doc = " },"]
28060#[doc = " \"shards_split_map\": {"]
28061#[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\","]
28062#[doc = " \"type\": ["]
28063#[doc = " \"array\","]
28064#[doc = " \"null\""]
28065#[doc = " ],"]
28066#[doc = " \"items\": {"]
28067#[doc = " \"type\": \"array\","]
28068#[doc = " \"items\": {"]
28069#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
28070#[doc = " }"]
28071#[doc = " }"]
28072#[doc = " },"]
28073#[doc = " \"to_parent_shard_map\": {"]
28074#[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\","]
28075#[doc = " \"type\": ["]
28076#[doc = " \"array\","]
28077#[doc = " \"null\""]
28078#[doc = " ],"]
28079#[doc = " \"items\": {"]
28080#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
28081#[doc = " }"]
28082#[doc = " },"]
28083#[doc = " \"version\": {"]
28084#[doc = " \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
28085#[doc = " \"type\": \"integer\","]
28086#[doc = " \"format\": \"uint32\","]
28087#[doc = " \"minimum\": 0.0"]
28088#[doc = " }"]
28089#[doc = " }"]
28090#[doc = "}"]
28091#[doc = r" ```"]
28092#[doc = r" </details>"]
28093#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28094pub struct ShardLayoutV1 {
28095 #[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."]
28096 pub boundary_accounts: ::std::vec::Vec<AccountId>,
28097 #[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"]
28098 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28099 pub shards_split_map: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<ShardId>>>,
28100 #[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"]
28101 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28102 pub to_parent_shard_map: ::std::option::Option<::std::vec::Vec<ShardId>>,
28103 #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
28104 pub version: u32,
28105}
28106impl ::std::convert::From<&ShardLayoutV1> for ShardLayoutV1 {
28107 fn from(value: &ShardLayoutV1) -> Self {
28108 value.clone()
28109 }
28110}
28111#[doc = "Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\nserde serialization."]
28112#[doc = r""]
28113#[doc = r" <details><summary>JSON schema</summary>"]
28114#[doc = r""]
28115#[doc = r" ```json"]
28116#[doc = "{"]
28117#[doc = " \"description\": \"Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\\nserde serialization.\","]
28118#[doc = " \"type\": \"object\","]
28119#[doc = " \"required\": ["]
28120#[doc = " \"boundary_accounts\","]
28121#[doc = " \"id_to_index_map\","]
28122#[doc = " \"index_to_id_map\","]
28123#[doc = " \"shard_ids\","]
28124#[doc = " \"version\""]
28125#[doc = " ],"]
28126#[doc = " \"properties\": {"]
28127#[doc = " \"boundary_accounts\": {"]
28128#[doc = " \"type\": \"array\","]
28129#[doc = " \"items\": {"]
28130#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
28131#[doc = " }"]
28132#[doc = " },"]
28133#[doc = " \"id_to_index_map\": {"]
28134#[doc = " \"type\": \"object\","]
28135#[doc = " \"additionalProperties\": {"]
28136#[doc = " \"type\": \"integer\","]
28137#[doc = " \"format\": \"uint\","]
28138#[doc = " \"minimum\": 0.0"]
28139#[doc = " }"]
28140#[doc = " },"]
28141#[doc = " \"index_to_id_map\": {"]
28142#[doc = " \"type\": \"object\","]
28143#[doc = " \"additionalProperties\": {"]
28144#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
28145#[doc = " }"]
28146#[doc = " },"]
28147#[doc = " \"shard_ids\": {"]
28148#[doc = " \"type\": \"array\","]
28149#[doc = " \"items\": {"]
28150#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
28151#[doc = " }"]
28152#[doc = " },"]
28153#[doc = " \"shards_parent_map\": {"]
28154#[doc = " \"type\": ["]
28155#[doc = " \"object\","]
28156#[doc = " \"null\""]
28157#[doc = " ],"]
28158#[doc = " \"additionalProperties\": {"]
28159#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
28160#[doc = " }"]
28161#[doc = " },"]
28162#[doc = " \"shards_split_map\": {"]
28163#[doc = " \"type\": ["]
28164#[doc = " \"object\","]
28165#[doc = " \"null\""]
28166#[doc = " ],"]
28167#[doc = " \"additionalProperties\": {"]
28168#[doc = " \"type\": \"array\","]
28169#[doc = " \"items\": {"]
28170#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
28171#[doc = " }"]
28172#[doc = " }"]
28173#[doc = " },"]
28174#[doc = " \"version\": {"]
28175#[doc = " \"type\": \"integer\","]
28176#[doc = " \"format\": \"uint32\","]
28177#[doc = " \"minimum\": 0.0"]
28178#[doc = " }"]
28179#[doc = " }"]
28180#[doc = "}"]
28181#[doc = r" ```"]
28182#[doc = r" </details>"]
28183#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28184pub struct ShardLayoutV2 {
28185 pub boundary_accounts: ::std::vec::Vec<AccountId>,
28186 pub id_to_index_map: ::std::collections::HashMap<::std::string::String, u32>,
28187 pub index_to_id_map: ::std::collections::HashMap<::std::string::String, ShardId>,
28188 pub shard_ids: ::std::vec::Vec<ShardId>,
28189 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28190 pub shards_parent_map:
28191 ::std::option::Option<::std::collections::HashMap<::std::string::String, ShardId>>,
28192 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
28193 pub shards_split_map: ::std::option::Option<
28194 ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<ShardId>>,
28195 >,
28196 pub version: u32,
28197}
28198impl ::std::convert::From<&ShardLayoutV2> for ShardLayoutV2 {
28199 fn from(value: &ShardLayoutV2) -> Self {
28200 value.clone()
28201 }
28202}
28203#[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`)"]
28204#[doc = r""]
28205#[doc = r" <details><summary>JSON schema</summary>"]
28206#[doc = r""]
28207#[doc = r" ```json"]
28208#[doc = "{"]
28209#[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`)\","]
28210#[doc = " \"type\": \"object\","]
28211#[doc = " \"required\": ["]
28212#[doc = " \"shard_id\","]
28213#[doc = " \"version\""]
28214#[doc = " ],"]
28215#[doc = " \"properties\": {"]
28216#[doc = " \"shard_id\": {"]
28217#[doc = " \"type\": \"integer\","]
28218#[doc = " \"format\": \"uint32\","]
28219#[doc = " \"minimum\": 0.0"]
28220#[doc = " },"]
28221#[doc = " \"version\": {"]
28222#[doc = " \"type\": \"integer\","]
28223#[doc = " \"format\": \"uint32\","]
28224#[doc = " \"minimum\": 0.0"]
28225#[doc = " }"]
28226#[doc = " }"]
28227#[doc = "}"]
28228#[doc = r" ```"]
28229#[doc = r" </details>"]
28230#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28231pub struct ShardUId {
28232 pub shard_id: u32,
28233 pub version: u32,
28234}
28235impl ::std::convert::From<&ShardUId> for ShardUId {
28236 fn from(value: &ShardUId) -> Self {
28237 value.clone()
28238 }
28239}
28240#[doc = "`Signature`"]
28241#[doc = r""]
28242#[doc = r" <details><summary>JSON schema</summary>"]
28243#[doc = r""]
28244#[doc = r" ```json"]
28245#[doc = "{"]
28246#[doc = " \"type\": \"string\""]
28247#[doc = "}"]
28248#[doc = r" ```"]
28249#[doc = r" </details>"]
28250#[derive(
28251 :: serde :: Deserialize,
28252 :: serde :: Serialize,
28253 Clone,
28254 Debug,
28255 Eq,
28256 Hash,
28257 Ord,
28258 PartialEq,
28259 PartialOrd,
28260)]
28261#[serde(transparent)]
28262pub struct Signature(pub ::std::string::String);
28263impl ::std::ops::Deref for Signature {
28264 type Target = ::std::string::String;
28265 fn deref(&self) -> &::std::string::String {
28266 &self.0
28267 }
28268}
28269impl ::std::convert::From<Signature> for ::std::string::String {
28270 fn from(value: Signature) -> Self {
28271 value.0
28272 }
28273}
28274impl ::std::convert::From<&Signature> for Signature {
28275 fn from(value: &Signature) -> Self {
28276 value.clone()
28277 }
28278}
28279impl ::std::convert::From<::std::string::String> for Signature {
28280 fn from(value: ::std::string::String) -> Self {
28281 Self(value)
28282 }
28283}
28284impl ::std::str::FromStr for Signature {
28285 type Err = ::std::convert::Infallible;
28286 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
28287 Ok(Self(value.to_string()))
28288 }
28289}
28290impl ::std::fmt::Display for Signature {
28291 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28292 self.0.fmt(f)
28293 }
28294}
28295#[doc = "`SignedDelegateAction`"]
28296#[doc = r""]
28297#[doc = r" <details><summary>JSON schema</summary>"]
28298#[doc = r""]
28299#[doc = r" ```json"]
28300#[doc = "{"]
28301#[doc = " \"type\": \"object\","]
28302#[doc = " \"required\": ["]
28303#[doc = " \"delegate_action\","]
28304#[doc = " \"signature\""]
28305#[doc = " ],"]
28306#[doc = " \"properties\": {"]
28307#[doc = " \"delegate_action\": {"]
28308#[doc = " \"$ref\": \"#/components/schemas/DelegateAction\""]
28309#[doc = " },"]
28310#[doc = " \"signature\": {"]
28311#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
28312#[doc = " }"]
28313#[doc = " }"]
28314#[doc = "}"]
28315#[doc = r" ```"]
28316#[doc = r" </details>"]
28317#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28318pub struct SignedDelegateAction {
28319 pub delegate_action: DelegateAction,
28320 pub signature: Signature,
28321}
28322impl ::std::convert::From<&SignedDelegateAction> for SignedDelegateAction {
28323 fn from(value: &SignedDelegateAction) -> Self {
28324 value.clone()
28325 }
28326}
28327#[doc = "`SignedTransaction`"]
28328#[doc = r""]
28329#[doc = r" <details><summary>JSON schema</summary>"]
28330#[doc = r""]
28331#[doc = r" ```json"]
28332#[doc = "{"]
28333#[doc = " \"type\": \"string\","]
28334#[doc = " \"format\": \"byte\""]
28335#[doc = "}"]
28336#[doc = r" ```"]
28337#[doc = r" </details>"]
28338#[derive(
28339 :: serde :: Deserialize,
28340 :: serde :: Serialize,
28341 Clone,
28342 Debug,
28343 Eq,
28344 Hash,
28345 Ord,
28346 PartialEq,
28347 PartialOrd,
28348)]
28349#[serde(transparent)]
28350pub struct SignedTransaction(pub ::std::string::String);
28351impl ::std::ops::Deref for SignedTransaction {
28352 type Target = ::std::string::String;
28353 fn deref(&self) -> &::std::string::String {
28354 &self.0
28355 }
28356}
28357impl ::std::convert::From<SignedTransaction> for ::std::string::String {
28358 fn from(value: SignedTransaction) -> Self {
28359 value.0
28360 }
28361}
28362impl ::std::convert::From<&SignedTransaction> for SignedTransaction {
28363 fn from(value: &SignedTransaction) -> Self {
28364 value.clone()
28365 }
28366}
28367impl ::std::convert::From<::std::string::String> for SignedTransaction {
28368 fn from(value: ::std::string::String) -> Self {
28369 Self(value)
28370 }
28371}
28372impl ::std::str::FromStr for SignedTransaction {
28373 type Err = ::std::convert::Infallible;
28374 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
28375 Ok(Self(value.to_string()))
28376 }
28377}
28378impl ::std::fmt::Display for SignedTransaction {
28379 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28380 self.0.fmt(f)
28381 }
28382}
28383#[doc = "`SignedTransactionView`"]
28384#[doc = r""]
28385#[doc = r" <details><summary>JSON schema</summary>"]
28386#[doc = r""]
28387#[doc = r" ```json"]
28388#[doc = "{"]
28389#[doc = " \"type\": \"object\","]
28390#[doc = " \"required\": ["]
28391#[doc = " \"actions\","]
28392#[doc = " \"hash\","]
28393#[doc = " \"nonce\","]
28394#[doc = " \"public_key\","]
28395#[doc = " \"receiver_id\","]
28396#[doc = " \"signature\","]
28397#[doc = " \"signer_id\""]
28398#[doc = " ],"]
28399#[doc = " \"properties\": {"]
28400#[doc = " \"actions\": {"]
28401#[doc = " \"type\": \"array\","]
28402#[doc = " \"items\": {"]
28403#[doc = " \"$ref\": \"#/components/schemas/ActionView\""]
28404#[doc = " }"]
28405#[doc = " },"]
28406#[doc = " \"hash\": {"]
28407#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
28408#[doc = " },"]
28409#[doc = " \"nonce\": {"]
28410#[doc = " \"type\": \"integer\","]
28411#[doc = " \"format\": \"uint64\","]
28412#[doc = " \"minimum\": 0.0"]
28413#[doc = " },"]
28414#[doc = " \"priority_fee\": {"]
28415#[doc = " \"default\": 0,"]
28416#[doc = " \"type\": \"integer\","]
28417#[doc = " \"format\": \"uint64\","]
28418#[doc = " \"minimum\": 0.0"]
28419#[doc = " },"]
28420#[doc = " \"public_key\": {"]
28421#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
28422#[doc = " },"]
28423#[doc = " \"receiver_id\": {"]
28424#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
28425#[doc = " },"]
28426#[doc = " \"signature\": {"]
28427#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
28428#[doc = " },"]
28429#[doc = " \"signer_id\": {"]
28430#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
28431#[doc = " }"]
28432#[doc = " }"]
28433#[doc = "}"]
28434#[doc = r" ```"]
28435#[doc = r" </details>"]
28436#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28437pub struct SignedTransactionView {
28438 pub actions: ::std::vec::Vec<ActionView>,
28439 pub hash: CryptoHash,
28440 pub nonce: u64,
28441 #[serde(default)]
28442 pub priority_fee: u64,
28443 pub public_key: PublicKey,
28444 pub receiver_id: AccountId,
28445 pub signature: Signature,
28446 pub signer_id: AccountId,
28447}
28448impl ::std::convert::From<&SignedTransactionView> for SignedTransactionView {
28449 fn from(value: &SignedTransactionView) -> Self {
28450 value.clone()
28451 }
28452}
28453#[doc = "`SingleAccessKeyChangesByBlockIdChangesType`"]
28454#[doc = r""]
28455#[doc = r" <details><summary>JSON schema</summary>"]
28456#[doc = r""]
28457#[doc = r" ```json"]
28458#[doc = "{"]
28459#[doc = " \"type\": \"string\","]
28460#[doc = " \"enum\": ["]
28461#[doc = " \"single_access_key_changes\""]
28462#[doc = " ]"]
28463#[doc = "}"]
28464#[doc = r" ```"]
28465#[doc = r" </details>"]
28466#[derive(
28467 :: serde :: Deserialize,
28468 :: serde :: Serialize,
28469 Clone,
28470 Copy,
28471 Debug,
28472 Eq,
28473 Hash,
28474 Ord,
28475 PartialEq,
28476 PartialOrd,
28477)]
28478pub enum SingleAccessKeyChangesByBlockIdChangesType {
28479 #[serde(rename = "single_access_key_changes")]
28480 SingleAccessKeyChanges,
28481}
28482impl ::std::convert::From<&Self> for SingleAccessKeyChangesByBlockIdChangesType {
28483 fn from(value: &SingleAccessKeyChangesByBlockIdChangesType) -> Self {
28484 value.clone()
28485 }
28486}
28487impl ::std::fmt::Display for SingleAccessKeyChangesByBlockIdChangesType {
28488 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28489 match *self {
28490 Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
28491 }
28492 }
28493}
28494impl ::std::str::FromStr for SingleAccessKeyChangesByBlockIdChangesType {
28495 type Err = self::error::ConversionError;
28496 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28497 match value {
28498 "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
28499 _ => Err("invalid value".into()),
28500 }
28501 }
28502}
28503impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByBlockIdChangesType {
28504 type Error = self::error::ConversionError;
28505 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28506 value.parse()
28507 }
28508}
28509impl ::std::convert::TryFrom<&::std::string::String>
28510 for SingleAccessKeyChangesByBlockIdChangesType
28511{
28512 type Error = self::error::ConversionError;
28513 fn try_from(
28514 value: &::std::string::String,
28515 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28516 value.parse()
28517 }
28518}
28519impl ::std::convert::TryFrom<::std::string::String> for SingleAccessKeyChangesByBlockIdChangesType {
28520 type Error = self::error::ConversionError;
28521 fn try_from(
28522 value: ::std::string::String,
28523 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28524 value.parse()
28525 }
28526}
28527#[doc = "`SingleAccessKeyChangesByFinalityChangesType`"]
28528#[doc = r""]
28529#[doc = r" <details><summary>JSON schema</summary>"]
28530#[doc = r""]
28531#[doc = r" ```json"]
28532#[doc = "{"]
28533#[doc = " \"type\": \"string\","]
28534#[doc = " \"enum\": ["]
28535#[doc = " \"single_access_key_changes\""]
28536#[doc = " ]"]
28537#[doc = "}"]
28538#[doc = r" ```"]
28539#[doc = r" </details>"]
28540#[derive(
28541 :: serde :: Deserialize,
28542 :: serde :: Serialize,
28543 Clone,
28544 Copy,
28545 Debug,
28546 Eq,
28547 Hash,
28548 Ord,
28549 PartialEq,
28550 PartialOrd,
28551)]
28552pub enum SingleAccessKeyChangesByFinalityChangesType {
28553 #[serde(rename = "single_access_key_changes")]
28554 SingleAccessKeyChanges,
28555}
28556impl ::std::convert::From<&Self> for SingleAccessKeyChangesByFinalityChangesType {
28557 fn from(value: &SingleAccessKeyChangesByFinalityChangesType) -> Self {
28558 value.clone()
28559 }
28560}
28561impl ::std::fmt::Display for SingleAccessKeyChangesByFinalityChangesType {
28562 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28563 match *self {
28564 Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
28565 }
28566 }
28567}
28568impl ::std::str::FromStr for SingleAccessKeyChangesByFinalityChangesType {
28569 type Err = self::error::ConversionError;
28570 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28571 match value {
28572 "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
28573 _ => Err("invalid value".into()),
28574 }
28575 }
28576}
28577impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByFinalityChangesType {
28578 type Error = self::error::ConversionError;
28579 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28580 value.parse()
28581 }
28582}
28583impl ::std::convert::TryFrom<&::std::string::String>
28584 for SingleAccessKeyChangesByFinalityChangesType
28585{
28586 type Error = self::error::ConversionError;
28587 fn try_from(
28588 value: &::std::string::String,
28589 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28590 value.parse()
28591 }
28592}
28593impl ::std::convert::TryFrom<::std::string::String>
28594 for SingleAccessKeyChangesByFinalityChangesType
28595{
28596 type Error = self::error::ConversionError;
28597 fn try_from(
28598 value: ::std::string::String,
28599 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28600 value.parse()
28601 }
28602}
28603#[doc = "`SingleAccessKeyChangesBySyncCheckpointChangesType`"]
28604#[doc = r""]
28605#[doc = r" <details><summary>JSON schema</summary>"]
28606#[doc = r""]
28607#[doc = r" ```json"]
28608#[doc = "{"]
28609#[doc = " \"type\": \"string\","]
28610#[doc = " \"enum\": ["]
28611#[doc = " \"single_access_key_changes\""]
28612#[doc = " ]"]
28613#[doc = "}"]
28614#[doc = r" ```"]
28615#[doc = r" </details>"]
28616#[derive(
28617 :: serde :: Deserialize,
28618 :: serde :: Serialize,
28619 Clone,
28620 Copy,
28621 Debug,
28622 Eq,
28623 Hash,
28624 Ord,
28625 PartialEq,
28626 PartialOrd,
28627)]
28628pub enum SingleAccessKeyChangesBySyncCheckpointChangesType {
28629 #[serde(rename = "single_access_key_changes")]
28630 SingleAccessKeyChanges,
28631}
28632impl ::std::convert::From<&Self> for SingleAccessKeyChangesBySyncCheckpointChangesType {
28633 fn from(value: &SingleAccessKeyChangesBySyncCheckpointChangesType) -> Self {
28634 value.clone()
28635 }
28636}
28637impl ::std::fmt::Display for SingleAccessKeyChangesBySyncCheckpointChangesType {
28638 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28639 match *self {
28640 Self::SingleAccessKeyChanges => f.write_str("single_access_key_changes"),
28641 }
28642 }
28643}
28644impl ::std::str::FromStr for SingleAccessKeyChangesBySyncCheckpointChangesType {
28645 type Err = self::error::ConversionError;
28646 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28647 match value {
28648 "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
28649 _ => Err("invalid value".into()),
28650 }
28651 }
28652}
28653impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesBySyncCheckpointChangesType {
28654 type Error = self::error::ConversionError;
28655 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28656 value.parse()
28657 }
28658}
28659impl ::std::convert::TryFrom<&::std::string::String>
28660 for SingleAccessKeyChangesBySyncCheckpointChangesType
28661{
28662 type Error = self::error::ConversionError;
28663 fn try_from(
28664 value: &::std::string::String,
28665 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28666 value.parse()
28667 }
28668}
28669impl ::std::convert::TryFrom<::std::string::String>
28670 for SingleAccessKeyChangesBySyncCheckpointChangesType
28671{
28672 type Error = self::error::ConversionError;
28673 fn try_from(
28674 value: ::std::string::String,
28675 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28676 value.parse()
28677 }
28678}
28679#[doc = "`SingleGasKeyChangesByBlockIdChangesType`"]
28680#[doc = r""]
28681#[doc = r" <details><summary>JSON schema</summary>"]
28682#[doc = r""]
28683#[doc = r" ```json"]
28684#[doc = "{"]
28685#[doc = " \"type\": \"string\","]
28686#[doc = " \"enum\": ["]
28687#[doc = " \"single_gas_key_changes\""]
28688#[doc = " ]"]
28689#[doc = "}"]
28690#[doc = r" ```"]
28691#[doc = r" </details>"]
28692#[derive(
28693 :: serde :: Deserialize,
28694 :: serde :: Serialize,
28695 Clone,
28696 Copy,
28697 Debug,
28698 Eq,
28699 Hash,
28700 Ord,
28701 PartialEq,
28702 PartialOrd,
28703)]
28704pub enum SingleGasKeyChangesByBlockIdChangesType {
28705 #[serde(rename = "single_gas_key_changes")]
28706 SingleGasKeyChanges,
28707}
28708impl ::std::convert::From<&Self> for SingleGasKeyChangesByBlockIdChangesType {
28709 fn from(value: &SingleGasKeyChangesByBlockIdChangesType) -> Self {
28710 value.clone()
28711 }
28712}
28713impl ::std::fmt::Display for SingleGasKeyChangesByBlockIdChangesType {
28714 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28715 match *self {
28716 Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
28717 }
28718 }
28719}
28720impl ::std::str::FromStr for SingleGasKeyChangesByBlockIdChangesType {
28721 type Err = self::error::ConversionError;
28722 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28723 match value {
28724 "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
28725 _ => Err("invalid value".into()),
28726 }
28727 }
28728}
28729impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByBlockIdChangesType {
28730 type Error = self::error::ConversionError;
28731 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28732 value.parse()
28733 }
28734}
28735impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
28736 type Error = self::error::ConversionError;
28737 fn try_from(
28738 value: &::std::string::String,
28739 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28740 value.parse()
28741 }
28742}
28743impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
28744 type Error = self::error::ConversionError;
28745 fn try_from(
28746 value: ::std::string::String,
28747 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28748 value.parse()
28749 }
28750}
28751#[doc = "`SingleGasKeyChangesByFinalityChangesType`"]
28752#[doc = r""]
28753#[doc = r" <details><summary>JSON schema</summary>"]
28754#[doc = r""]
28755#[doc = r" ```json"]
28756#[doc = "{"]
28757#[doc = " \"type\": \"string\","]
28758#[doc = " \"enum\": ["]
28759#[doc = " \"single_gas_key_changes\""]
28760#[doc = " ]"]
28761#[doc = "}"]
28762#[doc = r" ```"]
28763#[doc = r" </details>"]
28764#[derive(
28765 :: serde :: Deserialize,
28766 :: serde :: Serialize,
28767 Clone,
28768 Copy,
28769 Debug,
28770 Eq,
28771 Hash,
28772 Ord,
28773 PartialEq,
28774 PartialOrd,
28775)]
28776pub enum SingleGasKeyChangesByFinalityChangesType {
28777 #[serde(rename = "single_gas_key_changes")]
28778 SingleGasKeyChanges,
28779}
28780impl ::std::convert::From<&Self> for SingleGasKeyChangesByFinalityChangesType {
28781 fn from(value: &SingleGasKeyChangesByFinalityChangesType) -> Self {
28782 value.clone()
28783 }
28784}
28785impl ::std::fmt::Display for SingleGasKeyChangesByFinalityChangesType {
28786 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28787 match *self {
28788 Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
28789 }
28790 }
28791}
28792impl ::std::str::FromStr for SingleGasKeyChangesByFinalityChangesType {
28793 type Err = self::error::ConversionError;
28794 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28795 match value {
28796 "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
28797 _ => Err("invalid value".into()),
28798 }
28799 }
28800}
28801impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByFinalityChangesType {
28802 type Error = self::error::ConversionError;
28803 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28804 value.parse()
28805 }
28806}
28807impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
28808 type Error = self::error::ConversionError;
28809 fn try_from(
28810 value: &::std::string::String,
28811 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28812 value.parse()
28813 }
28814}
28815impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
28816 type Error = self::error::ConversionError;
28817 fn try_from(
28818 value: ::std::string::String,
28819 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28820 value.parse()
28821 }
28822}
28823#[doc = "`SingleGasKeyChangesBySyncCheckpointChangesType`"]
28824#[doc = r""]
28825#[doc = r" <details><summary>JSON schema</summary>"]
28826#[doc = r""]
28827#[doc = r" ```json"]
28828#[doc = "{"]
28829#[doc = " \"type\": \"string\","]
28830#[doc = " \"enum\": ["]
28831#[doc = " \"single_gas_key_changes\""]
28832#[doc = " ]"]
28833#[doc = "}"]
28834#[doc = r" ```"]
28835#[doc = r" </details>"]
28836#[derive(
28837 :: serde :: Deserialize,
28838 :: serde :: Serialize,
28839 Clone,
28840 Copy,
28841 Debug,
28842 Eq,
28843 Hash,
28844 Ord,
28845 PartialEq,
28846 PartialOrd,
28847)]
28848pub enum SingleGasKeyChangesBySyncCheckpointChangesType {
28849 #[serde(rename = "single_gas_key_changes")]
28850 SingleGasKeyChanges,
28851}
28852impl ::std::convert::From<&Self> for SingleGasKeyChangesBySyncCheckpointChangesType {
28853 fn from(value: &SingleGasKeyChangesBySyncCheckpointChangesType) -> Self {
28854 value.clone()
28855 }
28856}
28857impl ::std::fmt::Display for SingleGasKeyChangesBySyncCheckpointChangesType {
28858 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28859 match *self {
28860 Self::SingleGasKeyChanges => f.write_str("single_gas_key_changes"),
28861 }
28862 }
28863}
28864impl ::std::str::FromStr for SingleGasKeyChangesBySyncCheckpointChangesType {
28865 type Err = self::error::ConversionError;
28866 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28867 match value {
28868 "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
28869 _ => Err("invalid value".into()),
28870 }
28871 }
28872}
28873impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesBySyncCheckpointChangesType {
28874 type Error = self::error::ConversionError;
28875 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28876 value.parse()
28877 }
28878}
28879impl ::std::convert::TryFrom<&::std::string::String>
28880 for SingleGasKeyChangesBySyncCheckpointChangesType
28881{
28882 type Error = self::error::ConversionError;
28883 fn try_from(
28884 value: &::std::string::String,
28885 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28886 value.parse()
28887 }
28888}
28889impl ::std::convert::TryFrom<::std::string::String>
28890 for SingleGasKeyChangesBySyncCheckpointChangesType
28891{
28892 type Error = self::error::ConversionError;
28893 fn try_from(
28894 value: ::std::string::String,
28895 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28896 value.parse()
28897 }
28898}
28899#[doc = "`SlashedValidator`"]
28900#[doc = r""]
28901#[doc = r" <details><summary>JSON schema</summary>"]
28902#[doc = r""]
28903#[doc = r" ```json"]
28904#[doc = "{"]
28905#[doc = " \"type\": \"object\","]
28906#[doc = " \"required\": ["]
28907#[doc = " \"account_id\","]
28908#[doc = " \"is_double_sign\""]
28909#[doc = " ],"]
28910#[doc = " \"properties\": {"]
28911#[doc = " \"account_id\": {"]
28912#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
28913#[doc = " },"]
28914#[doc = " \"is_double_sign\": {"]
28915#[doc = " \"type\": \"boolean\""]
28916#[doc = " }"]
28917#[doc = " }"]
28918#[doc = "}"]
28919#[doc = r" ```"]
28920#[doc = r" </details>"]
28921#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28922pub struct SlashedValidator {
28923 pub account_id: AccountId,
28924 pub is_double_sign: bool,
28925}
28926impl ::std::convert::From<&SlashedValidator> for SlashedValidator {
28927 fn from(value: &SlashedValidator) -> Self {
28928 value.clone()
28929 }
28930}
28931#[doc = "An action which stakes signer_id tokens and setup's validator public key"]
28932#[doc = r""]
28933#[doc = r" <details><summary>JSON schema</summary>"]
28934#[doc = r""]
28935#[doc = r" ```json"]
28936#[doc = "{"]
28937#[doc = " \"description\": \"An action which stakes signer_id tokens and setup's validator public key\","]
28938#[doc = " \"type\": \"object\","]
28939#[doc = " \"required\": ["]
28940#[doc = " \"public_key\","]
28941#[doc = " \"stake\""]
28942#[doc = " ],"]
28943#[doc = " \"properties\": {"]
28944#[doc = " \"public_key\": {"]
28945#[doc = " \"description\": \"Validator key which will be used to sign transactions on behalf of signer_id\","]
28946#[doc = " \"allOf\": ["]
28947#[doc = " {"]
28948#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
28949#[doc = " }"]
28950#[doc = " ]"]
28951#[doc = " },"]
28952#[doc = " \"stake\": {"]
28953#[doc = " \"description\": \"Amount of tokens to stake.\","]
28954#[doc = " \"allOf\": ["]
28955#[doc = " {"]
28956#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
28957#[doc = " }"]
28958#[doc = " ]"]
28959#[doc = " }"]
28960#[doc = " }"]
28961#[doc = "}"]
28962#[doc = r" ```"]
28963#[doc = r" </details>"]
28964#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28965pub struct StakeAction {
28966 #[doc = "Validator key which will be used to sign transactions on behalf of signer_id"]
28967 pub public_key: PublicKey,
28968 #[doc = "Amount of tokens to stake."]
28969 pub stake: NearToken,
28970}
28971impl ::std::convert::From<&StakeAction> for StakeAction {
28972 fn from(value: &StakeAction) -> Self {
28973 value.clone()
28974 }
28975}
28976#[doc = "See crate::types::StateChangeCause for details."]
28977#[doc = r""]
28978#[doc = r" <details><summary>JSON schema</summary>"]
28979#[doc = r""]
28980#[doc = r" ```json"]
28981#[doc = "{"]
28982#[doc = " \"description\": \"See crate::types::StateChangeCause for details.\","]
28983#[doc = " \"oneOf\": ["]
28984#[doc = " {"]
28985#[doc = " \"type\": \"object\","]
28986#[doc = " \"required\": ["]
28987#[doc = " \"type\""]
28988#[doc = " ],"]
28989#[doc = " \"properties\": {"]
28990#[doc = " \"type\": {"]
28991#[doc = " \"type\": \"string\","]
28992#[doc = " \"enum\": ["]
28993#[doc = " \"not_writable_to_disk\""]
28994#[doc = " ]"]
28995#[doc = " }"]
28996#[doc = " }"]
28997#[doc = " },"]
28998#[doc = " {"]
28999#[doc = " \"type\": \"object\","]
29000#[doc = " \"required\": ["]
29001#[doc = " \"type\""]
29002#[doc = " ],"]
29003#[doc = " \"properties\": {"]
29004#[doc = " \"type\": {"]
29005#[doc = " \"type\": \"string\","]
29006#[doc = " \"enum\": ["]
29007#[doc = " \"initial_state\""]
29008#[doc = " ]"]
29009#[doc = " }"]
29010#[doc = " }"]
29011#[doc = " },"]
29012#[doc = " {"]
29013#[doc = " \"type\": \"object\","]
29014#[doc = " \"required\": ["]
29015#[doc = " \"tx_hash\","]
29016#[doc = " \"type\""]
29017#[doc = " ],"]
29018#[doc = " \"properties\": {"]
29019#[doc = " \"tx_hash\": {"]
29020#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29021#[doc = " },"]
29022#[doc = " \"type\": {"]
29023#[doc = " \"type\": \"string\","]
29024#[doc = " \"enum\": ["]
29025#[doc = " \"transaction_processing\""]
29026#[doc = " ]"]
29027#[doc = " }"]
29028#[doc = " }"]
29029#[doc = " },"]
29030#[doc = " {"]
29031#[doc = " \"type\": \"object\","]
29032#[doc = " \"required\": ["]
29033#[doc = " \"receipt_hash\","]
29034#[doc = " \"type\""]
29035#[doc = " ],"]
29036#[doc = " \"properties\": {"]
29037#[doc = " \"receipt_hash\": {"]
29038#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29039#[doc = " },"]
29040#[doc = " \"type\": {"]
29041#[doc = " \"type\": \"string\","]
29042#[doc = " \"enum\": ["]
29043#[doc = " \"action_receipt_processing_started\""]
29044#[doc = " ]"]
29045#[doc = " }"]
29046#[doc = " }"]
29047#[doc = " },"]
29048#[doc = " {"]
29049#[doc = " \"type\": \"object\","]
29050#[doc = " \"required\": ["]
29051#[doc = " \"receipt_hash\","]
29052#[doc = " \"type\""]
29053#[doc = " ],"]
29054#[doc = " \"properties\": {"]
29055#[doc = " \"receipt_hash\": {"]
29056#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29057#[doc = " },"]
29058#[doc = " \"type\": {"]
29059#[doc = " \"type\": \"string\","]
29060#[doc = " \"enum\": ["]
29061#[doc = " \"action_receipt_gas_reward\""]
29062#[doc = " ]"]
29063#[doc = " }"]
29064#[doc = " }"]
29065#[doc = " },"]
29066#[doc = " {"]
29067#[doc = " \"type\": \"object\","]
29068#[doc = " \"required\": ["]
29069#[doc = " \"receipt_hash\","]
29070#[doc = " \"type\""]
29071#[doc = " ],"]
29072#[doc = " \"properties\": {"]
29073#[doc = " \"receipt_hash\": {"]
29074#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29075#[doc = " },"]
29076#[doc = " \"type\": {"]
29077#[doc = " \"type\": \"string\","]
29078#[doc = " \"enum\": ["]
29079#[doc = " \"receipt_processing\""]
29080#[doc = " ]"]
29081#[doc = " }"]
29082#[doc = " }"]
29083#[doc = " },"]
29084#[doc = " {"]
29085#[doc = " \"type\": \"object\","]
29086#[doc = " \"required\": ["]
29087#[doc = " \"receipt_hash\","]
29088#[doc = " \"type\""]
29089#[doc = " ],"]
29090#[doc = " \"properties\": {"]
29091#[doc = " \"receipt_hash\": {"]
29092#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29093#[doc = " },"]
29094#[doc = " \"type\": {"]
29095#[doc = " \"type\": \"string\","]
29096#[doc = " \"enum\": ["]
29097#[doc = " \"postponed_receipt\""]
29098#[doc = " ]"]
29099#[doc = " }"]
29100#[doc = " }"]
29101#[doc = " },"]
29102#[doc = " {"]
29103#[doc = " \"type\": \"object\","]
29104#[doc = " \"required\": ["]
29105#[doc = " \"type\""]
29106#[doc = " ],"]
29107#[doc = " \"properties\": {"]
29108#[doc = " \"type\": {"]
29109#[doc = " \"type\": \"string\","]
29110#[doc = " \"enum\": ["]
29111#[doc = " \"updated_delayed_receipts\""]
29112#[doc = " ]"]
29113#[doc = " }"]
29114#[doc = " }"]
29115#[doc = " },"]
29116#[doc = " {"]
29117#[doc = " \"type\": \"object\","]
29118#[doc = " \"required\": ["]
29119#[doc = " \"type\""]
29120#[doc = " ],"]
29121#[doc = " \"properties\": {"]
29122#[doc = " \"type\": {"]
29123#[doc = " \"type\": \"string\","]
29124#[doc = " \"enum\": ["]
29125#[doc = " \"validator_accounts_update\""]
29126#[doc = " ]"]
29127#[doc = " }"]
29128#[doc = " }"]
29129#[doc = " },"]
29130#[doc = " {"]
29131#[doc = " \"type\": \"object\","]
29132#[doc = " \"required\": ["]
29133#[doc = " \"type\""]
29134#[doc = " ],"]
29135#[doc = " \"properties\": {"]
29136#[doc = " \"type\": {"]
29137#[doc = " \"type\": \"string\","]
29138#[doc = " \"enum\": ["]
29139#[doc = " \"migration\""]
29140#[doc = " ]"]
29141#[doc = " }"]
29142#[doc = " }"]
29143#[doc = " },"]
29144#[doc = " {"]
29145#[doc = " \"type\": \"object\","]
29146#[doc = " \"required\": ["]
29147#[doc = " \"type\""]
29148#[doc = " ],"]
29149#[doc = " \"properties\": {"]
29150#[doc = " \"type\": {"]
29151#[doc = " \"type\": \"string\","]
29152#[doc = " \"enum\": ["]
29153#[doc = " \"bandwidth_scheduler_state_update\""]
29154#[doc = " ]"]
29155#[doc = " }"]
29156#[doc = " }"]
29157#[doc = " }"]
29158#[doc = " ]"]
29159#[doc = "}"]
29160#[doc = r" ```"]
29161#[doc = r" </details>"]
29162#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29163#[serde(tag = "type")]
29164pub enum StateChangeCauseView {
29165 #[serde(rename = "not_writable_to_disk")]
29166 NotWritableToDisk,
29167 #[serde(rename = "initial_state")]
29168 InitialState,
29169 #[serde(rename = "transaction_processing")]
29170 TransactionProcessing { tx_hash: CryptoHash },
29171 #[serde(rename = "action_receipt_processing_started")]
29172 ActionReceiptProcessingStarted { receipt_hash: CryptoHash },
29173 #[serde(rename = "action_receipt_gas_reward")]
29174 ActionReceiptGasReward { receipt_hash: CryptoHash },
29175 #[serde(rename = "receipt_processing")]
29176 ReceiptProcessing { receipt_hash: CryptoHash },
29177 #[serde(rename = "postponed_receipt")]
29178 PostponedReceipt { receipt_hash: CryptoHash },
29179 #[serde(rename = "updated_delayed_receipts")]
29180 UpdatedDelayedReceipts,
29181 #[serde(rename = "validator_accounts_update")]
29182 ValidatorAccountsUpdate,
29183 #[serde(rename = "migration")]
29184 Migration,
29185 #[serde(rename = "bandwidth_scheduler_state_update")]
29186 BandwidthSchedulerStateUpdate,
29187}
29188impl ::std::convert::From<&Self> for StateChangeCauseView {
29189 fn from(value: &StateChangeCauseView) -> Self {
29190 value.clone()
29191 }
29192}
29193#[doc = "It is a [serializable view] of [`StateChangeKind`].\n\n[serializable view]: ./index.html\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html"]
29194#[doc = r""]
29195#[doc = r" <details><summary>JSON schema</summary>"]
29196#[doc = r""]
29197#[doc = r" ```json"]
29198#[doc = "{"]
29199#[doc = " \"description\": \"It is a [serializable view] of [`StateChangeKind`].\\n\\n[serializable view]: ./index.html\\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html\","]
29200#[doc = " \"oneOf\": ["]
29201#[doc = " {"]
29202#[doc = " \"type\": \"object\","]
29203#[doc = " \"required\": ["]
29204#[doc = " \"account_id\","]
29205#[doc = " \"type\""]
29206#[doc = " ],"]
29207#[doc = " \"properties\": {"]
29208#[doc = " \"account_id\": {"]
29209#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29210#[doc = " },"]
29211#[doc = " \"type\": {"]
29212#[doc = " \"type\": \"string\","]
29213#[doc = " \"enum\": ["]
29214#[doc = " \"account_touched\""]
29215#[doc = " ]"]
29216#[doc = " }"]
29217#[doc = " }"]
29218#[doc = " },"]
29219#[doc = " {"]
29220#[doc = " \"type\": \"object\","]
29221#[doc = " \"required\": ["]
29222#[doc = " \"account_id\","]
29223#[doc = " \"type\""]
29224#[doc = " ],"]
29225#[doc = " \"properties\": {"]
29226#[doc = " \"account_id\": {"]
29227#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29228#[doc = " },"]
29229#[doc = " \"type\": {"]
29230#[doc = " \"type\": \"string\","]
29231#[doc = " \"enum\": ["]
29232#[doc = " \"access_key_touched\""]
29233#[doc = " ]"]
29234#[doc = " }"]
29235#[doc = " }"]
29236#[doc = " },"]
29237#[doc = " {"]
29238#[doc = " \"type\": \"object\","]
29239#[doc = " \"required\": ["]
29240#[doc = " \"account_id\","]
29241#[doc = " \"type\""]
29242#[doc = " ],"]
29243#[doc = " \"properties\": {"]
29244#[doc = " \"account_id\": {"]
29245#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29246#[doc = " },"]
29247#[doc = " \"type\": {"]
29248#[doc = " \"type\": \"string\","]
29249#[doc = " \"enum\": ["]
29250#[doc = " \"data_touched\""]
29251#[doc = " ]"]
29252#[doc = " }"]
29253#[doc = " }"]
29254#[doc = " },"]
29255#[doc = " {"]
29256#[doc = " \"type\": \"object\","]
29257#[doc = " \"required\": ["]
29258#[doc = " \"account_id\","]
29259#[doc = " \"type\""]
29260#[doc = " ],"]
29261#[doc = " \"properties\": {"]
29262#[doc = " \"account_id\": {"]
29263#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29264#[doc = " },"]
29265#[doc = " \"type\": {"]
29266#[doc = " \"type\": \"string\","]
29267#[doc = " \"enum\": ["]
29268#[doc = " \"contract_code_touched\""]
29269#[doc = " ]"]
29270#[doc = " }"]
29271#[doc = " }"]
29272#[doc = " }"]
29273#[doc = " ]"]
29274#[doc = "}"]
29275#[doc = r" ```"]
29276#[doc = r" </details>"]
29277#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29278#[serde(tag = "type", content = "account_id")]
29279pub enum StateChangeKindView {
29280 #[serde(rename = "account_touched")]
29281 AccountTouched(AccountId),
29282 #[serde(rename = "access_key_touched")]
29283 AccessKeyTouched(AccountId),
29284 #[serde(rename = "data_touched")]
29285 DataTouched(AccountId),
29286 #[serde(rename = "contract_code_touched")]
29287 ContractCodeTouched(AccountId),
29288}
29289impl ::std::convert::From<&Self> for StateChangeKindView {
29290 fn from(value: &StateChangeKindView) -> Self {
29291 value.clone()
29292 }
29293}
29294#[doc = "`StateChangeWithCauseView`"]
29295#[doc = r""]
29296#[doc = r" <details><summary>JSON schema</summary>"]
29297#[doc = r""]
29298#[doc = r" ```json"]
29299#[doc = "{"]
29300#[doc = " \"type\": \"object\","]
29301#[doc = " \"oneOf\": ["]
29302#[doc = " {"]
29303#[doc = " \"type\": \"object\","]
29304#[doc = " \"required\": ["]
29305#[doc = " \"change\","]
29306#[doc = " \"type\""]
29307#[doc = " ],"]
29308#[doc = " \"properties\": {"]
29309#[doc = " \"change\": {"]
29310#[doc = " \"description\": \"A view of the account\","]
29311#[doc = " \"type\": \"object\","]
29312#[doc = " \"required\": ["]
29313#[doc = " \"account_id\","]
29314#[doc = " \"amount\","]
29315#[doc = " \"code_hash\","]
29316#[doc = " \"locked\","]
29317#[doc = " \"storage_usage\""]
29318#[doc = " ],"]
29319#[doc = " \"properties\": {"]
29320#[doc = " \"account_id\": {"]
29321#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29322#[doc = " },"]
29323#[doc = " \"amount\": {"]
29324#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
29325#[doc = " },"]
29326#[doc = " \"code_hash\": {"]
29327#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29328#[doc = " },"]
29329#[doc = " \"global_contract_account_id\": {"]
29330#[doc = " \"anyOf\": ["]
29331#[doc = " {"]
29332#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29333#[doc = " },"]
29334#[doc = " {"]
29335#[doc = " \"type\": \"null\""]
29336#[doc = " }"]
29337#[doc = " ]"]
29338#[doc = " },"]
29339#[doc = " \"global_contract_hash\": {"]
29340#[doc = " \"anyOf\": ["]
29341#[doc = " {"]
29342#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29343#[doc = " },"]
29344#[doc = " {"]
29345#[doc = " \"type\": \"null\""]
29346#[doc = " }"]
29347#[doc = " ]"]
29348#[doc = " },"]
29349#[doc = " \"locked\": {"]
29350#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
29351#[doc = " },"]
29352#[doc = " \"storage_paid_at\": {"]
29353#[doc = " \"description\": \"TODO(2271): deprecated.\","]
29354#[doc = " \"default\": 0,"]
29355#[doc = " \"type\": \"integer\","]
29356#[doc = " \"format\": \"uint64\","]
29357#[doc = " \"minimum\": 0.0"]
29358#[doc = " },"]
29359#[doc = " \"storage_usage\": {"]
29360#[doc = " \"type\": \"integer\","]
29361#[doc = " \"format\": \"uint64\","]
29362#[doc = " \"minimum\": 0.0"]
29363#[doc = " }"]
29364#[doc = " }"]
29365#[doc = " },"]
29366#[doc = " \"type\": {"]
29367#[doc = " \"type\": \"string\","]
29368#[doc = " \"enum\": ["]
29369#[doc = " \"account_update\""]
29370#[doc = " ]"]
29371#[doc = " }"]
29372#[doc = " }"]
29373#[doc = " },"]
29374#[doc = " {"]
29375#[doc = " \"type\": \"object\","]
29376#[doc = " \"required\": ["]
29377#[doc = " \"change\","]
29378#[doc = " \"type\""]
29379#[doc = " ],"]
29380#[doc = " \"properties\": {"]
29381#[doc = " \"change\": {"]
29382#[doc = " \"type\": \"object\","]
29383#[doc = " \"required\": ["]
29384#[doc = " \"account_id\""]
29385#[doc = " ],"]
29386#[doc = " \"properties\": {"]
29387#[doc = " \"account_id\": {"]
29388#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29389#[doc = " }"]
29390#[doc = " }"]
29391#[doc = " },"]
29392#[doc = " \"type\": {"]
29393#[doc = " \"type\": \"string\","]
29394#[doc = " \"enum\": ["]
29395#[doc = " \"account_deletion\""]
29396#[doc = " ]"]
29397#[doc = " }"]
29398#[doc = " }"]
29399#[doc = " },"]
29400#[doc = " {"]
29401#[doc = " \"type\": \"object\","]
29402#[doc = " \"required\": ["]
29403#[doc = " \"change\","]
29404#[doc = " \"type\""]
29405#[doc = " ],"]
29406#[doc = " \"properties\": {"]
29407#[doc = " \"change\": {"]
29408#[doc = " \"type\": \"object\","]
29409#[doc = " \"required\": ["]
29410#[doc = " \"access_key\","]
29411#[doc = " \"account_id\","]
29412#[doc = " \"public_key\""]
29413#[doc = " ],"]
29414#[doc = " \"properties\": {"]
29415#[doc = " \"access_key\": {"]
29416#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
29417#[doc = " },"]
29418#[doc = " \"account_id\": {"]
29419#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29420#[doc = " },"]
29421#[doc = " \"public_key\": {"]
29422#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
29423#[doc = " }"]
29424#[doc = " }"]
29425#[doc = " },"]
29426#[doc = " \"type\": {"]
29427#[doc = " \"type\": \"string\","]
29428#[doc = " \"enum\": ["]
29429#[doc = " \"access_key_update\""]
29430#[doc = " ]"]
29431#[doc = " }"]
29432#[doc = " }"]
29433#[doc = " },"]
29434#[doc = " {"]
29435#[doc = " \"type\": \"object\","]
29436#[doc = " \"required\": ["]
29437#[doc = " \"change\","]
29438#[doc = " \"type\""]
29439#[doc = " ],"]
29440#[doc = " \"properties\": {"]
29441#[doc = " \"change\": {"]
29442#[doc = " \"type\": \"object\","]
29443#[doc = " \"required\": ["]
29444#[doc = " \"account_id\","]
29445#[doc = " \"public_key\""]
29446#[doc = " ],"]
29447#[doc = " \"properties\": {"]
29448#[doc = " \"account_id\": {"]
29449#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29450#[doc = " },"]
29451#[doc = " \"public_key\": {"]
29452#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
29453#[doc = " }"]
29454#[doc = " }"]
29455#[doc = " },"]
29456#[doc = " \"type\": {"]
29457#[doc = " \"type\": \"string\","]
29458#[doc = " \"enum\": ["]
29459#[doc = " \"access_key_deletion\""]
29460#[doc = " ]"]
29461#[doc = " }"]
29462#[doc = " }"]
29463#[doc = " },"]
29464#[doc = " {"]
29465#[doc = " \"type\": \"object\","]
29466#[doc = " \"required\": ["]
29467#[doc = " \"change\","]
29468#[doc = " \"type\""]
29469#[doc = " ],"]
29470#[doc = " \"properties\": {"]
29471#[doc = " \"change\": {"]
29472#[doc = " \"type\": \"object\","]
29473#[doc = " \"required\": ["]
29474#[doc = " \"account_id\","]
29475#[doc = " \"gas_key\","]
29476#[doc = " \"public_key\""]
29477#[doc = " ],"]
29478#[doc = " \"properties\": {"]
29479#[doc = " \"account_id\": {"]
29480#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29481#[doc = " },"]
29482#[doc = " \"gas_key\": {"]
29483#[doc = " \"$ref\": \"#/components/schemas/GasKey\""]
29484#[doc = " },"]
29485#[doc = " \"public_key\": {"]
29486#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
29487#[doc = " }"]
29488#[doc = " }"]
29489#[doc = " },"]
29490#[doc = " \"type\": {"]
29491#[doc = " \"type\": \"string\","]
29492#[doc = " \"enum\": ["]
29493#[doc = " \"gas_key_update\""]
29494#[doc = " ]"]
29495#[doc = " }"]
29496#[doc = " }"]
29497#[doc = " },"]
29498#[doc = " {"]
29499#[doc = " \"type\": \"object\","]
29500#[doc = " \"required\": ["]
29501#[doc = " \"change\","]
29502#[doc = " \"type\""]
29503#[doc = " ],"]
29504#[doc = " \"properties\": {"]
29505#[doc = " \"change\": {"]
29506#[doc = " \"type\": \"object\","]
29507#[doc = " \"required\": ["]
29508#[doc = " \"account_id\","]
29509#[doc = " \"index\","]
29510#[doc = " \"nonce\","]
29511#[doc = " \"public_key\""]
29512#[doc = " ],"]
29513#[doc = " \"properties\": {"]
29514#[doc = " \"account_id\": {"]
29515#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29516#[doc = " },"]
29517#[doc = " \"index\": {"]
29518#[doc = " \"type\": \"integer\","]
29519#[doc = " \"format\": \"uint32\","]
29520#[doc = " \"minimum\": 0.0"]
29521#[doc = " },"]
29522#[doc = " \"nonce\": {"]
29523#[doc = " \"type\": \"integer\","]
29524#[doc = " \"format\": \"uint64\","]
29525#[doc = " \"minimum\": 0.0"]
29526#[doc = " },"]
29527#[doc = " \"public_key\": {"]
29528#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
29529#[doc = " }"]
29530#[doc = " }"]
29531#[doc = " },"]
29532#[doc = " \"type\": {"]
29533#[doc = " \"type\": \"string\","]
29534#[doc = " \"enum\": ["]
29535#[doc = " \"gas_key_nonce_update\""]
29536#[doc = " ]"]
29537#[doc = " }"]
29538#[doc = " }"]
29539#[doc = " },"]
29540#[doc = " {"]
29541#[doc = " \"type\": \"object\","]
29542#[doc = " \"required\": ["]
29543#[doc = " \"change\","]
29544#[doc = " \"type\""]
29545#[doc = " ],"]
29546#[doc = " \"properties\": {"]
29547#[doc = " \"change\": {"]
29548#[doc = " \"type\": \"object\","]
29549#[doc = " \"required\": ["]
29550#[doc = " \"account_id\","]
29551#[doc = " \"public_key\""]
29552#[doc = " ],"]
29553#[doc = " \"properties\": {"]
29554#[doc = " \"account_id\": {"]
29555#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29556#[doc = " },"]
29557#[doc = " \"public_key\": {"]
29558#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
29559#[doc = " }"]
29560#[doc = " }"]
29561#[doc = " },"]
29562#[doc = " \"type\": {"]
29563#[doc = " \"type\": \"string\","]
29564#[doc = " \"enum\": ["]
29565#[doc = " \"gas_key_deletion\""]
29566#[doc = " ]"]
29567#[doc = " }"]
29568#[doc = " }"]
29569#[doc = " },"]
29570#[doc = " {"]
29571#[doc = " \"type\": \"object\","]
29572#[doc = " \"required\": ["]
29573#[doc = " \"change\","]
29574#[doc = " \"type\""]
29575#[doc = " ],"]
29576#[doc = " \"properties\": {"]
29577#[doc = " \"change\": {"]
29578#[doc = " \"type\": \"object\","]
29579#[doc = " \"required\": ["]
29580#[doc = " \"account_id\","]
29581#[doc = " \"key_base64\","]
29582#[doc = " \"value_base64\""]
29583#[doc = " ],"]
29584#[doc = " \"properties\": {"]
29585#[doc = " \"account_id\": {"]
29586#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29587#[doc = " },"]
29588#[doc = " \"key_base64\": {"]
29589#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
29590#[doc = " },"]
29591#[doc = " \"value_base64\": {"]
29592#[doc = " \"$ref\": \"#/components/schemas/StoreValue\""]
29593#[doc = " }"]
29594#[doc = " }"]
29595#[doc = " },"]
29596#[doc = " \"type\": {"]
29597#[doc = " \"type\": \"string\","]
29598#[doc = " \"enum\": ["]
29599#[doc = " \"data_update\""]
29600#[doc = " ]"]
29601#[doc = " }"]
29602#[doc = " }"]
29603#[doc = " },"]
29604#[doc = " {"]
29605#[doc = " \"type\": \"object\","]
29606#[doc = " \"required\": ["]
29607#[doc = " \"change\","]
29608#[doc = " \"type\""]
29609#[doc = " ],"]
29610#[doc = " \"properties\": {"]
29611#[doc = " \"change\": {"]
29612#[doc = " \"type\": \"object\","]
29613#[doc = " \"required\": ["]
29614#[doc = " \"account_id\","]
29615#[doc = " \"key_base64\""]
29616#[doc = " ],"]
29617#[doc = " \"properties\": {"]
29618#[doc = " \"account_id\": {"]
29619#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29620#[doc = " },"]
29621#[doc = " \"key_base64\": {"]
29622#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
29623#[doc = " }"]
29624#[doc = " }"]
29625#[doc = " },"]
29626#[doc = " \"type\": {"]
29627#[doc = " \"type\": \"string\","]
29628#[doc = " \"enum\": ["]
29629#[doc = " \"data_deletion\""]
29630#[doc = " ]"]
29631#[doc = " }"]
29632#[doc = " }"]
29633#[doc = " },"]
29634#[doc = " {"]
29635#[doc = " \"type\": \"object\","]
29636#[doc = " \"required\": ["]
29637#[doc = " \"change\","]
29638#[doc = " \"type\""]
29639#[doc = " ],"]
29640#[doc = " \"properties\": {"]
29641#[doc = " \"change\": {"]
29642#[doc = " \"type\": \"object\","]
29643#[doc = " \"required\": ["]
29644#[doc = " \"account_id\","]
29645#[doc = " \"code_base64\""]
29646#[doc = " ],"]
29647#[doc = " \"properties\": {"]
29648#[doc = " \"account_id\": {"]
29649#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29650#[doc = " },"]
29651#[doc = " \"code_base64\": {"]
29652#[doc = " \"type\": \"string\""]
29653#[doc = " }"]
29654#[doc = " }"]
29655#[doc = " },"]
29656#[doc = " \"type\": {"]
29657#[doc = " \"type\": \"string\","]
29658#[doc = " \"enum\": ["]
29659#[doc = " \"contract_code_update\""]
29660#[doc = " ]"]
29661#[doc = " }"]
29662#[doc = " }"]
29663#[doc = " },"]
29664#[doc = " {"]
29665#[doc = " \"type\": \"object\","]
29666#[doc = " \"required\": ["]
29667#[doc = " \"change\","]
29668#[doc = " \"type\""]
29669#[doc = " ],"]
29670#[doc = " \"properties\": {"]
29671#[doc = " \"change\": {"]
29672#[doc = " \"type\": \"object\","]
29673#[doc = " \"required\": ["]
29674#[doc = " \"account_id\""]
29675#[doc = " ],"]
29676#[doc = " \"properties\": {"]
29677#[doc = " \"account_id\": {"]
29678#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29679#[doc = " }"]
29680#[doc = " }"]
29681#[doc = " },"]
29682#[doc = " \"type\": {"]
29683#[doc = " \"type\": \"string\","]
29684#[doc = " \"enum\": ["]
29685#[doc = " \"contract_code_deletion\""]
29686#[doc = " ]"]
29687#[doc = " }"]
29688#[doc = " }"]
29689#[doc = " }"]
29690#[doc = " ],"]
29691#[doc = " \"required\": ["]
29692#[doc = " \"cause\""]
29693#[doc = " ],"]
29694#[doc = " \"properties\": {"]
29695#[doc = " \"cause\": {"]
29696#[doc = " \"$ref\": \"#/components/schemas/StateChangeCauseView\""]
29697#[doc = " }"]
29698#[doc = " }"]
29699#[doc = "}"]
29700#[doc = r" ```"]
29701#[doc = r" </details>"]
29702#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29703#[serde(untagged)]
29704pub enum StateChangeWithCauseView {
29705 Variant0 {
29706 cause: StateChangeCauseView,
29707 change: StateChangeWithCauseViewVariant0Change,
29708 #[serde(rename = "type")]
29709 type_: StateChangeWithCauseViewVariant0Type,
29710 },
29711 Variant1 {
29712 cause: StateChangeCauseView,
29713 change: StateChangeWithCauseViewVariant1Change,
29714 #[serde(rename = "type")]
29715 type_: StateChangeWithCauseViewVariant1Type,
29716 },
29717 Variant2 {
29718 cause: StateChangeCauseView,
29719 change: StateChangeWithCauseViewVariant2Change,
29720 #[serde(rename = "type")]
29721 type_: StateChangeWithCauseViewVariant2Type,
29722 },
29723 Variant3 {
29724 cause: StateChangeCauseView,
29725 change: StateChangeWithCauseViewVariant3Change,
29726 #[serde(rename = "type")]
29727 type_: StateChangeWithCauseViewVariant3Type,
29728 },
29729 Variant4 {
29730 cause: StateChangeCauseView,
29731 change: StateChangeWithCauseViewVariant4Change,
29732 #[serde(rename = "type")]
29733 type_: StateChangeWithCauseViewVariant4Type,
29734 },
29735 Variant5 {
29736 cause: StateChangeCauseView,
29737 change: StateChangeWithCauseViewVariant5Change,
29738 #[serde(rename = "type")]
29739 type_: StateChangeWithCauseViewVariant5Type,
29740 },
29741 Variant6 {
29742 cause: StateChangeCauseView,
29743 change: StateChangeWithCauseViewVariant6Change,
29744 #[serde(rename = "type")]
29745 type_: StateChangeWithCauseViewVariant6Type,
29746 },
29747 Variant7 {
29748 cause: StateChangeCauseView,
29749 change: StateChangeWithCauseViewVariant7Change,
29750 #[serde(rename = "type")]
29751 type_: StateChangeWithCauseViewVariant7Type,
29752 },
29753 Variant8 {
29754 cause: StateChangeCauseView,
29755 change: StateChangeWithCauseViewVariant8Change,
29756 #[serde(rename = "type")]
29757 type_: StateChangeWithCauseViewVariant8Type,
29758 },
29759 Variant9 {
29760 cause: StateChangeCauseView,
29761 change: StateChangeWithCauseViewVariant9Change,
29762 #[serde(rename = "type")]
29763 type_: StateChangeWithCauseViewVariant9Type,
29764 },
29765 Variant10 {
29766 cause: StateChangeCauseView,
29767 change: StateChangeWithCauseViewVariant10Change,
29768 #[serde(rename = "type")]
29769 type_: StateChangeWithCauseViewVariant10Type,
29770 },
29771}
29772impl ::std::convert::From<&Self> for StateChangeWithCauseView {
29773 fn from(value: &StateChangeWithCauseView) -> Self {
29774 value.clone()
29775 }
29776}
29777#[doc = "A view of the account"]
29778#[doc = r""]
29779#[doc = r" <details><summary>JSON schema</summary>"]
29780#[doc = r""]
29781#[doc = r" ```json"]
29782#[doc = "{"]
29783#[doc = " \"description\": \"A view of the account\","]
29784#[doc = " \"type\": \"object\","]
29785#[doc = " \"required\": ["]
29786#[doc = " \"account_id\","]
29787#[doc = " \"amount\","]
29788#[doc = " \"code_hash\","]
29789#[doc = " \"locked\","]
29790#[doc = " \"storage_usage\""]
29791#[doc = " ],"]
29792#[doc = " \"properties\": {"]
29793#[doc = " \"access_key\": false,"]
29794#[doc = " \"account_id\": {"]
29795#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29796#[doc = " },"]
29797#[doc = " \"amount\": {"]
29798#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
29799#[doc = " },"]
29800#[doc = " \"code_base64\": false,"]
29801#[doc = " \"code_hash\": {"]
29802#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29803#[doc = " },"]
29804#[doc = " \"gas_key\": false,"]
29805#[doc = " \"global_contract_account_id\": {"]
29806#[doc = " \"anyOf\": ["]
29807#[doc = " {"]
29808#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29809#[doc = " },"]
29810#[doc = " {"]
29811#[doc = " \"type\": \"null\""]
29812#[doc = " }"]
29813#[doc = " ]"]
29814#[doc = " },"]
29815#[doc = " \"global_contract_hash\": {"]
29816#[doc = " \"anyOf\": ["]
29817#[doc = " {"]
29818#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
29819#[doc = " },"]
29820#[doc = " {"]
29821#[doc = " \"type\": \"null\""]
29822#[doc = " }"]
29823#[doc = " ]"]
29824#[doc = " },"]
29825#[doc = " \"index\": false,"]
29826#[doc = " \"key_base64\": false,"]
29827#[doc = " \"locked\": {"]
29828#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
29829#[doc = " },"]
29830#[doc = " \"nonce\": false,"]
29831#[doc = " \"public_key\": false,"]
29832#[doc = " \"storage_paid_at\": {"]
29833#[doc = " \"description\": \"TODO(2271): deprecated.\","]
29834#[doc = " \"default\": 0,"]
29835#[doc = " \"type\": \"integer\","]
29836#[doc = " \"format\": \"uint64\","]
29837#[doc = " \"minimum\": 0.0"]
29838#[doc = " },"]
29839#[doc = " \"storage_usage\": {"]
29840#[doc = " \"type\": \"integer\","]
29841#[doc = " \"format\": \"uint64\","]
29842#[doc = " \"minimum\": 0.0"]
29843#[doc = " },"]
29844#[doc = " \"value_base64\": false"]
29845#[doc = " }"]
29846#[doc = "}"]
29847#[doc = r" ```"]
29848#[doc = r" </details>"]
29849#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29850pub struct StateChangeWithCauseViewVariant0Change {
29851 pub account_id: AccountId,
29852 pub amount: NearToken,
29853 pub code_hash: CryptoHash,
29854 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
29855 pub global_contract_account_id: ::std::option::Option<AccountId>,
29856 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
29857 pub global_contract_hash: ::std::option::Option<CryptoHash>,
29858 pub locked: NearToken,
29859 #[doc = "TODO(2271): deprecated."]
29860 #[serde(default)]
29861 pub storage_paid_at: u64,
29862 pub storage_usage: u64,
29863}
29864impl ::std::convert::From<&StateChangeWithCauseViewVariant0Change>
29865 for StateChangeWithCauseViewVariant0Change
29866{
29867 fn from(value: &StateChangeWithCauseViewVariant0Change) -> Self {
29868 value.clone()
29869 }
29870}
29871#[doc = "`StateChangeWithCauseViewVariant0Type`"]
29872#[doc = r""]
29873#[doc = r" <details><summary>JSON schema</summary>"]
29874#[doc = r""]
29875#[doc = r" ```json"]
29876#[doc = "{"]
29877#[doc = " \"type\": \"string\","]
29878#[doc = " \"enum\": ["]
29879#[doc = " \"account_update\""]
29880#[doc = " ]"]
29881#[doc = "}"]
29882#[doc = r" ```"]
29883#[doc = r" </details>"]
29884#[derive(
29885 :: serde :: Deserialize,
29886 :: serde :: Serialize,
29887 Clone,
29888 Copy,
29889 Debug,
29890 Eq,
29891 Hash,
29892 Ord,
29893 PartialEq,
29894 PartialOrd,
29895)]
29896pub enum StateChangeWithCauseViewVariant0Type {
29897 #[serde(rename = "account_update")]
29898 AccountUpdate,
29899}
29900impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant0Type {
29901 fn from(value: &StateChangeWithCauseViewVariant0Type) -> Self {
29902 value.clone()
29903 }
29904}
29905impl ::std::fmt::Display for StateChangeWithCauseViewVariant0Type {
29906 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29907 match *self {
29908 Self::AccountUpdate => f.write_str("account_update"),
29909 }
29910 }
29911}
29912impl ::std::str::FromStr for StateChangeWithCauseViewVariant0Type {
29913 type Err = self::error::ConversionError;
29914 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29915 match value {
29916 "account_update" => Ok(Self::AccountUpdate),
29917 _ => Err("invalid value".into()),
29918 }
29919 }
29920}
29921impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant0Type {
29922 type Error = self::error::ConversionError;
29923 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29924 value.parse()
29925 }
29926}
29927impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant0Type {
29928 type Error = self::error::ConversionError;
29929 fn try_from(
29930 value: &::std::string::String,
29931 ) -> ::std::result::Result<Self, self::error::ConversionError> {
29932 value.parse()
29933 }
29934}
29935impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant0Type {
29936 type Error = self::error::ConversionError;
29937 fn try_from(
29938 value: ::std::string::String,
29939 ) -> ::std::result::Result<Self, self::error::ConversionError> {
29940 value.parse()
29941 }
29942}
29943#[doc = "`StateChangeWithCauseViewVariant10Change`"]
29944#[doc = r""]
29945#[doc = r" <details><summary>JSON schema</summary>"]
29946#[doc = r""]
29947#[doc = r" ```json"]
29948#[doc = "{"]
29949#[doc = " \"type\": \"object\","]
29950#[doc = " \"required\": ["]
29951#[doc = " \"account_id\""]
29952#[doc = " ],"]
29953#[doc = " \"properties\": {"]
29954#[doc = " \"access_key\": false,"]
29955#[doc = " \"account_id\": {"]
29956#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
29957#[doc = " },"]
29958#[doc = " \"amount\": false,"]
29959#[doc = " \"code_base64\": false,"]
29960#[doc = " \"code_hash\": false,"]
29961#[doc = " \"gas_key\": false,"]
29962#[doc = " \"global_contract_account_id\": false,"]
29963#[doc = " \"global_contract_hash\": false,"]
29964#[doc = " \"index\": false,"]
29965#[doc = " \"key_base64\": false,"]
29966#[doc = " \"locked\": false,"]
29967#[doc = " \"nonce\": false,"]
29968#[doc = " \"public_key\": false,"]
29969#[doc = " \"storage_paid_at\": false,"]
29970#[doc = " \"storage_usage\": false,"]
29971#[doc = " \"value_base64\": false"]
29972#[doc = " }"]
29973#[doc = "}"]
29974#[doc = r" ```"]
29975#[doc = r" </details>"]
29976#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29977pub struct StateChangeWithCauseViewVariant10Change {
29978 pub account_id: AccountId,
29979}
29980impl ::std::convert::From<&StateChangeWithCauseViewVariant10Change>
29981 for StateChangeWithCauseViewVariant10Change
29982{
29983 fn from(value: &StateChangeWithCauseViewVariant10Change) -> Self {
29984 value.clone()
29985 }
29986}
29987#[doc = "`StateChangeWithCauseViewVariant10Type`"]
29988#[doc = r""]
29989#[doc = r" <details><summary>JSON schema</summary>"]
29990#[doc = r""]
29991#[doc = r" ```json"]
29992#[doc = "{"]
29993#[doc = " \"type\": \"string\","]
29994#[doc = " \"enum\": ["]
29995#[doc = " \"contract_code_deletion\""]
29996#[doc = " ]"]
29997#[doc = "}"]
29998#[doc = r" ```"]
29999#[doc = r" </details>"]
30000#[derive(
30001 :: serde :: Deserialize,
30002 :: serde :: Serialize,
30003 Clone,
30004 Copy,
30005 Debug,
30006 Eq,
30007 Hash,
30008 Ord,
30009 PartialEq,
30010 PartialOrd,
30011)]
30012pub enum StateChangeWithCauseViewVariant10Type {
30013 #[serde(rename = "contract_code_deletion")]
30014 ContractCodeDeletion,
30015}
30016impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant10Type {
30017 fn from(value: &StateChangeWithCauseViewVariant10Type) -> Self {
30018 value.clone()
30019 }
30020}
30021impl ::std::fmt::Display for StateChangeWithCauseViewVariant10Type {
30022 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30023 match *self {
30024 Self::ContractCodeDeletion => f.write_str("contract_code_deletion"),
30025 }
30026 }
30027}
30028impl ::std::str::FromStr for StateChangeWithCauseViewVariant10Type {
30029 type Err = self::error::ConversionError;
30030 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30031 match value {
30032 "contract_code_deletion" => Ok(Self::ContractCodeDeletion),
30033 _ => Err("invalid value".into()),
30034 }
30035 }
30036}
30037impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant10Type {
30038 type Error = self::error::ConversionError;
30039 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30040 value.parse()
30041 }
30042}
30043impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant10Type {
30044 type Error = self::error::ConversionError;
30045 fn try_from(
30046 value: &::std::string::String,
30047 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30048 value.parse()
30049 }
30050}
30051impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant10Type {
30052 type Error = self::error::ConversionError;
30053 fn try_from(
30054 value: ::std::string::String,
30055 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30056 value.parse()
30057 }
30058}
30059#[doc = "`StateChangeWithCauseViewVariant1Change`"]
30060#[doc = r""]
30061#[doc = r" <details><summary>JSON schema</summary>"]
30062#[doc = r""]
30063#[doc = r" ```json"]
30064#[doc = "{"]
30065#[doc = " \"type\": \"object\","]
30066#[doc = " \"required\": ["]
30067#[doc = " \"account_id\""]
30068#[doc = " ],"]
30069#[doc = " \"properties\": {"]
30070#[doc = " \"access_key\": false,"]
30071#[doc = " \"account_id\": {"]
30072#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30073#[doc = " },"]
30074#[doc = " \"amount\": false,"]
30075#[doc = " \"code_base64\": false,"]
30076#[doc = " \"code_hash\": false,"]
30077#[doc = " \"gas_key\": false,"]
30078#[doc = " \"global_contract_account_id\": false,"]
30079#[doc = " \"global_contract_hash\": false,"]
30080#[doc = " \"index\": false,"]
30081#[doc = " \"key_base64\": false,"]
30082#[doc = " \"locked\": false,"]
30083#[doc = " \"nonce\": false,"]
30084#[doc = " \"public_key\": false,"]
30085#[doc = " \"storage_paid_at\": false,"]
30086#[doc = " \"storage_usage\": false,"]
30087#[doc = " \"value_base64\": false"]
30088#[doc = " }"]
30089#[doc = "}"]
30090#[doc = r" ```"]
30091#[doc = r" </details>"]
30092#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30093pub struct StateChangeWithCauseViewVariant1Change {
30094 pub account_id: AccountId,
30095}
30096impl ::std::convert::From<&StateChangeWithCauseViewVariant1Change>
30097 for StateChangeWithCauseViewVariant1Change
30098{
30099 fn from(value: &StateChangeWithCauseViewVariant1Change) -> Self {
30100 value.clone()
30101 }
30102}
30103#[doc = "`StateChangeWithCauseViewVariant1Type`"]
30104#[doc = r""]
30105#[doc = r" <details><summary>JSON schema</summary>"]
30106#[doc = r""]
30107#[doc = r" ```json"]
30108#[doc = "{"]
30109#[doc = " \"type\": \"string\","]
30110#[doc = " \"enum\": ["]
30111#[doc = " \"account_deletion\""]
30112#[doc = " ]"]
30113#[doc = "}"]
30114#[doc = r" ```"]
30115#[doc = r" </details>"]
30116#[derive(
30117 :: serde :: Deserialize,
30118 :: serde :: Serialize,
30119 Clone,
30120 Copy,
30121 Debug,
30122 Eq,
30123 Hash,
30124 Ord,
30125 PartialEq,
30126 PartialOrd,
30127)]
30128pub enum StateChangeWithCauseViewVariant1Type {
30129 #[serde(rename = "account_deletion")]
30130 AccountDeletion,
30131}
30132impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant1Type {
30133 fn from(value: &StateChangeWithCauseViewVariant1Type) -> Self {
30134 value.clone()
30135 }
30136}
30137impl ::std::fmt::Display for StateChangeWithCauseViewVariant1Type {
30138 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30139 match *self {
30140 Self::AccountDeletion => f.write_str("account_deletion"),
30141 }
30142 }
30143}
30144impl ::std::str::FromStr for StateChangeWithCauseViewVariant1Type {
30145 type Err = self::error::ConversionError;
30146 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30147 match value {
30148 "account_deletion" => Ok(Self::AccountDeletion),
30149 _ => Err("invalid value".into()),
30150 }
30151 }
30152}
30153impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant1Type {
30154 type Error = self::error::ConversionError;
30155 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30156 value.parse()
30157 }
30158}
30159impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant1Type {
30160 type Error = self::error::ConversionError;
30161 fn try_from(
30162 value: &::std::string::String,
30163 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30164 value.parse()
30165 }
30166}
30167impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant1Type {
30168 type Error = self::error::ConversionError;
30169 fn try_from(
30170 value: ::std::string::String,
30171 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30172 value.parse()
30173 }
30174}
30175#[doc = "`StateChangeWithCauseViewVariant2Change`"]
30176#[doc = r""]
30177#[doc = r" <details><summary>JSON schema</summary>"]
30178#[doc = r""]
30179#[doc = r" ```json"]
30180#[doc = "{"]
30181#[doc = " \"type\": \"object\","]
30182#[doc = " \"required\": ["]
30183#[doc = " \"access_key\","]
30184#[doc = " \"account_id\","]
30185#[doc = " \"public_key\""]
30186#[doc = " ],"]
30187#[doc = " \"properties\": {"]
30188#[doc = " \"access_key\": {"]
30189#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
30190#[doc = " },"]
30191#[doc = " \"account_id\": {"]
30192#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30193#[doc = " },"]
30194#[doc = " \"amount\": false,"]
30195#[doc = " \"code_base64\": false,"]
30196#[doc = " \"code_hash\": false,"]
30197#[doc = " \"gas_key\": false,"]
30198#[doc = " \"global_contract_account_id\": false,"]
30199#[doc = " \"global_contract_hash\": false,"]
30200#[doc = " \"index\": false,"]
30201#[doc = " \"key_base64\": false,"]
30202#[doc = " \"locked\": false,"]
30203#[doc = " \"nonce\": false,"]
30204#[doc = " \"public_key\": {"]
30205#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
30206#[doc = " },"]
30207#[doc = " \"storage_paid_at\": false,"]
30208#[doc = " \"storage_usage\": false,"]
30209#[doc = " \"value_base64\": false"]
30210#[doc = " }"]
30211#[doc = "}"]
30212#[doc = r" ```"]
30213#[doc = r" </details>"]
30214#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30215pub struct StateChangeWithCauseViewVariant2Change {
30216 pub access_key: AccessKeyView,
30217 pub account_id: AccountId,
30218 pub public_key: PublicKey,
30219}
30220impl ::std::convert::From<&StateChangeWithCauseViewVariant2Change>
30221 for StateChangeWithCauseViewVariant2Change
30222{
30223 fn from(value: &StateChangeWithCauseViewVariant2Change) -> Self {
30224 value.clone()
30225 }
30226}
30227#[doc = "`StateChangeWithCauseViewVariant2Type`"]
30228#[doc = r""]
30229#[doc = r" <details><summary>JSON schema</summary>"]
30230#[doc = r""]
30231#[doc = r" ```json"]
30232#[doc = "{"]
30233#[doc = " \"type\": \"string\","]
30234#[doc = " \"enum\": ["]
30235#[doc = " \"access_key_update\""]
30236#[doc = " ]"]
30237#[doc = "}"]
30238#[doc = r" ```"]
30239#[doc = r" </details>"]
30240#[derive(
30241 :: serde :: Deserialize,
30242 :: serde :: Serialize,
30243 Clone,
30244 Copy,
30245 Debug,
30246 Eq,
30247 Hash,
30248 Ord,
30249 PartialEq,
30250 PartialOrd,
30251)]
30252pub enum StateChangeWithCauseViewVariant2Type {
30253 #[serde(rename = "access_key_update")]
30254 AccessKeyUpdate,
30255}
30256impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant2Type {
30257 fn from(value: &StateChangeWithCauseViewVariant2Type) -> Self {
30258 value.clone()
30259 }
30260}
30261impl ::std::fmt::Display for StateChangeWithCauseViewVariant2Type {
30262 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30263 match *self {
30264 Self::AccessKeyUpdate => f.write_str("access_key_update"),
30265 }
30266 }
30267}
30268impl ::std::str::FromStr for StateChangeWithCauseViewVariant2Type {
30269 type Err = self::error::ConversionError;
30270 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30271 match value {
30272 "access_key_update" => Ok(Self::AccessKeyUpdate),
30273 _ => Err("invalid value".into()),
30274 }
30275 }
30276}
30277impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant2Type {
30278 type Error = self::error::ConversionError;
30279 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30280 value.parse()
30281 }
30282}
30283impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant2Type {
30284 type Error = self::error::ConversionError;
30285 fn try_from(
30286 value: &::std::string::String,
30287 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30288 value.parse()
30289 }
30290}
30291impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant2Type {
30292 type Error = self::error::ConversionError;
30293 fn try_from(
30294 value: ::std::string::String,
30295 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30296 value.parse()
30297 }
30298}
30299#[doc = "`StateChangeWithCauseViewVariant3Change`"]
30300#[doc = r""]
30301#[doc = r" <details><summary>JSON schema</summary>"]
30302#[doc = r""]
30303#[doc = r" ```json"]
30304#[doc = "{"]
30305#[doc = " \"type\": \"object\","]
30306#[doc = " \"required\": ["]
30307#[doc = " \"account_id\","]
30308#[doc = " \"public_key\""]
30309#[doc = " ],"]
30310#[doc = " \"properties\": {"]
30311#[doc = " \"access_key\": false,"]
30312#[doc = " \"account_id\": {"]
30313#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30314#[doc = " },"]
30315#[doc = " \"amount\": false,"]
30316#[doc = " \"code_base64\": false,"]
30317#[doc = " \"code_hash\": false,"]
30318#[doc = " \"gas_key\": false,"]
30319#[doc = " \"global_contract_account_id\": false,"]
30320#[doc = " \"global_contract_hash\": false,"]
30321#[doc = " \"index\": false,"]
30322#[doc = " \"key_base64\": false,"]
30323#[doc = " \"locked\": false,"]
30324#[doc = " \"nonce\": false,"]
30325#[doc = " \"public_key\": {"]
30326#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
30327#[doc = " },"]
30328#[doc = " \"storage_paid_at\": false,"]
30329#[doc = " \"storage_usage\": false,"]
30330#[doc = " \"value_base64\": false"]
30331#[doc = " }"]
30332#[doc = "}"]
30333#[doc = r" ```"]
30334#[doc = r" </details>"]
30335#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30336pub struct StateChangeWithCauseViewVariant3Change {
30337 pub account_id: AccountId,
30338 pub public_key: PublicKey,
30339}
30340impl ::std::convert::From<&StateChangeWithCauseViewVariant3Change>
30341 for StateChangeWithCauseViewVariant3Change
30342{
30343 fn from(value: &StateChangeWithCauseViewVariant3Change) -> Self {
30344 value.clone()
30345 }
30346}
30347#[doc = "`StateChangeWithCauseViewVariant3Type`"]
30348#[doc = r""]
30349#[doc = r" <details><summary>JSON schema</summary>"]
30350#[doc = r""]
30351#[doc = r" ```json"]
30352#[doc = "{"]
30353#[doc = " \"type\": \"string\","]
30354#[doc = " \"enum\": ["]
30355#[doc = " \"access_key_deletion\""]
30356#[doc = " ]"]
30357#[doc = "}"]
30358#[doc = r" ```"]
30359#[doc = r" </details>"]
30360#[derive(
30361 :: serde :: Deserialize,
30362 :: serde :: Serialize,
30363 Clone,
30364 Copy,
30365 Debug,
30366 Eq,
30367 Hash,
30368 Ord,
30369 PartialEq,
30370 PartialOrd,
30371)]
30372pub enum StateChangeWithCauseViewVariant3Type {
30373 #[serde(rename = "access_key_deletion")]
30374 AccessKeyDeletion,
30375}
30376impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant3Type {
30377 fn from(value: &StateChangeWithCauseViewVariant3Type) -> Self {
30378 value.clone()
30379 }
30380}
30381impl ::std::fmt::Display for StateChangeWithCauseViewVariant3Type {
30382 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30383 match *self {
30384 Self::AccessKeyDeletion => f.write_str("access_key_deletion"),
30385 }
30386 }
30387}
30388impl ::std::str::FromStr for StateChangeWithCauseViewVariant3Type {
30389 type Err = self::error::ConversionError;
30390 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30391 match value {
30392 "access_key_deletion" => Ok(Self::AccessKeyDeletion),
30393 _ => Err("invalid value".into()),
30394 }
30395 }
30396}
30397impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant3Type {
30398 type Error = self::error::ConversionError;
30399 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30400 value.parse()
30401 }
30402}
30403impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant3Type {
30404 type Error = self::error::ConversionError;
30405 fn try_from(
30406 value: &::std::string::String,
30407 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30408 value.parse()
30409 }
30410}
30411impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant3Type {
30412 type Error = self::error::ConversionError;
30413 fn try_from(
30414 value: ::std::string::String,
30415 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30416 value.parse()
30417 }
30418}
30419#[doc = "`StateChangeWithCauseViewVariant4Change`"]
30420#[doc = r""]
30421#[doc = r" <details><summary>JSON schema</summary>"]
30422#[doc = r""]
30423#[doc = r" ```json"]
30424#[doc = "{"]
30425#[doc = " \"type\": \"object\","]
30426#[doc = " \"required\": ["]
30427#[doc = " \"account_id\","]
30428#[doc = " \"gas_key\","]
30429#[doc = " \"public_key\""]
30430#[doc = " ],"]
30431#[doc = " \"properties\": {"]
30432#[doc = " \"access_key\": false,"]
30433#[doc = " \"account_id\": {"]
30434#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30435#[doc = " },"]
30436#[doc = " \"amount\": false,"]
30437#[doc = " \"code_base64\": false,"]
30438#[doc = " \"code_hash\": false,"]
30439#[doc = " \"gas_key\": {"]
30440#[doc = " \"$ref\": \"#/components/schemas/GasKey\""]
30441#[doc = " },"]
30442#[doc = " \"global_contract_account_id\": false,"]
30443#[doc = " \"global_contract_hash\": false,"]
30444#[doc = " \"index\": false,"]
30445#[doc = " \"key_base64\": false,"]
30446#[doc = " \"locked\": false,"]
30447#[doc = " \"nonce\": false,"]
30448#[doc = " \"public_key\": {"]
30449#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
30450#[doc = " },"]
30451#[doc = " \"storage_paid_at\": false,"]
30452#[doc = " \"storage_usage\": false,"]
30453#[doc = " \"value_base64\": false"]
30454#[doc = " }"]
30455#[doc = "}"]
30456#[doc = r" ```"]
30457#[doc = r" </details>"]
30458#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30459pub struct StateChangeWithCauseViewVariant4Change {
30460 pub account_id: AccountId,
30461 pub gas_key: GasKey,
30462 pub public_key: PublicKey,
30463}
30464impl ::std::convert::From<&StateChangeWithCauseViewVariant4Change>
30465 for StateChangeWithCauseViewVariant4Change
30466{
30467 fn from(value: &StateChangeWithCauseViewVariant4Change) -> Self {
30468 value.clone()
30469 }
30470}
30471#[doc = "`StateChangeWithCauseViewVariant4Type`"]
30472#[doc = r""]
30473#[doc = r" <details><summary>JSON schema</summary>"]
30474#[doc = r""]
30475#[doc = r" ```json"]
30476#[doc = "{"]
30477#[doc = " \"type\": \"string\","]
30478#[doc = " \"enum\": ["]
30479#[doc = " \"gas_key_update\""]
30480#[doc = " ]"]
30481#[doc = "}"]
30482#[doc = r" ```"]
30483#[doc = r" </details>"]
30484#[derive(
30485 :: serde :: Deserialize,
30486 :: serde :: Serialize,
30487 Clone,
30488 Copy,
30489 Debug,
30490 Eq,
30491 Hash,
30492 Ord,
30493 PartialEq,
30494 PartialOrd,
30495)]
30496pub enum StateChangeWithCauseViewVariant4Type {
30497 #[serde(rename = "gas_key_update")]
30498 GasKeyUpdate,
30499}
30500impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant4Type {
30501 fn from(value: &StateChangeWithCauseViewVariant4Type) -> Self {
30502 value.clone()
30503 }
30504}
30505impl ::std::fmt::Display for StateChangeWithCauseViewVariant4Type {
30506 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30507 match *self {
30508 Self::GasKeyUpdate => f.write_str("gas_key_update"),
30509 }
30510 }
30511}
30512impl ::std::str::FromStr for StateChangeWithCauseViewVariant4Type {
30513 type Err = self::error::ConversionError;
30514 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30515 match value {
30516 "gas_key_update" => Ok(Self::GasKeyUpdate),
30517 _ => Err("invalid value".into()),
30518 }
30519 }
30520}
30521impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant4Type {
30522 type Error = self::error::ConversionError;
30523 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30524 value.parse()
30525 }
30526}
30527impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant4Type {
30528 type Error = self::error::ConversionError;
30529 fn try_from(
30530 value: &::std::string::String,
30531 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30532 value.parse()
30533 }
30534}
30535impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant4Type {
30536 type Error = self::error::ConversionError;
30537 fn try_from(
30538 value: ::std::string::String,
30539 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30540 value.parse()
30541 }
30542}
30543#[doc = "`StateChangeWithCauseViewVariant5Change`"]
30544#[doc = r""]
30545#[doc = r" <details><summary>JSON schema</summary>"]
30546#[doc = r""]
30547#[doc = r" ```json"]
30548#[doc = "{"]
30549#[doc = " \"type\": \"object\","]
30550#[doc = " \"required\": ["]
30551#[doc = " \"account_id\","]
30552#[doc = " \"index\","]
30553#[doc = " \"nonce\","]
30554#[doc = " \"public_key\""]
30555#[doc = " ],"]
30556#[doc = " \"properties\": {"]
30557#[doc = " \"access_key\": false,"]
30558#[doc = " \"account_id\": {"]
30559#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30560#[doc = " },"]
30561#[doc = " \"amount\": false,"]
30562#[doc = " \"code_base64\": false,"]
30563#[doc = " \"code_hash\": false,"]
30564#[doc = " \"gas_key\": false,"]
30565#[doc = " \"global_contract_account_id\": false,"]
30566#[doc = " \"global_contract_hash\": false,"]
30567#[doc = " \"index\": {"]
30568#[doc = " \"type\": \"integer\","]
30569#[doc = " \"format\": \"uint32\","]
30570#[doc = " \"minimum\": 0.0"]
30571#[doc = " },"]
30572#[doc = " \"key_base64\": false,"]
30573#[doc = " \"locked\": false,"]
30574#[doc = " \"nonce\": {"]
30575#[doc = " \"type\": \"integer\","]
30576#[doc = " \"format\": \"uint64\","]
30577#[doc = " \"minimum\": 0.0"]
30578#[doc = " },"]
30579#[doc = " \"public_key\": {"]
30580#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
30581#[doc = " },"]
30582#[doc = " \"storage_paid_at\": false,"]
30583#[doc = " \"storage_usage\": false,"]
30584#[doc = " \"value_base64\": false"]
30585#[doc = " }"]
30586#[doc = "}"]
30587#[doc = r" ```"]
30588#[doc = r" </details>"]
30589#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30590pub struct StateChangeWithCauseViewVariant5Change {
30591 pub account_id: AccountId,
30592 pub index: u32,
30593 pub nonce: u64,
30594 pub public_key: PublicKey,
30595}
30596impl ::std::convert::From<&StateChangeWithCauseViewVariant5Change>
30597 for StateChangeWithCauseViewVariant5Change
30598{
30599 fn from(value: &StateChangeWithCauseViewVariant5Change) -> Self {
30600 value.clone()
30601 }
30602}
30603#[doc = "`StateChangeWithCauseViewVariant5Type`"]
30604#[doc = r""]
30605#[doc = r" <details><summary>JSON schema</summary>"]
30606#[doc = r""]
30607#[doc = r" ```json"]
30608#[doc = "{"]
30609#[doc = " \"type\": \"string\","]
30610#[doc = " \"enum\": ["]
30611#[doc = " \"gas_key_nonce_update\""]
30612#[doc = " ]"]
30613#[doc = "}"]
30614#[doc = r" ```"]
30615#[doc = r" </details>"]
30616#[derive(
30617 :: serde :: Deserialize,
30618 :: serde :: Serialize,
30619 Clone,
30620 Copy,
30621 Debug,
30622 Eq,
30623 Hash,
30624 Ord,
30625 PartialEq,
30626 PartialOrd,
30627)]
30628pub enum StateChangeWithCauseViewVariant5Type {
30629 #[serde(rename = "gas_key_nonce_update")]
30630 GasKeyNonceUpdate,
30631}
30632impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant5Type {
30633 fn from(value: &StateChangeWithCauseViewVariant5Type) -> Self {
30634 value.clone()
30635 }
30636}
30637impl ::std::fmt::Display for StateChangeWithCauseViewVariant5Type {
30638 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30639 match *self {
30640 Self::GasKeyNonceUpdate => f.write_str("gas_key_nonce_update"),
30641 }
30642 }
30643}
30644impl ::std::str::FromStr for StateChangeWithCauseViewVariant5Type {
30645 type Err = self::error::ConversionError;
30646 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30647 match value {
30648 "gas_key_nonce_update" => Ok(Self::GasKeyNonceUpdate),
30649 _ => Err("invalid value".into()),
30650 }
30651 }
30652}
30653impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant5Type {
30654 type Error = self::error::ConversionError;
30655 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30656 value.parse()
30657 }
30658}
30659impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant5Type {
30660 type Error = self::error::ConversionError;
30661 fn try_from(
30662 value: &::std::string::String,
30663 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30664 value.parse()
30665 }
30666}
30667impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant5Type {
30668 type Error = self::error::ConversionError;
30669 fn try_from(
30670 value: ::std::string::String,
30671 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30672 value.parse()
30673 }
30674}
30675#[doc = "`StateChangeWithCauseViewVariant6Change`"]
30676#[doc = r""]
30677#[doc = r" <details><summary>JSON schema</summary>"]
30678#[doc = r""]
30679#[doc = r" ```json"]
30680#[doc = "{"]
30681#[doc = " \"type\": \"object\","]
30682#[doc = " \"required\": ["]
30683#[doc = " \"account_id\","]
30684#[doc = " \"public_key\""]
30685#[doc = " ],"]
30686#[doc = " \"properties\": {"]
30687#[doc = " \"access_key\": false,"]
30688#[doc = " \"account_id\": {"]
30689#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30690#[doc = " },"]
30691#[doc = " \"amount\": false,"]
30692#[doc = " \"code_base64\": false,"]
30693#[doc = " \"code_hash\": false,"]
30694#[doc = " \"gas_key\": false,"]
30695#[doc = " \"global_contract_account_id\": false,"]
30696#[doc = " \"global_contract_hash\": false,"]
30697#[doc = " \"index\": false,"]
30698#[doc = " \"key_base64\": false,"]
30699#[doc = " \"locked\": false,"]
30700#[doc = " \"nonce\": false,"]
30701#[doc = " \"public_key\": {"]
30702#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
30703#[doc = " },"]
30704#[doc = " \"storage_paid_at\": false,"]
30705#[doc = " \"storage_usage\": false,"]
30706#[doc = " \"value_base64\": false"]
30707#[doc = " }"]
30708#[doc = "}"]
30709#[doc = r" ```"]
30710#[doc = r" </details>"]
30711#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30712pub struct StateChangeWithCauseViewVariant6Change {
30713 pub account_id: AccountId,
30714 pub public_key: PublicKey,
30715}
30716impl ::std::convert::From<&StateChangeWithCauseViewVariant6Change>
30717 for StateChangeWithCauseViewVariant6Change
30718{
30719 fn from(value: &StateChangeWithCauseViewVariant6Change) -> Self {
30720 value.clone()
30721 }
30722}
30723#[doc = "`StateChangeWithCauseViewVariant6Type`"]
30724#[doc = r""]
30725#[doc = r" <details><summary>JSON schema</summary>"]
30726#[doc = r""]
30727#[doc = r" ```json"]
30728#[doc = "{"]
30729#[doc = " \"type\": \"string\","]
30730#[doc = " \"enum\": ["]
30731#[doc = " \"gas_key_deletion\""]
30732#[doc = " ]"]
30733#[doc = "}"]
30734#[doc = r" ```"]
30735#[doc = r" </details>"]
30736#[derive(
30737 :: serde :: Deserialize,
30738 :: serde :: Serialize,
30739 Clone,
30740 Copy,
30741 Debug,
30742 Eq,
30743 Hash,
30744 Ord,
30745 PartialEq,
30746 PartialOrd,
30747)]
30748pub enum StateChangeWithCauseViewVariant6Type {
30749 #[serde(rename = "gas_key_deletion")]
30750 GasKeyDeletion,
30751}
30752impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant6Type {
30753 fn from(value: &StateChangeWithCauseViewVariant6Type) -> Self {
30754 value.clone()
30755 }
30756}
30757impl ::std::fmt::Display for StateChangeWithCauseViewVariant6Type {
30758 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30759 match *self {
30760 Self::GasKeyDeletion => f.write_str("gas_key_deletion"),
30761 }
30762 }
30763}
30764impl ::std::str::FromStr for StateChangeWithCauseViewVariant6Type {
30765 type Err = self::error::ConversionError;
30766 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30767 match value {
30768 "gas_key_deletion" => Ok(Self::GasKeyDeletion),
30769 _ => Err("invalid value".into()),
30770 }
30771 }
30772}
30773impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant6Type {
30774 type Error = self::error::ConversionError;
30775 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30776 value.parse()
30777 }
30778}
30779impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant6Type {
30780 type Error = self::error::ConversionError;
30781 fn try_from(
30782 value: &::std::string::String,
30783 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30784 value.parse()
30785 }
30786}
30787impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant6Type {
30788 type Error = self::error::ConversionError;
30789 fn try_from(
30790 value: ::std::string::String,
30791 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30792 value.parse()
30793 }
30794}
30795#[doc = "`StateChangeWithCauseViewVariant7Change`"]
30796#[doc = r""]
30797#[doc = r" <details><summary>JSON schema</summary>"]
30798#[doc = r""]
30799#[doc = r" ```json"]
30800#[doc = "{"]
30801#[doc = " \"type\": \"object\","]
30802#[doc = " \"required\": ["]
30803#[doc = " \"account_id\","]
30804#[doc = " \"key_base64\","]
30805#[doc = " \"value_base64\""]
30806#[doc = " ],"]
30807#[doc = " \"properties\": {"]
30808#[doc = " \"access_key\": false,"]
30809#[doc = " \"account_id\": {"]
30810#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30811#[doc = " },"]
30812#[doc = " \"amount\": false,"]
30813#[doc = " \"code_base64\": false,"]
30814#[doc = " \"code_hash\": false,"]
30815#[doc = " \"gas_key\": false,"]
30816#[doc = " \"global_contract_account_id\": false,"]
30817#[doc = " \"global_contract_hash\": false,"]
30818#[doc = " \"index\": false,"]
30819#[doc = " \"key_base64\": {"]
30820#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
30821#[doc = " },"]
30822#[doc = " \"locked\": false,"]
30823#[doc = " \"nonce\": false,"]
30824#[doc = " \"public_key\": false,"]
30825#[doc = " \"storage_paid_at\": false,"]
30826#[doc = " \"storage_usage\": false,"]
30827#[doc = " \"value_base64\": {"]
30828#[doc = " \"$ref\": \"#/components/schemas/StoreValue\""]
30829#[doc = " }"]
30830#[doc = " }"]
30831#[doc = "}"]
30832#[doc = r" ```"]
30833#[doc = r" </details>"]
30834#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30835pub struct StateChangeWithCauseViewVariant7Change {
30836 pub account_id: AccountId,
30837 pub key_base64: StoreKey,
30838 pub value_base64: StoreValue,
30839}
30840impl ::std::convert::From<&StateChangeWithCauseViewVariant7Change>
30841 for StateChangeWithCauseViewVariant7Change
30842{
30843 fn from(value: &StateChangeWithCauseViewVariant7Change) -> Self {
30844 value.clone()
30845 }
30846}
30847#[doc = "`StateChangeWithCauseViewVariant7Type`"]
30848#[doc = r""]
30849#[doc = r" <details><summary>JSON schema</summary>"]
30850#[doc = r""]
30851#[doc = r" ```json"]
30852#[doc = "{"]
30853#[doc = " \"type\": \"string\","]
30854#[doc = " \"enum\": ["]
30855#[doc = " \"data_update\""]
30856#[doc = " ]"]
30857#[doc = "}"]
30858#[doc = r" ```"]
30859#[doc = r" </details>"]
30860#[derive(
30861 :: serde :: Deserialize,
30862 :: serde :: Serialize,
30863 Clone,
30864 Copy,
30865 Debug,
30866 Eq,
30867 Hash,
30868 Ord,
30869 PartialEq,
30870 PartialOrd,
30871)]
30872pub enum StateChangeWithCauseViewVariant7Type {
30873 #[serde(rename = "data_update")]
30874 DataUpdate,
30875}
30876impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant7Type {
30877 fn from(value: &StateChangeWithCauseViewVariant7Type) -> Self {
30878 value.clone()
30879 }
30880}
30881impl ::std::fmt::Display for StateChangeWithCauseViewVariant7Type {
30882 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30883 match *self {
30884 Self::DataUpdate => f.write_str("data_update"),
30885 }
30886 }
30887}
30888impl ::std::str::FromStr for StateChangeWithCauseViewVariant7Type {
30889 type Err = self::error::ConversionError;
30890 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30891 match value {
30892 "data_update" => Ok(Self::DataUpdate),
30893 _ => Err("invalid value".into()),
30894 }
30895 }
30896}
30897impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant7Type {
30898 type Error = self::error::ConversionError;
30899 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30900 value.parse()
30901 }
30902}
30903impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant7Type {
30904 type Error = self::error::ConversionError;
30905 fn try_from(
30906 value: &::std::string::String,
30907 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30908 value.parse()
30909 }
30910}
30911impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant7Type {
30912 type Error = self::error::ConversionError;
30913 fn try_from(
30914 value: ::std::string::String,
30915 ) -> ::std::result::Result<Self, self::error::ConversionError> {
30916 value.parse()
30917 }
30918}
30919#[doc = "`StateChangeWithCauseViewVariant8Change`"]
30920#[doc = r""]
30921#[doc = r" <details><summary>JSON schema</summary>"]
30922#[doc = r""]
30923#[doc = r" ```json"]
30924#[doc = "{"]
30925#[doc = " \"type\": \"object\","]
30926#[doc = " \"required\": ["]
30927#[doc = " \"account_id\","]
30928#[doc = " \"key_base64\""]
30929#[doc = " ],"]
30930#[doc = " \"properties\": {"]
30931#[doc = " \"access_key\": false,"]
30932#[doc = " \"account_id\": {"]
30933#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
30934#[doc = " },"]
30935#[doc = " \"amount\": false,"]
30936#[doc = " \"code_base64\": false,"]
30937#[doc = " \"code_hash\": false,"]
30938#[doc = " \"gas_key\": false,"]
30939#[doc = " \"global_contract_account_id\": false,"]
30940#[doc = " \"global_contract_hash\": false,"]
30941#[doc = " \"index\": false,"]
30942#[doc = " \"key_base64\": {"]
30943#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
30944#[doc = " },"]
30945#[doc = " \"locked\": false,"]
30946#[doc = " \"nonce\": false,"]
30947#[doc = " \"public_key\": false,"]
30948#[doc = " \"storage_paid_at\": false,"]
30949#[doc = " \"storage_usage\": false,"]
30950#[doc = " \"value_base64\": false"]
30951#[doc = " }"]
30952#[doc = "}"]
30953#[doc = r" ```"]
30954#[doc = r" </details>"]
30955#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
30956pub struct StateChangeWithCauseViewVariant8Change {
30957 pub account_id: AccountId,
30958 pub key_base64: StoreKey,
30959}
30960impl ::std::convert::From<&StateChangeWithCauseViewVariant8Change>
30961 for StateChangeWithCauseViewVariant8Change
30962{
30963 fn from(value: &StateChangeWithCauseViewVariant8Change) -> Self {
30964 value.clone()
30965 }
30966}
30967#[doc = "`StateChangeWithCauseViewVariant8Type`"]
30968#[doc = r""]
30969#[doc = r" <details><summary>JSON schema</summary>"]
30970#[doc = r""]
30971#[doc = r" ```json"]
30972#[doc = "{"]
30973#[doc = " \"type\": \"string\","]
30974#[doc = " \"enum\": ["]
30975#[doc = " \"data_deletion\""]
30976#[doc = " ]"]
30977#[doc = "}"]
30978#[doc = r" ```"]
30979#[doc = r" </details>"]
30980#[derive(
30981 :: serde :: Deserialize,
30982 :: serde :: Serialize,
30983 Clone,
30984 Copy,
30985 Debug,
30986 Eq,
30987 Hash,
30988 Ord,
30989 PartialEq,
30990 PartialOrd,
30991)]
30992pub enum StateChangeWithCauseViewVariant8Type {
30993 #[serde(rename = "data_deletion")]
30994 DataDeletion,
30995}
30996impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant8Type {
30997 fn from(value: &StateChangeWithCauseViewVariant8Type) -> Self {
30998 value.clone()
30999 }
31000}
31001impl ::std::fmt::Display for StateChangeWithCauseViewVariant8Type {
31002 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31003 match *self {
31004 Self::DataDeletion => f.write_str("data_deletion"),
31005 }
31006 }
31007}
31008impl ::std::str::FromStr for StateChangeWithCauseViewVariant8Type {
31009 type Err = self::error::ConversionError;
31010 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31011 match value {
31012 "data_deletion" => Ok(Self::DataDeletion),
31013 _ => Err("invalid value".into()),
31014 }
31015 }
31016}
31017impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant8Type {
31018 type Error = self::error::ConversionError;
31019 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31020 value.parse()
31021 }
31022}
31023impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant8Type {
31024 type Error = self::error::ConversionError;
31025 fn try_from(
31026 value: &::std::string::String,
31027 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31028 value.parse()
31029 }
31030}
31031impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant8Type {
31032 type Error = self::error::ConversionError;
31033 fn try_from(
31034 value: ::std::string::String,
31035 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31036 value.parse()
31037 }
31038}
31039#[doc = "`StateChangeWithCauseViewVariant9Change`"]
31040#[doc = r""]
31041#[doc = r" <details><summary>JSON schema</summary>"]
31042#[doc = r""]
31043#[doc = r" ```json"]
31044#[doc = "{"]
31045#[doc = " \"type\": \"object\","]
31046#[doc = " \"required\": ["]
31047#[doc = " \"account_id\","]
31048#[doc = " \"code_base64\""]
31049#[doc = " ],"]
31050#[doc = " \"properties\": {"]
31051#[doc = " \"access_key\": false,"]
31052#[doc = " \"account_id\": {"]
31053#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
31054#[doc = " },"]
31055#[doc = " \"amount\": false,"]
31056#[doc = " \"code_base64\": {"]
31057#[doc = " \"type\": \"string\""]
31058#[doc = " },"]
31059#[doc = " \"code_hash\": false,"]
31060#[doc = " \"gas_key\": false,"]
31061#[doc = " \"global_contract_account_id\": false,"]
31062#[doc = " \"global_contract_hash\": false,"]
31063#[doc = " \"index\": false,"]
31064#[doc = " \"key_base64\": false,"]
31065#[doc = " \"locked\": false,"]
31066#[doc = " \"nonce\": false,"]
31067#[doc = " \"public_key\": false,"]
31068#[doc = " \"storage_paid_at\": false,"]
31069#[doc = " \"storage_usage\": false,"]
31070#[doc = " \"value_base64\": false"]
31071#[doc = " }"]
31072#[doc = "}"]
31073#[doc = r" ```"]
31074#[doc = r" </details>"]
31075#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31076pub struct StateChangeWithCauseViewVariant9Change {
31077 pub account_id: AccountId,
31078 pub code_base64: ::std::string::String,
31079}
31080impl ::std::convert::From<&StateChangeWithCauseViewVariant9Change>
31081 for StateChangeWithCauseViewVariant9Change
31082{
31083 fn from(value: &StateChangeWithCauseViewVariant9Change) -> Self {
31084 value.clone()
31085 }
31086}
31087#[doc = "`StateChangeWithCauseViewVariant9Type`"]
31088#[doc = r""]
31089#[doc = r" <details><summary>JSON schema</summary>"]
31090#[doc = r""]
31091#[doc = r" ```json"]
31092#[doc = "{"]
31093#[doc = " \"type\": \"string\","]
31094#[doc = " \"enum\": ["]
31095#[doc = " \"contract_code_update\""]
31096#[doc = " ]"]
31097#[doc = "}"]
31098#[doc = r" ```"]
31099#[doc = r" </details>"]
31100#[derive(
31101 :: serde :: Deserialize,
31102 :: serde :: Serialize,
31103 Clone,
31104 Copy,
31105 Debug,
31106 Eq,
31107 Hash,
31108 Ord,
31109 PartialEq,
31110 PartialOrd,
31111)]
31112pub enum StateChangeWithCauseViewVariant9Type {
31113 #[serde(rename = "contract_code_update")]
31114 ContractCodeUpdate,
31115}
31116impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant9Type {
31117 fn from(value: &StateChangeWithCauseViewVariant9Type) -> Self {
31118 value.clone()
31119 }
31120}
31121impl ::std::fmt::Display for StateChangeWithCauseViewVariant9Type {
31122 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31123 match *self {
31124 Self::ContractCodeUpdate => f.write_str("contract_code_update"),
31125 }
31126 }
31127}
31128impl ::std::str::FromStr for StateChangeWithCauseViewVariant9Type {
31129 type Err = self::error::ConversionError;
31130 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31131 match value {
31132 "contract_code_update" => Ok(Self::ContractCodeUpdate),
31133 _ => Err("invalid value".into()),
31134 }
31135 }
31136}
31137impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant9Type {
31138 type Error = self::error::ConversionError;
31139 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31140 value.parse()
31141 }
31142}
31143impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant9Type {
31144 type Error = self::error::ConversionError;
31145 fn try_from(
31146 value: &::std::string::String,
31147 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31148 value.parse()
31149 }
31150}
31151impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant9Type {
31152 type Error = self::error::ConversionError;
31153 fn try_from(
31154 value: ::std::string::String,
31155 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31156 value.parse()
31157 }
31158}
31159#[doc = "Item of the state, key and value are serialized in base64 and proof for inclusion of given state item."]
31160#[doc = r""]
31161#[doc = r" <details><summary>JSON schema</summary>"]
31162#[doc = r""]
31163#[doc = r" ```json"]
31164#[doc = "{"]
31165#[doc = " \"description\": \"Item of the state, key and value are serialized in base64 and proof for inclusion of given state item.\","]
31166#[doc = " \"type\": \"object\","]
31167#[doc = " \"required\": ["]
31168#[doc = " \"key\","]
31169#[doc = " \"value\""]
31170#[doc = " ],"]
31171#[doc = " \"properties\": {"]
31172#[doc = " \"key\": {"]
31173#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
31174#[doc = " },"]
31175#[doc = " \"value\": {"]
31176#[doc = " \"$ref\": \"#/components/schemas/StoreValue\""]
31177#[doc = " }"]
31178#[doc = " }"]
31179#[doc = "}"]
31180#[doc = r" ```"]
31181#[doc = r" </details>"]
31182#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31183pub struct StateItem {
31184 pub key: StoreKey,
31185 pub value: StoreValue,
31186}
31187impl ::std::convert::From<&StateItem> for StateItem {
31188 fn from(value: &StateItem) -> Self {
31189 value.clone()
31190 }
31191}
31192#[doc = "`StateSyncConfig`"]
31193#[doc = r""]
31194#[doc = r" <details><summary>JSON schema</summary>"]
31195#[doc = r""]
31196#[doc = r" ```json"]
31197#[doc = "{"]
31198#[doc = " \"type\": \"object\","]
31199#[doc = " \"properties\": {"]
31200#[doc = " \"concurrency\": {"]
31201#[doc = " \"$ref\": \"#/components/schemas/SyncConcurrency\""]
31202#[doc = " },"]
31203#[doc = " \"dump\": {"]
31204#[doc = " \"description\": \"`none` value disables state dump to external storage.\","]
31205#[doc = " \"anyOf\": ["]
31206#[doc = " {"]
31207#[doc = " \"$ref\": \"#/components/schemas/DumpConfig\""]
31208#[doc = " },"]
31209#[doc = " {"]
31210#[doc = " \"type\": \"null\""]
31211#[doc = " }"]
31212#[doc = " ]"]
31213#[doc = " },"]
31214#[doc = " \"parts_compression_lvl\": {"]
31215#[doc = " \"description\": \"Zstd compression level for state parts.\","]
31216#[doc = " \"default\": 1,"]
31217#[doc = " \"type\": \"integer\","]
31218#[doc = " \"format\": \"int32\""]
31219#[doc = " },"]
31220#[doc = " \"sync\": {"]
31221#[doc = " \"$ref\": \"#/components/schemas/SyncConfig\""]
31222#[doc = " }"]
31223#[doc = " }"]
31224#[doc = "}"]
31225#[doc = r" ```"]
31226#[doc = r" </details>"]
31227#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31228pub struct StateSyncConfig {
31229 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31230 pub concurrency: ::std::option::Option<SyncConcurrency>,
31231 #[doc = "`none` value disables state dump to external storage."]
31232 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31233 pub dump: ::std::option::Option<DumpConfig>,
31234 #[doc = "Zstd compression level for state parts."]
31235 #[serde(default = "defaults::default_u64::<i32, 1>")]
31236 pub parts_compression_lvl: i32,
31237 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31238 pub sync: ::std::option::Option<SyncConfig>,
31239}
31240impl ::std::convert::From<&StateSyncConfig> for StateSyncConfig {
31241 fn from(value: &StateSyncConfig) -> Self {
31242 value.clone()
31243 }
31244}
31245impl ::std::default::Default for StateSyncConfig {
31246 fn default() -> Self {
31247 Self {
31248 concurrency: Default::default(),
31249 dump: Default::default(),
31250 parts_compression_lvl: defaults::default_u64::<i32, 1>(),
31251 sync: Default::default(),
31252 }
31253 }
31254}
31255#[doc = "`StatusSyncInfo`"]
31256#[doc = r""]
31257#[doc = r" <details><summary>JSON schema</summary>"]
31258#[doc = r""]
31259#[doc = r" ```json"]
31260#[doc = "{"]
31261#[doc = " \"type\": \"object\","]
31262#[doc = " \"required\": ["]
31263#[doc = " \"latest_block_hash\","]
31264#[doc = " \"latest_block_height\","]
31265#[doc = " \"latest_block_time\","]
31266#[doc = " \"latest_state_root\","]
31267#[doc = " \"syncing\""]
31268#[doc = " ],"]
31269#[doc = " \"properties\": {"]
31270#[doc = " \"earliest_block_hash\": {"]
31271#[doc = " \"anyOf\": ["]
31272#[doc = " {"]
31273#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
31274#[doc = " },"]
31275#[doc = " {"]
31276#[doc = " \"type\": \"null\""]
31277#[doc = " }"]
31278#[doc = " ]"]
31279#[doc = " },"]
31280#[doc = " \"earliest_block_height\": {"]
31281#[doc = " \"type\": ["]
31282#[doc = " \"integer\","]
31283#[doc = " \"null\""]
31284#[doc = " ],"]
31285#[doc = " \"format\": \"uint64\","]
31286#[doc = " \"minimum\": 0.0"]
31287#[doc = " },"]
31288#[doc = " \"earliest_block_time\": {"]
31289#[doc = " \"type\": ["]
31290#[doc = " \"string\","]
31291#[doc = " \"null\""]
31292#[doc = " ]"]
31293#[doc = " },"]
31294#[doc = " \"epoch_id\": {"]
31295#[doc = " \"anyOf\": ["]
31296#[doc = " {"]
31297#[doc = " \"$ref\": \"#/components/schemas/EpochId\""]
31298#[doc = " },"]
31299#[doc = " {"]
31300#[doc = " \"type\": \"null\""]
31301#[doc = " }"]
31302#[doc = " ]"]
31303#[doc = " },"]
31304#[doc = " \"epoch_start_height\": {"]
31305#[doc = " \"type\": ["]
31306#[doc = " \"integer\","]
31307#[doc = " \"null\""]
31308#[doc = " ],"]
31309#[doc = " \"format\": \"uint64\","]
31310#[doc = " \"minimum\": 0.0"]
31311#[doc = " },"]
31312#[doc = " \"latest_block_hash\": {"]
31313#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
31314#[doc = " },"]
31315#[doc = " \"latest_block_height\": {"]
31316#[doc = " \"type\": \"integer\","]
31317#[doc = " \"format\": \"uint64\","]
31318#[doc = " \"minimum\": 0.0"]
31319#[doc = " },"]
31320#[doc = " \"latest_block_time\": {"]
31321#[doc = " \"type\": \"string\""]
31322#[doc = " },"]
31323#[doc = " \"latest_state_root\": {"]
31324#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
31325#[doc = " },"]
31326#[doc = " \"syncing\": {"]
31327#[doc = " \"type\": \"boolean\""]
31328#[doc = " }"]
31329#[doc = " }"]
31330#[doc = "}"]
31331#[doc = r" ```"]
31332#[doc = r" </details>"]
31333#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31334pub struct StatusSyncInfo {
31335 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31336 pub earliest_block_hash: ::std::option::Option<CryptoHash>,
31337 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31338 pub earliest_block_height: ::std::option::Option<u64>,
31339 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31340 pub earliest_block_time: ::std::option::Option<::std::string::String>,
31341 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31342 pub epoch_id: ::std::option::Option<EpochId>,
31343 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
31344 pub epoch_start_height: ::std::option::Option<u64>,
31345 pub latest_block_hash: CryptoHash,
31346 pub latest_block_height: u64,
31347 pub latest_block_time: ::std::string::String,
31348 pub latest_state_root: CryptoHash,
31349 pub syncing: bool,
31350}
31351impl ::std::convert::From<&StatusSyncInfo> for StatusSyncInfo {
31352 fn from(value: &StatusSyncInfo) -> Self {
31353 value.clone()
31354 }
31355}
31356#[doc = "Errors which may occur during working with trie storages, storing\ntrie values (trie nodes and state values) by their hashes."]
31357#[doc = r""]
31358#[doc = r" <details><summary>JSON schema</summary>"]
31359#[doc = r""]
31360#[doc = r" ```json"]
31361#[doc = "{"]
31362#[doc = " \"description\": \"Errors which may occur during working with trie storages, storing\\ntrie values (trie nodes and state values) by their hashes.\","]
31363#[doc = " \"oneOf\": ["]
31364#[doc = " {"]
31365#[doc = " \"description\": \"Key-value db internal failure\","]
31366#[doc = " \"type\": \"string\","]
31367#[doc = " \"enum\": ["]
31368#[doc = " \"StorageInternalError\""]
31369#[doc = " ]"]
31370#[doc = " },"]
31371#[doc = " {"]
31372#[doc = " \"description\": \"Requested trie value by its hash which is missing in storage.\","]
31373#[doc = " \"type\": \"object\","]
31374#[doc = " \"required\": ["]
31375#[doc = " \"MissingTrieValue\""]
31376#[doc = " ],"]
31377#[doc = " \"properties\": {"]
31378#[doc = " \"MissingTrieValue\": {"]
31379#[doc = " \"$ref\": \"#/components/schemas/MissingTrieValue\""]
31380#[doc = " }"]
31381#[doc = " },"]
31382#[doc = " \"additionalProperties\": false"]
31383#[doc = " },"]
31384#[doc = " {"]
31385#[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.\","]
31386#[doc = " \"type\": \"string\","]
31387#[doc = " \"enum\": ["]
31388#[doc = " \"UnexpectedTrieValue\""]
31389#[doc = " ]"]
31390#[doc = " },"]
31391#[doc = " {"]
31392#[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.\","]
31393#[doc = " \"type\": \"object\","]
31394#[doc = " \"required\": ["]
31395#[doc = " \"StorageInconsistentState\""]
31396#[doc = " ],"]
31397#[doc = " \"properties\": {"]
31398#[doc = " \"StorageInconsistentState\": {"]
31399#[doc = " \"type\": \"string\""]
31400#[doc = " }"]
31401#[doc = " },"]
31402#[doc = " \"additionalProperties\": false"]
31403#[doc = " },"]
31404#[doc = " {"]
31405#[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.\","]
31406#[doc = " \"type\": \"object\","]
31407#[doc = " \"required\": ["]
31408#[doc = " \"FlatStorageBlockNotSupported\""]
31409#[doc = " ],"]
31410#[doc = " \"properties\": {"]
31411#[doc = " \"FlatStorageBlockNotSupported\": {"]
31412#[doc = " \"type\": \"string\""]
31413#[doc = " }"]
31414#[doc = " },"]
31415#[doc = " \"additionalProperties\": false"]
31416#[doc = " },"]
31417#[doc = " {"]
31418#[doc = " \"description\": \"In-memory trie could not be loaded for some reason.\","]
31419#[doc = " \"type\": \"object\","]
31420#[doc = " \"required\": ["]
31421#[doc = " \"MemTrieLoadingError\""]
31422#[doc = " ],"]
31423#[doc = " \"properties\": {"]
31424#[doc = " \"MemTrieLoadingError\": {"]
31425#[doc = " \"type\": \"string\""]
31426#[doc = " }"]
31427#[doc = " },"]
31428#[doc = " \"additionalProperties\": false"]
31429#[doc = " }"]
31430#[doc = " ]"]
31431#[doc = "}"]
31432#[doc = r" ```"]
31433#[doc = r" </details>"]
31434#[derive(
31435 :: serde :: Deserialize,
31436 :: serde :: Serialize,
31437 Clone,
31438 Debug,
31439 thiserror::Error,
31440 strum_macros::Display,
31441)]
31442pub enum StorageError {
31443 #[doc = "Key-value db internal failure"]
31444 StorageInternalError,
31445 #[doc = "Requested trie value by its hash which is missing in storage."]
31446 MissingTrieValue(MissingTrieValue),
31447 #[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."]
31448 UnexpectedTrieValue,
31449 #[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."]
31450 StorageInconsistentState(::std::string::String),
31451 #[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."]
31452 FlatStorageBlockNotSupported(::std::string::String),
31453 #[doc = "In-memory trie could not be loaded for some reason."]
31454 MemTrieLoadingError(::std::string::String),
31455}
31456impl ::std::convert::From<&Self> for StorageError {
31457 fn from(value: &StorageError) -> Self {
31458 value.clone()
31459 }
31460}
31461impl ::std::convert::From<MissingTrieValue> for StorageError {
31462 fn from(value: MissingTrieValue) -> Self {
31463 Self::MissingTrieValue(value)
31464 }
31465}
31466#[doc = "This enum represents if a storage_get call will be performed through flat storage or trie"]
31467#[doc = r""]
31468#[doc = r" <details><summary>JSON schema</summary>"]
31469#[doc = r""]
31470#[doc = r" ```json"]
31471#[doc = "{"]
31472#[doc = " \"description\": \"This enum represents if a storage_get call will be performed through flat storage or trie\","]
31473#[doc = " \"type\": \"string\","]
31474#[doc = " \"enum\": ["]
31475#[doc = " \"FlatStorage\","]
31476#[doc = " \"Trie\""]
31477#[doc = " ]"]
31478#[doc = "}"]
31479#[doc = r" ```"]
31480#[doc = r" </details>"]
31481#[derive(
31482 :: serde :: Deserialize,
31483 :: serde :: Serialize,
31484 Clone,
31485 Copy,
31486 Debug,
31487 Eq,
31488 Hash,
31489 Ord,
31490 PartialEq,
31491 PartialOrd,
31492)]
31493pub enum StorageGetMode {
31494 FlatStorage,
31495 Trie,
31496}
31497impl ::std::convert::From<&Self> for StorageGetMode {
31498 fn from(value: &StorageGetMode) -> Self {
31499 value.clone()
31500 }
31501}
31502impl ::std::fmt::Display for StorageGetMode {
31503 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31504 match *self {
31505 Self::FlatStorage => f.write_str("FlatStorage"),
31506 Self::Trie => f.write_str("Trie"),
31507 }
31508 }
31509}
31510impl ::std::str::FromStr for StorageGetMode {
31511 type Err = self::error::ConversionError;
31512 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31513 match value {
31514 "FlatStorage" => Ok(Self::FlatStorage),
31515 "Trie" => Ok(Self::Trie),
31516 _ => Err("invalid value".into()),
31517 }
31518 }
31519}
31520impl ::std::convert::TryFrom<&str> for StorageGetMode {
31521 type Error = self::error::ConversionError;
31522 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31523 value.parse()
31524 }
31525}
31526impl ::std::convert::TryFrom<&::std::string::String> for StorageGetMode {
31527 type Error = self::error::ConversionError;
31528 fn try_from(
31529 value: &::std::string::String,
31530 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31531 value.parse()
31532 }
31533}
31534impl ::std::convert::TryFrom<::std::string::String> for StorageGetMode {
31535 type Error = self::error::ConversionError;
31536 fn try_from(
31537 value: ::std::string::String,
31538 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31539 value.parse()
31540 }
31541}
31542#[doc = "Describes cost of storage per block"]
31543#[doc = r""]
31544#[doc = r" <details><summary>JSON schema</summary>"]
31545#[doc = r""]
31546#[doc = r" ```json"]
31547#[doc = "{"]
31548#[doc = " \"description\": \"Describes cost of storage per block\","]
31549#[doc = " \"type\": \"object\","]
31550#[doc = " \"required\": ["]
31551#[doc = " \"num_bytes_account\","]
31552#[doc = " \"num_extra_bytes_record\""]
31553#[doc = " ],"]
31554#[doc = " \"properties\": {"]
31555#[doc = " \"num_bytes_account\": {"]
31556#[doc = " \"description\": \"Number of bytes for an account record, including rounding up for account id.\","]
31557#[doc = " \"type\": \"integer\","]
31558#[doc = " \"format\": \"uint64\","]
31559#[doc = " \"minimum\": 0.0"]
31560#[doc = " },"]
31561#[doc = " \"num_extra_bytes_record\": {"]
31562#[doc = " \"description\": \"Additional number of bytes for a k/v record\","]
31563#[doc = " \"type\": \"integer\","]
31564#[doc = " \"format\": \"uint64\","]
31565#[doc = " \"minimum\": 0.0"]
31566#[doc = " }"]
31567#[doc = " }"]
31568#[doc = "}"]
31569#[doc = r" ```"]
31570#[doc = r" </details>"]
31571#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31572pub struct StorageUsageConfigView {
31573 #[doc = "Number of bytes for an account record, including rounding up for account id."]
31574 pub num_bytes_account: u64,
31575 #[doc = "Additional number of bytes for a k/v record"]
31576 pub num_extra_bytes_record: u64,
31577}
31578impl ::std::convert::From<&StorageUsageConfigView> for StorageUsageConfigView {
31579 fn from(value: &StorageUsageConfigView) -> Self {
31580 value.clone()
31581 }
31582}
31583#[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`)."]
31584#[doc = r""]
31585#[doc = r" <details><summary>JSON schema</summary>"]
31586#[doc = r""]
31587#[doc = r" ```json"]
31588#[doc = "{"]
31589#[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`).\","]
31590#[doc = " \"type\": \"string\","]
31591#[doc = " \"format\": \"bytes\""]
31592#[doc = "}"]
31593#[doc = r" ```"]
31594#[doc = r" </details>"]
31595#[derive(
31596 :: serde :: Deserialize,
31597 :: serde :: Serialize,
31598 Clone,
31599 Debug,
31600 Eq,
31601 Hash,
31602 Ord,
31603 PartialEq,
31604 PartialOrd,
31605)]
31606#[serde(transparent)]
31607pub struct StoreKey(pub ::std::string::String);
31608impl ::std::ops::Deref for StoreKey {
31609 type Target = ::std::string::String;
31610 fn deref(&self) -> &::std::string::String {
31611 &self.0
31612 }
31613}
31614impl ::std::convert::From<StoreKey> for ::std::string::String {
31615 fn from(value: StoreKey) -> Self {
31616 value.0
31617 }
31618}
31619impl ::std::convert::From<&StoreKey> for StoreKey {
31620 fn from(value: &StoreKey) -> Self {
31621 value.clone()
31622 }
31623}
31624impl ::std::convert::From<::std::string::String> for StoreKey {
31625 fn from(value: ::std::string::String) -> Self {
31626 Self(value)
31627 }
31628}
31629impl ::std::str::FromStr for StoreKey {
31630 type Err = ::std::convert::Infallible;
31631 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
31632 Ok(Self(value.to_string()))
31633 }
31634}
31635impl ::std::fmt::Display for StoreKey {
31636 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31637 self.0.fmt(f)
31638 }
31639}
31640#[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`)."]
31641#[doc = r""]
31642#[doc = r" <details><summary>JSON schema</summary>"]
31643#[doc = r""]
31644#[doc = r" ```json"]
31645#[doc = "{"]
31646#[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`).\","]
31647#[doc = " \"type\": \"string\","]
31648#[doc = " \"format\": \"bytes\""]
31649#[doc = "}"]
31650#[doc = r" ```"]
31651#[doc = r" </details>"]
31652#[derive(
31653 :: serde :: Deserialize,
31654 :: serde :: Serialize,
31655 Clone,
31656 Debug,
31657 Eq,
31658 Hash,
31659 Ord,
31660 PartialEq,
31661 PartialOrd,
31662)]
31663#[serde(transparent)]
31664pub struct StoreValue(pub ::std::string::String);
31665impl ::std::ops::Deref for StoreValue {
31666 type Target = ::std::string::String;
31667 fn deref(&self) -> &::std::string::String {
31668 &self.0
31669 }
31670}
31671impl ::std::convert::From<StoreValue> for ::std::string::String {
31672 fn from(value: StoreValue) -> Self {
31673 value.0
31674 }
31675}
31676impl ::std::convert::From<&StoreValue> for StoreValue {
31677 fn from(value: &StoreValue) -> Self {
31678 value.clone()
31679 }
31680}
31681impl ::std::convert::From<::std::string::String> for StoreValue {
31682 fn from(value: ::std::string::String) -> Self {
31683 Self(value)
31684 }
31685}
31686impl ::std::str::FromStr for StoreValue {
31687 type Err = ::std::convert::Infallible;
31688 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
31689 Ok(Self(value.to_string()))
31690 }
31691}
31692impl ::std::fmt::Display for StoreValue {
31693 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31694 self.0.fmt(f)
31695 }
31696}
31697#[doc = "`SyncCheckpoint`"]
31698#[doc = r""]
31699#[doc = r" <details><summary>JSON schema</summary>"]
31700#[doc = r""]
31701#[doc = r" ```json"]
31702#[doc = "{"]
31703#[doc = " \"type\": \"string\","]
31704#[doc = " \"enum\": ["]
31705#[doc = " \"genesis\","]
31706#[doc = " \"earliest_available\""]
31707#[doc = " ]"]
31708#[doc = "}"]
31709#[doc = r" ```"]
31710#[doc = r" </details>"]
31711#[derive(
31712 :: serde :: Deserialize,
31713 :: serde :: Serialize,
31714 Clone,
31715 Copy,
31716 Debug,
31717 Eq,
31718 Hash,
31719 Ord,
31720 PartialEq,
31721 PartialOrd,
31722)]
31723pub enum SyncCheckpoint {
31724 #[serde(rename = "genesis")]
31725 Genesis,
31726 #[serde(rename = "earliest_available")]
31727 EarliestAvailable,
31728}
31729impl ::std::convert::From<&Self> for SyncCheckpoint {
31730 fn from(value: &SyncCheckpoint) -> Self {
31731 value.clone()
31732 }
31733}
31734impl ::std::fmt::Display for SyncCheckpoint {
31735 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31736 match *self {
31737 Self::Genesis => f.write_str("genesis"),
31738 Self::EarliestAvailable => f.write_str("earliest_available"),
31739 }
31740 }
31741}
31742impl ::std::str::FromStr for SyncCheckpoint {
31743 type Err = self::error::ConversionError;
31744 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31745 match value {
31746 "genesis" => Ok(Self::Genesis),
31747 "earliest_available" => Ok(Self::EarliestAvailable),
31748 _ => Err("invalid value".into()),
31749 }
31750 }
31751}
31752impl ::std::convert::TryFrom<&str> for SyncCheckpoint {
31753 type Error = self::error::ConversionError;
31754 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31755 value.parse()
31756 }
31757}
31758impl ::std::convert::TryFrom<&::std::string::String> for SyncCheckpoint {
31759 type Error = self::error::ConversionError;
31760 fn try_from(
31761 value: &::std::string::String,
31762 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31763 value.parse()
31764 }
31765}
31766impl ::std::convert::TryFrom<::std::string::String> for SyncCheckpoint {
31767 type Error = self::error::ConversionError;
31768 fn try_from(
31769 value: ::std::string::String,
31770 ) -> ::std::result::Result<Self, self::error::ConversionError> {
31771 value.parse()
31772 }
31773}
31774#[doc = "`SyncConcurrency`"]
31775#[doc = r""]
31776#[doc = r" <details><summary>JSON schema</summary>"]
31777#[doc = r""]
31778#[doc = r" ```json"]
31779#[doc = "{"]
31780#[doc = " \"type\": \"object\","]
31781#[doc = " \"required\": ["]
31782#[doc = " \"apply\","]
31783#[doc = " \"apply_during_catchup\","]
31784#[doc = " \"peer_downloads\","]
31785#[doc = " \"per_shard\""]
31786#[doc = " ],"]
31787#[doc = " \"properties\": {"]
31788#[doc = " \"apply\": {"]
31789#[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.\","]
31790#[doc = " \"type\": \"integer\","]
31791#[doc = " \"format\": \"uint8\","]
31792#[doc = " \"maximum\": 255.0,"]
31793#[doc = " \"minimum\": 0.0"]
31794#[doc = " },"]
31795#[doc = " \"apply_during_catchup\": {"]
31796#[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.\","]
31797#[doc = " \"type\": \"integer\","]
31798#[doc = " \"format\": \"uint8\","]
31799#[doc = " \"maximum\": 255.0,"]
31800#[doc = " \"minimum\": 0.0"]
31801#[doc = " },"]
31802#[doc = " \"peer_downloads\": {"]
31803#[doc = " \"description\": \"Maximum number of outstanding requests for decentralized state sync.\","]
31804#[doc = " \"type\": \"integer\","]
31805#[doc = " \"format\": \"uint8\","]
31806#[doc = " \"maximum\": 255.0,"]
31807#[doc = " \"minimum\": 0.0"]
31808#[doc = " },"]
31809#[doc = " \"per_shard\": {"]
31810#[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.\","]
31811#[doc = " \"type\": \"integer\","]
31812#[doc = " \"format\": \"uint8\","]
31813#[doc = " \"maximum\": 255.0,"]
31814#[doc = " \"minimum\": 0.0"]
31815#[doc = " }"]
31816#[doc = " }"]
31817#[doc = "}"]
31818#[doc = r" ```"]
31819#[doc = r" </details>"]
31820#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31821pub struct SyncConcurrency {
31822 #[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."]
31823 pub apply: u8,
31824 #[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."]
31825 pub apply_during_catchup: u8,
31826 #[doc = "Maximum number of outstanding requests for decentralized state sync."]
31827 pub peer_downloads: u8,
31828 #[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."]
31829 pub per_shard: u8,
31830}
31831impl ::std::convert::From<&SyncConcurrency> for SyncConcurrency {
31832 fn from(value: &SyncConcurrency) -> Self {
31833 value.clone()
31834 }
31835}
31836#[doc = "Configures how to fetch state parts during state sync."]
31837#[doc = r""]
31838#[doc = r" <details><summary>JSON schema</summary>"]
31839#[doc = r""]
31840#[doc = r" ```json"]
31841#[doc = "{"]
31842#[doc = " \"description\": \"Configures how to fetch state parts during state sync.\","]
31843#[doc = " \"oneOf\": ["]
31844#[doc = " {"]
31845#[doc = " \"description\": \"Syncs state from the peers without reading anything from external storage.\","]
31846#[doc = " \"type\": \"string\","]
31847#[doc = " \"enum\": ["]
31848#[doc = " \"Peers\""]
31849#[doc = " ]"]
31850#[doc = " },"]
31851#[doc = " {"]
31852#[doc = " \"description\": \"Expects parts to be available in external storage.\\n\\nUsually as a fallback after some number of attempts to use peers.\","]
31853#[doc = " \"type\": \"object\","]
31854#[doc = " \"required\": ["]
31855#[doc = " \"ExternalStorage\""]
31856#[doc = " ],"]
31857#[doc = " \"properties\": {"]
31858#[doc = " \"ExternalStorage\": {"]
31859#[doc = " \"$ref\": \"#/components/schemas/ExternalStorageConfig\""]
31860#[doc = " }"]
31861#[doc = " },"]
31862#[doc = " \"additionalProperties\": false"]
31863#[doc = " }"]
31864#[doc = " ]"]
31865#[doc = "}"]
31866#[doc = r" ```"]
31867#[doc = r" </details>"]
31868#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31869pub enum SyncConfig {
31870 #[doc = "Syncs state from the peers without reading anything from external storage."]
31871 Peers,
31872 #[doc = "Expects parts to be available in external storage.\n\nUsually as a fallback after some number of attempts to use peers."]
31873 ExternalStorage(ExternalStorageConfig),
31874}
31875impl ::std::convert::From<&Self> for SyncConfig {
31876 fn from(value: &SyncConfig) -> Self {
31877 value.clone()
31878 }
31879}
31880impl ::std::convert::From<ExternalStorageConfig> for SyncConfig {
31881 fn from(value: ExternalStorageConfig) -> Self {
31882 Self::ExternalStorage(value)
31883 }
31884}
31885#[doc = "`Tier1ProxyView`"]
31886#[doc = r""]
31887#[doc = r" <details><summary>JSON schema</summary>"]
31888#[doc = r""]
31889#[doc = r" ```json"]
31890#[doc = "{"]
31891#[doc = " \"type\": \"object\","]
31892#[doc = " \"required\": ["]
31893#[doc = " \"addr\","]
31894#[doc = " \"peer_id\""]
31895#[doc = " ],"]
31896#[doc = " \"properties\": {"]
31897#[doc = " \"addr\": {"]
31898#[doc = " \"type\": \"string\""]
31899#[doc = " },"]
31900#[doc = " \"peer_id\": {"]
31901#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
31902#[doc = " }"]
31903#[doc = " }"]
31904#[doc = "}"]
31905#[doc = r" ```"]
31906#[doc = r" </details>"]
31907#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
31908pub struct Tier1ProxyView {
31909 pub addr: ::std::string::String,
31910 pub peer_id: PublicKey,
31911}
31912impl ::std::convert::From<&Tier1ProxyView> for Tier1ProxyView {
31913 fn from(value: &Tier1ProxyView) -> Self {
31914 value.clone()
31915 }
31916}
31917#[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."]
31918#[doc = r""]
31919#[doc = r" <details><summary>JSON schema</summary>"]
31920#[doc = r""]
31921#[doc = r" ```json"]
31922#[doc = "{"]
31923#[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.\","]
31924#[doc = " \"oneOf\": ["]
31925#[doc = " {"]
31926#[doc = " \"description\": \"Tracks no shards (light client).\","]
31927#[doc = " \"type\": \"string\","]
31928#[doc = " \"enum\": ["]
31929#[doc = " \"NoShards\""]
31930#[doc = " ]"]
31931#[doc = " },"]
31932#[doc = " {"]
31933#[doc = " \"description\": \"Tracks arbitrary shards.\","]
31934#[doc = " \"type\": \"object\","]
31935#[doc = " \"required\": ["]
31936#[doc = " \"Shards\""]
31937#[doc = " ],"]
31938#[doc = " \"properties\": {"]
31939#[doc = " \"Shards\": {"]
31940#[doc = " \"type\": \"array\","]
31941#[doc = " \"items\": {"]
31942#[doc = " \"$ref\": \"#/components/schemas/ShardUId\""]
31943#[doc = " }"]
31944#[doc = " }"]
31945#[doc = " },"]
31946#[doc = " \"additionalProperties\": false"]
31947#[doc = " },"]
31948#[doc = " {"]
31949#[doc = " \"description\": \"Tracks all shards.\","]
31950#[doc = " \"type\": \"string\","]
31951#[doc = " \"enum\": ["]
31952#[doc = " \"AllShards\""]
31953#[doc = " ]"]
31954#[doc = " },"]
31955#[doc = " {"]
31956#[doc = " \"description\": \"Tracks shards that are assigned to given validator account.\","]
31957#[doc = " \"type\": \"object\","]
31958#[doc = " \"required\": ["]
31959#[doc = " \"ShadowValidator\""]
31960#[doc = " ],"]
31961#[doc = " \"properties\": {"]
31962#[doc = " \"ShadowValidator\": {"]
31963#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
31964#[doc = " }"]
31965#[doc = " },"]
31966#[doc = " \"additionalProperties\": false"]
31967#[doc = " },"]
31968#[doc = " {"]
31969#[doc = " \"description\": \"Rotate between these sets of tracked shards.\\nUsed to simulate the behavior of chunk only producers without staking tokens.\","]
31970#[doc = " \"type\": \"object\","]
31971#[doc = " \"required\": ["]
31972#[doc = " \"Schedule\""]
31973#[doc = " ],"]
31974#[doc = " \"properties\": {"]
31975#[doc = " \"Schedule\": {"]
31976#[doc = " \"type\": \"array\","]
31977#[doc = " \"items\": {"]
31978#[doc = " \"type\": \"array\","]
31979#[doc = " \"items\": {"]
31980#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
31981#[doc = " }"]
31982#[doc = " }"]
31983#[doc = " }"]
31984#[doc = " },"]
31985#[doc = " \"additionalProperties\": false"]
31986#[doc = " },"]
31987#[doc = " {"]
31988#[doc = " \"description\": \"Tracks shards that contain one of the given account.\","]
31989#[doc = " \"type\": \"object\","]
31990#[doc = " \"required\": ["]
31991#[doc = " \"Accounts\""]
31992#[doc = " ],"]
31993#[doc = " \"properties\": {"]
31994#[doc = " \"Accounts\": {"]
31995#[doc = " \"type\": \"array\","]
31996#[doc = " \"items\": {"]
31997#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
31998#[doc = " }"]
31999#[doc = " }"]
32000#[doc = " },"]
32001#[doc = " \"additionalProperties\": false"]
32002#[doc = " }"]
32003#[doc = " ]"]
32004#[doc = "}"]
32005#[doc = r" ```"]
32006#[doc = r" </details>"]
32007#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32008pub enum TrackedShardsConfig {
32009 #[doc = "Tracks no shards (light client)."]
32010 NoShards,
32011 #[doc = "Tracks arbitrary shards."]
32012 Shards(::std::vec::Vec<ShardUId>),
32013 #[doc = "Tracks all shards."]
32014 AllShards,
32015 #[doc = "Tracks shards that are assigned to given validator account."]
32016 ShadowValidator(AccountId),
32017 #[doc = "Rotate between these sets of tracked shards.\nUsed to simulate the behavior of chunk only producers without staking tokens."]
32018 Schedule(::std::vec::Vec<::std::vec::Vec<ShardId>>),
32019 #[doc = "Tracks shards that contain one of the given account."]
32020 Accounts(::std::vec::Vec<AccountId>),
32021}
32022impl ::std::convert::From<&Self> for TrackedShardsConfig {
32023 fn from(value: &TrackedShardsConfig) -> Self {
32024 value.clone()
32025 }
32026}
32027impl ::std::convert::From<::std::vec::Vec<ShardUId>> for TrackedShardsConfig {
32028 fn from(value: ::std::vec::Vec<ShardUId>) -> Self {
32029 Self::Shards(value)
32030 }
32031}
32032impl ::std::convert::From<AccountId> for TrackedShardsConfig {
32033 fn from(value: AccountId) -> Self {
32034 Self::ShadowValidator(value)
32035 }
32036}
32037impl ::std::convert::From<::std::vec::Vec<::std::vec::Vec<ShardId>>> for TrackedShardsConfig {
32038 fn from(value: ::std::vec::Vec<::std::vec::Vec<ShardId>>) -> Self {
32039 Self::Schedule(value)
32040 }
32041}
32042impl ::std::convert::From<::std::vec::Vec<AccountId>> for TrackedShardsConfig {
32043 fn from(value: ::std::vec::Vec<AccountId>) -> Self {
32044 Self::Accounts(value)
32045 }
32046}
32047#[doc = "`TransferAction`"]
32048#[doc = r""]
32049#[doc = r" <details><summary>JSON schema</summary>"]
32050#[doc = r""]
32051#[doc = r" ```json"]
32052#[doc = "{"]
32053#[doc = " \"type\": \"object\","]
32054#[doc = " \"required\": ["]
32055#[doc = " \"deposit\""]
32056#[doc = " ],"]
32057#[doc = " \"properties\": {"]
32058#[doc = " \"deposit\": {"]
32059#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
32060#[doc = " }"]
32061#[doc = " }"]
32062#[doc = "}"]
32063#[doc = r" ```"]
32064#[doc = r" </details>"]
32065#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32066pub struct TransferAction {
32067 pub deposit: NearToken,
32068}
32069impl ::std::convert::From<&TransferAction> for TransferAction {
32070 fn from(value: &TransferAction) -> Self {
32071 value.clone()
32072 }
32073}
32074#[doc = "`TransferToGasKeyAction`"]
32075#[doc = r""]
32076#[doc = r" <details><summary>JSON schema</summary>"]
32077#[doc = r""]
32078#[doc = r" ```json"]
32079#[doc = "{"]
32080#[doc = " \"type\": \"object\","]
32081#[doc = " \"required\": ["]
32082#[doc = " \"deposit\","]
32083#[doc = " \"public_key\""]
32084#[doc = " ],"]
32085#[doc = " \"properties\": {"]
32086#[doc = " \"deposit\": {"]
32087#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
32088#[doc = " },"]
32089#[doc = " \"public_key\": {"]
32090#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
32091#[doc = " }"]
32092#[doc = " }"]
32093#[doc = "}"]
32094#[doc = r" ```"]
32095#[doc = r" </details>"]
32096#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32097pub struct TransferToGasKeyAction {
32098 pub deposit: NearToken,
32099 pub public_key: PublicKey,
32100}
32101impl ::std::convert::From<&TransferToGasKeyAction> for TransferToGasKeyAction {
32102 fn from(value: &TransferToGasKeyAction) -> Self {
32103 value.clone()
32104 }
32105}
32106#[doc = "Error returned in the ExecutionOutcome in case of failure"]
32107#[doc = r""]
32108#[doc = r" <details><summary>JSON schema</summary>"]
32109#[doc = r""]
32110#[doc = r" ```json"]
32111#[doc = "{"]
32112#[doc = " \"description\": \"Error returned in the ExecutionOutcome in case of failure\","]
32113#[doc = " \"oneOf\": ["]
32114#[doc = " {"]
32115#[doc = " \"description\": \"An error happened during Action execution\","]
32116#[doc = " \"type\": \"object\","]
32117#[doc = " \"required\": ["]
32118#[doc = " \"ActionError\""]
32119#[doc = " ],"]
32120#[doc = " \"properties\": {"]
32121#[doc = " \"ActionError\": {"]
32122#[doc = " \"$ref\": \"#/components/schemas/ActionError\""]
32123#[doc = " }"]
32124#[doc = " },"]
32125#[doc = " \"additionalProperties\": false"]
32126#[doc = " },"]
32127#[doc = " {"]
32128#[doc = " \"description\": \"An error happened during Transaction execution\","]
32129#[doc = " \"type\": \"object\","]
32130#[doc = " \"required\": ["]
32131#[doc = " \"InvalidTxError\""]
32132#[doc = " ],"]
32133#[doc = " \"properties\": {"]
32134#[doc = " \"InvalidTxError\": {"]
32135#[doc = " \"$ref\": \"#/components/schemas/InvalidTxError\""]
32136#[doc = " }"]
32137#[doc = " },"]
32138#[doc = " \"additionalProperties\": false"]
32139#[doc = " }"]
32140#[doc = " ]"]
32141#[doc = "}"]
32142#[doc = r" ```"]
32143#[doc = r" </details>"]
32144#[derive(
32145 :: serde :: Deserialize,
32146 :: serde :: Serialize,
32147 Clone,
32148 Debug,
32149 thiserror::Error,
32150 strum_macros::Display,
32151)]
32152pub enum TxExecutionError {
32153 #[doc = "An error happened during Action execution"]
32154 ActionError(ActionError),
32155 #[doc = "An error happened during Transaction execution"]
32156 InvalidTxError(InvalidTxError),
32157}
32158impl ::std::convert::From<&Self> for TxExecutionError {
32159 fn from(value: &TxExecutionError) -> Self {
32160 value.clone()
32161 }
32162}
32163impl ::std::convert::From<ActionError> for TxExecutionError {
32164 fn from(value: ActionError) -> Self {
32165 Self::ActionError(value)
32166 }
32167}
32168impl ::std::convert::From<InvalidTxError> for TxExecutionError {
32169 fn from(value: InvalidTxError) -> Self {
32170 Self::InvalidTxError(value)
32171 }
32172}
32173#[doc = "`TxExecutionStatus`"]
32174#[doc = r""]
32175#[doc = r" <details><summary>JSON schema</summary>"]
32176#[doc = r""]
32177#[doc = r" ```json"]
32178#[doc = "{"]
32179#[doc = " \"oneOf\": ["]
32180#[doc = " {"]
32181#[doc = " \"description\": \"Transaction is waiting to be included into the block\","]
32182#[doc = " \"type\": \"string\","]
32183#[doc = " \"enum\": ["]
32184#[doc = " \"NONE\""]
32185#[doc = " ]"]
32186#[doc = " },"]
32187#[doc = " {"]
32188#[doc = " \"description\": \"Transaction is included into the block. The block may be not finalized yet\","]
32189#[doc = " \"type\": \"string\","]
32190#[doc = " \"enum\": ["]
32191#[doc = " \"INCLUDED\""]
32192#[doc = " ]"]
32193#[doc = " },"]
32194#[doc = " {"]
32195#[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\","]
32196#[doc = " \"type\": \"string\","]
32197#[doc = " \"enum\": ["]
32198#[doc = " \"EXECUTED_OPTIMISTIC\""]
32199#[doc = " ]"]
32200#[doc = " },"]
32201#[doc = " {"]
32202#[doc = " \"description\": \"Transaction is included into finalized block\","]
32203#[doc = " \"type\": \"string\","]
32204#[doc = " \"enum\": ["]
32205#[doc = " \"INCLUDED_FINAL\""]
32206#[doc = " ]"]
32207#[doc = " },"]
32208#[doc = " {"]
32209#[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\","]
32210#[doc = " \"type\": \"string\","]
32211#[doc = " \"enum\": ["]
32212#[doc = " \"EXECUTED\""]
32213#[doc = " ]"]
32214#[doc = " },"]
32215#[doc = " {"]
32216#[doc = " \"description\": \"Transaction is included into finalized block +\\nExecution of all transaction receipts is finalized, including refund receipts\","]
32217#[doc = " \"type\": \"string\","]
32218#[doc = " \"enum\": ["]
32219#[doc = " \"FINAL\""]
32220#[doc = " ]"]
32221#[doc = " }"]
32222#[doc = " ]"]
32223#[doc = "}"]
32224#[doc = r" ```"]
32225#[doc = r" </details>"]
32226#[derive(
32227 :: serde :: Deserialize,
32228 :: serde :: Serialize,
32229 Clone,
32230 Copy,
32231 Debug,
32232 Eq,
32233 Hash,
32234 Ord,
32235 PartialEq,
32236 PartialOrd,
32237)]
32238pub enum TxExecutionStatus {
32239 #[doc = "Transaction is waiting to be included into the block"]
32240 #[serde(rename = "NONE")]
32241 None,
32242 #[doc = "Transaction is included into the block. The block may be not finalized yet"]
32243 #[serde(rename = "INCLUDED")]
32244 Included,
32245 #[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"]
32246 #[serde(rename = "EXECUTED_OPTIMISTIC")]
32247 ExecutedOptimistic,
32248 #[doc = "Transaction is included into finalized block"]
32249 #[serde(rename = "INCLUDED_FINAL")]
32250 IncludedFinal,
32251 #[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"]
32252 #[serde(rename = "EXECUTED")]
32253 Executed,
32254 #[doc = "Transaction is included into finalized block +\nExecution of all transaction receipts is finalized, including refund receipts"]
32255 #[serde(rename = "FINAL")]
32256 Final,
32257}
32258impl ::std::convert::From<&Self> for TxExecutionStatus {
32259 fn from(value: &TxExecutionStatus) -> Self {
32260 value.clone()
32261 }
32262}
32263impl ::std::fmt::Display for TxExecutionStatus {
32264 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32265 match *self {
32266 Self::None => f.write_str("NONE"),
32267 Self::Included => f.write_str("INCLUDED"),
32268 Self::ExecutedOptimistic => f.write_str("EXECUTED_OPTIMISTIC"),
32269 Self::IncludedFinal => f.write_str("INCLUDED_FINAL"),
32270 Self::Executed => f.write_str("EXECUTED"),
32271 Self::Final => f.write_str("FINAL"),
32272 }
32273 }
32274}
32275impl ::std::str::FromStr for TxExecutionStatus {
32276 type Err = self::error::ConversionError;
32277 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32278 match value {
32279 "NONE" => Ok(Self::None),
32280 "INCLUDED" => Ok(Self::Included),
32281 "EXECUTED_OPTIMISTIC" => Ok(Self::ExecutedOptimistic),
32282 "INCLUDED_FINAL" => Ok(Self::IncludedFinal),
32283 "EXECUTED" => Ok(Self::Executed),
32284 "FINAL" => Ok(Self::Final),
32285 _ => Err("invalid value".into()),
32286 }
32287 }
32288}
32289impl ::std::convert::TryFrom<&str> for TxExecutionStatus {
32290 type Error = self::error::ConversionError;
32291 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32292 value.parse()
32293 }
32294}
32295impl ::std::convert::TryFrom<&::std::string::String> for TxExecutionStatus {
32296 type Error = self::error::ConversionError;
32297 fn try_from(
32298 value: &::std::string::String,
32299 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32300 value.parse()
32301 }
32302}
32303impl ::std::convert::TryFrom<::std::string::String> for TxExecutionStatus {
32304 type Error = self::error::ConversionError;
32305 fn try_from(
32306 value: ::std::string::String,
32307 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32308 value.parse()
32309 }
32310}
32311#[doc = "Use global contract action"]
32312#[doc = r""]
32313#[doc = r" <details><summary>JSON schema</summary>"]
32314#[doc = r""]
32315#[doc = r" ```json"]
32316#[doc = "{"]
32317#[doc = " \"description\": \"Use global contract action\","]
32318#[doc = " \"type\": \"object\","]
32319#[doc = " \"required\": ["]
32320#[doc = " \"contract_identifier\""]
32321#[doc = " ],"]
32322#[doc = " \"properties\": {"]
32323#[doc = " \"contract_identifier\": {"]
32324#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
32325#[doc = " }"]
32326#[doc = " }"]
32327#[doc = "}"]
32328#[doc = r" ```"]
32329#[doc = r" </details>"]
32330#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32331pub struct UseGlobalContractAction {
32332 pub contract_identifier: GlobalContractIdentifier,
32333}
32334impl ::std::convert::From<&UseGlobalContractAction> for UseGlobalContractAction {
32335 fn from(value: &UseGlobalContractAction) -> Self {
32336 value.clone()
32337 }
32338}
32339#[doc = "`ValidatorInfo`"]
32340#[doc = r""]
32341#[doc = r" <details><summary>JSON schema</summary>"]
32342#[doc = r""]
32343#[doc = r" ```json"]
32344#[doc = "{"]
32345#[doc = " \"type\": \"object\","]
32346#[doc = " \"required\": ["]
32347#[doc = " \"account_id\""]
32348#[doc = " ],"]
32349#[doc = " \"properties\": {"]
32350#[doc = " \"account_id\": {"]
32351#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
32352#[doc = " }"]
32353#[doc = " }"]
32354#[doc = "}"]
32355#[doc = r" ```"]
32356#[doc = r" </details>"]
32357#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32358pub struct ValidatorInfo {
32359 pub account_id: AccountId,
32360}
32361impl ::std::convert::From<&ValidatorInfo> for ValidatorInfo {
32362 fn from(value: &ValidatorInfo) -> Self {
32363 value.clone()
32364 }
32365}
32366#[doc = "Reasons for removing a validator from the validator set."]
32367#[doc = r""]
32368#[doc = r" <details><summary>JSON schema</summary>"]
32369#[doc = r""]
32370#[doc = r" ```json"]
32371#[doc = "{"]
32372#[doc = " \"description\": \"Reasons for removing a validator from the validator set.\","]
32373#[doc = " \"oneOf\": ["]
32374#[doc = " {"]
32375#[doc = " \"description\": \"Deprecated\","]
32376#[doc = " \"type\": \"string\","]
32377#[doc = " \"enum\": ["]
32378#[doc = " \"_UnusedSlashed\""]
32379#[doc = " ]"]
32380#[doc = " },"]
32381#[doc = " {"]
32382#[doc = " \"description\": \"Validator didn't produce enough blocks.\","]
32383#[doc = " \"type\": \"object\","]
32384#[doc = " \"required\": ["]
32385#[doc = " \"NotEnoughBlocks\""]
32386#[doc = " ],"]
32387#[doc = " \"properties\": {"]
32388#[doc = " \"NotEnoughBlocks\": {"]
32389#[doc = " \"type\": \"object\","]
32390#[doc = " \"required\": ["]
32391#[doc = " \"expected\","]
32392#[doc = " \"produced\""]
32393#[doc = " ],"]
32394#[doc = " \"properties\": {"]
32395#[doc = " \"expected\": {"]
32396#[doc = " \"type\": \"integer\","]
32397#[doc = " \"format\": \"uint64\","]
32398#[doc = " \"minimum\": 0.0"]
32399#[doc = " },"]
32400#[doc = " \"produced\": {"]
32401#[doc = " \"type\": \"integer\","]
32402#[doc = " \"format\": \"uint64\","]
32403#[doc = " \"minimum\": 0.0"]
32404#[doc = " }"]
32405#[doc = " }"]
32406#[doc = " }"]
32407#[doc = " },"]
32408#[doc = " \"additionalProperties\": false"]
32409#[doc = " },"]
32410#[doc = " {"]
32411#[doc = " \"description\": \"Validator didn't produce enough chunks.\","]
32412#[doc = " \"type\": \"object\","]
32413#[doc = " \"required\": ["]
32414#[doc = " \"NotEnoughChunks\""]
32415#[doc = " ],"]
32416#[doc = " \"properties\": {"]
32417#[doc = " \"NotEnoughChunks\": {"]
32418#[doc = " \"type\": \"object\","]
32419#[doc = " \"required\": ["]
32420#[doc = " \"expected\","]
32421#[doc = " \"produced\""]
32422#[doc = " ],"]
32423#[doc = " \"properties\": {"]
32424#[doc = " \"expected\": {"]
32425#[doc = " \"type\": \"integer\","]
32426#[doc = " \"format\": \"uint64\","]
32427#[doc = " \"minimum\": 0.0"]
32428#[doc = " },"]
32429#[doc = " \"produced\": {"]
32430#[doc = " \"type\": \"integer\","]
32431#[doc = " \"format\": \"uint64\","]
32432#[doc = " \"minimum\": 0.0"]
32433#[doc = " }"]
32434#[doc = " }"]
32435#[doc = " }"]
32436#[doc = " },"]
32437#[doc = " \"additionalProperties\": false"]
32438#[doc = " },"]
32439#[doc = " {"]
32440#[doc = " \"description\": \"Validator unstaked themselves.\","]
32441#[doc = " \"type\": \"string\","]
32442#[doc = " \"enum\": ["]
32443#[doc = " \"Unstaked\""]
32444#[doc = " ]"]
32445#[doc = " },"]
32446#[doc = " {"]
32447#[doc = " \"description\": \"Validator stake is now below threshold\","]
32448#[doc = " \"type\": \"object\","]
32449#[doc = " \"required\": ["]
32450#[doc = " \"NotEnoughStake\""]
32451#[doc = " ],"]
32452#[doc = " \"properties\": {"]
32453#[doc = " \"NotEnoughStake\": {"]
32454#[doc = " \"type\": \"object\","]
32455#[doc = " \"required\": ["]
32456#[doc = " \"stake_u128\","]
32457#[doc = " \"threshold_u128\""]
32458#[doc = " ],"]
32459#[doc = " \"properties\": {"]
32460#[doc = " \"stake_u128\": {"]
32461#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
32462#[doc = " },"]
32463#[doc = " \"threshold_u128\": {"]
32464#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
32465#[doc = " }"]
32466#[doc = " }"]
32467#[doc = " }"]
32468#[doc = " },"]
32469#[doc = " \"additionalProperties\": false"]
32470#[doc = " },"]
32471#[doc = " {"]
32472#[doc = " \"description\": \"Enough stake but is not chosen because of seat limits.\","]
32473#[doc = " \"type\": \"string\","]
32474#[doc = " \"enum\": ["]
32475#[doc = " \"DidNotGetASeat\""]
32476#[doc = " ]"]
32477#[doc = " },"]
32478#[doc = " {"]
32479#[doc = " \"description\": \"Validator didn't produce enough chunk endorsements.\","]
32480#[doc = " \"type\": \"object\","]
32481#[doc = " \"required\": ["]
32482#[doc = " \"NotEnoughChunkEndorsements\""]
32483#[doc = " ],"]
32484#[doc = " \"properties\": {"]
32485#[doc = " \"NotEnoughChunkEndorsements\": {"]
32486#[doc = " \"type\": \"object\","]
32487#[doc = " \"required\": ["]
32488#[doc = " \"expected\","]
32489#[doc = " \"produced\""]
32490#[doc = " ],"]
32491#[doc = " \"properties\": {"]
32492#[doc = " \"expected\": {"]
32493#[doc = " \"type\": \"integer\","]
32494#[doc = " \"format\": \"uint64\","]
32495#[doc = " \"minimum\": 0.0"]
32496#[doc = " },"]
32497#[doc = " \"produced\": {"]
32498#[doc = " \"type\": \"integer\","]
32499#[doc = " \"format\": \"uint64\","]
32500#[doc = " \"minimum\": 0.0"]
32501#[doc = " }"]
32502#[doc = " }"]
32503#[doc = " }"]
32504#[doc = " },"]
32505#[doc = " \"additionalProperties\": false"]
32506#[doc = " },"]
32507#[doc = " {"]
32508#[doc = " \"description\": \"Validator's last block proposal was for a protocol version older than\\nthe network's voted protocol version.\","]
32509#[doc = " \"type\": \"object\","]
32510#[doc = " \"required\": ["]
32511#[doc = " \"ProtocolVersionTooOld\""]
32512#[doc = " ],"]
32513#[doc = " \"properties\": {"]
32514#[doc = " \"ProtocolVersionTooOld\": {"]
32515#[doc = " \"type\": \"object\","]
32516#[doc = " \"required\": ["]
32517#[doc = " \"network_version\","]
32518#[doc = " \"version\""]
32519#[doc = " ],"]
32520#[doc = " \"properties\": {"]
32521#[doc = " \"network_version\": {"]
32522#[doc = " \"type\": \"integer\","]
32523#[doc = " \"format\": \"uint32\","]
32524#[doc = " \"minimum\": 0.0"]
32525#[doc = " },"]
32526#[doc = " \"version\": {"]
32527#[doc = " \"type\": \"integer\","]
32528#[doc = " \"format\": \"uint32\","]
32529#[doc = " \"minimum\": 0.0"]
32530#[doc = " }"]
32531#[doc = " }"]
32532#[doc = " }"]
32533#[doc = " },"]
32534#[doc = " \"additionalProperties\": false"]
32535#[doc = " }"]
32536#[doc = " ]"]
32537#[doc = "}"]
32538#[doc = r" ```"]
32539#[doc = r" </details>"]
32540#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32541pub enum ValidatorKickoutReason {
32542 #[doc = "Deprecated"]
32543 #[serde(rename = "_UnusedSlashed")]
32544 UnusedSlashed,
32545 #[doc = "Validator didn't produce enough blocks."]
32546 NotEnoughBlocks { expected: u64, produced: u64 },
32547 #[doc = "Validator didn't produce enough chunks."]
32548 NotEnoughChunks { expected: u64, produced: u64 },
32549 #[doc = "Validator unstaked themselves."]
32550 Unstaked,
32551 #[doc = "Validator stake is now below threshold"]
32552 NotEnoughStake {
32553 stake_u128: NearToken,
32554 threshold_u128: NearToken,
32555 },
32556 #[doc = "Enough stake but is not chosen because of seat limits."]
32557 DidNotGetASeat,
32558 #[doc = "Validator didn't produce enough chunk endorsements."]
32559 NotEnoughChunkEndorsements { expected: u64, produced: u64 },
32560 #[doc = "Validator's last block proposal was for a protocol version older than\nthe network's voted protocol version."]
32561 ProtocolVersionTooOld { network_version: u32, version: u32 },
32562}
32563impl ::std::convert::From<&Self> for ValidatorKickoutReason {
32564 fn from(value: &ValidatorKickoutReason) -> Self {
32565 value.clone()
32566 }
32567}
32568#[doc = "`ValidatorKickoutView`"]
32569#[doc = r""]
32570#[doc = r" <details><summary>JSON schema</summary>"]
32571#[doc = r""]
32572#[doc = r" ```json"]
32573#[doc = "{"]
32574#[doc = " \"type\": \"object\","]
32575#[doc = " \"required\": ["]
32576#[doc = " \"account_id\","]
32577#[doc = " \"reason\""]
32578#[doc = " ],"]
32579#[doc = " \"properties\": {"]
32580#[doc = " \"account_id\": {"]
32581#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
32582#[doc = " },"]
32583#[doc = " \"reason\": {"]
32584#[doc = " \"$ref\": \"#/components/schemas/ValidatorKickoutReason\""]
32585#[doc = " }"]
32586#[doc = " }"]
32587#[doc = "}"]
32588#[doc = r" ```"]
32589#[doc = r" </details>"]
32590#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32591pub struct ValidatorKickoutView {
32592 pub account_id: AccountId,
32593 pub reason: ValidatorKickoutReason,
32594}
32595impl ::std::convert::From<&ValidatorKickoutView> for ValidatorKickoutView {
32596 fn from(value: &ValidatorKickoutView) -> Self {
32597 value.clone()
32598 }
32599}
32600#[doc = "`ValidatorStakeView`"]
32601#[doc = r""]
32602#[doc = r" <details><summary>JSON schema</summary>"]
32603#[doc = r""]
32604#[doc = r" ```json"]
32605#[doc = "{"]
32606#[doc = " \"type\": \"object\","]
32607#[doc = " \"allOf\": ["]
32608#[doc = " {"]
32609#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeViewV1\""]
32610#[doc = " }"]
32611#[doc = " ],"]
32612#[doc = " \"required\": ["]
32613#[doc = " \"validator_stake_struct_version\""]
32614#[doc = " ],"]
32615#[doc = " \"properties\": {"]
32616#[doc = " \"validator_stake_struct_version\": {"]
32617#[doc = " \"type\": \"string\","]
32618#[doc = " \"enum\": ["]
32619#[doc = " \"V1\""]
32620#[doc = " ]"]
32621#[doc = " }"]
32622#[doc = " }"]
32623#[doc = "}"]
32624#[doc = r" ```"]
32625#[doc = r" </details>"]
32626#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32627pub struct ValidatorStakeView {
32628 pub account_id: AccountId,
32629 pub public_key: PublicKey,
32630 pub stake: NearToken,
32631 pub validator_stake_struct_version: ValidatorStakeViewValidatorStakeStructVersion,
32632}
32633impl ::std::convert::From<&ValidatorStakeView> for ValidatorStakeView {
32634 fn from(value: &ValidatorStakeView) -> Self {
32635 value.clone()
32636 }
32637}
32638#[doc = "`ValidatorStakeViewV1`"]
32639#[doc = r""]
32640#[doc = r" <details><summary>JSON schema</summary>"]
32641#[doc = r""]
32642#[doc = r" ```json"]
32643#[doc = "{"]
32644#[doc = " \"type\": \"object\","]
32645#[doc = " \"required\": ["]
32646#[doc = " \"account_id\","]
32647#[doc = " \"public_key\","]
32648#[doc = " \"stake\""]
32649#[doc = " ],"]
32650#[doc = " \"properties\": {"]
32651#[doc = " \"account_id\": {"]
32652#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
32653#[doc = " },"]
32654#[doc = " \"public_key\": {"]
32655#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
32656#[doc = " },"]
32657#[doc = " \"stake\": {"]
32658#[doc = " \"$ref\": \"#/components/schemas/NearToken\""]
32659#[doc = " }"]
32660#[doc = " }"]
32661#[doc = "}"]
32662#[doc = r" ```"]
32663#[doc = r" </details>"]
32664#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32665pub struct ValidatorStakeViewV1 {
32666 pub account_id: AccountId,
32667 pub public_key: PublicKey,
32668 pub stake: NearToken,
32669}
32670impl ::std::convert::From<&ValidatorStakeViewV1> for ValidatorStakeViewV1 {
32671 fn from(value: &ValidatorStakeViewV1) -> Self {
32672 value.clone()
32673 }
32674}
32675#[doc = "`ValidatorStakeViewValidatorStakeStructVersion`"]
32676#[doc = r""]
32677#[doc = r" <details><summary>JSON schema</summary>"]
32678#[doc = r""]
32679#[doc = r" ```json"]
32680#[doc = "{"]
32681#[doc = " \"type\": \"string\","]
32682#[doc = " \"enum\": ["]
32683#[doc = " \"V1\""]
32684#[doc = " ]"]
32685#[doc = "}"]
32686#[doc = r" ```"]
32687#[doc = r" </details>"]
32688#[derive(
32689 :: serde :: Deserialize,
32690 :: serde :: Serialize,
32691 Clone,
32692 Copy,
32693 Debug,
32694 Eq,
32695 Hash,
32696 Ord,
32697 PartialEq,
32698 PartialOrd,
32699)]
32700pub enum ValidatorStakeViewValidatorStakeStructVersion {
32701 V1,
32702}
32703impl ::std::convert::From<&Self> for ValidatorStakeViewValidatorStakeStructVersion {
32704 fn from(value: &ValidatorStakeViewValidatorStakeStructVersion) -> Self {
32705 value.clone()
32706 }
32707}
32708impl ::std::fmt::Display for ValidatorStakeViewValidatorStakeStructVersion {
32709 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32710 match *self {
32711 Self::V1 => f.write_str("V1"),
32712 }
32713 }
32714}
32715impl ::std::str::FromStr for ValidatorStakeViewValidatorStakeStructVersion {
32716 type Err = self::error::ConversionError;
32717 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32718 match value {
32719 "V1" => Ok(Self::V1),
32720 _ => Err("invalid value".into()),
32721 }
32722 }
32723}
32724impl ::std::convert::TryFrom<&str> for ValidatorStakeViewValidatorStakeStructVersion {
32725 type Error = self::error::ConversionError;
32726 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32727 value.parse()
32728 }
32729}
32730impl ::std::convert::TryFrom<&::std::string::String>
32731 for ValidatorStakeViewValidatorStakeStructVersion
32732{
32733 type Error = self::error::ConversionError;
32734 fn try_from(
32735 value: &::std::string::String,
32736 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32737 value.parse()
32738 }
32739}
32740impl ::std::convert::TryFrom<::std::string::String>
32741 for ValidatorStakeViewValidatorStakeStructVersion
32742{
32743 type Error = self::error::ConversionError;
32744 fn try_from(
32745 value: ::std::string::String,
32746 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32747 value.parse()
32748 }
32749}
32750#[doc = "Data structure for semver version and github tag or commit."]
32751#[doc = r""]
32752#[doc = r" <details><summary>JSON schema</summary>"]
32753#[doc = r""]
32754#[doc = r" ```json"]
32755#[doc = "{"]
32756#[doc = " \"description\": \"Data structure for semver version and github tag or commit.\","]
32757#[doc = " \"type\": \"object\","]
32758#[doc = " \"required\": ["]
32759#[doc = " \"build\","]
32760#[doc = " \"commit\","]
32761#[doc = " \"version\""]
32762#[doc = " ],"]
32763#[doc = " \"properties\": {"]
32764#[doc = " \"build\": {"]
32765#[doc = " \"type\": \"string\""]
32766#[doc = " },"]
32767#[doc = " \"commit\": {"]
32768#[doc = " \"type\": \"string\""]
32769#[doc = " },"]
32770#[doc = " \"rustc_version\": {"]
32771#[doc = " \"default\": \"\","]
32772#[doc = " \"type\": \"string\""]
32773#[doc = " },"]
32774#[doc = " \"version\": {"]
32775#[doc = " \"type\": \"string\""]
32776#[doc = " }"]
32777#[doc = " }"]
32778#[doc = "}"]
32779#[doc = r" ```"]
32780#[doc = r" </details>"]
32781#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
32782pub struct Version {
32783 pub build: ::std::string::String,
32784 pub commit: ::std::string::String,
32785 #[serde(default)]
32786 pub rustc_version: ::std::string::String,
32787 pub version: ::std::string::String,
32788}
32789impl ::std::convert::From<&Version> for Version {
32790 fn from(value: &Version) -> Self {
32791 value.clone()
32792 }
32793}
32794#[doc = "`ViewAccessKeyByBlockIdRequestType`"]
32795#[doc = r""]
32796#[doc = r" <details><summary>JSON schema</summary>"]
32797#[doc = r""]
32798#[doc = r" ```json"]
32799#[doc = "{"]
32800#[doc = " \"type\": \"string\","]
32801#[doc = " \"enum\": ["]
32802#[doc = " \"view_access_key\""]
32803#[doc = " ]"]
32804#[doc = "}"]
32805#[doc = r" ```"]
32806#[doc = r" </details>"]
32807#[derive(
32808 :: serde :: Deserialize,
32809 :: serde :: Serialize,
32810 Clone,
32811 Copy,
32812 Debug,
32813 Eq,
32814 Hash,
32815 Ord,
32816 PartialEq,
32817 PartialOrd,
32818)]
32819pub enum ViewAccessKeyByBlockIdRequestType {
32820 #[serde(rename = "view_access_key")]
32821 ViewAccessKey,
32822}
32823impl ::std::convert::From<&Self> for ViewAccessKeyByBlockIdRequestType {
32824 fn from(value: &ViewAccessKeyByBlockIdRequestType) -> Self {
32825 value.clone()
32826 }
32827}
32828impl ::std::fmt::Display for ViewAccessKeyByBlockIdRequestType {
32829 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32830 match *self {
32831 Self::ViewAccessKey => f.write_str("view_access_key"),
32832 }
32833 }
32834}
32835impl ::std::str::FromStr for ViewAccessKeyByBlockIdRequestType {
32836 type Err = self::error::ConversionError;
32837 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32838 match value {
32839 "view_access_key" => Ok(Self::ViewAccessKey),
32840 _ => Err("invalid value".into()),
32841 }
32842 }
32843}
32844impl ::std::convert::TryFrom<&str> for ViewAccessKeyByBlockIdRequestType {
32845 type Error = self::error::ConversionError;
32846 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32847 value.parse()
32848 }
32849}
32850impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByBlockIdRequestType {
32851 type Error = self::error::ConversionError;
32852 fn try_from(
32853 value: &::std::string::String,
32854 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32855 value.parse()
32856 }
32857}
32858impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByBlockIdRequestType {
32859 type Error = self::error::ConversionError;
32860 fn try_from(
32861 value: ::std::string::String,
32862 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32863 value.parse()
32864 }
32865}
32866#[doc = "`ViewAccessKeyByFinalityRequestType`"]
32867#[doc = r""]
32868#[doc = r" <details><summary>JSON schema</summary>"]
32869#[doc = r""]
32870#[doc = r" ```json"]
32871#[doc = "{"]
32872#[doc = " \"type\": \"string\","]
32873#[doc = " \"enum\": ["]
32874#[doc = " \"view_access_key\""]
32875#[doc = " ]"]
32876#[doc = "}"]
32877#[doc = r" ```"]
32878#[doc = r" </details>"]
32879#[derive(
32880 :: serde :: Deserialize,
32881 :: serde :: Serialize,
32882 Clone,
32883 Copy,
32884 Debug,
32885 Eq,
32886 Hash,
32887 Ord,
32888 PartialEq,
32889 PartialOrd,
32890)]
32891pub enum ViewAccessKeyByFinalityRequestType {
32892 #[serde(rename = "view_access_key")]
32893 ViewAccessKey,
32894}
32895impl ::std::convert::From<&Self> for ViewAccessKeyByFinalityRequestType {
32896 fn from(value: &ViewAccessKeyByFinalityRequestType) -> Self {
32897 value.clone()
32898 }
32899}
32900impl ::std::fmt::Display for ViewAccessKeyByFinalityRequestType {
32901 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32902 match *self {
32903 Self::ViewAccessKey => f.write_str("view_access_key"),
32904 }
32905 }
32906}
32907impl ::std::str::FromStr for ViewAccessKeyByFinalityRequestType {
32908 type Err = self::error::ConversionError;
32909 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32910 match value {
32911 "view_access_key" => Ok(Self::ViewAccessKey),
32912 _ => Err("invalid value".into()),
32913 }
32914 }
32915}
32916impl ::std::convert::TryFrom<&str> for ViewAccessKeyByFinalityRequestType {
32917 type Error = self::error::ConversionError;
32918 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32919 value.parse()
32920 }
32921}
32922impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByFinalityRequestType {
32923 type Error = self::error::ConversionError;
32924 fn try_from(
32925 value: &::std::string::String,
32926 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32927 value.parse()
32928 }
32929}
32930impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByFinalityRequestType {
32931 type Error = self::error::ConversionError;
32932 fn try_from(
32933 value: ::std::string::String,
32934 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32935 value.parse()
32936 }
32937}
32938#[doc = "`ViewAccessKeyBySyncCheckpointRequestType`"]
32939#[doc = r""]
32940#[doc = r" <details><summary>JSON schema</summary>"]
32941#[doc = r""]
32942#[doc = r" ```json"]
32943#[doc = "{"]
32944#[doc = " \"type\": \"string\","]
32945#[doc = " \"enum\": ["]
32946#[doc = " \"view_access_key\""]
32947#[doc = " ]"]
32948#[doc = "}"]
32949#[doc = r" ```"]
32950#[doc = r" </details>"]
32951#[derive(
32952 :: serde :: Deserialize,
32953 :: serde :: Serialize,
32954 Clone,
32955 Copy,
32956 Debug,
32957 Eq,
32958 Hash,
32959 Ord,
32960 PartialEq,
32961 PartialOrd,
32962)]
32963pub enum ViewAccessKeyBySyncCheckpointRequestType {
32964 #[serde(rename = "view_access_key")]
32965 ViewAccessKey,
32966}
32967impl ::std::convert::From<&Self> for ViewAccessKeyBySyncCheckpointRequestType {
32968 fn from(value: &ViewAccessKeyBySyncCheckpointRequestType) -> Self {
32969 value.clone()
32970 }
32971}
32972impl ::std::fmt::Display for ViewAccessKeyBySyncCheckpointRequestType {
32973 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32974 match *self {
32975 Self::ViewAccessKey => f.write_str("view_access_key"),
32976 }
32977 }
32978}
32979impl ::std::str::FromStr for ViewAccessKeyBySyncCheckpointRequestType {
32980 type Err = self::error::ConversionError;
32981 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32982 match value {
32983 "view_access_key" => Ok(Self::ViewAccessKey),
32984 _ => Err("invalid value".into()),
32985 }
32986 }
32987}
32988impl ::std::convert::TryFrom<&str> for ViewAccessKeyBySyncCheckpointRequestType {
32989 type Error = self::error::ConversionError;
32990 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32991 value.parse()
32992 }
32993}
32994impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
32995 type Error = self::error::ConversionError;
32996 fn try_from(
32997 value: &::std::string::String,
32998 ) -> ::std::result::Result<Self, self::error::ConversionError> {
32999 value.parse()
33000 }
33001}
33002impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
33003 type Error = self::error::ConversionError;
33004 fn try_from(
33005 value: ::std::string::String,
33006 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33007 value.parse()
33008 }
33009}
33010#[doc = "`ViewAccessKeyListByBlockIdRequestType`"]
33011#[doc = r""]
33012#[doc = r" <details><summary>JSON schema</summary>"]
33013#[doc = r""]
33014#[doc = r" ```json"]
33015#[doc = "{"]
33016#[doc = " \"type\": \"string\","]
33017#[doc = " \"enum\": ["]
33018#[doc = " \"view_access_key_list\""]
33019#[doc = " ]"]
33020#[doc = "}"]
33021#[doc = r" ```"]
33022#[doc = r" </details>"]
33023#[derive(
33024 :: serde :: Deserialize,
33025 :: serde :: Serialize,
33026 Clone,
33027 Copy,
33028 Debug,
33029 Eq,
33030 Hash,
33031 Ord,
33032 PartialEq,
33033 PartialOrd,
33034)]
33035pub enum ViewAccessKeyListByBlockIdRequestType {
33036 #[serde(rename = "view_access_key_list")]
33037 ViewAccessKeyList,
33038}
33039impl ::std::convert::From<&Self> for ViewAccessKeyListByBlockIdRequestType {
33040 fn from(value: &ViewAccessKeyListByBlockIdRequestType) -> Self {
33041 value.clone()
33042 }
33043}
33044impl ::std::fmt::Display for ViewAccessKeyListByBlockIdRequestType {
33045 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33046 match *self {
33047 Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
33048 }
33049 }
33050}
33051impl ::std::str::FromStr for ViewAccessKeyListByBlockIdRequestType {
33052 type Err = self::error::ConversionError;
33053 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33054 match value {
33055 "view_access_key_list" => Ok(Self::ViewAccessKeyList),
33056 _ => Err("invalid value".into()),
33057 }
33058 }
33059}
33060impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByBlockIdRequestType {
33061 type Error = self::error::ConversionError;
33062 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33063 value.parse()
33064 }
33065}
33066impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
33067 type Error = self::error::ConversionError;
33068 fn try_from(
33069 value: &::std::string::String,
33070 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33071 value.parse()
33072 }
33073}
33074impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
33075 type Error = self::error::ConversionError;
33076 fn try_from(
33077 value: ::std::string::String,
33078 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33079 value.parse()
33080 }
33081}
33082#[doc = "`ViewAccessKeyListByFinalityRequestType`"]
33083#[doc = r""]
33084#[doc = r" <details><summary>JSON schema</summary>"]
33085#[doc = r""]
33086#[doc = r" ```json"]
33087#[doc = "{"]
33088#[doc = " \"type\": \"string\","]
33089#[doc = " \"enum\": ["]
33090#[doc = " \"view_access_key_list\""]
33091#[doc = " ]"]
33092#[doc = "}"]
33093#[doc = r" ```"]
33094#[doc = r" </details>"]
33095#[derive(
33096 :: serde :: Deserialize,
33097 :: serde :: Serialize,
33098 Clone,
33099 Copy,
33100 Debug,
33101 Eq,
33102 Hash,
33103 Ord,
33104 PartialEq,
33105 PartialOrd,
33106)]
33107pub enum ViewAccessKeyListByFinalityRequestType {
33108 #[serde(rename = "view_access_key_list")]
33109 ViewAccessKeyList,
33110}
33111impl ::std::convert::From<&Self> for ViewAccessKeyListByFinalityRequestType {
33112 fn from(value: &ViewAccessKeyListByFinalityRequestType) -> Self {
33113 value.clone()
33114 }
33115}
33116impl ::std::fmt::Display for ViewAccessKeyListByFinalityRequestType {
33117 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33118 match *self {
33119 Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
33120 }
33121 }
33122}
33123impl ::std::str::FromStr for ViewAccessKeyListByFinalityRequestType {
33124 type Err = self::error::ConversionError;
33125 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33126 match value {
33127 "view_access_key_list" => Ok(Self::ViewAccessKeyList),
33128 _ => Err("invalid value".into()),
33129 }
33130 }
33131}
33132impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByFinalityRequestType {
33133 type Error = self::error::ConversionError;
33134 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33135 value.parse()
33136 }
33137}
33138impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByFinalityRequestType {
33139 type Error = self::error::ConversionError;
33140 fn try_from(
33141 value: &::std::string::String,
33142 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33143 value.parse()
33144 }
33145}
33146impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByFinalityRequestType {
33147 type Error = self::error::ConversionError;
33148 fn try_from(
33149 value: ::std::string::String,
33150 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33151 value.parse()
33152 }
33153}
33154#[doc = "`ViewAccessKeyListBySyncCheckpointRequestType`"]
33155#[doc = r""]
33156#[doc = r" <details><summary>JSON schema</summary>"]
33157#[doc = r""]
33158#[doc = r" ```json"]
33159#[doc = "{"]
33160#[doc = " \"type\": \"string\","]
33161#[doc = " \"enum\": ["]
33162#[doc = " \"view_access_key_list\""]
33163#[doc = " ]"]
33164#[doc = "}"]
33165#[doc = r" ```"]
33166#[doc = r" </details>"]
33167#[derive(
33168 :: serde :: Deserialize,
33169 :: serde :: Serialize,
33170 Clone,
33171 Copy,
33172 Debug,
33173 Eq,
33174 Hash,
33175 Ord,
33176 PartialEq,
33177 PartialOrd,
33178)]
33179pub enum ViewAccessKeyListBySyncCheckpointRequestType {
33180 #[serde(rename = "view_access_key_list")]
33181 ViewAccessKeyList,
33182}
33183impl ::std::convert::From<&Self> for ViewAccessKeyListBySyncCheckpointRequestType {
33184 fn from(value: &ViewAccessKeyListBySyncCheckpointRequestType) -> Self {
33185 value.clone()
33186 }
33187}
33188impl ::std::fmt::Display for ViewAccessKeyListBySyncCheckpointRequestType {
33189 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33190 match *self {
33191 Self::ViewAccessKeyList => f.write_str("view_access_key_list"),
33192 }
33193 }
33194}
33195impl ::std::str::FromStr for ViewAccessKeyListBySyncCheckpointRequestType {
33196 type Err = self::error::ConversionError;
33197 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33198 match value {
33199 "view_access_key_list" => Ok(Self::ViewAccessKeyList),
33200 _ => Err("invalid value".into()),
33201 }
33202 }
33203}
33204impl ::std::convert::TryFrom<&str> for ViewAccessKeyListBySyncCheckpointRequestType {
33205 type Error = self::error::ConversionError;
33206 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33207 value.parse()
33208 }
33209}
33210impl ::std::convert::TryFrom<&::std::string::String>
33211 for ViewAccessKeyListBySyncCheckpointRequestType
33212{
33213 type Error = self::error::ConversionError;
33214 fn try_from(
33215 value: &::std::string::String,
33216 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33217 value.parse()
33218 }
33219}
33220impl ::std::convert::TryFrom<::std::string::String>
33221 for ViewAccessKeyListBySyncCheckpointRequestType
33222{
33223 type Error = self::error::ConversionError;
33224 fn try_from(
33225 value: ::std::string::String,
33226 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33227 value.parse()
33228 }
33229}
33230#[doc = "`ViewAccountByBlockIdRequestType`"]
33231#[doc = r""]
33232#[doc = r" <details><summary>JSON schema</summary>"]
33233#[doc = r""]
33234#[doc = r" ```json"]
33235#[doc = "{"]
33236#[doc = " \"type\": \"string\","]
33237#[doc = " \"enum\": ["]
33238#[doc = " \"view_account\""]
33239#[doc = " ]"]
33240#[doc = "}"]
33241#[doc = r" ```"]
33242#[doc = r" </details>"]
33243#[derive(
33244 :: serde :: Deserialize,
33245 :: serde :: Serialize,
33246 Clone,
33247 Copy,
33248 Debug,
33249 Eq,
33250 Hash,
33251 Ord,
33252 PartialEq,
33253 PartialOrd,
33254)]
33255pub enum ViewAccountByBlockIdRequestType {
33256 #[serde(rename = "view_account")]
33257 ViewAccount,
33258}
33259impl ::std::convert::From<&Self> for ViewAccountByBlockIdRequestType {
33260 fn from(value: &ViewAccountByBlockIdRequestType) -> Self {
33261 value.clone()
33262 }
33263}
33264impl ::std::fmt::Display for ViewAccountByBlockIdRequestType {
33265 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33266 match *self {
33267 Self::ViewAccount => f.write_str("view_account"),
33268 }
33269 }
33270}
33271impl ::std::str::FromStr for ViewAccountByBlockIdRequestType {
33272 type Err = self::error::ConversionError;
33273 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33274 match value {
33275 "view_account" => Ok(Self::ViewAccount),
33276 _ => Err("invalid value".into()),
33277 }
33278 }
33279}
33280impl ::std::convert::TryFrom<&str> for ViewAccountByBlockIdRequestType {
33281 type Error = self::error::ConversionError;
33282 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33283 value.parse()
33284 }
33285}
33286impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByBlockIdRequestType {
33287 type Error = self::error::ConversionError;
33288 fn try_from(
33289 value: &::std::string::String,
33290 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33291 value.parse()
33292 }
33293}
33294impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByBlockIdRequestType {
33295 type Error = self::error::ConversionError;
33296 fn try_from(
33297 value: ::std::string::String,
33298 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33299 value.parse()
33300 }
33301}
33302#[doc = "`ViewAccountByFinalityRequestType`"]
33303#[doc = r""]
33304#[doc = r" <details><summary>JSON schema</summary>"]
33305#[doc = r""]
33306#[doc = r" ```json"]
33307#[doc = "{"]
33308#[doc = " \"type\": \"string\","]
33309#[doc = " \"enum\": ["]
33310#[doc = " \"view_account\""]
33311#[doc = " ]"]
33312#[doc = "}"]
33313#[doc = r" ```"]
33314#[doc = r" </details>"]
33315#[derive(
33316 :: serde :: Deserialize,
33317 :: serde :: Serialize,
33318 Clone,
33319 Copy,
33320 Debug,
33321 Eq,
33322 Hash,
33323 Ord,
33324 PartialEq,
33325 PartialOrd,
33326)]
33327pub enum ViewAccountByFinalityRequestType {
33328 #[serde(rename = "view_account")]
33329 ViewAccount,
33330}
33331impl ::std::convert::From<&Self> for ViewAccountByFinalityRequestType {
33332 fn from(value: &ViewAccountByFinalityRequestType) -> Self {
33333 value.clone()
33334 }
33335}
33336impl ::std::fmt::Display for ViewAccountByFinalityRequestType {
33337 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33338 match *self {
33339 Self::ViewAccount => f.write_str("view_account"),
33340 }
33341 }
33342}
33343impl ::std::str::FromStr for ViewAccountByFinalityRequestType {
33344 type Err = self::error::ConversionError;
33345 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33346 match value {
33347 "view_account" => Ok(Self::ViewAccount),
33348 _ => Err("invalid value".into()),
33349 }
33350 }
33351}
33352impl ::std::convert::TryFrom<&str> for ViewAccountByFinalityRequestType {
33353 type Error = self::error::ConversionError;
33354 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33355 value.parse()
33356 }
33357}
33358impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByFinalityRequestType {
33359 type Error = self::error::ConversionError;
33360 fn try_from(
33361 value: &::std::string::String,
33362 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33363 value.parse()
33364 }
33365}
33366impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByFinalityRequestType {
33367 type Error = self::error::ConversionError;
33368 fn try_from(
33369 value: ::std::string::String,
33370 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33371 value.parse()
33372 }
33373}
33374#[doc = "`ViewAccountBySyncCheckpointRequestType`"]
33375#[doc = r""]
33376#[doc = r" <details><summary>JSON schema</summary>"]
33377#[doc = r""]
33378#[doc = r" ```json"]
33379#[doc = "{"]
33380#[doc = " \"type\": \"string\","]
33381#[doc = " \"enum\": ["]
33382#[doc = " \"view_account\""]
33383#[doc = " ]"]
33384#[doc = "}"]
33385#[doc = r" ```"]
33386#[doc = r" </details>"]
33387#[derive(
33388 :: serde :: Deserialize,
33389 :: serde :: Serialize,
33390 Clone,
33391 Copy,
33392 Debug,
33393 Eq,
33394 Hash,
33395 Ord,
33396 PartialEq,
33397 PartialOrd,
33398)]
33399pub enum ViewAccountBySyncCheckpointRequestType {
33400 #[serde(rename = "view_account")]
33401 ViewAccount,
33402}
33403impl ::std::convert::From<&Self> for ViewAccountBySyncCheckpointRequestType {
33404 fn from(value: &ViewAccountBySyncCheckpointRequestType) -> Self {
33405 value.clone()
33406 }
33407}
33408impl ::std::fmt::Display for ViewAccountBySyncCheckpointRequestType {
33409 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33410 match *self {
33411 Self::ViewAccount => f.write_str("view_account"),
33412 }
33413 }
33414}
33415impl ::std::str::FromStr for ViewAccountBySyncCheckpointRequestType {
33416 type Err = self::error::ConversionError;
33417 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33418 match value {
33419 "view_account" => Ok(Self::ViewAccount),
33420 _ => Err("invalid value".into()),
33421 }
33422 }
33423}
33424impl ::std::convert::TryFrom<&str> for ViewAccountBySyncCheckpointRequestType {
33425 type Error = self::error::ConversionError;
33426 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33427 value.parse()
33428 }
33429}
33430impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountBySyncCheckpointRequestType {
33431 type Error = self::error::ConversionError;
33432 fn try_from(
33433 value: &::std::string::String,
33434 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33435 value.parse()
33436 }
33437}
33438impl ::std::convert::TryFrom<::std::string::String> for ViewAccountBySyncCheckpointRequestType {
33439 type Error = self::error::ConversionError;
33440 fn try_from(
33441 value: ::std::string::String,
33442 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33443 value.parse()
33444 }
33445}
33446#[doc = "`ViewCodeByBlockIdRequestType`"]
33447#[doc = r""]
33448#[doc = r" <details><summary>JSON schema</summary>"]
33449#[doc = r""]
33450#[doc = r" ```json"]
33451#[doc = "{"]
33452#[doc = " \"type\": \"string\","]
33453#[doc = " \"enum\": ["]
33454#[doc = " \"view_code\""]
33455#[doc = " ]"]
33456#[doc = "}"]
33457#[doc = r" ```"]
33458#[doc = r" </details>"]
33459#[derive(
33460 :: serde :: Deserialize,
33461 :: serde :: Serialize,
33462 Clone,
33463 Copy,
33464 Debug,
33465 Eq,
33466 Hash,
33467 Ord,
33468 PartialEq,
33469 PartialOrd,
33470)]
33471pub enum ViewCodeByBlockIdRequestType {
33472 #[serde(rename = "view_code")]
33473 ViewCode,
33474}
33475impl ::std::convert::From<&Self> for ViewCodeByBlockIdRequestType {
33476 fn from(value: &ViewCodeByBlockIdRequestType) -> Self {
33477 value.clone()
33478 }
33479}
33480impl ::std::fmt::Display for ViewCodeByBlockIdRequestType {
33481 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33482 match *self {
33483 Self::ViewCode => f.write_str("view_code"),
33484 }
33485 }
33486}
33487impl ::std::str::FromStr for ViewCodeByBlockIdRequestType {
33488 type Err = self::error::ConversionError;
33489 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33490 match value {
33491 "view_code" => Ok(Self::ViewCode),
33492 _ => Err("invalid value".into()),
33493 }
33494 }
33495}
33496impl ::std::convert::TryFrom<&str> for ViewCodeByBlockIdRequestType {
33497 type Error = self::error::ConversionError;
33498 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33499 value.parse()
33500 }
33501}
33502impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByBlockIdRequestType {
33503 type Error = self::error::ConversionError;
33504 fn try_from(
33505 value: &::std::string::String,
33506 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33507 value.parse()
33508 }
33509}
33510impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByBlockIdRequestType {
33511 type Error = self::error::ConversionError;
33512 fn try_from(
33513 value: ::std::string::String,
33514 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33515 value.parse()
33516 }
33517}
33518#[doc = "`ViewCodeByFinalityRequestType`"]
33519#[doc = r""]
33520#[doc = r" <details><summary>JSON schema</summary>"]
33521#[doc = r""]
33522#[doc = r" ```json"]
33523#[doc = "{"]
33524#[doc = " \"type\": \"string\","]
33525#[doc = " \"enum\": ["]
33526#[doc = " \"view_code\""]
33527#[doc = " ]"]
33528#[doc = "}"]
33529#[doc = r" ```"]
33530#[doc = r" </details>"]
33531#[derive(
33532 :: serde :: Deserialize,
33533 :: serde :: Serialize,
33534 Clone,
33535 Copy,
33536 Debug,
33537 Eq,
33538 Hash,
33539 Ord,
33540 PartialEq,
33541 PartialOrd,
33542)]
33543pub enum ViewCodeByFinalityRequestType {
33544 #[serde(rename = "view_code")]
33545 ViewCode,
33546}
33547impl ::std::convert::From<&Self> for ViewCodeByFinalityRequestType {
33548 fn from(value: &ViewCodeByFinalityRequestType) -> Self {
33549 value.clone()
33550 }
33551}
33552impl ::std::fmt::Display for ViewCodeByFinalityRequestType {
33553 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33554 match *self {
33555 Self::ViewCode => f.write_str("view_code"),
33556 }
33557 }
33558}
33559impl ::std::str::FromStr for ViewCodeByFinalityRequestType {
33560 type Err = self::error::ConversionError;
33561 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33562 match value {
33563 "view_code" => Ok(Self::ViewCode),
33564 _ => Err("invalid value".into()),
33565 }
33566 }
33567}
33568impl ::std::convert::TryFrom<&str> for ViewCodeByFinalityRequestType {
33569 type Error = self::error::ConversionError;
33570 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33571 value.parse()
33572 }
33573}
33574impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByFinalityRequestType {
33575 type Error = self::error::ConversionError;
33576 fn try_from(
33577 value: &::std::string::String,
33578 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33579 value.parse()
33580 }
33581}
33582impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByFinalityRequestType {
33583 type Error = self::error::ConversionError;
33584 fn try_from(
33585 value: ::std::string::String,
33586 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33587 value.parse()
33588 }
33589}
33590#[doc = "`ViewCodeBySyncCheckpointRequestType`"]
33591#[doc = r""]
33592#[doc = r" <details><summary>JSON schema</summary>"]
33593#[doc = r""]
33594#[doc = r" ```json"]
33595#[doc = "{"]
33596#[doc = " \"type\": \"string\","]
33597#[doc = " \"enum\": ["]
33598#[doc = " \"view_code\""]
33599#[doc = " ]"]
33600#[doc = "}"]
33601#[doc = r" ```"]
33602#[doc = r" </details>"]
33603#[derive(
33604 :: serde :: Deserialize,
33605 :: serde :: Serialize,
33606 Clone,
33607 Copy,
33608 Debug,
33609 Eq,
33610 Hash,
33611 Ord,
33612 PartialEq,
33613 PartialOrd,
33614)]
33615pub enum ViewCodeBySyncCheckpointRequestType {
33616 #[serde(rename = "view_code")]
33617 ViewCode,
33618}
33619impl ::std::convert::From<&Self> for ViewCodeBySyncCheckpointRequestType {
33620 fn from(value: &ViewCodeBySyncCheckpointRequestType) -> Self {
33621 value.clone()
33622 }
33623}
33624impl ::std::fmt::Display for ViewCodeBySyncCheckpointRequestType {
33625 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33626 match *self {
33627 Self::ViewCode => f.write_str("view_code"),
33628 }
33629 }
33630}
33631impl ::std::str::FromStr for ViewCodeBySyncCheckpointRequestType {
33632 type Err = self::error::ConversionError;
33633 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33634 match value {
33635 "view_code" => Ok(Self::ViewCode),
33636 _ => Err("invalid value".into()),
33637 }
33638 }
33639}
33640impl ::std::convert::TryFrom<&str> for ViewCodeBySyncCheckpointRequestType {
33641 type Error = self::error::ConversionError;
33642 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33643 value.parse()
33644 }
33645}
33646impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeBySyncCheckpointRequestType {
33647 type Error = self::error::ConversionError;
33648 fn try_from(
33649 value: &::std::string::String,
33650 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33651 value.parse()
33652 }
33653}
33654impl ::std::convert::TryFrom<::std::string::String> for ViewCodeBySyncCheckpointRequestType {
33655 type Error = self::error::ConversionError;
33656 fn try_from(
33657 value: ::std::string::String,
33658 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33659 value.parse()
33660 }
33661}
33662#[doc = "`ViewGasKeyByBlockIdRequestType`"]
33663#[doc = r""]
33664#[doc = r" <details><summary>JSON schema</summary>"]
33665#[doc = r""]
33666#[doc = r" ```json"]
33667#[doc = "{"]
33668#[doc = " \"type\": \"string\","]
33669#[doc = " \"enum\": ["]
33670#[doc = " \"view_gas_key\""]
33671#[doc = " ]"]
33672#[doc = "}"]
33673#[doc = r" ```"]
33674#[doc = r" </details>"]
33675#[derive(
33676 :: serde :: Deserialize,
33677 :: serde :: Serialize,
33678 Clone,
33679 Copy,
33680 Debug,
33681 Eq,
33682 Hash,
33683 Ord,
33684 PartialEq,
33685 PartialOrd,
33686)]
33687pub enum ViewGasKeyByBlockIdRequestType {
33688 #[serde(rename = "view_gas_key")]
33689 ViewGasKey,
33690}
33691impl ::std::convert::From<&Self> for ViewGasKeyByBlockIdRequestType {
33692 fn from(value: &ViewGasKeyByBlockIdRequestType) -> Self {
33693 value.clone()
33694 }
33695}
33696impl ::std::fmt::Display for ViewGasKeyByBlockIdRequestType {
33697 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33698 match *self {
33699 Self::ViewGasKey => f.write_str("view_gas_key"),
33700 }
33701 }
33702}
33703impl ::std::str::FromStr for ViewGasKeyByBlockIdRequestType {
33704 type Err = self::error::ConversionError;
33705 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33706 match value {
33707 "view_gas_key" => Ok(Self::ViewGasKey),
33708 _ => Err("invalid value".into()),
33709 }
33710 }
33711}
33712impl ::std::convert::TryFrom<&str> for ViewGasKeyByBlockIdRequestType {
33713 type Error = self::error::ConversionError;
33714 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33715 value.parse()
33716 }
33717}
33718impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyByBlockIdRequestType {
33719 type Error = self::error::ConversionError;
33720 fn try_from(
33721 value: &::std::string::String,
33722 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33723 value.parse()
33724 }
33725}
33726impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyByBlockIdRequestType {
33727 type Error = self::error::ConversionError;
33728 fn try_from(
33729 value: ::std::string::String,
33730 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33731 value.parse()
33732 }
33733}
33734#[doc = "`ViewGasKeyByFinalityRequestType`"]
33735#[doc = r""]
33736#[doc = r" <details><summary>JSON schema</summary>"]
33737#[doc = r""]
33738#[doc = r" ```json"]
33739#[doc = "{"]
33740#[doc = " \"type\": \"string\","]
33741#[doc = " \"enum\": ["]
33742#[doc = " \"view_gas_key\""]
33743#[doc = " ]"]
33744#[doc = "}"]
33745#[doc = r" ```"]
33746#[doc = r" </details>"]
33747#[derive(
33748 :: serde :: Deserialize,
33749 :: serde :: Serialize,
33750 Clone,
33751 Copy,
33752 Debug,
33753 Eq,
33754 Hash,
33755 Ord,
33756 PartialEq,
33757 PartialOrd,
33758)]
33759pub enum ViewGasKeyByFinalityRequestType {
33760 #[serde(rename = "view_gas_key")]
33761 ViewGasKey,
33762}
33763impl ::std::convert::From<&Self> for ViewGasKeyByFinalityRequestType {
33764 fn from(value: &ViewGasKeyByFinalityRequestType) -> Self {
33765 value.clone()
33766 }
33767}
33768impl ::std::fmt::Display for ViewGasKeyByFinalityRequestType {
33769 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33770 match *self {
33771 Self::ViewGasKey => f.write_str("view_gas_key"),
33772 }
33773 }
33774}
33775impl ::std::str::FromStr for ViewGasKeyByFinalityRequestType {
33776 type Err = self::error::ConversionError;
33777 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33778 match value {
33779 "view_gas_key" => Ok(Self::ViewGasKey),
33780 _ => Err("invalid value".into()),
33781 }
33782 }
33783}
33784impl ::std::convert::TryFrom<&str> for ViewGasKeyByFinalityRequestType {
33785 type Error = self::error::ConversionError;
33786 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33787 value.parse()
33788 }
33789}
33790impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyByFinalityRequestType {
33791 type Error = self::error::ConversionError;
33792 fn try_from(
33793 value: &::std::string::String,
33794 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33795 value.parse()
33796 }
33797}
33798impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyByFinalityRequestType {
33799 type Error = self::error::ConversionError;
33800 fn try_from(
33801 value: ::std::string::String,
33802 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33803 value.parse()
33804 }
33805}
33806#[doc = "`ViewGasKeyBySyncCheckpointRequestType`"]
33807#[doc = r""]
33808#[doc = r" <details><summary>JSON schema</summary>"]
33809#[doc = r""]
33810#[doc = r" ```json"]
33811#[doc = "{"]
33812#[doc = " \"type\": \"string\","]
33813#[doc = " \"enum\": ["]
33814#[doc = " \"view_gas_key\""]
33815#[doc = " ]"]
33816#[doc = "}"]
33817#[doc = r" ```"]
33818#[doc = r" </details>"]
33819#[derive(
33820 :: serde :: Deserialize,
33821 :: serde :: Serialize,
33822 Clone,
33823 Copy,
33824 Debug,
33825 Eq,
33826 Hash,
33827 Ord,
33828 PartialEq,
33829 PartialOrd,
33830)]
33831pub enum ViewGasKeyBySyncCheckpointRequestType {
33832 #[serde(rename = "view_gas_key")]
33833 ViewGasKey,
33834}
33835impl ::std::convert::From<&Self> for ViewGasKeyBySyncCheckpointRequestType {
33836 fn from(value: &ViewGasKeyBySyncCheckpointRequestType) -> Self {
33837 value.clone()
33838 }
33839}
33840impl ::std::fmt::Display for ViewGasKeyBySyncCheckpointRequestType {
33841 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33842 match *self {
33843 Self::ViewGasKey => f.write_str("view_gas_key"),
33844 }
33845 }
33846}
33847impl ::std::str::FromStr for ViewGasKeyBySyncCheckpointRequestType {
33848 type Err = self::error::ConversionError;
33849 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33850 match value {
33851 "view_gas_key" => Ok(Self::ViewGasKey),
33852 _ => Err("invalid value".into()),
33853 }
33854 }
33855}
33856impl ::std::convert::TryFrom<&str> for ViewGasKeyBySyncCheckpointRequestType {
33857 type Error = self::error::ConversionError;
33858 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33859 value.parse()
33860 }
33861}
33862impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyBySyncCheckpointRequestType {
33863 type Error = self::error::ConversionError;
33864 fn try_from(
33865 value: &::std::string::String,
33866 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33867 value.parse()
33868 }
33869}
33870impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyBySyncCheckpointRequestType {
33871 type Error = self::error::ConversionError;
33872 fn try_from(
33873 value: ::std::string::String,
33874 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33875 value.parse()
33876 }
33877}
33878#[doc = "`ViewGasKeyListByBlockIdRequestType`"]
33879#[doc = r""]
33880#[doc = r" <details><summary>JSON schema</summary>"]
33881#[doc = r""]
33882#[doc = r" ```json"]
33883#[doc = "{"]
33884#[doc = " \"type\": \"string\","]
33885#[doc = " \"enum\": ["]
33886#[doc = " \"view_gas_key_list\""]
33887#[doc = " ]"]
33888#[doc = "}"]
33889#[doc = r" ```"]
33890#[doc = r" </details>"]
33891#[derive(
33892 :: serde :: Deserialize,
33893 :: serde :: Serialize,
33894 Clone,
33895 Copy,
33896 Debug,
33897 Eq,
33898 Hash,
33899 Ord,
33900 PartialEq,
33901 PartialOrd,
33902)]
33903pub enum ViewGasKeyListByBlockIdRequestType {
33904 #[serde(rename = "view_gas_key_list")]
33905 ViewGasKeyList,
33906}
33907impl ::std::convert::From<&Self> for ViewGasKeyListByBlockIdRequestType {
33908 fn from(value: &ViewGasKeyListByBlockIdRequestType) -> Self {
33909 value.clone()
33910 }
33911}
33912impl ::std::fmt::Display for ViewGasKeyListByBlockIdRequestType {
33913 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33914 match *self {
33915 Self::ViewGasKeyList => f.write_str("view_gas_key_list"),
33916 }
33917 }
33918}
33919impl ::std::str::FromStr for ViewGasKeyListByBlockIdRequestType {
33920 type Err = self::error::ConversionError;
33921 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33922 match value {
33923 "view_gas_key_list" => Ok(Self::ViewGasKeyList),
33924 _ => Err("invalid value".into()),
33925 }
33926 }
33927}
33928impl ::std::convert::TryFrom<&str> for ViewGasKeyListByBlockIdRequestType {
33929 type Error = self::error::ConversionError;
33930 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33931 value.parse()
33932 }
33933}
33934impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyListByBlockIdRequestType {
33935 type Error = self::error::ConversionError;
33936 fn try_from(
33937 value: &::std::string::String,
33938 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33939 value.parse()
33940 }
33941}
33942impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyListByBlockIdRequestType {
33943 type Error = self::error::ConversionError;
33944 fn try_from(
33945 value: ::std::string::String,
33946 ) -> ::std::result::Result<Self, self::error::ConversionError> {
33947 value.parse()
33948 }
33949}
33950#[doc = "`ViewGasKeyListByFinalityRequestType`"]
33951#[doc = r""]
33952#[doc = r" <details><summary>JSON schema</summary>"]
33953#[doc = r""]
33954#[doc = r" ```json"]
33955#[doc = "{"]
33956#[doc = " \"type\": \"string\","]
33957#[doc = " \"enum\": ["]
33958#[doc = " \"view_gas_key_list\""]
33959#[doc = " ]"]
33960#[doc = "}"]
33961#[doc = r" ```"]
33962#[doc = r" </details>"]
33963#[derive(
33964 :: serde :: Deserialize,
33965 :: serde :: Serialize,
33966 Clone,
33967 Copy,
33968 Debug,
33969 Eq,
33970 Hash,
33971 Ord,
33972 PartialEq,
33973 PartialOrd,
33974)]
33975pub enum ViewGasKeyListByFinalityRequestType {
33976 #[serde(rename = "view_gas_key_list")]
33977 ViewGasKeyList,
33978}
33979impl ::std::convert::From<&Self> for ViewGasKeyListByFinalityRequestType {
33980 fn from(value: &ViewGasKeyListByFinalityRequestType) -> Self {
33981 value.clone()
33982 }
33983}
33984impl ::std::fmt::Display for ViewGasKeyListByFinalityRequestType {
33985 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33986 match *self {
33987 Self::ViewGasKeyList => f.write_str("view_gas_key_list"),
33988 }
33989 }
33990}
33991impl ::std::str::FromStr for ViewGasKeyListByFinalityRequestType {
33992 type Err = self::error::ConversionError;
33993 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33994 match value {
33995 "view_gas_key_list" => Ok(Self::ViewGasKeyList),
33996 _ => Err("invalid value".into()),
33997 }
33998 }
33999}
34000impl ::std::convert::TryFrom<&str> for ViewGasKeyListByFinalityRequestType {
34001 type Error = self::error::ConversionError;
34002 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34003 value.parse()
34004 }
34005}
34006impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyListByFinalityRequestType {
34007 type Error = self::error::ConversionError;
34008 fn try_from(
34009 value: &::std::string::String,
34010 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34011 value.parse()
34012 }
34013}
34014impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyListByFinalityRequestType {
34015 type Error = self::error::ConversionError;
34016 fn try_from(
34017 value: ::std::string::String,
34018 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34019 value.parse()
34020 }
34021}
34022#[doc = "`ViewGasKeyListBySyncCheckpointRequestType`"]
34023#[doc = r""]
34024#[doc = r" <details><summary>JSON schema</summary>"]
34025#[doc = r""]
34026#[doc = r" ```json"]
34027#[doc = "{"]
34028#[doc = " \"type\": \"string\","]
34029#[doc = " \"enum\": ["]
34030#[doc = " \"view_gas_key_list\""]
34031#[doc = " ]"]
34032#[doc = "}"]
34033#[doc = r" ```"]
34034#[doc = r" </details>"]
34035#[derive(
34036 :: serde :: Deserialize,
34037 :: serde :: Serialize,
34038 Clone,
34039 Copy,
34040 Debug,
34041 Eq,
34042 Hash,
34043 Ord,
34044 PartialEq,
34045 PartialOrd,
34046)]
34047pub enum ViewGasKeyListBySyncCheckpointRequestType {
34048 #[serde(rename = "view_gas_key_list")]
34049 ViewGasKeyList,
34050}
34051impl ::std::convert::From<&Self> for ViewGasKeyListBySyncCheckpointRequestType {
34052 fn from(value: &ViewGasKeyListBySyncCheckpointRequestType) -> Self {
34053 value.clone()
34054 }
34055}
34056impl ::std::fmt::Display for ViewGasKeyListBySyncCheckpointRequestType {
34057 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34058 match *self {
34059 Self::ViewGasKeyList => f.write_str("view_gas_key_list"),
34060 }
34061 }
34062}
34063impl ::std::str::FromStr for ViewGasKeyListBySyncCheckpointRequestType {
34064 type Err = self::error::ConversionError;
34065 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34066 match value {
34067 "view_gas_key_list" => Ok(Self::ViewGasKeyList),
34068 _ => Err("invalid value".into()),
34069 }
34070 }
34071}
34072impl ::std::convert::TryFrom<&str> for ViewGasKeyListBySyncCheckpointRequestType {
34073 type Error = self::error::ConversionError;
34074 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34075 value.parse()
34076 }
34077}
34078impl ::std::convert::TryFrom<&::std::string::String> for ViewGasKeyListBySyncCheckpointRequestType {
34079 type Error = self::error::ConversionError;
34080 fn try_from(
34081 value: &::std::string::String,
34082 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34083 value.parse()
34084 }
34085}
34086impl ::std::convert::TryFrom<::std::string::String> for ViewGasKeyListBySyncCheckpointRequestType {
34087 type Error = self::error::ConversionError;
34088 fn try_from(
34089 value: ::std::string::String,
34090 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34091 value.parse()
34092 }
34093}
34094#[doc = "`ViewGlobalContractCodeByAccountIdByBlockIdRequestType`"]
34095#[doc = r""]
34096#[doc = r" <details><summary>JSON schema</summary>"]
34097#[doc = r""]
34098#[doc = r" ```json"]
34099#[doc = "{"]
34100#[doc = " \"type\": \"string\","]
34101#[doc = " \"enum\": ["]
34102#[doc = " \"view_global_contract_code_by_account_id\""]
34103#[doc = " ]"]
34104#[doc = "}"]
34105#[doc = r" ```"]
34106#[doc = r" </details>"]
34107#[derive(
34108 :: serde :: Deserialize,
34109 :: serde :: Serialize,
34110 Clone,
34111 Copy,
34112 Debug,
34113 Eq,
34114 Hash,
34115 Ord,
34116 PartialEq,
34117 PartialOrd,
34118)]
34119pub enum ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34120 #[serde(rename = "view_global_contract_code_by_account_id")]
34121 ViewGlobalContractCodeByAccountId,
34122}
34123impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34124 fn from(value: &ViewGlobalContractCodeByAccountIdByBlockIdRequestType) -> Self {
34125 value.clone()
34126 }
34127}
34128impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34129 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34130 match *self {
34131 Self::ViewGlobalContractCodeByAccountId => {
34132 f.write_str("view_global_contract_code_by_account_id")
34133 }
34134 }
34135 }
34136}
34137impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34138 type Err = self::error::ConversionError;
34139 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34140 match value {
34141 "view_global_contract_code_by_account_id" => {
34142 Ok(Self::ViewGlobalContractCodeByAccountId)
34143 }
34144 _ => Err("invalid value".into()),
34145 }
34146 }
34147}
34148impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
34149 type Error = self::error::ConversionError;
34150 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34151 value.parse()
34152 }
34153}
34154impl ::std::convert::TryFrom<&::std::string::String>
34155 for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
34156{
34157 type Error = self::error::ConversionError;
34158 fn try_from(
34159 value: &::std::string::String,
34160 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34161 value.parse()
34162 }
34163}
34164impl ::std::convert::TryFrom<::std::string::String>
34165 for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
34166{
34167 type Error = self::error::ConversionError;
34168 fn try_from(
34169 value: ::std::string::String,
34170 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34171 value.parse()
34172 }
34173}
34174#[doc = "`ViewGlobalContractCodeByAccountIdByFinalityRequestType`"]
34175#[doc = r""]
34176#[doc = r" <details><summary>JSON schema</summary>"]
34177#[doc = r""]
34178#[doc = r" ```json"]
34179#[doc = "{"]
34180#[doc = " \"type\": \"string\","]
34181#[doc = " \"enum\": ["]
34182#[doc = " \"view_global_contract_code_by_account_id\""]
34183#[doc = " ]"]
34184#[doc = "}"]
34185#[doc = r" ```"]
34186#[doc = r" </details>"]
34187#[derive(
34188 :: serde :: Deserialize,
34189 :: serde :: Serialize,
34190 Clone,
34191 Copy,
34192 Debug,
34193 Eq,
34194 Hash,
34195 Ord,
34196 PartialEq,
34197 PartialOrd,
34198)]
34199pub enum ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34200 #[serde(rename = "view_global_contract_code_by_account_id")]
34201 ViewGlobalContractCodeByAccountId,
34202}
34203impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34204 fn from(value: &ViewGlobalContractCodeByAccountIdByFinalityRequestType) -> Self {
34205 value.clone()
34206 }
34207}
34208impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34209 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34210 match *self {
34211 Self::ViewGlobalContractCodeByAccountId => {
34212 f.write_str("view_global_contract_code_by_account_id")
34213 }
34214 }
34215 }
34216}
34217impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34218 type Err = self::error::ConversionError;
34219 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34220 match value {
34221 "view_global_contract_code_by_account_id" => {
34222 Ok(Self::ViewGlobalContractCodeByAccountId)
34223 }
34224 _ => Err("invalid value".into()),
34225 }
34226 }
34227}
34228impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
34229 type Error = self::error::ConversionError;
34230 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34231 value.parse()
34232 }
34233}
34234impl ::std::convert::TryFrom<&::std::string::String>
34235 for ViewGlobalContractCodeByAccountIdByFinalityRequestType
34236{
34237 type Error = self::error::ConversionError;
34238 fn try_from(
34239 value: &::std::string::String,
34240 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34241 value.parse()
34242 }
34243}
34244impl ::std::convert::TryFrom<::std::string::String>
34245 for ViewGlobalContractCodeByAccountIdByFinalityRequestType
34246{
34247 type Error = self::error::ConversionError;
34248 fn try_from(
34249 value: ::std::string::String,
34250 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34251 value.parse()
34252 }
34253}
34254#[doc = "`ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType`"]
34255#[doc = r""]
34256#[doc = r" <details><summary>JSON schema</summary>"]
34257#[doc = r""]
34258#[doc = r" ```json"]
34259#[doc = "{"]
34260#[doc = " \"type\": \"string\","]
34261#[doc = " \"enum\": ["]
34262#[doc = " \"view_global_contract_code_by_account_id\""]
34263#[doc = " ]"]
34264#[doc = "}"]
34265#[doc = r" ```"]
34266#[doc = r" </details>"]
34267#[derive(
34268 :: serde :: Deserialize,
34269 :: serde :: Serialize,
34270 Clone,
34271 Copy,
34272 Debug,
34273 Eq,
34274 Hash,
34275 Ord,
34276 PartialEq,
34277 PartialOrd,
34278)]
34279pub enum ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34280 #[serde(rename = "view_global_contract_code_by_account_id")]
34281 ViewGlobalContractCodeByAccountId,
34282}
34283impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34284 fn from(value: &ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType) -> Self {
34285 value.clone()
34286 }
34287}
34288impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34289 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34290 match *self {
34291 Self::ViewGlobalContractCodeByAccountId => {
34292 f.write_str("view_global_contract_code_by_account_id")
34293 }
34294 }
34295 }
34296}
34297impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
34298 type Err = self::error::ConversionError;
34299 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34300 match value {
34301 "view_global_contract_code_by_account_id" => {
34302 Ok(Self::ViewGlobalContractCodeByAccountId)
34303 }
34304 _ => Err("invalid value".into()),
34305 }
34306 }
34307}
34308impl ::std::convert::TryFrom<&str>
34309 for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
34310{
34311 type Error = self::error::ConversionError;
34312 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34313 value.parse()
34314 }
34315}
34316impl ::std::convert::TryFrom<&::std::string::String>
34317 for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
34318{
34319 type Error = self::error::ConversionError;
34320 fn try_from(
34321 value: &::std::string::String,
34322 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34323 value.parse()
34324 }
34325}
34326impl ::std::convert::TryFrom<::std::string::String>
34327 for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
34328{
34329 type Error = self::error::ConversionError;
34330 fn try_from(
34331 value: ::std::string::String,
34332 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34333 value.parse()
34334 }
34335}
34336#[doc = "`ViewGlobalContractCodeByBlockIdRequestType`"]
34337#[doc = r""]
34338#[doc = r" <details><summary>JSON schema</summary>"]
34339#[doc = r""]
34340#[doc = r" ```json"]
34341#[doc = "{"]
34342#[doc = " \"type\": \"string\","]
34343#[doc = " \"enum\": ["]
34344#[doc = " \"view_global_contract_code\""]
34345#[doc = " ]"]
34346#[doc = "}"]
34347#[doc = r" ```"]
34348#[doc = r" </details>"]
34349#[derive(
34350 :: serde :: Deserialize,
34351 :: serde :: Serialize,
34352 Clone,
34353 Copy,
34354 Debug,
34355 Eq,
34356 Hash,
34357 Ord,
34358 PartialEq,
34359 PartialOrd,
34360)]
34361pub enum ViewGlobalContractCodeByBlockIdRequestType {
34362 #[serde(rename = "view_global_contract_code")]
34363 ViewGlobalContractCode,
34364}
34365impl ::std::convert::From<&Self> for ViewGlobalContractCodeByBlockIdRequestType {
34366 fn from(value: &ViewGlobalContractCodeByBlockIdRequestType) -> Self {
34367 value.clone()
34368 }
34369}
34370impl ::std::fmt::Display for ViewGlobalContractCodeByBlockIdRequestType {
34371 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34372 match *self {
34373 Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
34374 }
34375 }
34376}
34377impl ::std::str::FromStr for ViewGlobalContractCodeByBlockIdRequestType {
34378 type Err = self::error::ConversionError;
34379 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34380 match value {
34381 "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
34382 _ => Err("invalid value".into()),
34383 }
34384 }
34385}
34386impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByBlockIdRequestType {
34387 type Error = self::error::ConversionError;
34388 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34389 value.parse()
34390 }
34391}
34392impl ::std::convert::TryFrom<&::std::string::String>
34393 for ViewGlobalContractCodeByBlockIdRequestType
34394{
34395 type Error = self::error::ConversionError;
34396 fn try_from(
34397 value: &::std::string::String,
34398 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34399 value.parse()
34400 }
34401}
34402impl ::std::convert::TryFrom<::std::string::String> for ViewGlobalContractCodeByBlockIdRequestType {
34403 type Error = self::error::ConversionError;
34404 fn try_from(
34405 value: ::std::string::String,
34406 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34407 value.parse()
34408 }
34409}
34410#[doc = "`ViewGlobalContractCodeByFinalityRequestType`"]
34411#[doc = r""]
34412#[doc = r" <details><summary>JSON schema</summary>"]
34413#[doc = r""]
34414#[doc = r" ```json"]
34415#[doc = "{"]
34416#[doc = " \"type\": \"string\","]
34417#[doc = " \"enum\": ["]
34418#[doc = " \"view_global_contract_code\""]
34419#[doc = " ]"]
34420#[doc = "}"]
34421#[doc = r" ```"]
34422#[doc = r" </details>"]
34423#[derive(
34424 :: serde :: Deserialize,
34425 :: serde :: Serialize,
34426 Clone,
34427 Copy,
34428 Debug,
34429 Eq,
34430 Hash,
34431 Ord,
34432 PartialEq,
34433 PartialOrd,
34434)]
34435pub enum ViewGlobalContractCodeByFinalityRequestType {
34436 #[serde(rename = "view_global_contract_code")]
34437 ViewGlobalContractCode,
34438}
34439impl ::std::convert::From<&Self> for ViewGlobalContractCodeByFinalityRequestType {
34440 fn from(value: &ViewGlobalContractCodeByFinalityRequestType) -> Self {
34441 value.clone()
34442 }
34443}
34444impl ::std::fmt::Display for ViewGlobalContractCodeByFinalityRequestType {
34445 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34446 match *self {
34447 Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
34448 }
34449 }
34450}
34451impl ::std::str::FromStr for ViewGlobalContractCodeByFinalityRequestType {
34452 type Err = self::error::ConversionError;
34453 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34454 match value {
34455 "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
34456 _ => Err("invalid value".into()),
34457 }
34458 }
34459}
34460impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByFinalityRequestType {
34461 type Error = self::error::ConversionError;
34462 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34463 value.parse()
34464 }
34465}
34466impl ::std::convert::TryFrom<&::std::string::String>
34467 for ViewGlobalContractCodeByFinalityRequestType
34468{
34469 type Error = self::error::ConversionError;
34470 fn try_from(
34471 value: &::std::string::String,
34472 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34473 value.parse()
34474 }
34475}
34476impl ::std::convert::TryFrom<::std::string::String>
34477 for ViewGlobalContractCodeByFinalityRequestType
34478{
34479 type Error = self::error::ConversionError;
34480 fn try_from(
34481 value: ::std::string::String,
34482 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34483 value.parse()
34484 }
34485}
34486#[doc = "`ViewGlobalContractCodeBySyncCheckpointRequestType`"]
34487#[doc = r""]
34488#[doc = r" <details><summary>JSON schema</summary>"]
34489#[doc = r""]
34490#[doc = r" ```json"]
34491#[doc = "{"]
34492#[doc = " \"type\": \"string\","]
34493#[doc = " \"enum\": ["]
34494#[doc = " \"view_global_contract_code\""]
34495#[doc = " ]"]
34496#[doc = "}"]
34497#[doc = r" ```"]
34498#[doc = r" </details>"]
34499#[derive(
34500 :: serde :: Deserialize,
34501 :: serde :: Serialize,
34502 Clone,
34503 Copy,
34504 Debug,
34505 Eq,
34506 Hash,
34507 Ord,
34508 PartialEq,
34509 PartialOrd,
34510)]
34511pub enum ViewGlobalContractCodeBySyncCheckpointRequestType {
34512 #[serde(rename = "view_global_contract_code")]
34513 ViewGlobalContractCode,
34514}
34515impl ::std::convert::From<&Self> for ViewGlobalContractCodeBySyncCheckpointRequestType {
34516 fn from(value: &ViewGlobalContractCodeBySyncCheckpointRequestType) -> Self {
34517 value.clone()
34518 }
34519}
34520impl ::std::fmt::Display for ViewGlobalContractCodeBySyncCheckpointRequestType {
34521 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34522 match *self {
34523 Self::ViewGlobalContractCode => f.write_str("view_global_contract_code"),
34524 }
34525 }
34526}
34527impl ::std::str::FromStr for ViewGlobalContractCodeBySyncCheckpointRequestType {
34528 type Err = self::error::ConversionError;
34529 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34530 match value {
34531 "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
34532 _ => Err("invalid value".into()),
34533 }
34534 }
34535}
34536impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeBySyncCheckpointRequestType {
34537 type Error = self::error::ConversionError;
34538 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34539 value.parse()
34540 }
34541}
34542impl ::std::convert::TryFrom<&::std::string::String>
34543 for ViewGlobalContractCodeBySyncCheckpointRequestType
34544{
34545 type Error = self::error::ConversionError;
34546 fn try_from(
34547 value: &::std::string::String,
34548 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34549 value.parse()
34550 }
34551}
34552impl ::std::convert::TryFrom<::std::string::String>
34553 for ViewGlobalContractCodeBySyncCheckpointRequestType
34554{
34555 type Error = self::error::ConversionError;
34556 fn try_from(
34557 value: ::std::string::String,
34558 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34559 value.parse()
34560 }
34561}
34562#[doc = "`ViewStateByBlockIdRequestType`"]
34563#[doc = r""]
34564#[doc = r" <details><summary>JSON schema</summary>"]
34565#[doc = r""]
34566#[doc = r" ```json"]
34567#[doc = "{"]
34568#[doc = " \"type\": \"string\","]
34569#[doc = " \"enum\": ["]
34570#[doc = " \"view_state\""]
34571#[doc = " ]"]
34572#[doc = "}"]
34573#[doc = r" ```"]
34574#[doc = r" </details>"]
34575#[derive(
34576 :: serde :: Deserialize,
34577 :: serde :: Serialize,
34578 Clone,
34579 Copy,
34580 Debug,
34581 Eq,
34582 Hash,
34583 Ord,
34584 PartialEq,
34585 PartialOrd,
34586)]
34587pub enum ViewStateByBlockIdRequestType {
34588 #[serde(rename = "view_state")]
34589 ViewState,
34590}
34591impl ::std::convert::From<&Self> for ViewStateByBlockIdRequestType {
34592 fn from(value: &ViewStateByBlockIdRequestType) -> Self {
34593 value.clone()
34594 }
34595}
34596impl ::std::fmt::Display for ViewStateByBlockIdRequestType {
34597 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34598 match *self {
34599 Self::ViewState => f.write_str("view_state"),
34600 }
34601 }
34602}
34603impl ::std::str::FromStr for ViewStateByBlockIdRequestType {
34604 type Err = self::error::ConversionError;
34605 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34606 match value {
34607 "view_state" => Ok(Self::ViewState),
34608 _ => Err("invalid value".into()),
34609 }
34610 }
34611}
34612impl ::std::convert::TryFrom<&str> for ViewStateByBlockIdRequestType {
34613 type Error = self::error::ConversionError;
34614 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34615 value.parse()
34616 }
34617}
34618impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByBlockIdRequestType {
34619 type Error = self::error::ConversionError;
34620 fn try_from(
34621 value: &::std::string::String,
34622 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34623 value.parse()
34624 }
34625}
34626impl ::std::convert::TryFrom<::std::string::String> for ViewStateByBlockIdRequestType {
34627 type Error = self::error::ConversionError;
34628 fn try_from(
34629 value: ::std::string::String,
34630 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34631 value.parse()
34632 }
34633}
34634#[doc = "`ViewStateByFinalityRequestType`"]
34635#[doc = r""]
34636#[doc = r" <details><summary>JSON schema</summary>"]
34637#[doc = r""]
34638#[doc = r" ```json"]
34639#[doc = "{"]
34640#[doc = " \"type\": \"string\","]
34641#[doc = " \"enum\": ["]
34642#[doc = " \"view_state\""]
34643#[doc = " ]"]
34644#[doc = "}"]
34645#[doc = r" ```"]
34646#[doc = r" </details>"]
34647#[derive(
34648 :: serde :: Deserialize,
34649 :: serde :: Serialize,
34650 Clone,
34651 Copy,
34652 Debug,
34653 Eq,
34654 Hash,
34655 Ord,
34656 PartialEq,
34657 PartialOrd,
34658)]
34659pub enum ViewStateByFinalityRequestType {
34660 #[serde(rename = "view_state")]
34661 ViewState,
34662}
34663impl ::std::convert::From<&Self> for ViewStateByFinalityRequestType {
34664 fn from(value: &ViewStateByFinalityRequestType) -> Self {
34665 value.clone()
34666 }
34667}
34668impl ::std::fmt::Display for ViewStateByFinalityRequestType {
34669 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34670 match *self {
34671 Self::ViewState => f.write_str("view_state"),
34672 }
34673 }
34674}
34675impl ::std::str::FromStr for ViewStateByFinalityRequestType {
34676 type Err = self::error::ConversionError;
34677 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34678 match value {
34679 "view_state" => Ok(Self::ViewState),
34680 _ => Err("invalid value".into()),
34681 }
34682 }
34683}
34684impl ::std::convert::TryFrom<&str> for ViewStateByFinalityRequestType {
34685 type Error = self::error::ConversionError;
34686 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34687 value.parse()
34688 }
34689}
34690impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByFinalityRequestType {
34691 type Error = self::error::ConversionError;
34692 fn try_from(
34693 value: &::std::string::String,
34694 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34695 value.parse()
34696 }
34697}
34698impl ::std::convert::TryFrom<::std::string::String> for ViewStateByFinalityRequestType {
34699 type Error = self::error::ConversionError;
34700 fn try_from(
34701 value: ::std::string::String,
34702 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34703 value.parse()
34704 }
34705}
34706#[doc = "`ViewStateBySyncCheckpointRequestType`"]
34707#[doc = r""]
34708#[doc = r" <details><summary>JSON schema</summary>"]
34709#[doc = r""]
34710#[doc = r" ```json"]
34711#[doc = "{"]
34712#[doc = " \"type\": \"string\","]
34713#[doc = " \"enum\": ["]
34714#[doc = " \"view_state\""]
34715#[doc = " ]"]
34716#[doc = "}"]
34717#[doc = r" ```"]
34718#[doc = r" </details>"]
34719#[derive(
34720 :: serde :: Deserialize,
34721 :: serde :: Serialize,
34722 Clone,
34723 Copy,
34724 Debug,
34725 Eq,
34726 Hash,
34727 Ord,
34728 PartialEq,
34729 PartialOrd,
34730)]
34731pub enum ViewStateBySyncCheckpointRequestType {
34732 #[serde(rename = "view_state")]
34733 ViewState,
34734}
34735impl ::std::convert::From<&Self> for ViewStateBySyncCheckpointRequestType {
34736 fn from(value: &ViewStateBySyncCheckpointRequestType) -> Self {
34737 value.clone()
34738 }
34739}
34740impl ::std::fmt::Display for ViewStateBySyncCheckpointRequestType {
34741 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34742 match *self {
34743 Self::ViewState => f.write_str("view_state"),
34744 }
34745 }
34746}
34747impl ::std::str::FromStr for ViewStateBySyncCheckpointRequestType {
34748 type Err = self::error::ConversionError;
34749 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34750 match value {
34751 "view_state" => Ok(Self::ViewState),
34752 _ => Err("invalid value".into()),
34753 }
34754 }
34755}
34756impl ::std::convert::TryFrom<&str> for ViewStateBySyncCheckpointRequestType {
34757 type Error = self::error::ConversionError;
34758 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34759 value.parse()
34760 }
34761}
34762impl ::std::convert::TryFrom<&::std::string::String> for ViewStateBySyncCheckpointRequestType {
34763 type Error = self::error::ConversionError;
34764 fn try_from(
34765 value: &::std::string::String,
34766 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34767 value.parse()
34768 }
34769}
34770impl ::std::convert::TryFrom<::std::string::String> for ViewStateBySyncCheckpointRequestType {
34771 type Error = self::error::ConversionError;
34772 fn try_from(
34773 value: ::std::string::String,
34774 ) -> ::std::result::Result<Self, self::error::ConversionError> {
34775 value.parse()
34776 }
34777}
34778#[doc = "Resulting state values for a view state query request"]
34779#[doc = r""]
34780#[doc = r" <details><summary>JSON schema</summary>"]
34781#[doc = r""]
34782#[doc = r" ```json"]
34783#[doc = "{"]
34784#[doc = " \"description\": \"Resulting state values for a view state query request\","]
34785#[doc = " \"type\": \"object\","]
34786#[doc = " \"required\": ["]
34787#[doc = " \"values\""]
34788#[doc = " ],"]
34789#[doc = " \"properties\": {"]
34790#[doc = " \"proof\": {"]
34791#[doc = " \"type\": \"array\","]
34792#[doc = " \"items\": {"]
34793#[doc = " \"type\": \"string\""]
34794#[doc = " }"]
34795#[doc = " },"]
34796#[doc = " \"values\": {"]
34797#[doc = " \"type\": \"array\","]
34798#[doc = " \"items\": {"]
34799#[doc = " \"$ref\": \"#/components/schemas/StateItem\""]
34800#[doc = " }"]
34801#[doc = " }"]
34802#[doc = " }"]
34803#[doc = "}"]
34804#[doc = r" ```"]
34805#[doc = r" </details>"]
34806#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
34807pub struct ViewStateResult {
34808 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
34809 pub proof: ::std::vec::Vec<::std::string::String>,
34810 pub values: ::std::vec::Vec<StateItem>,
34811}
34812impl ::std::convert::From<&ViewStateResult> for ViewStateResult {
34813 fn from(value: &ViewStateResult) -> Self {
34814 value.clone()
34815 }
34816}
34817#[doc = "`VmConfigView`"]
34818#[doc = r""]
34819#[doc = r" <details><summary>JSON schema</summary>"]
34820#[doc = r""]
34821#[doc = r" ```json"]
34822#[doc = "{"]
34823#[doc = " \"type\": \"object\","]
34824#[doc = " \"required\": ["]
34825#[doc = " \"deterministic_account_ids\","]
34826#[doc = " \"discard_custom_sections\","]
34827#[doc = " \"eth_implicit_accounts\","]
34828#[doc = " \"ext_costs\","]
34829#[doc = " \"fix_contract_loading_cost\","]
34830#[doc = " \"global_contract_host_fns\","]
34831#[doc = " \"grow_mem_cost\","]
34832#[doc = " \"implicit_account_creation\","]
34833#[doc = " \"limit_config\","]
34834#[doc = " \"linear_op_base_cost\","]
34835#[doc = " \"linear_op_unit_cost\","]
34836#[doc = " \"reftypes_bulk_memory\","]
34837#[doc = " \"regular_op_cost\","]
34838#[doc = " \"saturating_float_to_int\","]
34839#[doc = " \"storage_get_mode\","]
34840#[doc = " \"vm_kind\""]
34841#[doc = " ],"]
34842#[doc = " \"properties\": {"]
34843#[doc = " \"deterministic_account_ids\": {"]
34844#[doc = " \"description\": \"See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids).\","]
34845#[doc = " \"type\": \"boolean\""]
34846#[doc = " },"]
34847#[doc = " \"discard_custom_sections\": {"]
34848#[doc = " \"description\": \"See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections).\","]
34849#[doc = " \"type\": \"boolean\""]
34850#[doc = " },"]
34851#[doc = " \"eth_implicit_accounts\": {"]
34852#[doc = " \"description\": \"See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts).\","]
34853#[doc = " \"type\": \"boolean\""]
34854#[doc = " },"]
34855#[doc = " \"ext_costs\": {"]
34856#[doc = " \"description\": \"Costs for runtime externals\","]
34857#[doc = " \"allOf\": ["]
34858#[doc = " {"]
34859#[doc = " \"$ref\": \"#/components/schemas/ExtCostsConfigView\""]
34860#[doc = " }"]
34861#[doc = " ]"]
34862#[doc = " },"]
34863#[doc = " \"fix_contract_loading_cost\": {"]
34864#[doc = " \"description\": \"See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost).\","]
34865#[doc = " \"type\": \"boolean\""]
34866#[doc = " },"]
34867#[doc = " \"global_contract_host_fns\": {"]
34868#[doc = " \"description\": \"See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns).\","]
34869#[doc = " \"type\": \"boolean\""]
34870#[doc = " },"]
34871#[doc = " \"grow_mem_cost\": {"]
34872#[doc = " \"description\": \"Gas cost of a growing memory by single page.\","]
34873#[doc = " \"type\": \"integer\","]
34874#[doc = " \"format\": \"uint32\","]
34875#[doc = " \"minimum\": 0.0"]
34876#[doc = " },"]
34877#[doc = " \"implicit_account_creation\": {"]
34878#[doc = " \"description\": \"See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation).\","]
34879#[doc = " \"type\": \"boolean\""]
34880#[doc = " },"]
34881#[doc = " \"limit_config\": {"]
34882#[doc = " \"description\": \"Describes limits for VM and Runtime.\\n\\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\\non runtime.\","]
34883#[doc = " \"allOf\": ["]
34884#[doc = " {"]
34885#[doc = " \"$ref\": \"#/components/schemas/LimitConfig\""]
34886#[doc = " }"]
34887#[doc = " ]"]
34888#[doc = " },"]
34889#[doc = " \"linear_op_base_cost\": {"]
34890#[doc = " \"description\": \"Base gas cost of a linear operation\","]
34891#[doc = " \"type\": \"integer\","]
34892#[doc = " \"format\": \"uint64\","]
34893#[doc = " \"minimum\": 0.0"]
34894#[doc = " },"]
34895#[doc = " \"linear_op_unit_cost\": {"]
34896#[doc = " \"description\": \"Unit gas cost of a linear operation\","]
34897#[doc = " \"type\": \"integer\","]
34898#[doc = " \"format\": \"uint64\","]
34899#[doc = " \"minimum\": 0.0"]
34900#[doc = " },"]
34901#[doc = " \"reftypes_bulk_memory\": {"]
34902#[doc = " \"description\": \"See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).\","]
34903#[doc = " \"type\": \"boolean\""]
34904#[doc = " },"]
34905#[doc = " \"regular_op_cost\": {"]
34906#[doc = " \"description\": \"Gas cost of a regular operation.\","]
34907#[doc = " \"type\": \"integer\","]
34908#[doc = " \"format\": \"uint32\","]
34909#[doc = " \"minimum\": 0.0"]
34910#[doc = " },"]
34911#[doc = " \"saturating_float_to_int\": {"]
34912#[doc = " \"description\": \"See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int).\","]
34913#[doc = " \"type\": \"boolean\""]
34914#[doc = " },"]
34915#[doc = " \"storage_get_mode\": {"]
34916#[doc = " \"description\": \"See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode).\","]
34917#[doc = " \"allOf\": ["]
34918#[doc = " {"]
34919#[doc = " \"$ref\": \"#/components/schemas/StorageGetMode\""]
34920#[doc = " }"]
34921#[doc = " ]"]
34922#[doc = " },"]
34923#[doc = " \"vm_kind\": {"]
34924#[doc = " \"description\": \"See [VMConfig::vm_kind](crate::vm::Config::vm_kind).\","]
34925#[doc = " \"allOf\": ["]
34926#[doc = " {"]
34927#[doc = " \"$ref\": \"#/components/schemas/VMKind\""]
34928#[doc = " }"]
34929#[doc = " ]"]
34930#[doc = " }"]
34931#[doc = " }"]
34932#[doc = "}"]
34933#[doc = r" ```"]
34934#[doc = r" </details>"]
34935#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
34936pub struct VmConfigView {
34937 #[doc = "See [VMConfig::deterministic_account_ids](crate::vm::Config::deterministic_account_ids)."]
34938 pub deterministic_account_ids: bool,
34939 #[doc = "See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections)."]
34940 pub discard_custom_sections: bool,
34941 #[doc = "See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts)."]
34942 pub eth_implicit_accounts: bool,
34943 #[doc = "Costs for runtime externals"]
34944 pub ext_costs: ExtCostsConfigView,
34945 #[doc = "See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost)."]
34946 pub fix_contract_loading_cost: bool,
34947 #[doc = "See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns)."]
34948 pub global_contract_host_fns: bool,
34949 #[doc = "Gas cost of a growing memory by single page."]
34950 pub grow_mem_cost: u32,
34951 #[doc = "See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation)."]
34952 pub implicit_account_creation: bool,
34953 #[doc = "Describes limits for VM and Runtime.\n\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\non runtime."]
34954 pub limit_config: LimitConfig,
34955 #[doc = "Base gas cost of a linear operation"]
34956 pub linear_op_base_cost: u64,
34957 #[doc = "Unit gas cost of a linear operation"]
34958 pub linear_op_unit_cost: u64,
34959 #[doc = "See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory)."]
34960 pub reftypes_bulk_memory: bool,
34961 #[doc = "Gas cost of a regular operation."]
34962 pub regular_op_cost: u32,
34963 #[doc = "See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int)."]
34964 pub saturating_float_to_int: bool,
34965 #[doc = "See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode)."]
34966 pub storage_get_mode: StorageGetMode,
34967 #[doc = "See [VMConfig::vm_kind](crate::vm::Config::vm_kind)."]
34968 pub vm_kind: VmKind,
34969}
34970impl ::std::convert::From<&VmConfigView> for VmConfigView {
34971 fn from(value: &VmConfigView) -> Self {
34972 value.clone()
34973 }
34974}
34975#[doc = "`VmKind`"]
34976#[doc = r""]
34977#[doc = r" <details><summary>JSON schema</summary>"]
34978#[doc = r""]
34979#[doc = r" ```json"]
34980#[doc = "{"]
34981#[doc = " \"oneOf\": ["]
34982#[doc = " {"]
34983#[doc = " \"description\": \"Wasmer 0.17.x VM. Gone now.\","]
34984#[doc = " \"type\": \"string\","]
34985#[doc = " \"enum\": ["]
34986#[doc = " \"Wasmer0\""]
34987#[doc = " ]"]
34988#[doc = " },"]
34989#[doc = " {"]
34990#[doc = " \"description\": \"Wasmtime VM.\","]
34991#[doc = " \"type\": \"string\","]
34992#[doc = " \"enum\": ["]
34993#[doc = " \"Wasmtime\""]
34994#[doc = " ]"]
34995#[doc = " },"]
34996#[doc = " {"]
34997#[doc = " \"description\": \"Wasmer 2.x VM.\","]
34998#[doc = " \"type\": \"string\","]
34999#[doc = " \"enum\": ["]
35000#[doc = " \"Wasmer2\""]
35001#[doc = " ]"]
35002#[doc = " },"]
35003#[doc = " {"]
35004#[doc = " \"description\": \"NearVM.\","]
35005#[doc = " \"type\": \"string\","]
35006#[doc = " \"enum\": ["]
35007#[doc = " \"NearVm\""]
35008#[doc = " ]"]
35009#[doc = " }"]
35010#[doc = " ]"]
35011#[doc = "}"]
35012#[doc = r" ```"]
35013#[doc = r" </details>"]
35014#[derive(
35015 :: serde :: Deserialize,
35016 :: serde :: Serialize,
35017 Clone,
35018 Copy,
35019 Debug,
35020 Eq,
35021 Hash,
35022 Ord,
35023 PartialEq,
35024 PartialOrd,
35025)]
35026pub enum VmKind {
35027 #[doc = "Wasmer 0.17.x VM. Gone now."]
35028 Wasmer0,
35029 #[doc = "Wasmtime VM."]
35030 Wasmtime,
35031 #[doc = "Wasmer 2.x VM."]
35032 Wasmer2,
35033 #[doc = "NearVM."]
35034 NearVm,
35035}
35036impl ::std::convert::From<&Self> for VmKind {
35037 fn from(value: &VmKind) -> Self {
35038 value.clone()
35039 }
35040}
35041impl ::std::fmt::Display for VmKind {
35042 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35043 match *self {
35044 Self::Wasmer0 => f.write_str("Wasmer0"),
35045 Self::Wasmtime => f.write_str("Wasmtime"),
35046 Self::Wasmer2 => f.write_str("Wasmer2"),
35047 Self::NearVm => f.write_str("NearVm"),
35048 }
35049 }
35050}
35051impl ::std::str::FromStr for VmKind {
35052 type Err = self::error::ConversionError;
35053 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35054 match value {
35055 "Wasmer0" => Ok(Self::Wasmer0),
35056 "Wasmtime" => Ok(Self::Wasmtime),
35057 "Wasmer2" => Ok(Self::Wasmer2),
35058 "NearVm" => Ok(Self::NearVm),
35059 _ => Err("invalid value".into()),
35060 }
35061 }
35062}
35063impl ::std::convert::TryFrom<&str> for VmKind {
35064 type Error = self::error::ConversionError;
35065 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35066 value.parse()
35067 }
35068}
35069impl ::std::convert::TryFrom<&::std::string::String> for VmKind {
35070 type Error = self::error::ConversionError;
35071 fn try_from(
35072 value: &::std::string::String,
35073 ) -> ::std::result::Result<Self, self::error::ConversionError> {
35074 value.parse()
35075 }
35076}
35077impl ::std::convert::TryFrom<::std::string::String> for VmKind {
35078 type Error = self::error::ConversionError;
35079 fn try_from(
35080 value: ::std::string::String,
35081 ) -> ::std::result::Result<Self, self::error::ConversionError> {
35082 value.parse()
35083 }
35084}
35085#[doc = "A kind of a trap happened during execution of a binary"]
35086#[doc = r""]
35087#[doc = r" <details><summary>JSON schema</summary>"]
35088#[doc = r""]
35089#[doc = r" ```json"]
35090#[doc = "{"]
35091#[doc = " \"description\": \"A kind of a trap happened during execution of a binary\","]
35092#[doc = " \"oneOf\": ["]
35093#[doc = " {"]
35094#[doc = " \"description\": \"An `unreachable` opcode was executed.\","]
35095#[doc = " \"type\": \"string\","]
35096#[doc = " \"enum\": ["]
35097#[doc = " \"Unreachable\""]
35098#[doc = " ]"]
35099#[doc = " },"]
35100#[doc = " {"]
35101#[doc = " \"description\": \"Call indirect incorrect signature trap.\","]
35102#[doc = " \"type\": \"string\","]
35103#[doc = " \"enum\": ["]
35104#[doc = " \"IncorrectCallIndirectSignature\""]
35105#[doc = " ]"]
35106#[doc = " },"]
35107#[doc = " {"]
35108#[doc = " \"description\": \"Memory out of bounds trap.\","]
35109#[doc = " \"type\": \"string\","]
35110#[doc = " \"enum\": ["]
35111#[doc = " \"MemoryOutOfBounds\""]
35112#[doc = " ]"]
35113#[doc = " },"]
35114#[doc = " {"]
35115#[doc = " \"description\": \"Call indirect out of bounds trap.\","]
35116#[doc = " \"type\": \"string\","]
35117#[doc = " \"enum\": ["]
35118#[doc = " \"CallIndirectOOB\""]
35119#[doc = " ]"]
35120#[doc = " },"]
35121#[doc = " {"]
35122#[doc = " \"description\": \"An arithmetic exception, e.g. divided by zero.\","]
35123#[doc = " \"type\": \"string\","]
35124#[doc = " \"enum\": ["]
35125#[doc = " \"IllegalArithmetic\""]
35126#[doc = " ]"]
35127#[doc = " },"]
35128#[doc = " {"]
35129#[doc = " \"description\": \"Misaligned atomic access trap.\","]
35130#[doc = " \"type\": \"string\","]
35131#[doc = " \"enum\": ["]
35132#[doc = " \"MisalignedAtomicAccess\""]
35133#[doc = " ]"]
35134#[doc = " },"]
35135#[doc = " {"]
35136#[doc = " \"description\": \"Indirect call to null.\","]
35137#[doc = " \"type\": \"string\","]
35138#[doc = " \"enum\": ["]
35139#[doc = " \"IndirectCallToNull\""]
35140#[doc = " ]"]
35141#[doc = " },"]
35142#[doc = " {"]
35143#[doc = " \"description\": \"Stack overflow.\","]
35144#[doc = " \"type\": \"string\","]
35145#[doc = " \"enum\": ["]
35146#[doc = " \"StackOverflow\""]
35147#[doc = " ]"]
35148#[doc = " },"]
35149#[doc = " {"]
35150#[doc = " \"description\": \"Generic trap.\","]
35151#[doc = " \"type\": \"string\","]
35152#[doc = " \"enum\": ["]
35153#[doc = " \"GenericTrap\""]
35154#[doc = " ]"]
35155#[doc = " }"]
35156#[doc = " ]"]
35157#[doc = "}"]
35158#[doc = r" ```"]
35159#[doc = r" </details>"]
35160#[derive(
35161 :: serde :: Deserialize,
35162 :: serde :: Serialize,
35163 Clone,
35164 Copy,
35165 Debug,
35166 Eq,
35167 Hash,
35168 Ord,
35169 PartialEq,
35170 PartialOrd,
35171)]
35172pub enum WasmTrap {
35173 #[doc = "An `unreachable` opcode was executed."]
35174 Unreachable,
35175 #[doc = "Call indirect incorrect signature trap."]
35176 IncorrectCallIndirectSignature,
35177 #[doc = "Memory out of bounds trap."]
35178 MemoryOutOfBounds,
35179 #[doc = "Call indirect out of bounds trap."]
35180 #[serde(rename = "CallIndirectOOB")]
35181 CallIndirectOob,
35182 #[doc = "An arithmetic exception, e.g. divided by zero."]
35183 IllegalArithmetic,
35184 #[doc = "Misaligned atomic access trap."]
35185 MisalignedAtomicAccess,
35186 #[doc = "Indirect call to null."]
35187 IndirectCallToNull,
35188 #[doc = "Stack overflow."]
35189 StackOverflow,
35190 #[doc = "Generic trap."]
35191 GenericTrap,
35192}
35193impl ::std::convert::From<&Self> for WasmTrap {
35194 fn from(value: &WasmTrap) -> Self {
35195 value.clone()
35196 }
35197}
35198impl ::std::fmt::Display for WasmTrap {
35199 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35200 match *self {
35201 Self::Unreachable => f.write_str("Unreachable"),
35202 Self::IncorrectCallIndirectSignature => f.write_str("IncorrectCallIndirectSignature"),
35203 Self::MemoryOutOfBounds => f.write_str("MemoryOutOfBounds"),
35204 Self::CallIndirectOob => f.write_str("CallIndirectOOB"),
35205 Self::IllegalArithmetic => f.write_str("IllegalArithmetic"),
35206 Self::MisalignedAtomicAccess => f.write_str("MisalignedAtomicAccess"),
35207 Self::IndirectCallToNull => f.write_str("IndirectCallToNull"),
35208 Self::StackOverflow => f.write_str("StackOverflow"),
35209 Self::GenericTrap => f.write_str("GenericTrap"),
35210 }
35211 }
35212}
35213impl ::std::str::FromStr for WasmTrap {
35214 type Err = self::error::ConversionError;
35215 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35216 match value {
35217 "Unreachable" => Ok(Self::Unreachable),
35218 "IncorrectCallIndirectSignature" => Ok(Self::IncorrectCallIndirectSignature),
35219 "MemoryOutOfBounds" => Ok(Self::MemoryOutOfBounds),
35220 "CallIndirectOOB" => Ok(Self::CallIndirectOob),
35221 "IllegalArithmetic" => Ok(Self::IllegalArithmetic),
35222 "MisalignedAtomicAccess" => Ok(Self::MisalignedAtomicAccess),
35223 "IndirectCallToNull" => Ok(Self::IndirectCallToNull),
35224 "StackOverflow" => Ok(Self::StackOverflow),
35225 "GenericTrap" => Ok(Self::GenericTrap),
35226 _ => Err("invalid value".into()),
35227 }
35228 }
35229}
35230impl ::std::convert::TryFrom<&str> for WasmTrap {
35231 type Error = self::error::ConversionError;
35232 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35233 value.parse()
35234 }
35235}
35236impl ::std::convert::TryFrom<&::std::string::String> for WasmTrap {
35237 type Error = self::error::ConversionError;
35238 fn try_from(
35239 value: &::std::string::String,
35240 ) -> ::std::result::Result<Self, self::error::ConversionError> {
35241 value.parse()
35242 }
35243}
35244impl ::std::convert::TryFrom<::std::string::String> for WasmTrap {
35245 type Error = self::error::ConversionError;
35246 fn try_from(
35247 value: ::std::string::String,
35248 ) -> ::std::result::Result<Self, self::error::ConversionError> {
35249 value.parse()
35250 }
35251}
35252#[doc = "Configuration specific to ChunkStateWitness."]
35253#[doc = r""]
35254#[doc = r" <details><summary>JSON schema</summary>"]
35255#[doc = r""]
35256#[doc = r" ```json"]
35257#[doc = "{"]
35258#[doc = " \"description\": \"Configuration specific to ChunkStateWitness.\","]
35259#[doc = " \"type\": \"object\","]
35260#[doc = " \"required\": ["]
35261#[doc = " \"combined_transactions_size_limit\","]
35262#[doc = " \"main_storage_proof_size_soft_limit\","]
35263#[doc = " \"new_transactions_validation_state_size_soft_limit\""]
35264#[doc = " ],"]
35265#[doc = " \"properties\": {"]
35266#[doc = " \"combined_transactions_size_limit\": {"]
35267#[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.\","]
35268#[doc = " \"type\": \"integer\","]
35269#[doc = " \"format\": \"uint\","]
35270#[doc = " \"minimum\": 0.0"]
35271#[doc = " },"]
35272#[doc = " \"main_storage_proof_size_soft_limit\": {"]
35273#[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.\","]
35274#[doc = " \"type\": \"integer\","]
35275#[doc = " \"format\": \"uint64\","]
35276#[doc = " \"minimum\": 0.0"]
35277#[doc = " },"]
35278#[doc = " \"new_transactions_validation_state_size_soft_limit\": {"]
35279#[doc = " \"description\": \"Soft size limit of storage proof used to validate new transactions in ChunkStateWitness.\","]
35280#[doc = " \"type\": \"integer\","]
35281#[doc = " \"format\": \"uint64\","]
35282#[doc = " \"minimum\": 0.0"]
35283#[doc = " }"]
35284#[doc = " }"]
35285#[doc = "}"]
35286#[doc = r" ```"]
35287#[doc = r" </details>"]
35288#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
35289pub struct WitnessConfigView {
35290 #[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."]
35291 pub combined_transactions_size_limit: u32,
35292 #[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."]
35293 pub main_storage_proof_size_soft_limit: u64,
35294 #[doc = "Soft size limit of storage proof used to validate new transactions in ChunkStateWitness."]
35295 pub new_transactions_validation_state_size_soft_limit: u64,
35296}
35297impl ::std::convert::From<&WitnessConfigView> for WitnessConfigView {
35298 fn from(value: &WitnessConfigView) -> Self {
35299 value.clone()
35300 }
35301}
35302#[doc = r" Generation of default values for serde."]
35303pub mod defaults {
35304 pub(super) fn default_u64<T, const V: u64>() -> T
35305 where
35306 T: ::std::convert::TryFrom<u64>,
35307 <T as ::std::convert::TryFrom<u64>>::Error: ::std::fmt::Debug,
35308 {
35309 T::try_from(V).unwrap()
35310 }
35311 pub(super) fn block_header_view_rent_paid() -> super::NearToken {
35312 super::NearToken::from_yoctonear(0)
35313 }
35314 pub(super) fn block_header_view_validator_reward() -> super::NearToken {
35315 super::NearToken::from_yoctonear(0)
35316 }
35317 pub(super) fn chunk_header_view_rent_paid() -> super::NearToken {
35318 super::NearToken::from_yoctonear(0)
35319 }
35320 pub(super) fn chunk_header_view_validator_reward() -> super::NearToken {
35321 super::NearToken::from_yoctonear(0)
35322 }
35323 pub(super) fn cloud_archival_writer_config_polling_interval(
35324 ) -> super::DurationAsStdSchemaProvider {
35325 super::DurationAsStdSchemaProvider {
35326 nanos: 0_i32,
35327 secs: 1_i64,
35328 }
35329 }
35330 pub(super) fn execution_outcome_view_metadata() -> super::ExecutionMetadataView {
35331 super::ExecutionMetadataView {
35332 gas_profile: Default::default(),
35333 version: 1_u32,
35334 }
35335 }
35336 pub(super) fn gc_config_gc_step_period() -> super::DurationAsStdSchemaProvider {
35337 super::DurationAsStdSchemaProvider {
35338 nanos: 500000000_i32,
35339 secs: 0_i64,
35340 }
35341 }
35342 pub(super) fn genesis_config_minimum_stake_ratio() -> [i32; 2usize] {
35343 [1_i32, 6250_i32]
35344 }
35345 pub(super) fn genesis_config_online_max_threshold() -> [i32; 2usize] {
35346 [99_i32, 100_i32]
35347 }
35348 pub(super) fn genesis_config_online_min_threshold() -> [i32; 2usize] {
35349 [9_i32, 10_i32]
35350 }
35351 pub(super) fn genesis_config_protocol_upgrade_stake_threshold() -> [i32; 2usize] {
35352 [4_i32, 5_i32]
35353 }
35354 pub(super) fn genesis_config_shard_layout() -> super::ShardLayout {
35355 super::ShardLayout::V2(super::ShardLayoutV2 {
35356 boundary_accounts: vec![],
35357 id_to_index_map: [("0".to_string(), 0_u32)].into_iter().collect(),
35358 index_to_id_map: [("0".to_string(), super::ShardId(0_u64))]
35359 .into_iter()
35360 .collect(),
35361 shard_ids: vec![super::ShardId(0_u64)],
35362 shards_parent_map: Default::default(),
35363 shards_split_map: Default::default(),
35364 version: 0_u32,
35365 })
35366 }
35367 pub(super) fn limit_config_account_id_validity_rules_version(
35368 ) -> super::AccountIdValidityRulesVersion {
35369 super::AccountIdValidityRulesVersion(0_u8)
35370 }
35371 pub(super) fn rpc_send_transaction_request_wait_until() -> super::TxExecutionStatus {
35372 super::TxExecutionStatus::ExecutedOptimistic
35373 }
35374 pub(super) fn rpc_transaction_status_request_variant0_wait_until() -> super::TxExecutionStatus {
35375 super::TxExecutionStatus::ExecutedOptimistic
35376 }
35377 pub(super) fn rpc_transaction_status_request_variant1_wait_until() -> super::TxExecutionStatus {
35378 super::TxExecutionStatus::ExecutedOptimistic
35379 }
35380}