1pub use near_account_id::AccountId;
5#[allow(unused_imports)]
6use progenitor_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt};
7#[allow(unused_imports)]
8pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
9#[doc = r" Error types."]
10pub mod error {
11 #[doc = r" Error from a `TryFrom` or `FromStr` implementation."]
12 pub struct ConversionError(::std::borrow::Cow<'static, str>);
13 impl ::std::error::Error for ConversionError {}
14 impl ::std::fmt::Display for ConversionError {
15 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
16 ::std::fmt::Display::fmt(&self.0, f)
17 }
18 }
19 impl ::std::fmt::Debug for ConversionError {
20 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
21 ::std::fmt::Debug::fmt(&self.0, f)
22 }
23 }
24 impl From<&'static str> for ConversionError {
25 fn from(value: &'static str) -> Self {
26 Self(value.into())
27 }
28 }
29 impl From<String> for ConversionError {
30 fn from(value: String) -> Self {
31 Self(value.into())
32 }
33 }
34}
35#[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"]
36#[doc = r""]
37#[doc = r" <details><summary>JSON schema</summary>"]
38#[doc = r""]
39#[doc = r" ```json"]
40#[doc = "{"]
41#[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\","]
42#[doc = " \"type\": \"object\","]
43#[doc = " \"required\": ["]
44#[doc = " \"nonce\","]
45#[doc = " \"permission\""]
46#[doc = " ],"]
47#[doc = " \"properties\": {"]
48#[doc = " \"nonce\": {"]
49#[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.\","]
50#[doc = " \"type\": \"integer\","]
51#[doc = " \"format\": \"uint64\","]
52#[doc = " \"minimum\": 0.0"]
53#[doc = " },"]
54#[doc = " \"permission\": {"]
55#[doc = " \"description\": \"Defines permissions for this access key.\","]
56#[doc = " \"allOf\": ["]
57#[doc = " {"]
58#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermission\""]
59#[doc = " }"]
60#[doc = " ]"]
61#[doc = " }"]
62#[doc = " }"]
63#[doc = "}"]
64#[doc = r" ```"]
65#[doc = r" </details>"]
66#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
67pub struct AccessKey {
68 #[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."]
69 pub nonce: u64,
70 #[doc = "Defines permissions for this access key."]
71 pub permission: AccessKeyPermission,
72}
73impl ::std::convert::From<&AccessKey> for AccessKey {
74 fn from(value: &AccessKey) -> Self {
75 value.clone()
76 }
77}
78#[doc = "Describes the cost of creating an access key."]
79#[doc = r""]
80#[doc = r" <details><summary>JSON schema</summary>"]
81#[doc = r""]
82#[doc = r" ```json"]
83#[doc = "{"]
84#[doc = " \"description\": \"Describes the cost of creating an access key.\","]
85#[doc = " \"type\": \"object\","]
86#[doc = " \"required\": ["]
87#[doc = " \"full_access_cost\","]
88#[doc = " \"function_call_cost\","]
89#[doc = " \"function_call_cost_per_byte\""]
90#[doc = " ],"]
91#[doc = " \"properties\": {"]
92#[doc = " \"full_access_cost\": {"]
93#[doc = " \"description\": \"Base cost of creating a full access access-key.\","]
94#[doc = " \"allOf\": ["]
95#[doc = " {"]
96#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
97#[doc = " }"]
98#[doc = " ]"]
99#[doc = " },"]
100#[doc = " \"function_call_cost\": {"]
101#[doc = " \"description\": \"Base cost of creating an access-key restricted to specific functions.\","]
102#[doc = " \"allOf\": ["]
103#[doc = " {"]
104#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
105#[doc = " }"]
106#[doc = " ]"]
107#[doc = " },"]
108#[doc = " \"function_call_cost_per_byte\": {"]
109#[doc = " \"description\": \"Cost per byte of method_names of creating a restricted access-key.\","]
110#[doc = " \"allOf\": ["]
111#[doc = " {"]
112#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
113#[doc = " }"]
114#[doc = " ]"]
115#[doc = " }"]
116#[doc = " }"]
117#[doc = "}"]
118#[doc = r" ```"]
119#[doc = r" </details>"]
120#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
121pub struct AccessKeyCreationConfigView {
122 #[doc = "Base cost of creating a full access access-key."]
123 pub full_access_cost: Fee,
124 #[doc = "Base cost of creating an access-key restricted to specific functions."]
125 pub function_call_cost: Fee,
126 #[doc = "Cost per byte of method_names of creating a restricted access-key."]
127 pub function_call_cost_per_byte: Fee,
128}
129impl ::std::convert::From<&AccessKeyCreationConfigView> for AccessKeyCreationConfigView {
130 fn from(value: &AccessKeyCreationConfigView) -> Self {
131 value.clone()
132 }
133}
134#[doc = "Describes information about an access key including the public key."]
135#[doc = r""]
136#[doc = r" <details><summary>JSON schema</summary>"]
137#[doc = r""]
138#[doc = r" ```json"]
139#[doc = "{"]
140#[doc = " \"description\": \"Describes information about an access key including the public key.\","]
141#[doc = " \"type\": \"object\","]
142#[doc = " \"required\": ["]
143#[doc = " \"access_key\","]
144#[doc = " \"public_key\""]
145#[doc = " ],"]
146#[doc = " \"properties\": {"]
147#[doc = " \"access_key\": {"]
148#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
149#[doc = " },"]
150#[doc = " \"public_key\": {"]
151#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
152#[doc = " }"]
153#[doc = " }"]
154#[doc = "}"]
155#[doc = r" ```"]
156#[doc = r" </details>"]
157#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
158pub struct AccessKeyInfoView {
159 pub access_key: AccessKeyView,
160 pub public_key: PublicKey,
161}
162impl ::std::convert::From<&AccessKeyInfoView> for AccessKeyInfoView {
163 fn from(value: &AccessKeyInfoView) -> Self {
164 value.clone()
165 }
166}
167#[doc = "Lists access keys"]
168#[doc = r""]
169#[doc = r" <details><summary>JSON schema</summary>"]
170#[doc = r""]
171#[doc = r" ```json"]
172#[doc = "{"]
173#[doc = " \"description\": \"Lists access keys\","]
174#[doc = " \"type\": \"object\","]
175#[doc = " \"required\": ["]
176#[doc = " \"keys\""]
177#[doc = " ],"]
178#[doc = " \"properties\": {"]
179#[doc = " \"keys\": {"]
180#[doc = " \"type\": \"array\","]
181#[doc = " \"items\": {"]
182#[doc = " \"$ref\": \"#/components/schemas/AccessKeyInfoView\""]
183#[doc = " }"]
184#[doc = " }"]
185#[doc = " }"]
186#[doc = "}"]
187#[doc = r" ```"]
188#[doc = r" </details>"]
189#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
190pub struct AccessKeyList {
191 pub keys: ::std::vec::Vec<AccessKeyInfoView>,
192}
193impl ::std::convert::From<&AccessKeyList> for AccessKeyList {
194 fn from(value: &AccessKeyList) -> Self {
195 value.clone()
196 }
197}
198#[doc = "Defines permissions for AccessKey"]
199#[doc = r""]
200#[doc = r" <details><summary>JSON schema</summary>"]
201#[doc = r""]
202#[doc = r" ```json"]
203#[doc = "{"]
204#[doc = " \"description\": \"Defines permissions for AccessKey\","]
205#[doc = " \"oneOf\": ["]
206#[doc = " {"]
207#[doc = " \"type\": \"object\","]
208#[doc = " \"required\": ["]
209#[doc = " \"FunctionCall\""]
210#[doc = " ],"]
211#[doc = " \"properties\": {"]
212#[doc = " \"FunctionCall\": {"]
213#[doc = " \"$ref\": \"#/components/schemas/FunctionCallPermission\""]
214#[doc = " }"]
215#[doc = " },"]
216#[doc = " \"additionalProperties\": false"]
217#[doc = " },"]
218#[doc = " {"]
219#[doc = " \"description\": \"Grants full access to the account.\\nNOTE: It's used to replace account-level public keys.\","]
220#[doc = " \"type\": \"string\","]
221#[doc = " \"enum\": ["]
222#[doc = " \"FullAccess\""]
223#[doc = " ]"]
224#[doc = " }"]
225#[doc = " ]"]
226#[doc = "}"]
227#[doc = r" ```"]
228#[doc = r" </details>"]
229#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
230pub enum AccessKeyPermission {
231 FunctionCall(FunctionCallPermission),
232 #[doc = "Grants full access to the account.\nNOTE: It's used to replace account-level public keys."]
233 FullAccess,
234}
235impl ::std::convert::From<&Self> for AccessKeyPermission {
236 fn from(value: &AccessKeyPermission) -> Self {
237 value.clone()
238 }
239}
240impl ::std::convert::From<FunctionCallPermission> for AccessKeyPermission {
241 fn from(value: FunctionCallPermission) -> Self {
242 Self::FunctionCall(value)
243 }
244}
245#[doc = "Describes the permission scope for an access key. Whether it is a function call or a full access key."]
246#[doc = r""]
247#[doc = r" <details><summary>JSON schema</summary>"]
248#[doc = r""]
249#[doc = r" ```json"]
250#[doc = "{"]
251#[doc = " \"description\": \"Describes the permission scope for an access key. Whether it is a function call or a full access key.\","]
252#[doc = " \"oneOf\": ["]
253#[doc = " {"]
254#[doc = " \"type\": \"string\","]
255#[doc = " \"enum\": ["]
256#[doc = " \"FullAccess\""]
257#[doc = " ]"]
258#[doc = " },"]
259#[doc = " {"]
260#[doc = " \"type\": \"object\","]
261#[doc = " \"required\": ["]
262#[doc = " \"FunctionCall\""]
263#[doc = " ],"]
264#[doc = " \"properties\": {"]
265#[doc = " \"FunctionCall\": {"]
266#[doc = " \"type\": \"object\","]
267#[doc = " \"required\": ["]
268#[doc = " \"method_names\","]
269#[doc = " \"receiver_id\""]
270#[doc = " ],"]
271#[doc = " \"properties\": {"]
272#[doc = " \"allowance\": {"]
273#[doc = " \"type\": ["]
274#[doc = " \"string\","]
275#[doc = " \"null\""]
276#[doc = " ]"]
277#[doc = " },"]
278#[doc = " \"method_names\": {"]
279#[doc = " \"type\": \"array\","]
280#[doc = " \"items\": {"]
281#[doc = " \"type\": \"string\""]
282#[doc = " }"]
283#[doc = " },"]
284#[doc = " \"receiver_id\": {"]
285#[doc = " \"type\": \"string\""]
286#[doc = " }"]
287#[doc = " }"]
288#[doc = " }"]
289#[doc = " },"]
290#[doc = " \"additionalProperties\": false"]
291#[doc = " }"]
292#[doc = " ]"]
293#[doc = "}"]
294#[doc = r" ```"]
295#[doc = r" </details>"]
296#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
297pub enum AccessKeyPermissionView {
298 FullAccess,
299 FunctionCall {
300 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
301 allowance: ::std::option::Option<::std::string::String>,
302 method_names: ::std::vec::Vec<::std::string::String>,
303 receiver_id: ::std::string::String,
304 },
305}
306impl ::std::convert::From<&Self> for AccessKeyPermissionView {
307 fn from(value: &AccessKeyPermissionView) -> Self {
308 value.clone()
309 }
310}
311#[doc = "Describes access key permission scope and nonce."]
312#[doc = r""]
313#[doc = r" <details><summary>JSON schema</summary>"]
314#[doc = r""]
315#[doc = r" ```json"]
316#[doc = "{"]
317#[doc = " \"description\": \"Describes access key permission scope and nonce.\","]
318#[doc = " \"type\": \"object\","]
319#[doc = " \"required\": ["]
320#[doc = " \"nonce\","]
321#[doc = " \"permission\""]
322#[doc = " ],"]
323#[doc = " \"properties\": {"]
324#[doc = " \"nonce\": {"]
325#[doc = " \"type\": \"integer\","]
326#[doc = " \"format\": \"uint64\","]
327#[doc = " \"minimum\": 0.0"]
328#[doc = " },"]
329#[doc = " \"permission\": {"]
330#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
331#[doc = " }"]
332#[doc = " }"]
333#[doc = "}"]
334#[doc = r" ```"]
335#[doc = r" </details>"]
336#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
337pub struct AccessKeyView {
338 pub nonce: u64,
339 pub permission: AccessKeyPermissionView,
340}
341impl ::std::convert::From<&AccessKeyView> for AccessKeyView {
342 fn from(value: &AccessKeyView) -> Self {
343 value.clone()
344 }
345}
346#[doc = "`AccountChangesByBlockIdChangesType`"]
347#[doc = r""]
348#[doc = r" <details><summary>JSON schema</summary>"]
349#[doc = r""]
350#[doc = r" ```json"]
351#[doc = "{"]
352#[doc = " \"type\": \"string\","]
353#[doc = " \"enum\": ["]
354#[doc = " \"account_changes\""]
355#[doc = " ]"]
356#[doc = "}"]
357#[doc = r" ```"]
358#[doc = r" </details>"]
359#[derive(
360 :: serde :: Deserialize,
361 :: serde :: Serialize,
362 Clone,
363 Copy,
364 Debug,
365 Eq,
366 Hash,
367 Ord,
368 PartialEq,
369 PartialOrd,
370)]
371pub enum AccountChangesByBlockIdChangesType {
372 #[serde(rename = "account_changes")]
373 AccountChanges,
374}
375impl ::std::convert::From<&Self> for AccountChangesByBlockIdChangesType {
376 fn from(value: &AccountChangesByBlockIdChangesType) -> Self {
377 value.clone()
378 }
379}
380impl ::std::fmt::Display for AccountChangesByBlockIdChangesType {
381 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
382 match *self {
383 Self::AccountChanges => write!(f, "account_changes"),
384 }
385 }
386}
387impl ::std::str::FromStr for AccountChangesByBlockIdChangesType {
388 type Err = self::error::ConversionError;
389 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
390 match value {
391 "account_changes" => Ok(Self::AccountChanges),
392 _ => Err("invalid value".into()),
393 }
394 }
395}
396impl ::std::convert::TryFrom<&str> for AccountChangesByBlockIdChangesType {
397 type Error = self::error::ConversionError;
398 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
399 value.parse()
400 }
401}
402impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByBlockIdChangesType {
403 type Error = self::error::ConversionError;
404 fn try_from(
405 value: &::std::string::String,
406 ) -> ::std::result::Result<Self, self::error::ConversionError> {
407 value.parse()
408 }
409}
410impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByBlockIdChangesType {
411 type Error = self::error::ConversionError;
412 fn try_from(
413 value: ::std::string::String,
414 ) -> ::std::result::Result<Self, self::error::ConversionError> {
415 value.parse()
416 }
417}
418#[doc = "`AccountChangesByFinalityChangesType`"]
419#[doc = r""]
420#[doc = r" <details><summary>JSON schema</summary>"]
421#[doc = r""]
422#[doc = r" ```json"]
423#[doc = "{"]
424#[doc = " \"type\": \"string\","]
425#[doc = " \"enum\": ["]
426#[doc = " \"account_changes\""]
427#[doc = " ]"]
428#[doc = "}"]
429#[doc = r" ```"]
430#[doc = r" </details>"]
431#[derive(
432 :: serde :: Deserialize,
433 :: serde :: Serialize,
434 Clone,
435 Copy,
436 Debug,
437 Eq,
438 Hash,
439 Ord,
440 PartialEq,
441 PartialOrd,
442)]
443pub enum AccountChangesByFinalityChangesType {
444 #[serde(rename = "account_changes")]
445 AccountChanges,
446}
447impl ::std::convert::From<&Self> for AccountChangesByFinalityChangesType {
448 fn from(value: &AccountChangesByFinalityChangesType) -> Self {
449 value.clone()
450 }
451}
452impl ::std::fmt::Display for AccountChangesByFinalityChangesType {
453 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
454 match *self {
455 Self::AccountChanges => write!(f, "account_changes"),
456 }
457 }
458}
459impl ::std::str::FromStr for AccountChangesByFinalityChangesType {
460 type Err = self::error::ConversionError;
461 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
462 match value {
463 "account_changes" => Ok(Self::AccountChanges),
464 _ => Err("invalid value".into()),
465 }
466 }
467}
468impl ::std::convert::TryFrom<&str> for AccountChangesByFinalityChangesType {
469 type Error = self::error::ConversionError;
470 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
471 value.parse()
472 }
473}
474impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesByFinalityChangesType {
475 type Error = self::error::ConversionError;
476 fn try_from(
477 value: &::std::string::String,
478 ) -> ::std::result::Result<Self, self::error::ConversionError> {
479 value.parse()
480 }
481}
482impl ::std::convert::TryFrom<::std::string::String> for AccountChangesByFinalityChangesType {
483 type Error = self::error::ConversionError;
484 fn try_from(
485 value: ::std::string::String,
486 ) -> ::std::result::Result<Self, self::error::ConversionError> {
487 value.parse()
488 }
489}
490#[doc = "`AccountChangesBySyncCheckpointChangesType`"]
491#[doc = r""]
492#[doc = r" <details><summary>JSON schema</summary>"]
493#[doc = r""]
494#[doc = r" ```json"]
495#[doc = "{"]
496#[doc = " \"type\": \"string\","]
497#[doc = " \"enum\": ["]
498#[doc = " \"account_changes\""]
499#[doc = " ]"]
500#[doc = "}"]
501#[doc = r" ```"]
502#[doc = r" </details>"]
503#[derive(
504 :: serde :: Deserialize,
505 :: serde :: Serialize,
506 Clone,
507 Copy,
508 Debug,
509 Eq,
510 Hash,
511 Ord,
512 PartialEq,
513 PartialOrd,
514)]
515pub enum AccountChangesBySyncCheckpointChangesType {
516 #[serde(rename = "account_changes")]
517 AccountChanges,
518}
519impl ::std::convert::From<&Self> for AccountChangesBySyncCheckpointChangesType {
520 fn from(value: &AccountChangesBySyncCheckpointChangesType) -> Self {
521 value.clone()
522 }
523}
524impl ::std::fmt::Display for AccountChangesBySyncCheckpointChangesType {
525 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
526 match *self {
527 Self::AccountChanges => write!(f, "account_changes"),
528 }
529 }
530}
531impl ::std::str::FromStr for AccountChangesBySyncCheckpointChangesType {
532 type Err = self::error::ConversionError;
533 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
534 match value {
535 "account_changes" => Ok(Self::AccountChanges),
536 _ => Err("invalid value".into()),
537 }
538 }
539}
540impl ::std::convert::TryFrom<&str> for AccountChangesBySyncCheckpointChangesType {
541 type Error = self::error::ConversionError;
542 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
543 value.parse()
544 }
545}
546impl ::std::convert::TryFrom<&::std::string::String> for AccountChangesBySyncCheckpointChangesType {
547 type Error = self::error::ConversionError;
548 fn try_from(
549 value: &::std::string::String,
550 ) -> ::std::result::Result<Self, self::error::ConversionError> {
551 value.parse()
552 }
553}
554impl ::std::convert::TryFrom<::std::string::String> for AccountChangesBySyncCheckpointChangesType {
555 type Error = self::error::ConversionError;
556 fn try_from(
557 value: ::std::string::String,
558 ) -> ::std::result::Result<Self, self::error::ConversionError> {
559 value.parse()
560 }
561}
562#[doc = "The structure describes configuration for creation of new accounts."]
563#[doc = r""]
564#[doc = r" <details><summary>JSON schema</summary>"]
565#[doc = r""]
566#[doc = r" ```json"]
567#[doc = "{"]
568#[doc = " \"description\": \"The structure describes configuration for creation of new accounts.\","]
569#[doc = " \"type\": \"object\","]
570#[doc = " \"required\": ["]
571#[doc = " \"min_allowed_top_level_account_length\","]
572#[doc = " \"registrar_account_id\""]
573#[doc = " ],"]
574#[doc = " \"properties\": {"]
575#[doc = " \"min_allowed_top_level_account_length\": {"]
576#[doc = " \"description\": \"The minimum length of the top-level account ID that is allowed to be created by any account.\","]
577#[doc = " \"type\": \"integer\","]
578#[doc = " \"format\": \"uint8\","]
579#[doc = " \"maximum\": 255.0,"]
580#[doc = " \"minimum\": 0.0"]
581#[doc = " },"]
582#[doc = " \"registrar_account_id\": {"]
583#[doc = " \"description\": \"The account ID of the account registrar. This account ID allowed to create top-level\\naccounts of any valid length.\","]
584#[doc = " \"allOf\": ["]
585#[doc = " {"]
586#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
587#[doc = " }"]
588#[doc = " ]"]
589#[doc = " }"]
590#[doc = " }"]
591#[doc = "}"]
592#[doc = r" ```"]
593#[doc = r" </details>"]
594#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
595pub struct AccountCreationConfigView {
596 #[doc = "The minimum length of the top-level account ID that is allowed to be created by any account."]
597 pub min_allowed_top_level_account_length: u8,
598 #[doc = "The account ID of the account registrar. This account ID allowed to create top-level\naccounts of any valid length."]
599 pub registrar_account_id: AccountId,
600}
601impl ::std::convert::From<&AccountCreationConfigView> for AccountCreationConfigView {
602 fn from(value: &AccountCreationConfigView) -> Self {
603 value.clone()
604 }
605}
606#[doc = "AccountData is a piece of global state that a validator\nsigns and broadcasts to the network. It is essentially\nthe 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)"]
607#[doc = r""]
608#[doc = r" <details><summary>JSON schema</summary>"]
609#[doc = r""]
610#[doc = r" ```json"]
611#[doc = "{"]
612#[doc = " \"description\": \"AccountData is a piece of global state that a validator\\nsigns and broadcasts to the network. It is essentially\\nthe 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)\","]
613#[doc = " \"type\": \"object\","]
614#[doc = " \"required\": ["]
615#[doc = " \"account_key\","]
616#[doc = " \"peer_id\","]
617#[doc = " \"proxies\","]
618#[doc = " \"timestamp\""]
619#[doc = " ],"]
620#[doc = " \"properties\": {"]
621#[doc = " \"account_key\": {"]
622#[doc = " \"description\": \"Account key of the validator signing this AccountData.\","]
623#[doc = " \"allOf\": ["]
624#[doc = " {"]
625#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
626#[doc = " }"]
627#[doc = " ]"]
628#[doc = " },"]
629#[doc = " \"peer_id\": {"]
630#[doc = " \"description\": \"ID of the node that handles the account key (aka validator key).\","]
631#[doc = " \"allOf\": ["]
632#[doc = " {"]
633#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
634#[doc = " }"]
635#[doc = " ]"]
636#[doc = " },"]
637#[doc = " \"proxies\": {"]
638#[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.\","]
639#[doc = " \"type\": \"array\","]
640#[doc = " \"items\": {"]
641#[doc = " \"$ref\": \"#/components/schemas/Tier1ProxyView\""]
642#[doc = " }"]
643#[doc = " },"]
644#[doc = " \"timestamp\": {"]
645#[doc = " \"description\": \"UTC timestamp of when the AccountData has been signed.\","]
646#[doc = " \"type\": \"string\""]
647#[doc = " }"]
648#[doc = " }"]
649#[doc = "}"]
650#[doc = r" ```"]
651#[doc = r" </details>"]
652#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
653pub struct AccountDataView {
654 #[doc = "Account key of the validator signing this AccountData."]
655 pub account_key: PublicKey,
656 #[doc = "ID of the node that handles the account key (aka validator key)."]
657 pub peer_id: PublicKey,
658 #[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."]
659 pub proxies: ::std::vec::Vec<Tier1ProxyView>,
660 #[doc = "UTC timestamp of when the AccountData has been signed."]
661 pub timestamp: ::std::string::String,
662}
663impl ::std::convert::From<&AccountDataView> for AccountDataView {
664 fn from(value: &AccountDataView) -> Self {
665 value.clone()
666 }
667}
668#[doc = "`AccountIdValidityRulesVersion`"]
669#[doc = r""]
670#[doc = r" <details><summary>JSON schema</summary>"]
671#[doc = r""]
672#[doc = r" ```json"]
673#[doc = "{"]
674#[doc = " \"type\": \"integer\","]
675#[doc = " \"format\": \"uint8\","]
676#[doc = " \"maximum\": 255.0,"]
677#[doc = " \"minimum\": 0.0"]
678#[doc = "}"]
679#[doc = r" ```"]
680#[doc = r" </details>"]
681#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
682#[serde(transparent)]
683pub struct AccountIdValidityRulesVersion(pub u8);
684impl ::std::ops::Deref for AccountIdValidityRulesVersion {
685 type Target = u8;
686 fn deref(&self) -> &u8 {
687 &self.0
688 }
689}
690impl ::std::convert::From<AccountIdValidityRulesVersion> for u8 {
691 fn from(value: AccountIdValidityRulesVersion) -> Self {
692 value.0
693 }
694}
695impl ::std::convert::From<&AccountIdValidityRulesVersion> for AccountIdValidityRulesVersion {
696 fn from(value: &AccountIdValidityRulesVersion) -> Self {
697 value.clone()
698 }
699}
700impl ::std::convert::From<u8> for AccountIdValidityRulesVersion {
701 fn from(value: u8) -> Self {
702 Self(value)
703 }
704}
705impl ::std::str::FromStr for AccountIdValidityRulesVersion {
706 type Err = <u8 as ::std::str::FromStr>::Err;
707 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
708 Ok(Self(value.parse()?))
709 }
710}
711impl ::std::convert::TryFrom<&str> for AccountIdValidityRulesVersion {
712 type Error = <u8 as ::std::str::FromStr>::Err;
713 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
714 value.parse()
715 }
716}
717impl ::std::convert::TryFrom<&String> for AccountIdValidityRulesVersion {
718 type Error = <u8 as ::std::str::FromStr>::Err;
719 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
720 value.parse()
721 }
722}
723impl ::std::convert::TryFrom<String> for AccountIdValidityRulesVersion {
724 type Error = <u8 as ::std::str::FromStr>::Err;
725 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
726 value.parse()
727 }
728}
729impl ::std::fmt::Display for AccountIdValidityRulesVersion {
730 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
731 self.0.fmt(f)
732 }
733}
734#[doc = "Account info for validators"]
735#[doc = r""]
736#[doc = r" <details><summary>JSON schema</summary>"]
737#[doc = r""]
738#[doc = r" ```json"]
739#[doc = "{"]
740#[doc = " \"description\": \"Account info for validators\","]
741#[doc = " \"type\": \"object\","]
742#[doc = " \"required\": ["]
743#[doc = " \"account_id\","]
744#[doc = " \"amount\","]
745#[doc = " \"public_key\""]
746#[doc = " ],"]
747#[doc = " \"properties\": {"]
748#[doc = " \"account_id\": {"]
749#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
750#[doc = " },"]
751#[doc = " \"amount\": {"]
752#[doc = " \"type\": \"string\""]
753#[doc = " },"]
754#[doc = " \"public_key\": {"]
755#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
756#[doc = " }"]
757#[doc = " }"]
758#[doc = "}"]
759#[doc = r" ```"]
760#[doc = r" </details>"]
761#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
762pub struct AccountInfo {
763 pub account_id: AccountId,
764 pub amount: ::std::string::String,
765 pub public_key: PublicKey,
766}
767impl ::std::convert::From<&AccountInfo> for AccountInfo {
768 fn from(value: &AccountInfo) -> Self {
769 value.clone()
770 }
771}
772#[doc = "A view of the account"]
773#[doc = r""]
774#[doc = r" <details><summary>JSON schema</summary>"]
775#[doc = r""]
776#[doc = r" ```json"]
777#[doc = "{"]
778#[doc = " \"description\": \"A view of the account\","]
779#[doc = " \"type\": \"object\","]
780#[doc = " \"required\": ["]
781#[doc = " \"amount\","]
782#[doc = " \"code_hash\","]
783#[doc = " \"locked\","]
784#[doc = " \"storage_usage\""]
785#[doc = " ],"]
786#[doc = " \"properties\": {"]
787#[doc = " \"amount\": {"]
788#[doc = " \"type\": \"string\""]
789#[doc = " },"]
790#[doc = " \"code_hash\": {"]
791#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
792#[doc = " },"]
793#[doc = " \"global_contract_account_id\": {"]
794#[doc = " \"anyOf\": ["]
795#[doc = " {"]
796#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
797#[doc = " },"]
798#[doc = " {"]
799#[doc = " \"type\": \"null\""]
800#[doc = " }"]
801#[doc = " ]"]
802#[doc = " },"]
803#[doc = " \"global_contract_hash\": {"]
804#[doc = " \"anyOf\": ["]
805#[doc = " {"]
806#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
807#[doc = " },"]
808#[doc = " {"]
809#[doc = " \"type\": \"null\""]
810#[doc = " }"]
811#[doc = " ]"]
812#[doc = " },"]
813#[doc = " \"locked\": {"]
814#[doc = " \"type\": \"string\""]
815#[doc = " },"]
816#[doc = " \"storage_paid_at\": {"]
817#[doc = " \"description\": \"TODO(2271): deprecated.\","]
818#[doc = " \"default\": 0,"]
819#[doc = " \"type\": \"integer\","]
820#[doc = " \"format\": \"uint64\","]
821#[doc = " \"minimum\": 0.0"]
822#[doc = " },"]
823#[doc = " \"storage_usage\": {"]
824#[doc = " \"type\": \"integer\","]
825#[doc = " \"format\": \"uint64\","]
826#[doc = " \"minimum\": 0.0"]
827#[doc = " }"]
828#[doc = " }"]
829#[doc = "}"]
830#[doc = r" ```"]
831#[doc = r" </details>"]
832#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
833pub struct AccountView {
834 pub amount: ::std::string::String,
835 pub code_hash: CryptoHash,
836 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
837 pub global_contract_account_id: ::std::option::Option<AccountId>,
838 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
839 pub global_contract_hash: ::std::option::Option<CryptoHash>,
840 pub locked: ::std::string::String,
841 #[doc = "TODO(2271): deprecated."]
842 #[serde(default)]
843 pub storage_paid_at: u64,
844 pub storage_usage: u64,
845}
846impl ::std::convert::From<&AccountView> for AccountView {
847 fn from(value: &AccountView) -> Self {
848 value.clone()
849 }
850}
851#[doc = "Account ID with its public key."]
852#[doc = r""]
853#[doc = r" <details><summary>JSON schema</summary>"]
854#[doc = r""]
855#[doc = r" ```json"]
856#[doc = "{"]
857#[doc = " \"description\": \"Account ID with its public key.\","]
858#[doc = " \"type\": \"object\","]
859#[doc = " \"required\": ["]
860#[doc = " \"account_id\","]
861#[doc = " \"public_key\""]
862#[doc = " ],"]
863#[doc = " \"properties\": {"]
864#[doc = " \"account_id\": {"]
865#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
866#[doc = " },"]
867#[doc = " \"public_key\": {"]
868#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
869#[doc = " }"]
870#[doc = " }"]
871#[doc = "}"]
872#[doc = r" ```"]
873#[doc = r" </details>"]
874#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
875pub struct AccountWithPublicKey {
876 pub account_id: AccountId,
877 pub public_key: PublicKey,
878}
879impl ::std::convert::From<&AccountWithPublicKey> for AccountWithPublicKey {
880 fn from(value: &AccountWithPublicKey) -> Self {
881 value.clone()
882 }
883}
884#[doc = "`Action`"]
885#[doc = r""]
886#[doc = r" <details><summary>JSON schema</summary>"]
887#[doc = r""]
888#[doc = r" ```json"]
889#[doc = "{"]
890#[doc = " \"oneOf\": ["]
891#[doc = " {"]
892#[doc = " \"description\": \"Create an (sub)account using a transaction `receiver_id` as an ID for\\na new account ID must pass validation rules described here\\n<http://nomicon.io/Primitives/Account.html>.\","]
893#[doc = " \"type\": \"object\","]
894#[doc = " \"required\": ["]
895#[doc = " \"CreateAccount\""]
896#[doc = " ],"]
897#[doc = " \"properties\": {"]
898#[doc = " \"CreateAccount\": {"]
899#[doc = " \"$ref\": \"#/components/schemas/CreateAccountAction\""]
900#[doc = " }"]
901#[doc = " },"]
902#[doc = " \"additionalProperties\": false"]
903#[doc = " },"]
904#[doc = " {"]
905#[doc = " \"description\": \"Sets a Wasm code to a receiver_id\","]
906#[doc = " \"type\": \"object\","]
907#[doc = " \"required\": ["]
908#[doc = " \"DeployContract\""]
909#[doc = " ],"]
910#[doc = " \"properties\": {"]
911#[doc = " \"DeployContract\": {"]
912#[doc = " \"$ref\": \"#/components/schemas/DeployContractAction\""]
913#[doc = " }"]
914#[doc = " },"]
915#[doc = " \"additionalProperties\": false"]
916#[doc = " },"]
917#[doc = " {"]
918#[doc = " \"type\": \"object\","]
919#[doc = " \"required\": ["]
920#[doc = " \"FunctionCall\""]
921#[doc = " ],"]
922#[doc = " \"properties\": {"]
923#[doc = " \"FunctionCall\": {"]
924#[doc = " \"$ref\": \"#/components/schemas/FunctionCallAction\""]
925#[doc = " }"]
926#[doc = " },"]
927#[doc = " \"additionalProperties\": false"]
928#[doc = " },"]
929#[doc = " {"]
930#[doc = " \"type\": \"object\","]
931#[doc = " \"required\": ["]
932#[doc = " \"Transfer\""]
933#[doc = " ],"]
934#[doc = " \"properties\": {"]
935#[doc = " \"Transfer\": {"]
936#[doc = " \"$ref\": \"#/components/schemas/TransferAction\""]
937#[doc = " }"]
938#[doc = " },"]
939#[doc = " \"additionalProperties\": false"]
940#[doc = " },"]
941#[doc = " {"]
942#[doc = " \"type\": \"object\","]
943#[doc = " \"required\": ["]
944#[doc = " \"Stake\""]
945#[doc = " ],"]
946#[doc = " \"properties\": {"]
947#[doc = " \"Stake\": {"]
948#[doc = " \"$ref\": \"#/components/schemas/StakeAction\""]
949#[doc = " }"]
950#[doc = " },"]
951#[doc = " \"additionalProperties\": false"]
952#[doc = " },"]
953#[doc = " {"]
954#[doc = " \"type\": \"object\","]
955#[doc = " \"required\": ["]
956#[doc = " \"AddKey\""]
957#[doc = " ],"]
958#[doc = " \"properties\": {"]
959#[doc = " \"AddKey\": {"]
960#[doc = " \"$ref\": \"#/components/schemas/AddKeyAction\""]
961#[doc = " }"]
962#[doc = " },"]
963#[doc = " \"additionalProperties\": false"]
964#[doc = " },"]
965#[doc = " {"]
966#[doc = " \"type\": \"object\","]
967#[doc = " \"required\": ["]
968#[doc = " \"DeleteKey\""]
969#[doc = " ],"]
970#[doc = " \"properties\": {"]
971#[doc = " \"DeleteKey\": {"]
972#[doc = " \"$ref\": \"#/components/schemas/DeleteKeyAction\""]
973#[doc = " }"]
974#[doc = " },"]
975#[doc = " \"additionalProperties\": false"]
976#[doc = " },"]
977#[doc = " {"]
978#[doc = " \"type\": \"object\","]
979#[doc = " \"required\": ["]
980#[doc = " \"DeleteAccount\""]
981#[doc = " ],"]
982#[doc = " \"properties\": {"]
983#[doc = " \"DeleteAccount\": {"]
984#[doc = " \"$ref\": \"#/components/schemas/DeleteAccountAction\""]
985#[doc = " }"]
986#[doc = " },"]
987#[doc = " \"additionalProperties\": false"]
988#[doc = " },"]
989#[doc = " {"]
990#[doc = " \"type\": \"object\","]
991#[doc = " \"required\": ["]
992#[doc = " \"Delegate\""]
993#[doc = " ],"]
994#[doc = " \"properties\": {"]
995#[doc = " \"Delegate\": {"]
996#[doc = " \"$ref\": \"#/components/schemas/SignedDelegateAction\""]
997#[doc = " }"]
998#[doc = " },"]
999#[doc = " \"additionalProperties\": false"]
1000#[doc = " },"]
1001#[doc = " {"]
1002#[doc = " \"type\": \"object\","]
1003#[doc = " \"required\": ["]
1004#[doc = " \"DeployGlobalContract\""]
1005#[doc = " ],"]
1006#[doc = " \"properties\": {"]
1007#[doc = " \"DeployGlobalContract\": {"]
1008#[doc = " \"$ref\": \"#/components/schemas/DeployGlobalContractAction\""]
1009#[doc = " }"]
1010#[doc = " },"]
1011#[doc = " \"additionalProperties\": false"]
1012#[doc = " },"]
1013#[doc = " {"]
1014#[doc = " \"type\": \"object\","]
1015#[doc = " \"required\": ["]
1016#[doc = " \"UseGlobalContract\""]
1017#[doc = " ],"]
1018#[doc = " \"properties\": {"]
1019#[doc = " \"UseGlobalContract\": {"]
1020#[doc = " \"$ref\": \"#/components/schemas/UseGlobalContractAction\""]
1021#[doc = " }"]
1022#[doc = " },"]
1023#[doc = " \"additionalProperties\": false"]
1024#[doc = " }"]
1025#[doc = " ]"]
1026#[doc = "}"]
1027#[doc = r" ```"]
1028#[doc = r" </details>"]
1029#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1030pub enum Action {
1031 #[doc = "Create an (sub)account using a transaction `receiver_id` as an ID for\na new account ID must pass validation rules described here\n<http://nomicon.io/Primitives/Account.html>."]
1032 CreateAccount(CreateAccountAction),
1033 #[doc = "Sets a Wasm code to a receiver_id"]
1034 DeployContract(DeployContractAction),
1035 FunctionCall(FunctionCallAction),
1036 Transfer(TransferAction),
1037 Stake(StakeAction),
1038 AddKey(AddKeyAction),
1039 DeleteKey(DeleteKeyAction),
1040 DeleteAccount(DeleteAccountAction),
1041 Delegate(SignedDelegateAction),
1042 DeployGlobalContract(DeployGlobalContractAction),
1043 UseGlobalContract(UseGlobalContractAction),
1044}
1045impl ::std::convert::From<&Self> for Action {
1046 fn from(value: &Action) -> Self {
1047 value.clone()
1048 }
1049}
1050impl ::std::convert::From<CreateAccountAction> for Action {
1051 fn from(value: CreateAccountAction) -> Self {
1052 Self::CreateAccount(value)
1053 }
1054}
1055impl ::std::convert::From<DeployContractAction> for Action {
1056 fn from(value: DeployContractAction) -> Self {
1057 Self::DeployContract(value)
1058 }
1059}
1060impl ::std::convert::From<FunctionCallAction> for Action {
1061 fn from(value: FunctionCallAction) -> Self {
1062 Self::FunctionCall(value)
1063 }
1064}
1065impl ::std::convert::From<TransferAction> for Action {
1066 fn from(value: TransferAction) -> Self {
1067 Self::Transfer(value)
1068 }
1069}
1070impl ::std::convert::From<StakeAction> for Action {
1071 fn from(value: StakeAction) -> Self {
1072 Self::Stake(value)
1073 }
1074}
1075impl ::std::convert::From<AddKeyAction> for Action {
1076 fn from(value: AddKeyAction) -> Self {
1077 Self::AddKey(value)
1078 }
1079}
1080impl ::std::convert::From<DeleteKeyAction> for Action {
1081 fn from(value: DeleteKeyAction) -> Self {
1082 Self::DeleteKey(value)
1083 }
1084}
1085impl ::std::convert::From<DeleteAccountAction> for Action {
1086 fn from(value: DeleteAccountAction) -> Self {
1087 Self::DeleteAccount(value)
1088 }
1089}
1090impl ::std::convert::From<SignedDelegateAction> for Action {
1091 fn from(value: SignedDelegateAction) -> Self {
1092 Self::Delegate(value)
1093 }
1094}
1095impl ::std::convert::From<DeployGlobalContractAction> for Action {
1096 fn from(value: DeployGlobalContractAction) -> Self {
1097 Self::DeployGlobalContract(value)
1098 }
1099}
1100impl ::std::convert::From<UseGlobalContractAction> for Action {
1101 fn from(value: UseGlobalContractAction) -> Self {
1102 Self::UseGlobalContract(value)
1103 }
1104}
1105#[doc = "Describes the cost of creating a specific action, `Action`. Includes all variants."]
1106#[doc = r""]
1107#[doc = r" <details><summary>JSON schema</summary>"]
1108#[doc = r""]
1109#[doc = r" ```json"]
1110#[doc = "{"]
1111#[doc = " \"description\": \"Describes the cost of creating a specific action, `Action`. Includes all variants.\","]
1112#[doc = " \"type\": \"object\","]
1113#[doc = " \"required\": ["]
1114#[doc = " \"add_key_cost\","]
1115#[doc = " \"create_account_cost\","]
1116#[doc = " \"delegate_cost\","]
1117#[doc = " \"delete_account_cost\","]
1118#[doc = " \"delete_key_cost\","]
1119#[doc = " \"deploy_contract_cost\","]
1120#[doc = " \"deploy_contract_cost_per_byte\","]
1121#[doc = " \"function_call_cost\","]
1122#[doc = " \"function_call_cost_per_byte\","]
1123#[doc = " \"stake_cost\","]
1124#[doc = " \"transfer_cost\""]
1125#[doc = " ],"]
1126#[doc = " \"properties\": {"]
1127#[doc = " \"add_key_cost\": {"]
1128#[doc = " \"description\": \"Base cost of adding a key.\","]
1129#[doc = " \"allOf\": ["]
1130#[doc = " {"]
1131#[doc = " \"$ref\": \"#/components/schemas/AccessKeyCreationConfigView\""]
1132#[doc = " }"]
1133#[doc = " ]"]
1134#[doc = " },"]
1135#[doc = " \"create_account_cost\": {"]
1136#[doc = " \"description\": \"Base cost of creating an account.\","]
1137#[doc = " \"allOf\": ["]
1138#[doc = " {"]
1139#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1140#[doc = " }"]
1141#[doc = " ]"]
1142#[doc = " },"]
1143#[doc = " \"delegate_cost\": {"]
1144#[doc = " \"description\": \"Base cost for processing a delegate action.\\n\\nThis is on top of the costs for the actions inside the delegate action.\","]
1145#[doc = " \"allOf\": ["]
1146#[doc = " {"]
1147#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1148#[doc = " }"]
1149#[doc = " ]"]
1150#[doc = " },"]
1151#[doc = " \"delete_account_cost\": {"]
1152#[doc = " \"description\": \"Base cost of deleting an account.\","]
1153#[doc = " \"allOf\": ["]
1154#[doc = " {"]
1155#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1156#[doc = " }"]
1157#[doc = " ]"]
1158#[doc = " },"]
1159#[doc = " \"delete_key_cost\": {"]
1160#[doc = " \"description\": \"Base cost of deleting a key.\","]
1161#[doc = " \"allOf\": ["]
1162#[doc = " {"]
1163#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1164#[doc = " }"]
1165#[doc = " ]"]
1166#[doc = " },"]
1167#[doc = " \"deploy_contract_cost\": {"]
1168#[doc = " \"description\": \"Base cost of deploying a contract.\","]
1169#[doc = " \"allOf\": ["]
1170#[doc = " {"]
1171#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1172#[doc = " }"]
1173#[doc = " ]"]
1174#[doc = " },"]
1175#[doc = " \"deploy_contract_cost_per_byte\": {"]
1176#[doc = " \"description\": \"Cost per byte of deploying a contract.\","]
1177#[doc = " \"allOf\": ["]
1178#[doc = " {"]
1179#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1180#[doc = " }"]
1181#[doc = " ]"]
1182#[doc = " },"]
1183#[doc = " \"function_call_cost\": {"]
1184#[doc = " \"description\": \"Base cost of calling a function.\","]
1185#[doc = " \"allOf\": ["]
1186#[doc = " {"]
1187#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1188#[doc = " }"]
1189#[doc = " ]"]
1190#[doc = " },"]
1191#[doc = " \"function_call_cost_per_byte\": {"]
1192#[doc = " \"description\": \"Cost per byte of method name and arguments of calling a function.\","]
1193#[doc = " \"allOf\": ["]
1194#[doc = " {"]
1195#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1196#[doc = " }"]
1197#[doc = " ]"]
1198#[doc = " },"]
1199#[doc = " \"stake_cost\": {"]
1200#[doc = " \"description\": \"Base cost of staking.\","]
1201#[doc = " \"allOf\": ["]
1202#[doc = " {"]
1203#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1204#[doc = " }"]
1205#[doc = " ]"]
1206#[doc = " },"]
1207#[doc = " \"transfer_cost\": {"]
1208#[doc = " \"description\": \"Base cost of making a transfer.\","]
1209#[doc = " \"allOf\": ["]
1210#[doc = " {"]
1211#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
1212#[doc = " }"]
1213#[doc = " ]"]
1214#[doc = " }"]
1215#[doc = " }"]
1216#[doc = "}"]
1217#[doc = r" ```"]
1218#[doc = r" </details>"]
1219#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1220pub struct ActionCreationConfigView {
1221 #[doc = "Base cost of adding a key."]
1222 pub add_key_cost: AccessKeyCreationConfigView,
1223 #[doc = "Base cost of creating an account."]
1224 pub create_account_cost: Fee,
1225 #[doc = "Base cost for processing a delegate action.\n\nThis is on top of the costs for the actions inside the delegate action."]
1226 pub delegate_cost: Fee,
1227 #[doc = "Base cost of deleting an account."]
1228 pub delete_account_cost: Fee,
1229 #[doc = "Base cost of deleting a key."]
1230 pub delete_key_cost: Fee,
1231 #[doc = "Base cost of deploying a contract."]
1232 pub deploy_contract_cost: Fee,
1233 #[doc = "Cost per byte of deploying a contract."]
1234 pub deploy_contract_cost_per_byte: Fee,
1235 #[doc = "Base cost of calling a function."]
1236 pub function_call_cost: Fee,
1237 #[doc = "Cost per byte of method name and arguments of calling a function."]
1238 pub function_call_cost_per_byte: Fee,
1239 #[doc = "Base cost of staking."]
1240 pub stake_cost: Fee,
1241 #[doc = "Base cost of making a transfer."]
1242 pub transfer_cost: Fee,
1243}
1244impl ::std::convert::From<&ActionCreationConfigView> for ActionCreationConfigView {
1245 fn from(value: &ActionCreationConfigView) -> Self {
1246 value.clone()
1247 }
1248}
1249#[doc = "An error happened during Action execution"]
1250#[doc = r""]
1251#[doc = r" <details><summary>JSON schema</summary>"]
1252#[doc = r""]
1253#[doc = r" ```json"]
1254#[doc = "{"]
1255#[doc = " \"description\": \"An error happened during Action execution\","]
1256#[doc = " \"type\": \"object\","]
1257#[doc = " \"required\": ["]
1258#[doc = " \"kind\""]
1259#[doc = " ],"]
1260#[doc = " \"properties\": {"]
1261#[doc = " \"index\": {"]
1262#[doc = " \"description\": \"Index of the failed action in the transaction.\\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`\","]
1263#[doc = " \"type\": ["]
1264#[doc = " \"integer\","]
1265#[doc = " \"null\""]
1266#[doc = " ],"]
1267#[doc = " \"format\": \"uint64\","]
1268#[doc = " \"minimum\": 0.0"]
1269#[doc = " },"]
1270#[doc = " \"kind\": {"]
1271#[doc = " \"description\": \"The kind of ActionError happened\","]
1272#[doc = " \"allOf\": ["]
1273#[doc = " {"]
1274#[doc = " \"$ref\": \"#/components/schemas/ActionErrorKind\""]
1275#[doc = " }"]
1276#[doc = " ]"]
1277#[doc = " }"]
1278#[doc = " }"]
1279#[doc = "}"]
1280#[doc = r" ```"]
1281#[doc = r" </details>"]
1282#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1283pub struct ActionError {
1284 #[doc = "Index of the failed action in the transaction.\nAction index is not defined if ActionError.kind is `ActionErrorKind::LackBalanceForState`"]
1285 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1286 pub index: ::std::option::Option<u64>,
1287 #[doc = "The kind of ActionError happened"]
1288 pub kind: ActionErrorKind,
1289}
1290impl ::std::convert::From<&ActionError> for ActionError {
1291 fn from(value: &ActionError) -> Self {
1292 value.clone()
1293 }
1294}
1295#[doc = "`ActionErrorKind`"]
1296#[doc = r""]
1297#[doc = r" <details><summary>JSON schema</summary>"]
1298#[doc = r""]
1299#[doc = r" ```json"]
1300#[doc = "{"]
1301#[doc = " \"oneOf\": ["]
1302#[doc = " {"]
1303#[doc = " \"description\": \"Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage\","]
1304#[doc = " \"type\": \"object\","]
1305#[doc = " \"required\": ["]
1306#[doc = " \"AccountAlreadyExists\""]
1307#[doc = " ],"]
1308#[doc = " \"properties\": {"]
1309#[doc = " \"AccountAlreadyExists\": {"]
1310#[doc = " \"type\": \"object\","]
1311#[doc = " \"required\": ["]
1312#[doc = " \"account_id\""]
1313#[doc = " ],"]
1314#[doc = " \"properties\": {"]
1315#[doc = " \"account_id\": {"]
1316#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1317#[doc = " }"]
1318#[doc = " }"]
1319#[doc = " }"]
1320#[doc = " },"]
1321#[doc = " \"additionalProperties\": false"]
1322#[doc = " },"]
1323#[doc = " {"]
1324#[doc = " \"description\": \"Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)\","]
1325#[doc = " \"type\": \"object\","]
1326#[doc = " \"required\": ["]
1327#[doc = " \"AccountDoesNotExist\""]
1328#[doc = " ],"]
1329#[doc = " \"properties\": {"]
1330#[doc = " \"AccountDoesNotExist\": {"]
1331#[doc = " \"type\": \"object\","]
1332#[doc = " \"required\": ["]
1333#[doc = " \"account_id\""]
1334#[doc = " ],"]
1335#[doc = " \"properties\": {"]
1336#[doc = " \"account_id\": {"]
1337#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1338#[doc = " }"]
1339#[doc = " }"]
1340#[doc = " }"]
1341#[doc = " },"]
1342#[doc = " \"additionalProperties\": false"]
1343#[doc = " },"]
1344#[doc = " {"]
1345#[doc = " \"description\": \"A top-level account ID can only be created by registrar.\","]
1346#[doc = " \"type\": \"object\","]
1347#[doc = " \"required\": ["]
1348#[doc = " \"CreateAccountOnlyByRegistrar\""]
1349#[doc = " ],"]
1350#[doc = " \"properties\": {"]
1351#[doc = " \"CreateAccountOnlyByRegistrar\": {"]
1352#[doc = " \"type\": \"object\","]
1353#[doc = " \"required\": ["]
1354#[doc = " \"account_id\","]
1355#[doc = " \"predecessor_id\","]
1356#[doc = " \"registrar_account_id\""]
1357#[doc = " ],"]
1358#[doc = " \"properties\": {"]
1359#[doc = " \"account_id\": {"]
1360#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1361#[doc = " },"]
1362#[doc = " \"predecessor_id\": {"]
1363#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1364#[doc = " },"]
1365#[doc = " \"registrar_account_id\": {"]
1366#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1367#[doc = " }"]
1368#[doc = " }"]
1369#[doc = " }"]
1370#[doc = " },"]
1371#[doc = " \"additionalProperties\": false"]
1372#[doc = " },"]
1373#[doc = " {"]
1374#[doc = " \"description\": \"A newly created account must be under a namespace of the creator account\","]
1375#[doc = " \"type\": \"object\","]
1376#[doc = " \"required\": ["]
1377#[doc = " \"CreateAccountNotAllowed\""]
1378#[doc = " ],"]
1379#[doc = " \"properties\": {"]
1380#[doc = " \"CreateAccountNotAllowed\": {"]
1381#[doc = " \"type\": \"object\","]
1382#[doc = " \"required\": ["]
1383#[doc = " \"account_id\","]
1384#[doc = " \"predecessor_id\""]
1385#[doc = " ],"]
1386#[doc = " \"properties\": {"]
1387#[doc = " \"account_id\": {"]
1388#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1389#[doc = " },"]
1390#[doc = " \"predecessor_id\": {"]
1391#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1392#[doc = " }"]
1393#[doc = " }"]
1394#[doc = " }"]
1395#[doc = " },"]
1396#[doc = " \"additionalProperties\": false"]
1397#[doc = " },"]
1398#[doc = " {"]
1399#[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\","]
1400#[doc = " \"type\": \"object\","]
1401#[doc = " \"required\": ["]
1402#[doc = " \"ActorNoPermission\""]
1403#[doc = " ],"]
1404#[doc = " \"properties\": {"]
1405#[doc = " \"ActorNoPermission\": {"]
1406#[doc = " \"type\": \"object\","]
1407#[doc = " \"required\": ["]
1408#[doc = " \"account_id\","]
1409#[doc = " \"actor_id\""]
1410#[doc = " ],"]
1411#[doc = " \"properties\": {"]
1412#[doc = " \"account_id\": {"]
1413#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1414#[doc = " },"]
1415#[doc = " \"actor_id\": {"]
1416#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1417#[doc = " }"]
1418#[doc = " }"]
1419#[doc = " }"]
1420#[doc = " },"]
1421#[doc = " \"additionalProperties\": false"]
1422#[doc = " },"]
1423#[doc = " {"]
1424#[doc = " \"description\": \"Account tries to remove an access key that doesn't exist\","]
1425#[doc = " \"type\": \"object\","]
1426#[doc = " \"required\": ["]
1427#[doc = " \"DeleteKeyDoesNotExist\""]
1428#[doc = " ],"]
1429#[doc = " \"properties\": {"]
1430#[doc = " \"DeleteKeyDoesNotExist\": {"]
1431#[doc = " \"type\": \"object\","]
1432#[doc = " \"required\": ["]
1433#[doc = " \"account_id\","]
1434#[doc = " \"public_key\""]
1435#[doc = " ],"]
1436#[doc = " \"properties\": {"]
1437#[doc = " \"account_id\": {"]
1438#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1439#[doc = " },"]
1440#[doc = " \"public_key\": {"]
1441#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1442#[doc = " }"]
1443#[doc = " }"]
1444#[doc = " }"]
1445#[doc = " },"]
1446#[doc = " \"additionalProperties\": false"]
1447#[doc = " },"]
1448#[doc = " {"]
1449#[doc = " \"description\": \"The public key is already used for an existing access key\","]
1450#[doc = " \"type\": \"object\","]
1451#[doc = " \"required\": ["]
1452#[doc = " \"AddKeyAlreadyExists\""]
1453#[doc = " ],"]
1454#[doc = " \"properties\": {"]
1455#[doc = " \"AddKeyAlreadyExists\": {"]
1456#[doc = " \"type\": \"object\","]
1457#[doc = " \"required\": ["]
1458#[doc = " \"account_id\","]
1459#[doc = " \"public_key\""]
1460#[doc = " ],"]
1461#[doc = " \"properties\": {"]
1462#[doc = " \"account_id\": {"]
1463#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1464#[doc = " },"]
1465#[doc = " \"public_key\": {"]
1466#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
1467#[doc = " }"]
1468#[doc = " }"]
1469#[doc = " }"]
1470#[doc = " },"]
1471#[doc = " \"additionalProperties\": false"]
1472#[doc = " },"]
1473#[doc = " {"]
1474#[doc = " \"description\": \"Account is staking and can not be deleted\","]
1475#[doc = " \"type\": \"object\","]
1476#[doc = " \"required\": ["]
1477#[doc = " \"DeleteAccountStaking\""]
1478#[doc = " ],"]
1479#[doc = " \"properties\": {"]
1480#[doc = " \"DeleteAccountStaking\": {"]
1481#[doc = " \"type\": \"object\","]
1482#[doc = " \"required\": ["]
1483#[doc = " \"account_id\""]
1484#[doc = " ],"]
1485#[doc = " \"properties\": {"]
1486#[doc = " \"account_id\": {"]
1487#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1488#[doc = " }"]
1489#[doc = " }"]
1490#[doc = " }"]
1491#[doc = " },"]
1492#[doc = " \"additionalProperties\": false"]
1493#[doc = " },"]
1494#[doc = " {"]
1495#[doc = " \"description\": \"ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage.\","]
1496#[doc = " \"type\": \"object\","]
1497#[doc = " \"required\": ["]
1498#[doc = " \"LackBalanceForState\""]
1499#[doc = " ],"]
1500#[doc = " \"properties\": {"]
1501#[doc = " \"LackBalanceForState\": {"]
1502#[doc = " \"type\": \"object\","]
1503#[doc = " \"required\": ["]
1504#[doc = " \"account_id\","]
1505#[doc = " \"amount\""]
1506#[doc = " ],"]
1507#[doc = " \"properties\": {"]
1508#[doc = " \"account_id\": {"]
1509#[doc = " \"description\": \"An account which needs balance\","]
1510#[doc = " \"allOf\": ["]
1511#[doc = " {"]
1512#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1513#[doc = " }"]
1514#[doc = " ]"]
1515#[doc = " },"]
1516#[doc = " \"amount\": {"]
1517#[doc = " \"description\": \"Balance required to complete an action.\","]
1518#[doc = " \"type\": \"string\""]
1519#[doc = " }"]
1520#[doc = " }"]
1521#[doc = " }"]
1522#[doc = " },"]
1523#[doc = " \"additionalProperties\": false"]
1524#[doc = " },"]
1525#[doc = " {"]
1526#[doc = " \"description\": \"Account is not yet staked, but tries to unstake\","]
1527#[doc = " \"type\": \"object\","]
1528#[doc = " \"required\": ["]
1529#[doc = " \"TriesToUnstake\""]
1530#[doc = " ],"]
1531#[doc = " \"properties\": {"]
1532#[doc = " \"TriesToUnstake\": {"]
1533#[doc = " \"type\": \"object\","]
1534#[doc = " \"required\": ["]
1535#[doc = " \"account_id\""]
1536#[doc = " ],"]
1537#[doc = " \"properties\": {"]
1538#[doc = " \"account_id\": {"]
1539#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1540#[doc = " }"]
1541#[doc = " }"]
1542#[doc = " }"]
1543#[doc = " },"]
1544#[doc = " \"additionalProperties\": false"]
1545#[doc = " },"]
1546#[doc = " {"]
1547#[doc = " \"description\": \"The account doesn't have enough balance to increase the stake.\","]
1548#[doc = " \"type\": \"object\","]
1549#[doc = " \"required\": ["]
1550#[doc = " \"TriesToStake\""]
1551#[doc = " ],"]
1552#[doc = " \"properties\": {"]
1553#[doc = " \"TriesToStake\": {"]
1554#[doc = " \"type\": \"object\","]
1555#[doc = " \"required\": ["]
1556#[doc = " \"account_id\","]
1557#[doc = " \"balance\","]
1558#[doc = " \"locked\","]
1559#[doc = " \"stake\""]
1560#[doc = " ],"]
1561#[doc = " \"properties\": {"]
1562#[doc = " \"account_id\": {"]
1563#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1564#[doc = " },"]
1565#[doc = " \"balance\": {"]
1566#[doc = " \"type\": \"string\""]
1567#[doc = " },"]
1568#[doc = " \"locked\": {"]
1569#[doc = " \"type\": \"string\""]
1570#[doc = " },"]
1571#[doc = " \"stake\": {"]
1572#[doc = " \"type\": \"string\""]
1573#[doc = " }"]
1574#[doc = " }"]
1575#[doc = " }"]
1576#[doc = " },"]
1577#[doc = " \"additionalProperties\": false"]
1578#[doc = " },"]
1579#[doc = " {"]
1580#[doc = " \"type\": \"object\","]
1581#[doc = " \"required\": ["]
1582#[doc = " \"InsufficientStake\""]
1583#[doc = " ],"]
1584#[doc = " \"properties\": {"]
1585#[doc = " \"InsufficientStake\": {"]
1586#[doc = " \"type\": \"object\","]
1587#[doc = " \"required\": ["]
1588#[doc = " \"account_id\","]
1589#[doc = " \"minimum_stake\","]
1590#[doc = " \"stake\""]
1591#[doc = " ],"]
1592#[doc = " \"properties\": {"]
1593#[doc = " \"account_id\": {"]
1594#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1595#[doc = " },"]
1596#[doc = " \"minimum_stake\": {"]
1597#[doc = " \"type\": \"string\""]
1598#[doc = " },"]
1599#[doc = " \"stake\": {"]
1600#[doc = " \"type\": \"string\""]
1601#[doc = " }"]
1602#[doc = " }"]
1603#[doc = " }"]
1604#[doc = " },"]
1605#[doc = " \"additionalProperties\": false"]
1606#[doc = " },"]
1607#[doc = " {"]
1608#[doc = " \"description\": \"An error occurred during a `FunctionCall` Action, parameter is debug message.\","]
1609#[doc = " \"type\": \"object\","]
1610#[doc = " \"required\": ["]
1611#[doc = " \"FunctionCallError\""]
1612#[doc = " ],"]
1613#[doc = " \"properties\": {"]
1614#[doc = " \"FunctionCallError\": {"]
1615#[doc = " \"$ref\": \"#/components/schemas/FunctionCallError\""]
1616#[doc = " }"]
1617#[doc = " },"]
1618#[doc = " \"additionalProperties\": false"]
1619#[doc = " },"]
1620#[doc = " {"]
1621#[doc = " \"description\": \"Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\\nreceipt validation.\","]
1622#[doc = " \"type\": \"object\","]
1623#[doc = " \"required\": ["]
1624#[doc = " \"NewReceiptValidationError\""]
1625#[doc = " ],"]
1626#[doc = " \"properties\": {"]
1627#[doc = " \"NewReceiptValidationError\": {"]
1628#[doc = " \"$ref\": \"#/components/schemas/ReceiptValidationError\""]
1629#[doc = " }"]
1630#[doc = " },"]
1631#[doc = " \"additionalProperties\": false"]
1632#[doc = " },"]
1633#[doc = " {"]
1634#[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`.\","]
1635#[doc = " \"type\": \"object\","]
1636#[doc = " \"required\": ["]
1637#[doc = " \"OnlyImplicitAccountCreationAllowed\""]
1638#[doc = " ],"]
1639#[doc = " \"properties\": {"]
1640#[doc = " \"OnlyImplicitAccountCreationAllowed\": {"]
1641#[doc = " \"type\": \"object\","]
1642#[doc = " \"required\": ["]
1643#[doc = " \"account_id\""]
1644#[doc = " ],"]
1645#[doc = " \"properties\": {"]
1646#[doc = " \"account_id\": {"]
1647#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1648#[doc = " }"]
1649#[doc = " }"]
1650#[doc = " }"]
1651#[doc = " },"]
1652#[doc = " \"additionalProperties\": false"]
1653#[doc = " },"]
1654#[doc = " {"]
1655#[doc = " \"description\": \"Delete account whose state is large is temporarily banned.\","]
1656#[doc = " \"type\": \"object\","]
1657#[doc = " \"required\": ["]
1658#[doc = " \"DeleteAccountWithLargeState\""]
1659#[doc = " ],"]
1660#[doc = " \"properties\": {"]
1661#[doc = " \"DeleteAccountWithLargeState\": {"]
1662#[doc = " \"type\": \"object\","]
1663#[doc = " \"required\": ["]
1664#[doc = " \"account_id\""]
1665#[doc = " ],"]
1666#[doc = " \"properties\": {"]
1667#[doc = " \"account_id\": {"]
1668#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1669#[doc = " }"]
1670#[doc = " }"]
1671#[doc = " }"]
1672#[doc = " },"]
1673#[doc = " \"additionalProperties\": false"]
1674#[doc = " },"]
1675#[doc = " {"]
1676#[doc = " \"description\": \"Signature does not match the provided actions and given signer public key.\","]
1677#[doc = " \"type\": \"string\","]
1678#[doc = " \"enum\": ["]
1679#[doc = " \"DelegateActionInvalidSignature\""]
1680#[doc = " ]"]
1681#[doc = " },"]
1682#[doc = " {"]
1683#[doc = " \"description\": \"Receiver of the transaction doesn't match Sender of the delegate action\","]
1684#[doc = " \"type\": \"object\","]
1685#[doc = " \"required\": ["]
1686#[doc = " \"DelegateActionSenderDoesNotMatchTxReceiver\""]
1687#[doc = " ],"]
1688#[doc = " \"properties\": {"]
1689#[doc = " \"DelegateActionSenderDoesNotMatchTxReceiver\": {"]
1690#[doc = " \"type\": \"object\","]
1691#[doc = " \"required\": ["]
1692#[doc = " \"receiver_id\","]
1693#[doc = " \"sender_id\""]
1694#[doc = " ],"]
1695#[doc = " \"properties\": {"]
1696#[doc = " \"receiver_id\": {"]
1697#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1698#[doc = " },"]
1699#[doc = " \"sender_id\": {"]
1700#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
1701#[doc = " }"]
1702#[doc = " }"]
1703#[doc = " }"]
1704#[doc = " },"]
1705#[doc = " \"additionalProperties\": false"]
1706#[doc = " },"]
1707#[doc = " {"]
1708#[doc = " \"description\": \"Delegate action has expired. `max_block_height` is less than actual block height.\","]
1709#[doc = " \"type\": \"string\","]
1710#[doc = " \"enum\": ["]
1711#[doc = " \"DelegateActionExpired\""]
1712#[doc = " ]"]
1713#[doc = " },"]
1714#[doc = " {"]
1715#[doc = " \"description\": \"The given public key doesn't exist for Sender account\","]
1716#[doc = " \"type\": \"object\","]
1717#[doc = " \"required\": ["]
1718#[doc = " \"DelegateActionAccessKeyError\""]
1719#[doc = " ],"]
1720#[doc = " \"properties\": {"]
1721#[doc = " \"DelegateActionAccessKeyError\": {"]
1722#[doc = " \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
1723#[doc = " }"]
1724#[doc = " },"]
1725#[doc = " \"additionalProperties\": false"]
1726#[doc = " },"]
1727#[doc = " {"]
1728#[doc = " \"description\": \"DelegateAction nonce must be greater sender[public_key].nonce\","]
1729#[doc = " \"type\": \"object\","]
1730#[doc = " \"required\": ["]
1731#[doc = " \"DelegateActionInvalidNonce\""]
1732#[doc = " ],"]
1733#[doc = " \"properties\": {"]
1734#[doc = " \"DelegateActionInvalidNonce\": {"]
1735#[doc = " \"type\": \"object\","]
1736#[doc = " \"required\": ["]
1737#[doc = " \"ak_nonce\","]
1738#[doc = " \"delegate_nonce\""]
1739#[doc = " ],"]
1740#[doc = " \"properties\": {"]
1741#[doc = " \"ak_nonce\": {"]
1742#[doc = " \"type\": \"integer\","]
1743#[doc = " \"format\": \"uint64\","]
1744#[doc = " \"minimum\": 0.0"]
1745#[doc = " },"]
1746#[doc = " \"delegate_nonce\": {"]
1747#[doc = " \"type\": \"integer\","]
1748#[doc = " \"format\": \"uint64\","]
1749#[doc = " \"minimum\": 0.0"]
1750#[doc = " }"]
1751#[doc = " }"]
1752#[doc = " }"]
1753#[doc = " },"]
1754#[doc = " \"additionalProperties\": false"]
1755#[doc = " },"]
1756#[doc = " {"]
1757#[doc = " \"description\": \"DelegateAction nonce is larger than the upper bound given by the block height\","]
1758#[doc = " \"type\": \"object\","]
1759#[doc = " \"required\": ["]
1760#[doc = " \"DelegateActionNonceTooLarge\""]
1761#[doc = " ],"]
1762#[doc = " \"properties\": {"]
1763#[doc = " \"DelegateActionNonceTooLarge\": {"]
1764#[doc = " \"type\": \"object\","]
1765#[doc = " \"required\": ["]
1766#[doc = " \"delegate_nonce\","]
1767#[doc = " \"upper_bound\""]
1768#[doc = " ],"]
1769#[doc = " \"properties\": {"]
1770#[doc = " \"delegate_nonce\": {"]
1771#[doc = " \"type\": \"integer\","]
1772#[doc = " \"format\": \"uint64\","]
1773#[doc = " \"minimum\": 0.0"]
1774#[doc = " },"]
1775#[doc = " \"upper_bound\": {"]
1776#[doc = " \"type\": \"integer\","]
1777#[doc = " \"format\": \"uint64\","]
1778#[doc = " \"minimum\": 0.0"]
1779#[doc = " }"]
1780#[doc = " }"]
1781#[doc = " }"]
1782#[doc = " },"]
1783#[doc = " \"additionalProperties\": false"]
1784#[doc = " },"]
1785#[doc = " {"]
1786#[doc = " \"type\": \"object\","]
1787#[doc = " \"required\": ["]
1788#[doc = " \"GlobalContractDoesNotExist\""]
1789#[doc = " ],"]
1790#[doc = " \"properties\": {"]
1791#[doc = " \"GlobalContractDoesNotExist\": {"]
1792#[doc = " \"type\": \"object\","]
1793#[doc = " \"required\": ["]
1794#[doc = " \"identifier\""]
1795#[doc = " ],"]
1796#[doc = " \"properties\": {"]
1797#[doc = " \"identifier\": {"]
1798#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
1799#[doc = " }"]
1800#[doc = " }"]
1801#[doc = " }"]
1802#[doc = " },"]
1803#[doc = " \"additionalProperties\": false"]
1804#[doc = " }"]
1805#[doc = " ]"]
1806#[doc = "}"]
1807#[doc = r" ```"]
1808#[doc = r" </details>"]
1809#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1810pub enum ActionErrorKind {
1811 #[doc = "Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage"]
1812 AccountAlreadyExists { account_id: AccountId },
1813 #[doc = "Happens when TX receiver_id doesn't exist (but action is not Action::CreateAccount)"]
1814 AccountDoesNotExist { account_id: AccountId },
1815 #[doc = "A top-level account ID can only be created by registrar."]
1816 CreateAccountOnlyByRegistrar {
1817 account_id: AccountId,
1818 predecessor_id: AccountId,
1819 registrar_account_id: AccountId,
1820 },
1821 #[doc = "A newly created account must be under a namespace of the creator account"]
1822 CreateAccountNotAllowed {
1823 account_id: AccountId,
1824 predecessor_id: AccountId,
1825 },
1826 #[doc = "Administrative actions like `DeployContract`, `Stake`, `AddKey`, `DeleteKey`. can be proceed only if sender=receiver\nor the first TX action is a `CreateAccount` action"]
1827 ActorNoPermission {
1828 account_id: AccountId,
1829 actor_id: AccountId,
1830 },
1831 #[doc = "Account tries to remove an access key that doesn't exist"]
1832 DeleteKeyDoesNotExist {
1833 account_id: AccountId,
1834 public_key: PublicKey,
1835 },
1836 #[doc = "The public key is already used for an existing access key"]
1837 AddKeyAlreadyExists {
1838 account_id: AccountId,
1839 public_key: PublicKey,
1840 },
1841 #[doc = "Account is staking and can not be deleted"]
1842 DeleteAccountStaking { account_id: AccountId },
1843 #[doc = "ActionReceipt can't be completed, because the remaining balance will not be enough to cover storage."]
1844 LackBalanceForState {
1845 #[doc = "An account which needs balance"]
1846 account_id: AccountId,
1847 #[doc = "Balance required to complete an action."]
1848 amount: ::std::string::String,
1849 },
1850 #[doc = "Account is not yet staked, but tries to unstake"]
1851 TriesToUnstake { account_id: AccountId },
1852 #[doc = "The account doesn't have enough balance to increase the stake."]
1853 TriesToStake {
1854 account_id: AccountId,
1855 balance: ::std::string::String,
1856 locked: ::std::string::String,
1857 stake: ::std::string::String,
1858 },
1859 InsufficientStake {
1860 account_id: AccountId,
1861 minimum_stake: ::std::string::String,
1862 stake: ::std::string::String,
1863 },
1864 #[doc = "An error occurred during a `FunctionCall` Action, parameter is debug message."]
1865 FunctionCallError(FunctionCallError),
1866 #[doc = "Error occurs when a new `ActionReceipt` created by the `FunctionCall` action fails\nreceipt validation."]
1867 NewReceiptValidationError(ReceiptValidationError),
1868 #[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`."]
1869 OnlyImplicitAccountCreationAllowed { account_id: AccountId },
1870 #[doc = "Delete account whose state is large is temporarily banned."]
1871 DeleteAccountWithLargeState { account_id: AccountId },
1872 #[doc = "Signature does not match the provided actions and given signer public key."]
1873 DelegateActionInvalidSignature,
1874 #[doc = "Receiver of the transaction doesn't match Sender of the delegate action"]
1875 DelegateActionSenderDoesNotMatchTxReceiver {
1876 receiver_id: AccountId,
1877 sender_id: AccountId,
1878 },
1879 #[doc = "Delegate action has expired. `max_block_height` is less than actual block height."]
1880 DelegateActionExpired,
1881 #[doc = "The given public key doesn't exist for Sender account"]
1882 DelegateActionAccessKeyError(InvalidAccessKeyError),
1883 #[doc = "DelegateAction nonce must be greater sender[public_key].nonce"]
1884 DelegateActionInvalidNonce { ak_nonce: u64, delegate_nonce: u64 },
1885 #[doc = "DelegateAction nonce is larger than the upper bound given by the block height"]
1886 DelegateActionNonceTooLarge {
1887 delegate_nonce: u64,
1888 upper_bound: u64,
1889 },
1890 GlobalContractDoesNotExist {
1891 identifier: GlobalContractIdentifier,
1892 },
1893}
1894impl ::std::convert::From<&Self> for ActionErrorKind {
1895 fn from(value: &ActionErrorKind) -> Self {
1896 value.clone()
1897 }
1898}
1899impl ::std::convert::From<FunctionCallError> for ActionErrorKind {
1900 fn from(value: FunctionCallError) -> Self {
1901 Self::FunctionCallError(value)
1902 }
1903}
1904impl ::std::convert::From<ReceiptValidationError> for ActionErrorKind {
1905 fn from(value: ReceiptValidationError) -> Self {
1906 Self::NewReceiptValidationError(value)
1907 }
1908}
1909impl ::std::convert::From<InvalidAccessKeyError> for ActionErrorKind {
1910 fn from(value: InvalidAccessKeyError) -> Self {
1911 Self::DelegateActionAccessKeyError(value)
1912 }
1913}
1914#[doc = "`ActionView`"]
1915#[doc = r""]
1916#[doc = r" <details><summary>JSON schema</summary>"]
1917#[doc = r""]
1918#[doc = r" ```json"]
1919#[doc = "{"]
1920#[doc = " \"oneOf\": ["]
1921#[doc = " {"]
1922#[doc = " \"type\": \"string\","]
1923#[doc = " \"enum\": ["]
1924#[doc = " \"CreateAccount\""]
1925#[doc = " ]"]
1926#[doc = " },"]
1927#[doc = " {"]
1928#[doc = " \"type\": \"object\","]
1929#[doc = " \"required\": ["]
1930#[doc = " \"DeployContract\""]
1931#[doc = " ],"]
1932#[doc = " \"properties\": {"]
1933#[doc = " \"DeployContract\": {"]
1934#[doc = " \"type\": \"object\","]
1935#[doc = " \"required\": ["]
1936#[doc = " \"code\""]
1937#[doc = " ],"]
1938#[doc = " \"properties\": {"]
1939#[doc = " \"code\": {"]
1940#[doc = " \"type\": \"string\","]
1941#[doc = " \"format\": \"bytes\""]
1942#[doc = " }"]
1943#[doc = " }"]
1944#[doc = " }"]
1945#[doc = " },"]
1946#[doc = " \"additionalProperties\": false"]
1947#[doc = " },"]
1948#[doc = " {"]
1949#[doc = " \"type\": \"object\","]
1950#[doc = " \"required\": ["]
1951#[doc = " \"FunctionCall\""]
1952#[doc = " ],"]
1953#[doc = " \"properties\": {"]
1954#[doc = " \"FunctionCall\": {"]
1955#[doc = " \"type\": \"object\","]
1956#[doc = " \"required\": ["]
1957#[doc = " \"args\","]
1958#[doc = " \"deposit\","]
1959#[doc = " \"gas\","]
1960#[doc = " \"method_name\""]
1961#[doc = " ],"]
1962#[doc = " \"properties\": {"]
1963#[doc = " \"args\": {"]
1964#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
1965#[doc = " },"]
1966#[doc = " \"deposit\": {"]
1967#[doc = " \"type\": \"string\""]
1968#[doc = " },"]
1969#[doc = " \"gas\": {"]
1970#[doc = " \"type\": \"integer\","]
1971#[doc = " \"format\": \"uint64\","]
1972#[doc = " \"minimum\": 0.0"]
1973#[doc = " },"]
1974#[doc = " \"method_name\": {"]
1975#[doc = " \"type\": \"string\""]
1976#[doc = " }"]
1977#[doc = " }"]
1978#[doc = " }"]
1979#[doc = " },"]
1980#[doc = " \"additionalProperties\": false"]
1981#[doc = " },"]
1982#[doc = " {"]
1983#[doc = " \"type\": \"object\","]
1984#[doc = " \"required\": ["]
1985#[doc = " \"Transfer\""]
1986#[doc = " ],"]
1987#[doc = " \"properties\": {"]
1988#[doc = " \"Transfer\": {"]
1989#[doc = " \"type\": \"object\","]
1990#[doc = " \"required\": ["]
1991#[doc = " \"deposit\""]
1992#[doc = " ],"]
1993#[doc = " \"properties\": {"]
1994#[doc = " \"deposit\": {"]
1995#[doc = " \"type\": \"string\""]
1996#[doc = " }"]
1997#[doc = " }"]
1998#[doc = " }"]
1999#[doc = " },"]
2000#[doc = " \"additionalProperties\": false"]
2001#[doc = " },"]
2002#[doc = " {"]
2003#[doc = " \"type\": \"object\","]
2004#[doc = " \"required\": ["]
2005#[doc = " \"Stake\""]
2006#[doc = " ],"]
2007#[doc = " \"properties\": {"]
2008#[doc = " \"Stake\": {"]
2009#[doc = " \"type\": \"object\","]
2010#[doc = " \"required\": ["]
2011#[doc = " \"public_key\","]
2012#[doc = " \"stake\""]
2013#[doc = " ],"]
2014#[doc = " \"properties\": {"]
2015#[doc = " \"public_key\": {"]
2016#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2017#[doc = " },"]
2018#[doc = " \"stake\": {"]
2019#[doc = " \"type\": \"string\""]
2020#[doc = " }"]
2021#[doc = " }"]
2022#[doc = " }"]
2023#[doc = " },"]
2024#[doc = " \"additionalProperties\": false"]
2025#[doc = " },"]
2026#[doc = " {"]
2027#[doc = " \"type\": \"object\","]
2028#[doc = " \"required\": ["]
2029#[doc = " \"AddKey\""]
2030#[doc = " ],"]
2031#[doc = " \"properties\": {"]
2032#[doc = " \"AddKey\": {"]
2033#[doc = " \"type\": \"object\","]
2034#[doc = " \"required\": ["]
2035#[doc = " \"access_key\","]
2036#[doc = " \"public_key\""]
2037#[doc = " ],"]
2038#[doc = " \"properties\": {"]
2039#[doc = " \"access_key\": {"]
2040#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
2041#[doc = " },"]
2042#[doc = " \"public_key\": {"]
2043#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2044#[doc = " }"]
2045#[doc = " }"]
2046#[doc = " }"]
2047#[doc = " },"]
2048#[doc = " \"additionalProperties\": false"]
2049#[doc = " },"]
2050#[doc = " {"]
2051#[doc = " \"type\": \"object\","]
2052#[doc = " \"required\": ["]
2053#[doc = " \"DeleteKey\""]
2054#[doc = " ],"]
2055#[doc = " \"properties\": {"]
2056#[doc = " \"DeleteKey\": {"]
2057#[doc = " \"type\": \"object\","]
2058#[doc = " \"required\": ["]
2059#[doc = " \"public_key\""]
2060#[doc = " ],"]
2061#[doc = " \"properties\": {"]
2062#[doc = " \"public_key\": {"]
2063#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2064#[doc = " }"]
2065#[doc = " }"]
2066#[doc = " }"]
2067#[doc = " },"]
2068#[doc = " \"additionalProperties\": false"]
2069#[doc = " },"]
2070#[doc = " {"]
2071#[doc = " \"type\": \"object\","]
2072#[doc = " \"required\": ["]
2073#[doc = " \"DeleteAccount\""]
2074#[doc = " ],"]
2075#[doc = " \"properties\": {"]
2076#[doc = " \"DeleteAccount\": {"]
2077#[doc = " \"type\": \"object\","]
2078#[doc = " \"required\": ["]
2079#[doc = " \"beneficiary_id\""]
2080#[doc = " ],"]
2081#[doc = " \"properties\": {"]
2082#[doc = " \"beneficiary_id\": {"]
2083#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
2084#[doc = " }"]
2085#[doc = " }"]
2086#[doc = " }"]
2087#[doc = " },"]
2088#[doc = " \"additionalProperties\": false"]
2089#[doc = " },"]
2090#[doc = " {"]
2091#[doc = " \"type\": \"object\","]
2092#[doc = " \"required\": ["]
2093#[doc = " \"Delegate\""]
2094#[doc = " ],"]
2095#[doc = " \"properties\": {"]
2096#[doc = " \"Delegate\": {"]
2097#[doc = " \"type\": \"object\","]
2098#[doc = " \"required\": ["]
2099#[doc = " \"delegate_action\","]
2100#[doc = " \"signature\""]
2101#[doc = " ],"]
2102#[doc = " \"properties\": {"]
2103#[doc = " \"delegate_action\": {"]
2104#[doc = " \"$ref\": \"#/components/schemas/DelegateAction\""]
2105#[doc = " },"]
2106#[doc = " \"signature\": {"]
2107#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
2108#[doc = " }"]
2109#[doc = " }"]
2110#[doc = " }"]
2111#[doc = " },"]
2112#[doc = " \"additionalProperties\": false"]
2113#[doc = " },"]
2114#[doc = " {"]
2115#[doc = " \"type\": \"object\","]
2116#[doc = " \"required\": ["]
2117#[doc = " \"DeployGlobalContract\""]
2118#[doc = " ],"]
2119#[doc = " \"properties\": {"]
2120#[doc = " \"DeployGlobalContract\": {"]
2121#[doc = " \"type\": \"object\","]
2122#[doc = " \"required\": ["]
2123#[doc = " \"code\""]
2124#[doc = " ],"]
2125#[doc = " \"properties\": {"]
2126#[doc = " \"code\": {"]
2127#[doc = " \"type\": \"string\","]
2128#[doc = " \"format\": \"bytes\""]
2129#[doc = " }"]
2130#[doc = " }"]
2131#[doc = " }"]
2132#[doc = " },"]
2133#[doc = " \"additionalProperties\": false"]
2134#[doc = " },"]
2135#[doc = " {"]
2136#[doc = " \"type\": \"object\","]
2137#[doc = " \"required\": ["]
2138#[doc = " \"DeployGlobalContractByAccountId\""]
2139#[doc = " ],"]
2140#[doc = " \"properties\": {"]
2141#[doc = " \"DeployGlobalContractByAccountId\": {"]
2142#[doc = " \"type\": \"object\","]
2143#[doc = " \"required\": ["]
2144#[doc = " \"code\""]
2145#[doc = " ],"]
2146#[doc = " \"properties\": {"]
2147#[doc = " \"code\": {"]
2148#[doc = " \"type\": \"string\","]
2149#[doc = " \"format\": \"bytes\""]
2150#[doc = " }"]
2151#[doc = " }"]
2152#[doc = " }"]
2153#[doc = " },"]
2154#[doc = " \"additionalProperties\": false"]
2155#[doc = " },"]
2156#[doc = " {"]
2157#[doc = " \"type\": \"object\","]
2158#[doc = " \"required\": ["]
2159#[doc = " \"UseGlobalContract\""]
2160#[doc = " ],"]
2161#[doc = " \"properties\": {"]
2162#[doc = " \"UseGlobalContract\": {"]
2163#[doc = " \"type\": \"object\","]
2164#[doc = " \"required\": ["]
2165#[doc = " \"code_hash\""]
2166#[doc = " ],"]
2167#[doc = " \"properties\": {"]
2168#[doc = " \"code_hash\": {"]
2169#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
2170#[doc = " }"]
2171#[doc = " }"]
2172#[doc = " }"]
2173#[doc = " },"]
2174#[doc = " \"additionalProperties\": false"]
2175#[doc = " },"]
2176#[doc = " {"]
2177#[doc = " \"type\": \"object\","]
2178#[doc = " \"required\": ["]
2179#[doc = " \"UseGlobalContractByAccountId\""]
2180#[doc = " ],"]
2181#[doc = " \"properties\": {"]
2182#[doc = " \"UseGlobalContractByAccountId\": {"]
2183#[doc = " \"type\": \"object\","]
2184#[doc = " \"required\": ["]
2185#[doc = " \"account_id\""]
2186#[doc = " ],"]
2187#[doc = " \"properties\": {"]
2188#[doc = " \"account_id\": {"]
2189#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
2190#[doc = " }"]
2191#[doc = " }"]
2192#[doc = " }"]
2193#[doc = " },"]
2194#[doc = " \"additionalProperties\": false"]
2195#[doc = " }"]
2196#[doc = " ]"]
2197#[doc = "}"]
2198#[doc = r" ```"]
2199#[doc = r" </details>"]
2200#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2201pub enum ActionView {
2202 CreateAccount,
2203 DeployContract {
2204 code: ::std::string::String,
2205 },
2206 FunctionCall {
2207 args: FunctionArgs,
2208 deposit: ::std::string::String,
2209 gas: u64,
2210 method_name: ::std::string::String,
2211 },
2212 Transfer {
2213 deposit: ::std::string::String,
2214 },
2215 Stake {
2216 public_key: PublicKey,
2217 stake: ::std::string::String,
2218 },
2219 AddKey {
2220 access_key: AccessKeyView,
2221 public_key: PublicKey,
2222 },
2223 DeleteKey {
2224 public_key: PublicKey,
2225 },
2226 DeleteAccount {
2227 beneficiary_id: AccountId,
2228 },
2229 Delegate {
2230 delegate_action: DelegateAction,
2231 signature: Signature,
2232 },
2233 DeployGlobalContract {
2234 code: ::std::string::String,
2235 },
2236 DeployGlobalContractByAccountId {
2237 code: ::std::string::String,
2238 },
2239 UseGlobalContract {
2240 code_hash: CryptoHash,
2241 },
2242 UseGlobalContractByAccountId {
2243 account_id: AccountId,
2244 },
2245}
2246impl ::std::convert::From<&Self> for ActionView {
2247 fn from(value: &ActionView) -> Self {
2248 value.clone()
2249 }
2250}
2251#[doc = "Describes the error for validating a list of actions."]
2252#[doc = r""]
2253#[doc = r" <details><summary>JSON schema</summary>"]
2254#[doc = r""]
2255#[doc = r" ```json"]
2256#[doc = "{"]
2257#[doc = " \"description\": \"Describes the error for validating a list of actions.\","]
2258#[doc = " \"oneOf\": ["]
2259#[doc = " {"]
2260#[doc = " \"description\": \"The delete action must be a final action in transaction\","]
2261#[doc = " \"type\": \"string\","]
2262#[doc = " \"enum\": ["]
2263#[doc = " \"DeleteActionMustBeFinal\""]
2264#[doc = " ]"]
2265#[doc = " },"]
2266#[doc = " {"]
2267#[doc = " \"description\": \"The total prepaid gas (for all given actions) exceeded the limit.\","]
2268#[doc = " \"type\": \"object\","]
2269#[doc = " \"required\": ["]
2270#[doc = " \"TotalPrepaidGasExceeded\""]
2271#[doc = " ],"]
2272#[doc = " \"properties\": {"]
2273#[doc = " \"TotalPrepaidGasExceeded\": {"]
2274#[doc = " \"type\": \"object\","]
2275#[doc = " \"required\": ["]
2276#[doc = " \"limit\","]
2277#[doc = " \"total_prepaid_gas\""]
2278#[doc = " ],"]
2279#[doc = " \"properties\": {"]
2280#[doc = " \"limit\": {"]
2281#[doc = " \"type\": \"integer\","]
2282#[doc = " \"format\": \"uint64\","]
2283#[doc = " \"minimum\": 0.0"]
2284#[doc = " },"]
2285#[doc = " \"total_prepaid_gas\": {"]
2286#[doc = " \"type\": \"integer\","]
2287#[doc = " \"format\": \"uint64\","]
2288#[doc = " \"minimum\": 0.0"]
2289#[doc = " }"]
2290#[doc = " }"]
2291#[doc = " }"]
2292#[doc = " },"]
2293#[doc = " \"additionalProperties\": false"]
2294#[doc = " },"]
2295#[doc = " {"]
2296#[doc = " \"description\": \"The number of actions exceeded the given limit.\","]
2297#[doc = " \"type\": \"object\","]
2298#[doc = " \"required\": ["]
2299#[doc = " \"TotalNumberOfActionsExceeded\""]
2300#[doc = " ],"]
2301#[doc = " \"properties\": {"]
2302#[doc = " \"TotalNumberOfActionsExceeded\": {"]
2303#[doc = " \"type\": \"object\","]
2304#[doc = " \"required\": ["]
2305#[doc = " \"limit\","]
2306#[doc = " \"total_number_of_actions\""]
2307#[doc = " ],"]
2308#[doc = " \"properties\": {"]
2309#[doc = " \"limit\": {"]
2310#[doc = " \"type\": \"integer\","]
2311#[doc = " \"format\": \"uint64\","]
2312#[doc = " \"minimum\": 0.0"]
2313#[doc = " },"]
2314#[doc = " \"total_number_of_actions\": {"]
2315#[doc = " \"type\": \"integer\","]
2316#[doc = " \"format\": \"uint64\","]
2317#[doc = " \"minimum\": 0.0"]
2318#[doc = " }"]
2319#[doc = " }"]
2320#[doc = " }"]
2321#[doc = " },"]
2322#[doc = " \"additionalProperties\": false"]
2323#[doc = " },"]
2324#[doc = " {"]
2325#[doc = " \"description\": \"The total number of bytes of the method names exceeded the limit in a Add Key action.\","]
2326#[doc = " \"type\": \"object\","]
2327#[doc = " \"required\": ["]
2328#[doc = " \"AddKeyMethodNamesNumberOfBytesExceeded\""]
2329#[doc = " ],"]
2330#[doc = " \"properties\": {"]
2331#[doc = " \"AddKeyMethodNamesNumberOfBytesExceeded\": {"]
2332#[doc = " \"type\": \"object\","]
2333#[doc = " \"required\": ["]
2334#[doc = " \"limit\","]
2335#[doc = " \"total_number_of_bytes\""]
2336#[doc = " ],"]
2337#[doc = " \"properties\": {"]
2338#[doc = " \"limit\": {"]
2339#[doc = " \"type\": \"integer\","]
2340#[doc = " \"format\": \"uint64\","]
2341#[doc = " \"minimum\": 0.0"]
2342#[doc = " },"]
2343#[doc = " \"total_number_of_bytes\": {"]
2344#[doc = " \"type\": \"integer\","]
2345#[doc = " \"format\": \"uint64\","]
2346#[doc = " \"minimum\": 0.0"]
2347#[doc = " }"]
2348#[doc = " }"]
2349#[doc = " }"]
2350#[doc = " },"]
2351#[doc = " \"additionalProperties\": false"]
2352#[doc = " },"]
2353#[doc = " {"]
2354#[doc = " \"description\": \"The length of some method name exceeded the limit in a Add Key action.\","]
2355#[doc = " \"type\": \"object\","]
2356#[doc = " \"required\": ["]
2357#[doc = " \"AddKeyMethodNameLengthExceeded\""]
2358#[doc = " ],"]
2359#[doc = " \"properties\": {"]
2360#[doc = " \"AddKeyMethodNameLengthExceeded\": {"]
2361#[doc = " \"type\": \"object\","]
2362#[doc = " \"required\": ["]
2363#[doc = " \"length\","]
2364#[doc = " \"limit\""]
2365#[doc = " ],"]
2366#[doc = " \"properties\": {"]
2367#[doc = " \"length\": {"]
2368#[doc = " \"type\": \"integer\","]
2369#[doc = " \"format\": \"uint64\","]
2370#[doc = " \"minimum\": 0.0"]
2371#[doc = " },"]
2372#[doc = " \"limit\": {"]
2373#[doc = " \"type\": \"integer\","]
2374#[doc = " \"format\": \"uint64\","]
2375#[doc = " \"minimum\": 0.0"]
2376#[doc = " }"]
2377#[doc = " }"]
2378#[doc = " }"]
2379#[doc = " },"]
2380#[doc = " \"additionalProperties\": false"]
2381#[doc = " },"]
2382#[doc = " {"]
2383#[doc = " \"description\": \"Integer overflow during a compute.\","]
2384#[doc = " \"type\": \"string\","]
2385#[doc = " \"enum\": ["]
2386#[doc = " \"IntegerOverflow\""]
2387#[doc = " ]"]
2388#[doc = " },"]
2389#[doc = " {"]
2390#[doc = " \"description\": \"Invalid account ID.\","]
2391#[doc = " \"type\": \"object\","]
2392#[doc = " \"required\": ["]
2393#[doc = " \"InvalidAccountId\""]
2394#[doc = " ],"]
2395#[doc = " \"properties\": {"]
2396#[doc = " \"InvalidAccountId\": {"]
2397#[doc = " \"type\": \"object\","]
2398#[doc = " \"required\": ["]
2399#[doc = " \"account_id\""]
2400#[doc = " ],"]
2401#[doc = " \"properties\": {"]
2402#[doc = " \"account_id\": {"]
2403#[doc = " \"type\": \"string\""]
2404#[doc = " }"]
2405#[doc = " }"]
2406#[doc = " }"]
2407#[doc = " },"]
2408#[doc = " \"additionalProperties\": false"]
2409#[doc = " },"]
2410#[doc = " {"]
2411#[doc = " \"description\": \"The size of the contract code exceeded the limit in a DeployContract action.\","]
2412#[doc = " \"type\": \"object\","]
2413#[doc = " \"required\": ["]
2414#[doc = " \"ContractSizeExceeded\""]
2415#[doc = " ],"]
2416#[doc = " \"properties\": {"]
2417#[doc = " \"ContractSizeExceeded\": {"]
2418#[doc = " \"type\": \"object\","]
2419#[doc = " \"required\": ["]
2420#[doc = " \"limit\","]
2421#[doc = " \"size\""]
2422#[doc = " ],"]
2423#[doc = " \"properties\": {"]
2424#[doc = " \"limit\": {"]
2425#[doc = " \"type\": \"integer\","]
2426#[doc = " \"format\": \"uint64\","]
2427#[doc = " \"minimum\": 0.0"]
2428#[doc = " },"]
2429#[doc = " \"size\": {"]
2430#[doc = " \"type\": \"integer\","]
2431#[doc = " \"format\": \"uint64\","]
2432#[doc = " \"minimum\": 0.0"]
2433#[doc = " }"]
2434#[doc = " }"]
2435#[doc = " }"]
2436#[doc = " },"]
2437#[doc = " \"additionalProperties\": false"]
2438#[doc = " },"]
2439#[doc = " {"]
2440#[doc = " \"description\": \"The length of the method name exceeded the limit in a Function Call action.\","]
2441#[doc = " \"type\": \"object\","]
2442#[doc = " \"required\": ["]
2443#[doc = " \"FunctionCallMethodNameLengthExceeded\""]
2444#[doc = " ],"]
2445#[doc = " \"properties\": {"]
2446#[doc = " \"FunctionCallMethodNameLengthExceeded\": {"]
2447#[doc = " \"type\": \"object\","]
2448#[doc = " \"required\": ["]
2449#[doc = " \"length\","]
2450#[doc = " \"limit\""]
2451#[doc = " ],"]
2452#[doc = " \"properties\": {"]
2453#[doc = " \"length\": {"]
2454#[doc = " \"type\": \"integer\","]
2455#[doc = " \"format\": \"uint64\","]
2456#[doc = " \"minimum\": 0.0"]
2457#[doc = " },"]
2458#[doc = " \"limit\": {"]
2459#[doc = " \"type\": \"integer\","]
2460#[doc = " \"format\": \"uint64\","]
2461#[doc = " \"minimum\": 0.0"]
2462#[doc = " }"]
2463#[doc = " }"]
2464#[doc = " }"]
2465#[doc = " },"]
2466#[doc = " \"additionalProperties\": false"]
2467#[doc = " },"]
2468#[doc = " {"]
2469#[doc = " \"description\": \"The length of the arguments exceeded the limit in a Function Call action.\","]
2470#[doc = " \"type\": \"object\","]
2471#[doc = " \"required\": ["]
2472#[doc = " \"FunctionCallArgumentsLengthExceeded\""]
2473#[doc = " ],"]
2474#[doc = " \"properties\": {"]
2475#[doc = " \"FunctionCallArgumentsLengthExceeded\": {"]
2476#[doc = " \"type\": \"object\","]
2477#[doc = " \"required\": ["]
2478#[doc = " \"length\","]
2479#[doc = " \"limit\""]
2480#[doc = " ],"]
2481#[doc = " \"properties\": {"]
2482#[doc = " \"length\": {"]
2483#[doc = " \"type\": \"integer\","]
2484#[doc = " \"format\": \"uint64\","]
2485#[doc = " \"minimum\": 0.0"]
2486#[doc = " },"]
2487#[doc = " \"limit\": {"]
2488#[doc = " \"type\": \"integer\","]
2489#[doc = " \"format\": \"uint64\","]
2490#[doc = " \"minimum\": 0.0"]
2491#[doc = " }"]
2492#[doc = " }"]
2493#[doc = " }"]
2494#[doc = " },"]
2495#[doc = " \"additionalProperties\": false"]
2496#[doc = " },"]
2497#[doc = " {"]
2498#[doc = " \"description\": \"An attempt to stake with a public key that is not convertible to ristretto.\","]
2499#[doc = " \"type\": \"object\","]
2500#[doc = " \"required\": ["]
2501#[doc = " \"UnsuitableStakingKey\""]
2502#[doc = " ],"]
2503#[doc = " \"properties\": {"]
2504#[doc = " \"UnsuitableStakingKey\": {"]
2505#[doc = " \"type\": \"object\","]
2506#[doc = " \"required\": ["]
2507#[doc = " \"public_key\""]
2508#[doc = " ],"]
2509#[doc = " \"properties\": {"]
2510#[doc = " \"public_key\": {"]
2511#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2512#[doc = " }"]
2513#[doc = " }"]
2514#[doc = " }"]
2515#[doc = " },"]
2516#[doc = " \"additionalProperties\": false"]
2517#[doc = " },"]
2518#[doc = " {"]
2519#[doc = " \"description\": \"The attached amount of gas in a FunctionCall action has to be a positive number.\","]
2520#[doc = " \"type\": \"string\","]
2521#[doc = " \"enum\": ["]
2522#[doc = " \"FunctionCallZeroAttachedGas\""]
2523#[doc = " ]"]
2524#[doc = " },"]
2525#[doc = " {"]
2526#[doc = " \"description\": \"There should be the only one DelegateAction\","]
2527#[doc = " \"type\": \"string\","]
2528#[doc = " \"enum\": ["]
2529#[doc = " \"DelegateActionMustBeOnlyOne\""]
2530#[doc = " ]"]
2531#[doc = " },"]
2532#[doc = " {"]
2533#[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.\","]
2534#[doc = " \"type\": \"object\","]
2535#[doc = " \"required\": ["]
2536#[doc = " \"UnsupportedProtocolFeature\""]
2537#[doc = " ],"]
2538#[doc = " \"properties\": {"]
2539#[doc = " \"UnsupportedProtocolFeature\": {"]
2540#[doc = " \"type\": \"object\","]
2541#[doc = " \"required\": ["]
2542#[doc = " \"protocol_feature\","]
2543#[doc = " \"version\""]
2544#[doc = " ],"]
2545#[doc = " \"properties\": {"]
2546#[doc = " \"protocol_feature\": {"]
2547#[doc = " \"type\": \"string\""]
2548#[doc = " },"]
2549#[doc = " \"version\": {"]
2550#[doc = " \"type\": \"integer\","]
2551#[doc = " \"format\": \"uint32\","]
2552#[doc = " \"minimum\": 0.0"]
2553#[doc = " }"]
2554#[doc = " }"]
2555#[doc = " }"]
2556#[doc = " },"]
2557#[doc = " \"additionalProperties\": false"]
2558#[doc = " }"]
2559#[doc = " ]"]
2560#[doc = "}"]
2561#[doc = r" ```"]
2562#[doc = r" </details>"]
2563#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2564pub enum ActionsValidationError {
2565 #[doc = "The delete action must be a final action in transaction"]
2566 DeleteActionMustBeFinal,
2567 #[doc = "The total prepaid gas (for all given actions) exceeded the limit."]
2568 TotalPrepaidGasExceeded { limit: u64, total_prepaid_gas: u64 },
2569 #[doc = "The number of actions exceeded the given limit."]
2570 TotalNumberOfActionsExceeded {
2571 limit: u64,
2572 total_number_of_actions: u64,
2573 },
2574 #[doc = "The total number of bytes of the method names exceeded the limit in a Add Key action."]
2575 AddKeyMethodNamesNumberOfBytesExceeded {
2576 limit: u64,
2577 total_number_of_bytes: u64,
2578 },
2579 #[doc = "The length of some method name exceeded the limit in a Add Key action."]
2580 AddKeyMethodNameLengthExceeded { length: u64, limit: u64 },
2581 #[doc = "Integer overflow during a compute."]
2582 IntegerOverflow,
2583 #[doc = "Invalid account ID."]
2584 InvalidAccountId { account_id: ::std::string::String },
2585 #[doc = "The size of the contract code exceeded the limit in a DeployContract action."]
2586 ContractSizeExceeded { limit: u64, size: u64 },
2587 #[doc = "The length of the method name exceeded the limit in a Function Call action."]
2588 FunctionCallMethodNameLengthExceeded { length: u64, limit: u64 },
2589 #[doc = "The length of the arguments exceeded the limit in a Function Call action."]
2590 FunctionCallArgumentsLengthExceeded { length: u64, limit: u64 },
2591 #[doc = "An attempt to stake with a public key that is not convertible to ristretto."]
2592 UnsuitableStakingKey { public_key: PublicKey },
2593 #[doc = "The attached amount of gas in a FunctionCall action has to be a positive number."]
2594 FunctionCallZeroAttachedGas,
2595 #[doc = "There should be the only one DelegateAction"]
2596 DelegateActionMustBeOnlyOne,
2597 #[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."]
2598 UnsupportedProtocolFeature {
2599 protocol_feature: ::std::string::String,
2600 version: u32,
2601 },
2602}
2603impl ::std::convert::From<&Self> for ActionsValidationError {
2604 fn from(value: &ActionsValidationError) -> Self {
2605 value.clone()
2606 }
2607}
2608#[doc = "An action that adds key with public key associated"]
2609#[doc = r""]
2610#[doc = r" <details><summary>JSON schema</summary>"]
2611#[doc = r""]
2612#[doc = r" ```json"]
2613#[doc = "{"]
2614#[doc = " \"description\": \"An action that adds key with public key associated\","]
2615#[doc = " \"type\": \"object\","]
2616#[doc = " \"required\": ["]
2617#[doc = " \"access_key\","]
2618#[doc = " \"public_key\""]
2619#[doc = " ],"]
2620#[doc = " \"properties\": {"]
2621#[doc = " \"access_key\": {"]
2622#[doc = " \"description\": \"An access key with the permission\","]
2623#[doc = " \"allOf\": ["]
2624#[doc = " {"]
2625#[doc = " \"$ref\": \"#/components/schemas/AccessKey\""]
2626#[doc = " }"]
2627#[doc = " ]"]
2628#[doc = " },"]
2629#[doc = " \"public_key\": {"]
2630#[doc = " \"description\": \"A public key which will be associated with an access_key\","]
2631#[doc = " \"allOf\": ["]
2632#[doc = " {"]
2633#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
2634#[doc = " }"]
2635#[doc = " ]"]
2636#[doc = " }"]
2637#[doc = " }"]
2638#[doc = "}"]
2639#[doc = r" ```"]
2640#[doc = r" </details>"]
2641#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2642pub struct AddKeyAction {
2643 #[doc = "An access key with the permission"]
2644 pub access_key: AccessKey,
2645 #[doc = "A public key which will be associated with an access_key"]
2646 pub public_key: PublicKey,
2647}
2648impl ::std::convert::From<&AddKeyAction> for AddKeyAction {
2649 fn from(value: &AddKeyAction) -> Self {
2650 value.clone()
2651 }
2652}
2653#[doc = "`AllAccessKeyChangesByBlockIdChangesType`"]
2654#[doc = r""]
2655#[doc = r" <details><summary>JSON schema</summary>"]
2656#[doc = r""]
2657#[doc = r" ```json"]
2658#[doc = "{"]
2659#[doc = " \"type\": \"string\","]
2660#[doc = " \"enum\": ["]
2661#[doc = " \"all_access_key_changes\""]
2662#[doc = " ]"]
2663#[doc = "}"]
2664#[doc = r" ```"]
2665#[doc = r" </details>"]
2666#[derive(
2667 :: serde :: Deserialize,
2668 :: serde :: Serialize,
2669 Clone,
2670 Copy,
2671 Debug,
2672 Eq,
2673 Hash,
2674 Ord,
2675 PartialEq,
2676 PartialOrd,
2677)]
2678pub enum AllAccessKeyChangesByBlockIdChangesType {
2679 #[serde(rename = "all_access_key_changes")]
2680 AllAccessKeyChanges,
2681}
2682impl ::std::convert::From<&Self> for AllAccessKeyChangesByBlockIdChangesType {
2683 fn from(value: &AllAccessKeyChangesByBlockIdChangesType) -> Self {
2684 value.clone()
2685 }
2686}
2687impl ::std::fmt::Display for AllAccessKeyChangesByBlockIdChangesType {
2688 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2689 match *self {
2690 Self::AllAccessKeyChanges => write!(f, "all_access_key_changes"),
2691 }
2692 }
2693}
2694impl ::std::str::FromStr for AllAccessKeyChangesByBlockIdChangesType {
2695 type Err = self::error::ConversionError;
2696 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2697 match value {
2698 "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2699 _ => Err("invalid value".into()),
2700 }
2701 }
2702}
2703impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByBlockIdChangesType {
2704 type Error = self::error::ConversionError;
2705 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2706 value.parse()
2707 }
2708}
2709impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2710 type Error = self::error::ConversionError;
2711 fn try_from(
2712 value: &::std::string::String,
2713 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2714 value.parse()
2715 }
2716}
2717impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByBlockIdChangesType {
2718 type Error = self::error::ConversionError;
2719 fn try_from(
2720 value: ::std::string::String,
2721 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2722 value.parse()
2723 }
2724}
2725#[doc = "`AllAccessKeyChangesByFinalityChangesType`"]
2726#[doc = r""]
2727#[doc = r" <details><summary>JSON schema</summary>"]
2728#[doc = r""]
2729#[doc = r" ```json"]
2730#[doc = "{"]
2731#[doc = " \"type\": \"string\","]
2732#[doc = " \"enum\": ["]
2733#[doc = " \"all_access_key_changes\""]
2734#[doc = " ]"]
2735#[doc = "}"]
2736#[doc = r" ```"]
2737#[doc = r" </details>"]
2738#[derive(
2739 :: serde :: Deserialize,
2740 :: serde :: Serialize,
2741 Clone,
2742 Copy,
2743 Debug,
2744 Eq,
2745 Hash,
2746 Ord,
2747 PartialEq,
2748 PartialOrd,
2749)]
2750pub enum AllAccessKeyChangesByFinalityChangesType {
2751 #[serde(rename = "all_access_key_changes")]
2752 AllAccessKeyChanges,
2753}
2754impl ::std::convert::From<&Self> for AllAccessKeyChangesByFinalityChangesType {
2755 fn from(value: &AllAccessKeyChangesByFinalityChangesType) -> Self {
2756 value.clone()
2757 }
2758}
2759impl ::std::fmt::Display for AllAccessKeyChangesByFinalityChangesType {
2760 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2761 match *self {
2762 Self::AllAccessKeyChanges => write!(f, "all_access_key_changes"),
2763 }
2764 }
2765}
2766impl ::std::str::FromStr for AllAccessKeyChangesByFinalityChangesType {
2767 type Err = self::error::ConversionError;
2768 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2769 match value {
2770 "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2771 _ => Err("invalid value".into()),
2772 }
2773 }
2774}
2775impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesByFinalityChangesType {
2776 type Error = self::error::ConversionError;
2777 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2778 value.parse()
2779 }
2780}
2781impl ::std::convert::TryFrom<&::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2782 type Error = self::error::ConversionError;
2783 fn try_from(
2784 value: &::std::string::String,
2785 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2786 value.parse()
2787 }
2788}
2789impl ::std::convert::TryFrom<::std::string::String> for AllAccessKeyChangesByFinalityChangesType {
2790 type Error = self::error::ConversionError;
2791 fn try_from(
2792 value: ::std::string::String,
2793 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2794 value.parse()
2795 }
2796}
2797#[doc = "`AllAccessKeyChangesBySyncCheckpointChangesType`"]
2798#[doc = r""]
2799#[doc = r" <details><summary>JSON schema</summary>"]
2800#[doc = r""]
2801#[doc = r" ```json"]
2802#[doc = "{"]
2803#[doc = " \"type\": \"string\","]
2804#[doc = " \"enum\": ["]
2805#[doc = " \"all_access_key_changes\""]
2806#[doc = " ]"]
2807#[doc = "}"]
2808#[doc = r" ```"]
2809#[doc = r" </details>"]
2810#[derive(
2811 :: serde :: Deserialize,
2812 :: serde :: Serialize,
2813 Clone,
2814 Copy,
2815 Debug,
2816 Eq,
2817 Hash,
2818 Ord,
2819 PartialEq,
2820 PartialOrd,
2821)]
2822pub enum AllAccessKeyChangesBySyncCheckpointChangesType {
2823 #[serde(rename = "all_access_key_changes")]
2824 AllAccessKeyChanges,
2825}
2826impl ::std::convert::From<&Self> for AllAccessKeyChangesBySyncCheckpointChangesType {
2827 fn from(value: &AllAccessKeyChangesBySyncCheckpointChangesType) -> Self {
2828 value.clone()
2829 }
2830}
2831impl ::std::fmt::Display for AllAccessKeyChangesBySyncCheckpointChangesType {
2832 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2833 match *self {
2834 Self::AllAccessKeyChanges => write!(f, "all_access_key_changes"),
2835 }
2836 }
2837}
2838impl ::std::str::FromStr for AllAccessKeyChangesBySyncCheckpointChangesType {
2839 type Err = self::error::ConversionError;
2840 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2841 match value {
2842 "all_access_key_changes" => Ok(Self::AllAccessKeyChanges),
2843 _ => Err("invalid value".into()),
2844 }
2845 }
2846}
2847impl ::std::convert::TryFrom<&str> for AllAccessKeyChangesBySyncCheckpointChangesType {
2848 type Error = self::error::ConversionError;
2849 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2850 value.parse()
2851 }
2852}
2853impl ::std::convert::TryFrom<&::std::string::String>
2854 for AllAccessKeyChangesBySyncCheckpointChangesType
2855{
2856 type Error = self::error::ConversionError;
2857 fn try_from(
2858 value: &::std::string::String,
2859 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2860 value.parse()
2861 }
2862}
2863impl ::std::convert::TryFrom<::std::string::String>
2864 for AllAccessKeyChangesBySyncCheckpointChangesType
2865{
2866 type Error = self::error::ConversionError;
2867 fn try_from(
2868 value: ::std::string::String,
2869 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2870 value.parse()
2871 }
2872}
2873#[doc = "`AllGasKeyChangesByBlockIdChangesType`"]
2874#[doc = r""]
2875#[doc = r" <details><summary>JSON schema</summary>"]
2876#[doc = r""]
2877#[doc = r" ```json"]
2878#[doc = "{"]
2879#[doc = " \"type\": \"string\","]
2880#[doc = " \"enum\": ["]
2881#[doc = " \"all_gas_key_changes\""]
2882#[doc = " ]"]
2883#[doc = "}"]
2884#[doc = r" ```"]
2885#[doc = r" </details>"]
2886#[derive(
2887 :: serde :: Deserialize,
2888 :: serde :: Serialize,
2889 Clone,
2890 Copy,
2891 Debug,
2892 Eq,
2893 Hash,
2894 Ord,
2895 PartialEq,
2896 PartialOrd,
2897)]
2898pub enum AllGasKeyChangesByBlockIdChangesType {
2899 #[serde(rename = "all_gas_key_changes")]
2900 AllGasKeyChanges,
2901}
2902impl ::std::convert::From<&Self> for AllGasKeyChangesByBlockIdChangesType {
2903 fn from(value: &AllGasKeyChangesByBlockIdChangesType) -> Self {
2904 value.clone()
2905 }
2906}
2907impl ::std::fmt::Display for AllGasKeyChangesByBlockIdChangesType {
2908 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2909 match *self {
2910 Self::AllGasKeyChanges => write!(f, "all_gas_key_changes"),
2911 }
2912 }
2913}
2914impl ::std::str::FromStr for AllGasKeyChangesByBlockIdChangesType {
2915 type Err = self::error::ConversionError;
2916 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2917 match value {
2918 "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
2919 _ => Err("invalid value".into()),
2920 }
2921 }
2922}
2923impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByBlockIdChangesType {
2924 type Error = self::error::ConversionError;
2925 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2926 value.parse()
2927 }
2928}
2929impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
2930 type Error = self::error::ConversionError;
2931 fn try_from(
2932 value: &::std::string::String,
2933 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2934 value.parse()
2935 }
2936}
2937impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByBlockIdChangesType {
2938 type Error = self::error::ConversionError;
2939 fn try_from(
2940 value: ::std::string::String,
2941 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2942 value.parse()
2943 }
2944}
2945#[doc = "`AllGasKeyChangesByFinalityChangesType`"]
2946#[doc = r""]
2947#[doc = r" <details><summary>JSON schema</summary>"]
2948#[doc = r""]
2949#[doc = r" ```json"]
2950#[doc = "{"]
2951#[doc = " \"type\": \"string\","]
2952#[doc = " \"enum\": ["]
2953#[doc = " \"all_gas_key_changes\""]
2954#[doc = " ]"]
2955#[doc = "}"]
2956#[doc = r" ```"]
2957#[doc = r" </details>"]
2958#[derive(
2959 :: serde :: Deserialize,
2960 :: serde :: Serialize,
2961 Clone,
2962 Copy,
2963 Debug,
2964 Eq,
2965 Hash,
2966 Ord,
2967 PartialEq,
2968 PartialOrd,
2969)]
2970pub enum AllGasKeyChangesByFinalityChangesType {
2971 #[serde(rename = "all_gas_key_changes")]
2972 AllGasKeyChanges,
2973}
2974impl ::std::convert::From<&Self> for AllGasKeyChangesByFinalityChangesType {
2975 fn from(value: &AllGasKeyChangesByFinalityChangesType) -> Self {
2976 value.clone()
2977 }
2978}
2979impl ::std::fmt::Display for AllGasKeyChangesByFinalityChangesType {
2980 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2981 match *self {
2982 Self::AllGasKeyChanges => write!(f, "all_gas_key_changes"),
2983 }
2984 }
2985}
2986impl ::std::str::FromStr for AllGasKeyChangesByFinalityChangesType {
2987 type Err = self::error::ConversionError;
2988 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2989 match value {
2990 "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
2991 _ => Err("invalid value".into()),
2992 }
2993 }
2994}
2995impl ::std::convert::TryFrom<&str> for AllGasKeyChangesByFinalityChangesType {
2996 type Error = self::error::ConversionError;
2997 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2998 value.parse()
2999 }
3000}
3001impl ::std::convert::TryFrom<&::std::string::String> for AllGasKeyChangesByFinalityChangesType {
3002 type Error = self::error::ConversionError;
3003 fn try_from(
3004 value: &::std::string::String,
3005 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3006 value.parse()
3007 }
3008}
3009impl ::std::convert::TryFrom<::std::string::String> for AllGasKeyChangesByFinalityChangesType {
3010 type Error = self::error::ConversionError;
3011 fn try_from(
3012 value: ::std::string::String,
3013 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3014 value.parse()
3015 }
3016}
3017#[doc = "`AllGasKeyChangesBySyncCheckpointChangesType`"]
3018#[doc = r""]
3019#[doc = r" <details><summary>JSON schema</summary>"]
3020#[doc = r""]
3021#[doc = r" ```json"]
3022#[doc = "{"]
3023#[doc = " \"type\": \"string\","]
3024#[doc = " \"enum\": ["]
3025#[doc = " \"all_gas_key_changes\""]
3026#[doc = " ]"]
3027#[doc = "}"]
3028#[doc = r" ```"]
3029#[doc = r" </details>"]
3030#[derive(
3031 :: serde :: Deserialize,
3032 :: serde :: Serialize,
3033 Clone,
3034 Copy,
3035 Debug,
3036 Eq,
3037 Hash,
3038 Ord,
3039 PartialEq,
3040 PartialOrd,
3041)]
3042pub enum AllGasKeyChangesBySyncCheckpointChangesType {
3043 #[serde(rename = "all_gas_key_changes")]
3044 AllGasKeyChanges,
3045}
3046impl ::std::convert::From<&Self> for AllGasKeyChangesBySyncCheckpointChangesType {
3047 fn from(value: &AllGasKeyChangesBySyncCheckpointChangesType) -> Self {
3048 value.clone()
3049 }
3050}
3051impl ::std::fmt::Display for AllGasKeyChangesBySyncCheckpointChangesType {
3052 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3053 match *self {
3054 Self::AllGasKeyChanges => write!(f, "all_gas_key_changes"),
3055 }
3056 }
3057}
3058impl ::std::str::FromStr for AllGasKeyChangesBySyncCheckpointChangesType {
3059 type Err = self::error::ConversionError;
3060 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3061 match value {
3062 "all_gas_key_changes" => Ok(Self::AllGasKeyChanges),
3063 _ => Err("invalid value".into()),
3064 }
3065 }
3066}
3067impl ::std::convert::TryFrom<&str> for AllGasKeyChangesBySyncCheckpointChangesType {
3068 type Error = self::error::ConversionError;
3069 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3070 value.parse()
3071 }
3072}
3073impl ::std::convert::TryFrom<&::std::string::String>
3074 for AllGasKeyChangesBySyncCheckpointChangesType
3075{
3076 type Error = self::error::ConversionError;
3077 fn try_from(
3078 value: &::std::string::String,
3079 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3080 value.parse()
3081 }
3082}
3083impl ::std::convert::TryFrom<::std::string::String>
3084 for AllGasKeyChangesBySyncCheckpointChangesType
3085{
3086 type Error = self::error::ConversionError;
3087 fn try_from(
3088 value: ::std::string::String,
3089 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3090 value.parse()
3091 }
3092}
3093#[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."]
3094#[doc = r""]
3095#[doc = r" <details><summary>JSON schema</summary>"]
3096#[doc = r""]
3097#[doc = r" ```json"]
3098#[doc = "{"]
3099#[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.\","]
3100#[doc = " \"type\": \"object\","]
3101#[doc = " \"required\": ["]
3102#[doc = " \"requested_values_bitmap\","]
3103#[doc = " \"to_shard\""]
3104#[doc = " ],"]
3105#[doc = " \"properties\": {"]
3106#[doc = " \"requested_values_bitmap\": {"]
3107#[doc = " \"description\": \"Bitmap which describes what values of bandwidth are requested.\","]
3108#[doc = " \"allOf\": ["]
3109#[doc = " {"]
3110#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequestBitmap\""]
3111#[doc = " }"]
3112#[doc = " ]"]
3113#[doc = " },"]
3114#[doc = " \"to_shard\": {"]
3115#[doc = " \"description\": \"Requesting bandwidth to this shard.\","]
3116#[doc = " \"type\": \"integer\","]
3117#[doc = " \"format\": \"uint16\","]
3118#[doc = " \"maximum\": 65535.0,"]
3119#[doc = " \"minimum\": 0.0"]
3120#[doc = " }"]
3121#[doc = " }"]
3122#[doc = "}"]
3123#[doc = r" ```"]
3124#[doc = r" </details>"]
3125#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3126pub struct BandwidthRequest {
3127 #[doc = "Bitmap which describes what values of bandwidth are requested."]
3128 pub requested_values_bitmap: BandwidthRequestBitmap,
3129 #[doc = "Requesting bandwidth to this shard."]
3130 pub to_shard: u16,
3131}
3132impl ::std::convert::From<&BandwidthRequest> for BandwidthRequest {
3133 fn from(value: &BandwidthRequest) -> Self {
3134 value.clone()
3135 }
3136}
3137#[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."]
3138#[doc = r""]
3139#[doc = r" <details><summary>JSON schema</summary>"]
3140#[doc = r""]
3141#[doc = r" ```json"]
3142#[doc = "{"]
3143#[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.\","]
3144#[doc = " \"type\": \"object\","]
3145#[doc = " \"required\": ["]
3146#[doc = " \"data\""]
3147#[doc = " ],"]
3148#[doc = " \"properties\": {"]
3149#[doc = " \"data\": {"]
3150#[doc = " \"type\": \"array\","]
3151#[doc = " \"items\": {"]
3152#[doc = " \"type\": \"integer\","]
3153#[doc = " \"format\": \"uint8\","]
3154#[doc = " \"maximum\": 255.0,"]
3155#[doc = " \"minimum\": 0.0"]
3156#[doc = " },"]
3157#[doc = " \"maxItems\": 5,"]
3158#[doc = " \"minItems\": 5"]
3159#[doc = " }"]
3160#[doc = " }"]
3161#[doc = "}"]
3162#[doc = r" ```"]
3163#[doc = r" </details>"]
3164#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3165pub struct BandwidthRequestBitmap {
3166 pub data: [u8; 5usize],
3167}
3168impl ::std::convert::From<&BandwidthRequestBitmap> for BandwidthRequestBitmap {
3169 fn from(value: &BandwidthRequestBitmap) -> Self {
3170 value.clone()
3171 }
3172}
3173#[doc = "A list of shard's bandwidth requests.\nDescribes how much the shard would like to send to other shards."]
3174#[doc = r""]
3175#[doc = r" <details><summary>JSON schema</summary>"]
3176#[doc = r""]
3177#[doc = r" ```json"]
3178#[doc = "{"]
3179#[doc = " \"description\": \"A list of shard's bandwidth requests.\\nDescribes how much the shard would like to send to other shards.\","]
3180#[doc = " \"oneOf\": ["]
3181#[doc = " {"]
3182#[doc = " \"type\": \"object\","]
3183#[doc = " \"required\": ["]
3184#[doc = " \"V1\""]
3185#[doc = " ],"]
3186#[doc = " \"properties\": {"]
3187#[doc = " \"V1\": {"]
3188#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequestsV1\""]
3189#[doc = " }"]
3190#[doc = " },"]
3191#[doc = " \"additionalProperties\": false"]
3192#[doc = " }"]
3193#[doc = " ]"]
3194#[doc = "}"]
3195#[doc = r" ```"]
3196#[doc = r" </details>"]
3197#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3198pub enum BandwidthRequests {
3199 V1(BandwidthRequestsV1),
3200}
3201impl ::std::convert::From<&Self> for BandwidthRequests {
3202 fn from(value: &BandwidthRequests) -> Self {
3203 value.clone()
3204 }
3205}
3206impl ::std::convert::From<BandwidthRequestsV1> for BandwidthRequests {
3207 fn from(value: BandwidthRequestsV1) -> Self {
3208 Self::V1(value)
3209 }
3210}
3211#[doc = "Version 1 for list of [`BandwidthRequest`]s."]
3212#[doc = r""]
3213#[doc = r" <details><summary>JSON schema</summary>"]
3214#[doc = r""]
3215#[doc = r" ```json"]
3216#[doc = "{"]
3217#[doc = " \"description\": \"Version 1 for list of [`BandwidthRequest`]s.\","]
3218#[doc = " \"type\": \"object\","]
3219#[doc = " \"required\": ["]
3220#[doc = " \"requests\""]
3221#[doc = " ],"]
3222#[doc = " \"properties\": {"]
3223#[doc = " \"requests\": {"]
3224#[doc = " \"type\": \"array\","]
3225#[doc = " \"items\": {"]
3226#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequest\""]
3227#[doc = " }"]
3228#[doc = " }"]
3229#[doc = " }"]
3230#[doc = "}"]
3231#[doc = r" ```"]
3232#[doc = r" </details>"]
3233#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3234pub struct BandwidthRequestsV1 {
3235 pub requests: ::std::vec::Vec<BandwidthRequest>,
3236}
3237impl ::std::convert::From<&BandwidthRequestsV1> for BandwidthRequestsV1 {
3238 fn from(value: &BandwidthRequestsV1) -> Self {
3239 value.clone()
3240 }
3241}
3242#[doc = "A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
3243#[doc = r""]
3244#[doc = r" <details><summary>JSON schema</summary>"]
3245#[doc = r""]
3246#[doc = r" ```json"]
3247#[doc = "{"]
3248#[doc = " \"description\": \"A part of a state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
3249#[doc = " \"type\": \"object\","]
3250#[doc = " \"required\": ["]
3251#[doc = " \"block_merkle_root\","]
3252#[doc = " \"epoch_id\","]
3253#[doc = " \"height\","]
3254#[doc = " \"next_bp_hash\","]
3255#[doc = " \"next_epoch_id\","]
3256#[doc = " \"outcome_root\","]
3257#[doc = " \"prev_state_root\","]
3258#[doc = " \"timestamp\","]
3259#[doc = " \"timestamp_nanosec\""]
3260#[doc = " ],"]
3261#[doc = " \"properties\": {"]
3262#[doc = " \"block_merkle_root\": {"]
3263#[doc = " \"description\": \"The merkle root of all the block hashes\","]
3264#[doc = " \"allOf\": ["]
3265#[doc = " {"]
3266#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3267#[doc = " }"]
3268#[doc = " ]"]
3269#[doc = " },"]
3270#[doc = " \"epoch_id\": {"]
3271#[doc = " \"description\": \"The epoch to which the block that is the current known head belongs\","]
3272#[doc = " \"allOf\": ["]
3273#[doc = " {"]
3274#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3275#[doc = " }"]
3276#[doc = " ]"]
3277#[doc = " },"]
3278#[doc = " \"height\": {"]
3279#[doc = " \"type\": \"integer\","]
3280#[doc = " \"format\": \"uint64\","]
3281#[doc = " \"minimum\": 0.0"]
3282#[doc = " },"]
3283#[doc = " \"next_bp_hash\": {"]
3284#[doc = " \"description\": \"The hash of the block producers set for the next epoch\","]
3285#[doc = " \"allOf\": ["]
3286#[doc = " {"]
3287#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3288#[doc = " }"]
3289#[doc = " ]"]
3290#[doc = " },"]
3291#[doc = " \"next_epoch_id\": {"]
3292#[doc = " \"description\": \"The epoch that will follow the current epoch\","]
3293#[doc = " \"allOf\": ["]
3294#[doc = " {"]
3295#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3296#[doc = " }"]
3297#[doc = " ]"]
3298#[doc = " },"]
3299#[doc = " \"outcome_root\": {"]
3300#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3301#[doc = " },"]
3302#[doc = " \"prev_state_root\": {"]
3303#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3304#[doc = " },"]
3305#[doc = " \"timestamp\": {"]
3306#[doc = " \"description\": \"Legacy json number. Should not be used.\","]
3307#[doc = " \"type\": \"integer\","]
3308#[doc = " \"format\": \"uint64\","]
3309#[doc = " \"minimum\": 0.0"]
3310#[doc = " },"]
3311#[doc = " \"timestamp_nanosec\": {"]
3312#[doc = " \"type\": \"string\""]
3313#[doc = " }"]
3314#[doc = " }"]
3315#[doc = "}"]
3316#[doc = r" ```"]
3317#[doc = r" </details>"]
3318#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3319pub struct BlockHeaderInnerLiteView {
3320 #[doc = "The merkle root of all the block hashes"]
3321 pub block_merkle_root: CryptoHash,
3322 #[doc = "The epoch to which the block that is the current known head belongs"]
3323 pub epoch_id: CryptoHash,
3324 pub height: u64,
3325 #[doc = "The hash of the block producers set for the next epoch"]
3326 pub next_bp_hash: CryptoHash,
3327 #[doc = "The epoch that will follow the current epoch"]
3328 pub next_epoch_id: CryptoHash,
3329 pub outcome_root: CryptoHash,
3330 pub prev_state_root: CryptoHash,
3331 #[doc = "Legacy json number. Should not be used."]
3332 pub timestamp: u64,
3333 pub timestamp_nanosec: ::std::string::String,
3334}
3335impl ::std::convert::From<&BlockHeaderInnerLiteView> for BlockHeaderInnerLiteView {
3336 fn from(value: &BlockHeaderInnerLiteView) -> Self {
3337 value.clone()
3338 }
3339}
3340#[doc = "Contains main info about the block."]
3341#[doc = r""]
3342#[doc = r" <details><summary>JSON schema</summary>"]
3343#[doc = r""]
3344#[doc = r" ```json"]
3345#[doc = "{"]
3346#[doc = " \"description\": \"Contains main info about the block.\","]
3347#[doc = " \"type\": \"object\","]
3348#[doc = " \"required\": ["]
3349#[doc = " \"approvals\","]
3350#[doc = " \"block_merkle_root\","]
3351#[doc = " \"challenges_result\","]
3352#[doc = " \"challenges_root\","]
3353#[doc = " \"chunk_headers_root\","]
3354#[doc = " \"chunk_mask\","]
3355#[doc = " \"chunk_receipts_root\","]
3356#[doc = " \"chunk_tx_root\","]
3357#[doc = " \"chunks_included\","]
3358#[doc = " \"epoch_id\","]
3359#[doc = " \"gas_price\","]
3360#[doc = " \"hash\","]
3361#[doc = " \"height\","]
3362#[doc = " \"last_ds_final_block\","]
3363#[doc = " \"last_final_block\","]
3364#[doc = " \"latest_protocol_version\","]
3365#[doc = " \"next_bp_hash\","]
3366#[doc = " \"next_epoch_id\","]
3367#[doc = " \"outcome_root\","]
3368#[doc = " \"prev_hash\","]
3369#[doc = " \"prev_state_root\","]
3370#[doc = " \"random_value\","]
3371#[doc = " \"rent_paid\","]
3372#[doc = " \"signature\","]
3373#[doc = " \"timestamp\","]
3374#[doc = " \"timestamp_nanosec\","]
3375#[doc = " \"total_supply\","]
3376#[doc = " \"validator_proposals\","]
3377#[doc = " \"validator_reward\""]
3378#[doc = " ],"]
3379#[doc = " \"properties\": {"]
3380#[doc = " \"approvals\": {"]
3381#[doc = " \"type\": \"array\","]
3382#[doc = " \"items\": {"]
3383#[doc = " \"anyOf\": ["]
3384#[doc = " {"]
3385#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
3386#[doc = " },"]
3387#[doc = " {"]
3388#[doc = " \"type\": \"null\""]
3389#[doc = " }"]
3390#[doc = " ]"]
3391#[doc = " }"]
3392#[doc = " },"]
3393#[doc = " \"block_body_hash\": {"]
3394#[doc = " \"anyOf\": ["]
3395#[doc = " {"]
3396#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3397#[doc = " },"]
3398#[doc = " {"]
3399#[doc = " \"type\": \"null\""]
3400#[doc = " }"]
3401#[doc = " ]"]
3402#[doc = " },"]
3403#[doc = " \"block_merkle_root\": {"]
3404#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3405#[doc = " },"]
3406#[doc = " \"block_ordinal\": {"]
3407#[doc = " \"type\": ["]
3408#[doc = " \"integer\","]
3409#[doc = " \"null\""]
3410#[doc = " ],"]
3411#[doc = " \"format\": \"uint64\","]
3412#[doc = " \"minimum\": 0.0"]
3413#[doc = " },"]
3414#[doc = " \"challenges_result\": {"]
3415#[doc = " \"type\": \"array\","]
3416#[doc = " \"items\": {"]
3417#[doc = " \"$ref\": \"#/components/schemas/SlashedValidator\""]
3418#[doc = " }"]
3419#[doc = " },"]
3420#[doc = " \"challenges_root\": {"]
3421#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3422#[doc = " },"]
3423#[doc = " \"chunk_endorsements\": {"]
3424#[doc = " \"type\": ["]
3425#[doc = " \"array\","]
3426#[doc = " \"null\""]
3427#[doc = " ],"]
3428#[doc = " \"items\": {"]
3429#[doc = " \"type\": \"array\","]
3430#[doc = " \"items\": {"]
3431#[doc = " \"type\": \"integer\","]
3432#[doc = " \"format\": \"uint8\","]
3433#[doc = " \"maximum\": 255.0,"]
3434#[doc = " \"minimum\": 0.0"]
3435#[doc = " }"]
3436#[doc = " }"]
3437#[doc = " },"]
3438#[doc = " \"chunk_headers_root\": {"]
3439#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3440#[doc = " },"]
3441#[doc = " \"chunk_mask\": {"]
3442#[doc = " \"type\": \"array\","]
3443#[doc = " \"items\": {"]
3444#[doc = " \"type\": \"boolean\""]
3445#[doc = " }"]
3446#[doc = " },"]
3447#[doc = " \"chunk_receipts_root\": {"]
3448#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3449#[doc = " },"]
3450#[doc = " \"chunk_tx_root\": {"]
3451#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3452#[doc = " },"]
3453#[doc = " \"chunks_included\": {"]
3454#[doc = " \"type\": \"integer\","]
3455#[doc = " \"format\": \"uint64\","]
3456#[doc = " \"minimum\": 0.0"]
3457#[doc = " },"]
3458#[doc = " \"epoch_id\": {"]
3459#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3460#[doc = " },"]
3461#[doc = " \"epoch_sync_data_hash\": {"]
3462#[doc = " \"anyOf\": ["]
3463#[doc = " {"]
3464#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3465#[doc = " },"]
3466#[doc = " {"]
3467#[doc = " \"type\": \"null\""]
3468#[doc = " }"]
3469#[doc = " ]"]
3470#[doc = " },"]
3471#[doc = " \"gas_price\": {"]
3472#[doc = " \"type\": \"string\""]
3473#[doc = " },"]
3474#[doc = " \"hash\": {"]
3475#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3476#[doc = " },"]
3477#[doc = " \"height\": {"]
3478#[doc = " \"type\": \"integer\","]
3479#[doc = " \"format\": \"uint64\","]
3480#[doc = " \"minimum\": 0.0"]
3481#[doc = " },"]
3482#[doc = " \"last_ds_final_block\": {"]
3483#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3484#[doc = " },"]
3485#[doc = " \"last_final_block\": {"]
3486#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3487#[doc = " },"]
3488#[doc = " \"latest_protocol_version\": {"]
3489#[doc = " \"type\": \"integer\","]
3490#[doc = " \"format\": \"uint32\","]
3491#[doc = " \"minimum\": 0.0"]
3492#[doc = " },"]
3493#[doc = " \"next_bp_hash\": {"]
3494#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3495#[doc = " },"]
3496#[doc = " \"next_epoch_id\": {"]
3497#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3498#[doc = " },"]
3499#[doc = " \"outcome_root\": {"]
3500#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3501#[doc = " },"]
3502#[doc = " \"prev_hash\": {"]
3503#[doc = " \"description\": \"The hash of the previous Block\","]
3504#[doc = " \"allOf\": ["]
3505#[doc = " {"]
3506#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3507#[doc = " }"]
3508#[doc = " ]"]
3509#[doc = " },"]
3510#[doc = " \"prev_height\": {"]
3511#[doc = " \"type\": ["]
3512#[doc = " \"integer\","]
3513#[doc = " \"null\""]
3514#[doc = " ],"]
3515#[doc = " \"format\": \"uint64\","]
3516#[doc = " \"minimum\": 0.0"]
3517#[doc = " },"]
3518#[doc = " \"prev_state_root\": {"]
3519#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3520#[doc = " },"]
3521#[doc = " \"random_value\": {"]
3522#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3523#[doc = " },"]
3524#[doc = " \"rent_paid\": {"]
3525#[doc = " \"description\": \"TODO(2271): deprecated.\","]
3526#[doc = " \"type\": \"string\""]
3527#[doc = " },"]
3528#[doc = " \"signature\": {"]
3529#[doc = " \"description\": \"Signature of the block producer.\","]
3530#[doc = " \"allOf\": ["]
3531#[doc = " {"]
3532#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
3533#[doc = " }"]
3534#[doc = " ]"]
3535#[doc = " },"]
3536#[doc = " \"timestamp\": {"]
3537#[doc = " \"description\": \"Legacy json number. Should not be used.\","]
3538#[doc = " \"type\": \"integer\","]
3539#[doc = " \"format\": \"uint64\","]
3540#[doc = " \"minimum\": 0.0"]
3541#[doc = " },"]
3542#[doc = " \"timestamp_nanosec\": {"]
3543#[doc = " \"type\": \"string\""]
3544#[doc = " },"]
3545#[doc = " \"total_supply\": {"]
3546#[doc = " \"type\": \"string\""]
3547#[doc = " },"]
3548#[doc = " \"validator_proposals\": {"]
3549#[doc = " \"type\": \"array\","]
3550#[doc = " \"items\": {"]
3551#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
3552#[doc = " }"]
3553#[doc = " },"]
3554#[doc = " \"validator_reward\": {"]
3555#[doc = " \"description\": \"TODO(2271): deprecated.\","]
3556#[doc = " \"type\": \"string\""]
3557#[doc = " }"]
3558#[doc = " }"]
3559#[doc = "}"]
3560#[doc = r" ```"]
3561#[doc = r" </details>"]
3562#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3563pub struct BlockHeaderView {
3564 pub approvals: ::std::vec::Vec<::std::option::Option<Signature>>,
3565 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3566 pub block_body_hash: ::std::option::Option<CryptoHash>,
3567 pub block_merkle_root: CryptoHash,
3568 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3569 pub block_ordinal: ::std::option::Option<u64>,
3570 pub challenges_result: ::std::vec::Vec<SlashedValidator>,
3571 pub challenges_root: CryptoHash,
3572 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3573 pub chunk_endorsements: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<u8>>>,
3574 pub chunk_headers_root: CryptoHash,
3575 pub chunk_mask: ::std::vec::Vec<bool>,
3576 pub chunk_receipts_root: CryptoHash,
3577 pub chunk_tx_root: CryptoHash,
3578 pub chunks_included: u64,
3579 pub epoch_id: CryptoHash,
3580 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3581 pub epoch_sync_data_hash: ::std::option::Option<CryptoHash>,
3582 pub gas_price: ::std::string::String,
3583 pub hash: CryptoHash,
3584 pub height: u64,
3585 pub last_ds_final_block: CryptoHash,
3586 pub last_final_block: CryptoHash,
3587 pub latest_protocol_version: u32,
3588 pub next_bp_hash: CryptoHash,
3589 pub next_epoch_id: CryptoHash,
3590 pub outcome_root: CryptoHash,
3591 #[doc = "The hash of the previous Block"]
3592 pub prev_hash: CryptoHash,
3593 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3594 pub prev_height: ::std::option::Option<u64>,
3595 pub prev_state_root: CryptoHash,
3596 pub random_value: CryptoHash,
3597 #[doc = "TODO(2271): deprecated."]
3598 pub rent_paid: ::std::string::String,
3599 #[doc = "Signature of the block producer."]
3600 pub signature: Signature,
3601 #[doc = "Legacy json number. Should not be used."]
3602 pub timestamp: u64,
3603 pub timestamp_nanosec: ::std::string::String,
3604 pub total_supply: ::std::string::String,
3605 pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
3606 #[doc = "TODO(2271): deprecated."]
3607 pub validator_reward: ::std::string::String,
3608}
3609impl ::std::convert::From<&BlockHeaderView> for BlockHeaderView {
3610 fn from(value: &BlockHeaderView) -> Self {
3611 value.clone()
3612 }
3613}
3614#[doc = "`BlockId`"]
3615#[doc = r""]
3616#[doc = r" <details><summary>JSON schema</summary>"]
3617#[doc = r""]
3618#[doc = r" ```json"]
3619#[doc = "{"]
3620#[doc = " \"anyOf\": ["]
3621#[doc = " {"]
3622#[doc = " \"title\": \"block_height\","]
3623#[doc = " \"type\": \"integer\","]
3624#[doc = " \"format\": \"uint64\","]
3625#[doc = " \"minimum\": 0.0"]
3626#[doc = " },"]
3627#[doc = " {"]
3628#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3629#[doc = " }"]
3630#[doc = " ]"]
3631#[doc = "}"]
3632#[doc = r" ```"]
3633#[doc = r" </details>"]
3634#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3635#[serde(untagged)]
3636pub enum BlockId {
3637 BlockHeight(u64),
3638 CryptoHash(CryptoHash),
3639}
3640impl ::std::convert::From<&Self> for BlockId {
3641 fn from(value: &BlockId) -> Self {
3642 value.clone()
3643 }
3644}
3645impl ::std::str::FromStr for BlockId {
3646 type Err = self::error::ConversionError;
3647 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3648 if let Ok(v) = value.parse() {
3649 Ok(Self::BlockHeight(v))
3650 } else if let Ok(v) = value.parse() {
3651 Ok(Self::CryptoHash(v))
3652 } else {
3653 Err("string conversion failed for all variants".into())
3654 }
3655 }
3656}
3657impl ::std::convert::TryFrom<&str> for BlockId {
3658 type Error = self::error::ConversionError;
3659 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3660 value.parse()
3661 }
3662}
3663impl ::std::convert::TryFrom<&::std::string::String> for BlockId {
3664 type Error = self::error::ConversionError;
3665 fn try_from(
3666 value: &::std::string::String,
3667 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3668 value.parse()
3669 }
3670}
3671impl ::std::convert::TryFrom<::std::string::String> for BlockId {
3672 type Error = self::error::ConversionError;
3673 fn try_from(
3674 value: ::std::string::String,
3675 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3676 value.parse()
3677 }
3678}
3679impl ::std::fmt::Display for BlockId {
3680 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3681 match self {
3682 Self::BlockHeight(x) => x.fmt(f),
3683 Self::CryptoHash(x) => x.fmt(f),
3684 }
3685 }
3686}
3687impl ::std::convert::From<u64> for BlockId {
3688 fn from(value: u64) -> Self {
3689 Self::BlockHeight(value)
3690 }
3691}
3692impl ::std::convert::From<CryptoHash> for BlockId {
3693 fn from(value: CryptoHash) -> Self {
3694 Self::CryptoHash(value)
3695 }
3696}
3697#[doc = "Height and hash of a block"]
3698#[doc = r""]
3699#[doc = r" <details><summary>JSON schema</summary>"]
3700#[doc = r""]
3701#[doc = r" ```json"]
3702#[doc = "{"]
3703#[doc = " \"description\": \"Height and hash of a block\","]
3704#[doc = " \"type\": \"object\","]
3705#[doc = " \"required\": ["]
3706#[doc = " \"hash\","]
3707#[doc = " \"height\""]
3708#[doc = " ],"]
3709#[doc = " \"properties\": {"]
3710#[doc = " \"hash\": {"]
3711#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
3712#[doc = " },"]
3713#[doc = " \"height\": {"]
3714#[doc = " \"type\": \"integer\","]
3715#[doc = " \"format\": \"uint64\","]
3716#[doc = " \"minimum\": 0.0"]
3717#[doc = " }"]
3718#[doc = " }"]
3719#[doc = "}"]
3720#[doc = r" ```"]
3721#[doc = r" </details>"]
3722#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3723pub struct BlockStatusView {
3724 pub hash: CryptoHash,
3725 pub height: u64,
3726}
3727impl ::std::convert::From<&BlockStatusView> for BlockStatusView {
3728 fn from(value: &BlockStatusView) -> Self {
3729 value.clone()
3730 }
3731}
3732#[doc = "`CallFunctionByBlockIdRequestType`"]
3733#[doc = r""]
3734#[doc = r" <details><summary>JSON schema</summary>"]
3735#[doc = r""]
3736#[doc = r" ```json"]
3737#[doc = "{"]
3738#[doc = " \"type\": \"string\","]
3739#[doc = " \"enum\": ["]
3740#[doc = " \"call_function\""]
3741#[doc = " ]"]
3742#[doc = "}"]
3743#[doc = r" ```"]
3744#[doc = r" </details>"]
3745#[derive(
3746 :: serde :: Deserialize,
3747 :: serde :: Serialize,
3748 Clone,
3749 Copy,
3750 Debug,
3751 Eq,
3752 Hash,
3753 Ord,
3754 PartialEq,
3755 PartialOrd,
3756)]
3757pub enum CallFunctionByBlockIdRequestType {
3758 #[serde(rename = "call_function")]
3759 CallFunction,
3760}
3761impl ::std::convert::From<&Self> for CallFunctionByBlockIdRequestType {
3762 fn from(value: &CallFunctionByBlockIdRequestType) -> Self {
3763 value.clone()
3764 }
3765}
3766impl ::std::fmt::Display for CallFunctionByBlockIdRequestType {
3767 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3768 match *self {
3769 Self::CallFunction => write!(f, "call_function"),
3770 }
3771 }
3772}
3773impl ::std::str::FromStr for CallFunctionByBlockIdRequestType {
3774 type Err = self::error::ConversionError;
3775 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3776 match value {
3777 "call_function" => Ok(Self::CallFunction),
3778 _ => Err("invalid value".into()),
3779 }
3780 }
3781}
3782impl ::std::convert::TryFrom<&str> for CallFunctionByBlockIdRequestType {
3783 type Error = self::error::ConversionError;
3784 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3785 value.parse()
3786 }
3787}
3788impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByBlockIdRequestType {
3789 type Error = self::error::ConversionError;
3790 fn try_from(
3791 value: &::std::string::String,
3792 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3793 value.parse()
3794 }
3795}
3796impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByBlockIdRequestType {
3797 type Error = self::error::ConversionError;
3798 fn try_from(
3799 value: ::std::string::String,
3800 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3801 value.parse()
3802 }
3803}
3804#[doc = "`CallFunctionByFinalityRequestType`"]
3805#[doc = r""]
3806#[doc = r" <details><summary>JSON schema</summary>"]
3807#[doc = r""]
3808#[doc = r" ```json"]
3809#[doc = "{"]
3810#[doc = " \"type\": \"string\","]
3811#[doc = " \"enum\": ["]
3812#[doc = " \"call_function\""]
3813#[doc = " ]"]
3814#[doc = "}"]
3815#[doc = r" ```"]
3816#[doc = r" </details>"]
3817#[derive(
3818 :: serde :: Deserialize,
3819 :: serde :: Serialize,
3820 Clone,
3821 Copy,
3822 Debug,
3823 Eq,
3824 Hash,
3825 Ord,
3826 PartialEq,
3827 PartialOrd,
3828)]
3829pub enum CallFunctionByFinalityRequestType {
3830 #[serde(rename = "call_function")]
3831 CallFunction,
3832}
3833impl ::std::convert::From<&Self> for CallFunctionByFinalityRequestType {
3834 fn from(value: &CallFunctionByFinalityRequestType) -> Self {
3835 value.clone()
3836 }
3837}
3838impl ::std::fmt::Display for CallFunctionByFinalityRequestType {
3839 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3840 match *self {
3841 Self::CallFunction => write!(f, "call_function"),
3842 }
3843 }
3844}
3845impl ::std::str::FromStr for CallFunctionByFinalityRequestType {
3846 type Err = self::error::ConversionError;
3847 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3848 match value {
3849 "call_function" => Ok(Self::CallFunction),
3850 _ => Err("invalid value".into()),
3851 }
3852 }
3853}
3854impl ::std::convert::TryFrom<&str> for CallFunctionByFinalityRequestType {
3855 type Error = self::error::ConversionError;
3856 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3857 value.parse()
3858 }
3859}
3860impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionByFinalityRequestType {
3861 type Error = self::error::ConversionError;
3862 fn try_from(
3863 value: &::std::string::String,
3864 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3865 value.parse()
3866 }
3867}
3868impl ::std::convert::TryFrom<::std::string::String> for CallFunctionByFinalityRequestType {
3869 type Error = self::error::ConversionError;
3870 fn try_from(
3871 value: ::std::string::String,
3872 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3873 value.parse()
3874 }
3875}
3876#[doc = "`CallFunctionBySyncCheckpointRequestType`"]
3877#[doc = r""]
3878#[doc = r" <details><summary>JSON schema</summary>"]
3879#[doc = r""]
3880#[doc = r" ```json"]
3881#[doc = "{"]
3882#[doc = " \"type\": \"string\","]
3883#[doc = " \"enum\": ["]
3884#[doc = " \"call_function\""]
3885#[doc = " ]"]
3886#[doc = "}"]
3887#[doc = r" ```"]
3888#[doc = r" </details>"]
3889#[derive(
3890 :: serde :: Deserialize,
3891 :: serde :: Serialize,
3892 Clone,
3893 Copy,
3894 Debug,
3895 Eq,
3896 Hash,
3897 Ord,
3898 PartialEq,
3899 PartialOrd,
3900)]
3901pub enum CallFunctionBySyncCheckpointRequestType {
3902 #[serde(rename = "call_function")]
3903 CallFunction,
3904}
3905impl ::std::convert::From<&Self> for CallFunctionBySyncCheckpointRequestType {
3906 fn from(value: &CallFunctionBySyncCheckpointRequestType) -> Self {
3907 value.clone()
3908 }
3909}
3910impl ::std::fmt::Display for CallFunctionBySyncCheckpointRequestType {
3911 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3912 match *self {
3913 Self::CallFunction => write!(f, "call_function"),
3914 }
3915 }
3916}
3917impl ::std::str::FromStr for CallFunctionBySyncCheckpointRequestType {
3918 type Err = self::error::ConversionError;
3919 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3920 match value {
3921 "call_function" => Ok(Self::CallFunction),
3922 _ => Err("invalid value".into()),
3923 }
3924 }
3925}
3926impl ::std::convert::TryFrom<&str> for CallFunctionBySyncCheckpointRequestType {
3927 type Error = self::error::ConversionError;
3928 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3929 value.parse()
3930 }
3931}
3932impl ::std::convert::TryFrom<&::std::string::String> for CallFunctionBySyncCheckpointRequestType {
3933 type Error = self::error::ConversionError;
3934 fn try_from(
3935 value: &::std::string::String,
3936 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3937 value.parse()
3938 }
3939}
3940impl ::std::convert::TryFrom<::std::string::String> for CallFunctionBySyncCheckpointRequestType {
3941 type Error = self::error::ConversionError;
3942 fn try_from(
3943 value: ::std::string::String,
3944 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3945 value.parse()
3946 }
3947}
3948#[doc = "A result returned by contract method"]
3949#[doc = r""]
3950#[doc = r" <details><summary>JSON schema</summary>"]
3951#[doc = r""]
3952#[doc = r" ```json"]
3953#[doc = "{"]
3954#[doc = " \"description\": \"A result returned by contract method\","]
3955#[doc = " \"type\": \"object\","]
3956#[doc = " \"required\": ["]
3957#[doc = " \"logs\","]
3958#[doc = " \"result\""]
3959#[doc = " ],"]
3960#[doc = " \"properties\": {"]
3961#[doc = " \"logs\": {"]
3962#[doc = " \"type\": \"array\","]
3963#[doc = " \"items\": {"]
3964#[doc = " \"type\": \"string\""]
3965#[doc = " }"]
3966#[doc = " },"]
3967#[doc = " \"result\": {"]
3968#[doc = " \"type\": \"array\","]
3969#[doc = " \"items\": {"]
3970#[doc = " \"type\": \"integer\","]
3971#[doc = " \"format\": \"uint8\","]
3972#[doc = " \"maximum\": 255.0,"]
3973#[doc = " \"minimum\": 0.0"]
3974#[doc = " }"]
3975#[doc = " }"]
3976#[doc = " }"]
3977#[doc = "}"]
3978#[doc = r" ```"]
3979#[doc = r" </details>"]
3980#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3981pub struct CallResult {
3982 pub logs: ::std::vec::Vec<::std::string::String>,
3983 pub result: ::std::vec::Vec<u8>,
3984}
3985impl ::std::convert::From<&CallResult> for CallResult {
3986 fn from(value: &CallResult) -> Self {
3987 value.clone()
3988 }
3989}
3990#[doc = "Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process"]
3991#[doc = r""]
3992#[doc = r" <details><summary>JSON schema</summary>"]
3993#[doc = r""]
3994#[doc = r" ```json"]
3995#[doc = "{"]
3996#[doc = " \"description\": \"Status of the [catchup](https://near.github.io/nearcore/architecture/how/sync.html#catchup) process\","]
3997#[doc = " \"type\": \"object\","]
3998#[doc = " \"required\": ["]
3999#[doc = " \"blocks_to_catchup\","]
4000#[doc = " \"shard_sync_status\","]
4001#[doc = " \"sync_block_hash\","]
4002#[doc = " \"sync_block_height\""]
4003#[doc = " ],"]
4004#[doc = " \"properties\": {"]
4005#[doc = " \"blocks_to_catchup\": {"]
4006#[doc = " \"type\": \"array\","]
4007#[doc = " \"items\": {"]
4008#[doc = " \"$ref\": \"#/components/schemas/BlockStatusView\""]
4009#[doc = " }"]
4010#[doc = " },"]
4011#[doc = " \"shard_sync_status\": {"]
4012#[doc = " \"type\": \"object\","]
4013#[doc = " \"additionalProperties\": false"]
4014#[doc = " },"]
4015#[doc = " \"sync_block_hash\": {"]
4016#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4017#[doc = " },"]
4018#[doc = " \"sync_block_height\": {"]
4019#[doc = " \"type\": \"integer\","]
4020#[doc = " \"format\": \"uint64\","]
4021#[doc = " \"minimum\": 0.0"]
4022#[doc = " }"]
4023#[doc = " }"]
4024#[doc = "}"]
4025#[doc = r" ```"]
4026#[doc = r" </details>"]
4027#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4028pub struct CatchupStatusView {
4029 pub blocks_to_catchup: ::std::vec::Vec<BlockStatusView>,
4030 pub shard_sync_status: CatchupStatusViewShardSyncStatus,
4031 pub sync_block_hash: CryptoHash,
4032 pub sync_block_height: u64,
4033}
4034impl ::std::convert::From<&CatchupStatusView> for CatchupStatusView {
4035 fn from(value: &CatchupStatusView) -> Self {
4036 value.clone()
4037 }
4038}
4039#[doc = "`CatchupStatusViewShardSyncStatus`"]
4040#[doc = r""]
4041#[doc = r" <details><summary>JSON schema</summary>"]
4042#[doc = r""]
4043#[doc = r" ```json"]
4044#[doc = "{"]
4045#[doc = " \"type\": \"object\","]
4046#[doc = " \"additionalProperties\": false"]
4047#[doc = "}"]
4048#[doc = r" ```"]
4049#[doc = r" </details>"]
4050#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4051#[serde(deny_unknown_fields)]
4052pub struct CatchupStatusViewShardSyncStatus {}
4053impl ::std::convert::From<&CatchupStatusViewShardSyncStatus> for CatchupStatusViewShardSyncStatus {
4054 fn from(value: &CatchupStatusViewShardSyncStatus) -> Self {
4055 value.clone()
4056 }
4057}
4058impl ::std::default::Default for CatchupStatusViewShardSyncStatus {
4059 fn default() -> Self {
4060 Self {}
4061 }
4062}
4063#[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."]
4064#[doc = r""]
4065#[doc = r" <details><summary>JSON schema</summary>"]
4066#[doc = r""]
4067#[doc = r" ```json"]
4068#[doc = "{"]
4069#[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.\","]
4070#[doc = " \"type\": \"object\","]
4071#[doc = " \"required\": ["]
4072#[doc = " \"enabled\","]
4073#[doc = " \"uris\""]
4074#[doc = " ],"]
4075#[doc = " \"properties\": {"]
4076#[doc = " \"enabled\": {"]
4077#[doc = " \"type\": \"boolean\""]
4078#[doc = " },"]
4079#[doc = " \"uris\": {"]
4080#[doc = " \"$ref\": \"#/components/schemas/ChunkDistributionUris\""]
4081#[doc = " }"]
4082#[doc = " }"]
4083#[doc = "}"]
4084#[doc = r" ```"]
4085#[doc = r" </details>"]
4086#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4087pub struct ChunkDistributionNetworkConfig {
4088 pub enabled: bool,
4089 pub uris: ChunkDistributionUris,
4090}
4091impl ::std::convert::From<&ChunkDistributionNetworkConfig> for ChunkDistributionNetworkConfig {
4092 fn from(value: &ChunkDistributionNetworkConfig) -> Self {
4093 value.clone()
4094 }
4095}
4096#[doc = "URIs for the Chunk Distribution Network feature."]
4097#[doc = r""]
4098#[doc = r" <details><summary>JSON schema</summary>"]
4099#[doc = r""]
4100#[doc = r" ```json"]
4101#[doc = "{"]
4102#[doc = " \"description\": \"URIs for the Chunk Distribution Network feature.\","]
4103#[doc = " \"type\": \"object\","]
4104#[doc = " \"required\": ["]
4105#[doc = " \"get\","]
4106#[doc = " \"set\""]
4107#[doc = " ],"]
4108#[doc = " \"properties\": {"]
4109#[doc = " \"get\": {"]
4110#[doc = " \"description\": \"URI for pulling chunks from the stream.\","]
4111#[doc = " \"type\": \"string\""]
4112#[doc = " },"]
4113#[doc = " \"set\": {"]
4114#[doc = " \"description\": \"URI for publishing chunks to the stream.\","]
4115#[doc = " \"type\": \"string\""]
4116#[doc = " }"]
4117#[doc = " }"]
4118#[doc = "}"]
4119#[doc = r" ```"]
4120#[doc = r" </details>"]
4121#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4122pub struct ChunkDistributionUris {
4123 #[doc = "URI for pulling chunks from the stream."]
4124 pub get: ::std::string::String,
4125 #[doc = "URI for publishing chunks to the stream."]
4126 pub set: ::std::string::String,
4127}
4128impl ::std::convert::From<&ChunkDistributionUris> for ChunkDistributionUris {
4129 fn from(value: &ChunkDistributionUris) -> Self {
4130 value.clone()
4131 }
4132}
4133#[doc = "Contains main info about the chunk."]
4134#[doc = r""]
4135#[doc = r" <details><summary>JSON schema</summary>"]
4136#[doc = r""]
4137#[doc = r" ```json"]
4138#[doc = "{"]
4139#[doc = " \"description\": \"Contains main info about the chunk.\","]
4140#[doc = " \"type\": \"object\","]
4141#[doc = " \"required\": ["]
4142#[doc = " \"balance_burnt\","]
4143#[doc = " \"chunk_hash\","]
4144#[doc = " \"encoded_length\","]
4145#[doc = " \"encoded_merkle_root\","]
4146#[doc = " \"gas_limit\","]
4147#[doc = " \"gas_used\","]
4148#[doc = " \"height_created\","]
4149#[doc = " \"height_included\","]
4150#[doc = " \"outcome_root\","]
4151#[doc = " \"outgoing_receipts_root\","]
4152#[doc = " \"prev_block_hash\","]
4153#[doc = " \"prev_state_root\","]
4154#[doc = " \"rent_paid\","]
4155#[doc = " \"shard_id\","]
4156#[doc = " \"signature\","]
4157#[doc = " \"tx_root\","]
4158#[doc = " \"validator_proposals\","]
4159#[doc = " \"validator_reward\""]
4160#[doc = " ],"]
4161#[doc = " \"properties\": {"]
4162#[doc = " \"balance_burnt\": {"]
4163#[doc = " \"type\": \"string\""]
4164#[doc = " },"]
4165#[doc = " \"bandwidth_requests\": {"]
4166#[doc = " \"anyOf\": ["]
4167#[doc = " {"]
4168#[doc = " \"$ref\": \"#/components/schemas/BandwidthRequests\""]
4169#[doc = " },"]
4170#[doc = " {"]
4171#[doc = " \"type\": \"null\""]
4172#[doc = " }"]
4173#[doc = " ]"]
4174#[doc = " },"]
4175#[doc = " \"chunk_hash\": {"]
4176#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4177#[doc = " },"]
4178#[doc = " \"congestion_info\": {"]
4179#[doc = " \"anyOf\": ["]
4180#[doc = " {"]
4181#[doc = " \"$ref\": \"#/components/schemas/CongestionInfoView\""]
4182#[doc = " },"]
4183#[doc = " {"]
4184#[doc = " \"type\": \"null\""]
4185#[doc = " }"]
4186#[doc = " ]"]
4187#[doc = " },"]
4188#[doc = " \"encoded_length\": {"]
4189#[doc = " \"type\": \"integer\","]
4190#[doc = " \"format\": \"uint64\","]
4191#[doc = " \"minimum\": 0.0"]
4192#[doc = " },"]
4193#[doc = " \"encoded_merkle_root\": {"]
4194#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4195#[doc = " },"]
4196#[doc = " \"gas_limit\": {"]
4197#[doc = " \"type\": \"integer\","]
4198#[doc = " \"format\": \"uint64\","]
4199#[doc = " \"minimum\": 0.0"]
4200#[doc = " },"]
4201#[doc = " \"gas_used\": {"]
4202#[doc = " \"type\": \"integer\","]
4203#[doc = " \"format\": \"uint64\","]
4204#[doc = " \"minimum\": 0.0"]
4205#[doc = " },"]
4206#[doc = " \"height_created\": {"]
4207#[doc = " \"type\": \"integer\","]
4208#[doc = " \"format\": \"uint64\","]
4209#[doc = " \"minimum\": 0.0"]
4210#[doc = " },"]
4211#[doc = " \"height_included\": {"]
4212#[doc = " \"type\": \"integer\","]
4213#[doc = " \"format\": \"uint64\","]
4214#[doc = " \"minimum\": 0.0"]
4215#[doc = " },"]
4216#[doc = " \"outcome_root\": {"]
4217#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4218#[doc = " },"]
4219#[doc = " \"outgoing_receipts_root\": {"]
4220#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4221#[doc = " },"]
4222#[doc = " \"prev_block_hash\": {"]
4223#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4224#[doc = " },"]
4225#[doc = " \"prev_state_root\": {"]
4226#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4227#[doc = " },"]
4228#[doc = " \"rent_paid\": {"]
4229#[doc = " \"description\": \"TODO(2271): deprecated.\","]
4230#[doc = " \"type\": \"string\""]
4231#[doc = " },"]
4232#[doc = " \"shard_id\": {"]
4233#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
4234#[doc = " },"]
4235#[doc = " \"signature\": {"]
4236#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
4237#[doc = " },"]
4238#[doc = " \"tx_root\": {"]
4239#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4240#[doc = " },"]
4241#[doc = " \"validator_proposals\": {"]
4242#[doc = " \"type\": \"array\","]
4243#[doc = " \"items\": {"]
4244#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
4245#[doc = " }"]
4246#[doc = " },"]
4247#[doc = " \"validator_reward\": {"]
4248#[doc = " \"description\": \"TODO(2271): deprecated.\","]
4249#[doc = " \"type\": \"string\""]
4250#[doc = " }"]
4251#[doc = " }"]
4252#[doc = "}"]
4253#[doc = r" ```"]
4254#[doc = r" </details>"]
4255#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4256pub struct ChunkHeaderView {
4257 pub balance_burnt: ::std::string::String,
4258 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4259 pub bandwidth_requests: ::std::option::Option<BandwidthRequests>,
4260 pub chunk_hash: CryptoHash,
4261 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4262 pub congestion_info: ::std::option::Option<CongestionInfoView>,
4263 pub encoded_length: u64,
4264 pub encoded_merkle_root: CryptoHash,
4265 pub gas_limit: u64,
4266 pub gas_used: u64,
4267 pub height_created: u64,
4268 pub height_included: u64,
4269 pub outcome_root: CryptoHash,
4270 pub outgoing_receipts_root: CryptoHash,
4271 pub prev_block_hash: CryptoHash,
4272 pub prev_state_root: CryptoHash,
4273 #[doc = "TODO(2271): deprecated."]
4274 pub rent_paid: ::std::string::String,
4275 pub shard_id: ShardId,
4276 pub signature: Signature,
4277 pub tx_root: CryptoHash,
4278 pub validator_proposals: ::std::vec::Vec<ValidatorStakeView>,
4279 #[doc = "TODO(2271): deprecated."]
4280 pub validator_reward: ::std::string::String,
4281}
4282impl ::std::convert::From<&ChunkHeaderView> for ChunkHeaderView {
4283 fn from(value: &ChunkHeaderView) -> Self {
4284 value.clone()
4285 }
4286}
4287#[doc = "`CompilationError`"]
4288#[doc = r""]
4289#[doc = r" <details><summary>JSON schema</summary>"]
4290#[doc = r""]
4291#[doc = r" ```json"]
4292#[doc = "{"]
4293#[doc = " \"oneOf\": ["]
4294#[doc = " {"]
4295#[doc = " \"type\": \"object\","]
4296#[doc = " \"required\": ["]
4297#[doc = " \"CodeDoesNotExist\""]
4298#[doc = " ],"]
4299#[doc = " \"properties\": {"]
4300#[doc = " \"CodeDoesNotExist\": {"]
4301#[doc = " \"type\": \"object\","]
4302#[doc = " \"required\": ["]
4303#[doc = " \"account_id\""]
4304#[doc = " ],"]
4305#[doc = " \"properties\": {"]
4306#[doc = " \"account_id\": {"]
4307#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
4308#[doc = " }"]
4309#[doc = " }"]
4310#[doc = " }"]
4311#[doc = " },"]
4312#[doc = " \"additionalProperties\": false"]
4313#[doc = " },"]
4314#[doc = " {"]
4315#[doc = " \"type\": \"object\","]
4316#[doc = " \"required\": ["]
4317#[doc = " \"PrepareError\""]
4318#[doc = " ],"]
4319#[doc = " \"properties\": {"]
4320#[doc = " \"PrepareError\": {"]
4321#[doc = " \"$ref\": \"#/components/schemas/PrepareError\""]
4322#[doc = " }"]
4323#[doc = " },"]
4324#[doc = " \"additionalProperties\": false"]
4325#[doc = " },"]
4326#[doc = " {"]
4327#[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\","]
4328#[doc = " \"type\": \"object\","]
4329#[doc = " \"required\": ["]
4330#[doc = " \"WasmerCompileError\""]
4331#[doc = " ],"]
4332#[doc = " \"properties\": {"]
4333#[doc = " \"WasmerCompileError\": {"]
4334#[doc = " \"type\": \"object\","]
4335#[doc = " \"required\": ["]
4336#[doc = " \"msg\""]
4337#[doc = " ],"]
4338#[doc = " \"properties\": {"]
4339#[doc = " \"msg\": {"]
4340#[doc = " \"type\": \"string\""]
4341#[doc = " }"]
4342#[doc = " }"]
4343#[doc = " }"]
4344#[doc = " },"]
4345#[doc = " \"additionalProperties\": false"]
4346#[doc = " }"]
4347#[doc = " ]"]
4348#[doc = "}"]
4349#[doc = r" ```"]
4350#[doc = r" </details>"]
4351#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4352pub enum CompilationError {
4353 CodeDoesNotExist {
4354 account_id: AccountId,
4355 },
4356 PrepareError(PrepareError),
4357 #[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"]
4358 WasmerCompileError {
4359 msg: ::std::string::String,
4360 },
4361}
4362impl ::std::convert::From<&Self> for CompilationError {
4363 fn from(value: &CompilationError) -> Self {
4364 value.clone()
4365 }
4366}
4367impl ::std::convert::From<PrepareError> for CompilationError {
4368 fn from(value: PrepareError) -> Self {
4369 Self::PrepareError(value)
4370 }
4371}
4372#[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)"]
4373#[doc = r""]
4374#[doc = r" <details><summary>JSON schema</summary>"]
4375#[doc = r""]
4376#[doc = r" ```json"]
4377#[doc = "{"]
4378#[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)\","]
4379#[doc = " \"type\": \"object\","]
4380#[doc = " \"required\": ["]
4381#[doc = " \"allowed_shard_outgoing_gas\","]
4382#[doc = " \"max_congestion_incoming_gas\","]
4383#[doc = " \"max_congestion_memory_consumption\","]
4384#[doc = " \"max_congestion_missed_chunks\","]
4385#[doc = " \"max_congestion_outgoing_gas\","]
4386#[doc = " \"max_outgoing_gas\","]
4387#[doc = " \"max_tx_gas\","]
4388#[doc = " \"min_outgoing_gas\","]
4389#[doc = " \"min_tx_gas\","]
4390#[doc = " \"outgoing_receipts_big_size_limit\","]
4391#[doc = " \"outgoing_receipts_usual_size_limit\","]
4392#[doc = " \"reject_tx_congestion_threshold\""]
4393#[doc = " ],"]
4394#[doc = " \"properties\": {"]
4395#[doc = " \"allowed_shard_outgoing_gas\": {"]
4396#[doc = " \"description\": \"How much gas the chosen allowed shard can send to a 100% congested shard.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4397#[doc = " \"type\": \"integer\","]
4398#[doc = " \"format\": \"uint64\","]
4399#[doc = " \"minimum\": 0.0"]
4400#[doc = " },"]
4401#[doc = " \"max_congestion_incoming_gas\": {"]
4402#[doc = " \"description\": \"How much gas in delayed receipts of a shard is 100% incoming congestion.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4403#[doc = " \"type\": \"integer\","]
4404#[doc = " \"format\": \"uint64\","]
4405#[doc = " \"minimum\": 0.0"]
4406#[doc = " },"]
4407#[doc = " \"max_congestion_memory_consumption\": {"]
4408#[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.\","]
4409#[doc = " \"type\": \"integer\","]
4410#[doc = " \"format\": \"uint64\","]
4411#[doc = " \"minimum\": 0.0"]
4412#[doc = " },"]
4413#[doc = " \"max_congestion_missed_chunks\": {"]
4414#[doc = " \"description\": \"How many missed chunks in a row in a shard is considered 100% congested.\","]
4415#[doc = " \"type\": \"integer\","]
4416#[doc = " \"format\": \"uint64\","]
4417#[doc = " \"minimum\": 0.0"]
4418#[doc = " },"]
4419#[doc = " \"max_congestion_outgoing_gas\": {"]
4420#[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.\","]
4421#[doc = " \"type\": \"integer\","]
4422#[doc = " \"format\": \"uint64\","]
4423#[doc = " \"minimum\": 0.0"]
4424#[doc = " },"]
4425#[doc = " \"max_outgoing_gas\": {"]
4426#[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.\","]
4427#[doc = " \"type\": \"integer\","]
4428#[doc = " \"format\": \"uint64\","]
4429#[doc = " \"minimum\": 0.0"]
4430#[doc = " },"]
4431#[doc = " \"max_tx_gas\": {"]
4432#[doc = " \"description\": \"The maximum amount of gas in a chunk spent on converting new transactions to\\nreceipts.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4433#[doc = " \"type\": \"integer\","]
4434#[doc = " \"format\": \"uint64\","]
4435#[doc = " \"minimum\": 0.0"]
4436#[doc = " },"]
4437#[doc = " \"min_outgoing_gas\": {"]
4438#[doc = " \"description\": \"The minimum gas each shard can send to a shard that is not fully congested.\\n\\nSee [`CongestionControlConfig`] for more details.\","]
4439#[doc = " \"type\": \"integer\","]
4440#[doc = " \"format\": \"uint64\","]
4441#[doc = " \"minimum\": 0.0"]
4442#[doc = " },"]
4443#[doc = " \"min_tx_gas\": {"]
4444#[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.\","]
4445#[doc = " \"type\": \"integer\","]
4446#[doc = " \"format\": \"uint64\","]
4447#[doc = " \"minimum\": 0.0"]
4448#[doc = " },"]
4449#[doc = " \"outgoing_receipts_big_size_limit\": {"]
4450#[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.\","]
4451#[doc = " \"type\": \"integer\","]
4452#[doc = " \"format\": \"uint64\","]
4453#[doc = " \"minimum\": 0.0"]
4454#[doc = " },"]
4455#[doc = " \"outgoing_receipts_usual_size_limit\": {"]
4456#[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.\","]
4457#[doc = " \"type\": \"integer\","]
4458#[doc = " \"format\": \"uint64\","]
4459#[doc = " \"minimum\": 0.0"]
4460#[doc = " },"]
4461#[doc = " \"reject_tx_congestion_threshold\": {"]
4462#[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.\","]
4463#[doc = " \"type\": \"number\","]
4464#[doc = " \"format\": \"double\""]
4465#[doc = " }"]
4466#[doc = " }"]
4467#[doc = "}"]
4468#[doc = r" ```"]
4469#[doc = r" </details>"]
4470#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4471pub struct CongestionControlConfigView {
4472 #[doc = "How much gas the chosen allowed shard can send to a 100% congested shard.\n\nSee [`CongestionControlConfig`] for more details."]
4473 pub allowed_shard_outgoing_gas: u64,
4474 #[doc = "How much gas in delayed receipts of a shard is 100% incoming congestion.\n\nSee [`CongestionControlConfig`] for more details."]
4475 pub max_congestion_incoming_gas: u64,
4476 #[doc = "How much memory space of all delayed and buffered receipts in a shard is\nconsidered 100% congested.\n\nSee [`CongestionControlConfig`] for more details."]
4477 pub max_congestion_memory_consumption: u64,
4478 #[doc = "How many missed chunks in a row in a shard is considered 100% congested."]
4479 pub max_congestion_missed_chunks: u64,
4480 #[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."]
4481 pub max_congestion_outgoing_gas: u64,
4482 #[doc = "The maximum amount of gas attached to receipts a shard can forward to\nanother shard per chunk.\n\nSee [`CongestionControlConfig`] for more details."]
4483 pub max_outgoing_gas: u64,
4484 #[doc = "The maximum amount of gas in a chunk spent on converting new transactions to\nreceipts.\n\nSee [`CongestionControlConfig`] for more details."]
4485 pub max_tx_gas: u64,
4486 #[doc = "The minimum gas each shard can send to a shard that is not fully congested.\n\nSee [`CongestionControlConfig`] for more details."]
4487 pub min_outgoing_gas: u64,
4488 #[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."]
4489 pub min_tx_gas: u64,
4490 #[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."]
4491 pub outgoing_receipts_big_size_limit: u64,
4492 #[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."]
4493 pub outgoing_receipts_usual_size_limit: u64,
4494 pub reject_tx_congestion_threshold: f64,
4495}
4496impl ::std::convert::From<&CongestionControlConfigView> for CongestionControlConfigView {
4497 fn from(value: &CongestionControlConfigView) -> Self {
4498 value.clone()
4499 }
4500}
4501#[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)"]
4502#[doc = r""]
4503#[doc = r" <details><summary>JSON schema</summary>"]
4504#[doc = r""]
4505#[doc = r" ```json"]
4506#[doc = "{"]
4507#[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)\","]
4508#[doc = " \"type\": \"object\","]
4509#[doc = " \"required\": ["]
4510#[doc = " \"allowed_shard\","]
4511#[doc = " \"buffered_receipts_gas\","]
4512#[doc = " \"delayed_receipts_gas\","]
4513#[doc = " \"receipt_bytes\""]
4514#[doc = " ],"]
4515#[doc = " \"properties\": {"]
4516#[doc = " \"allowed_shard\": {"]
4517#[doc = " \"type\": \"integer\","]
4518#[doc = " \"format\": \"uint16\","]
4519#[doc = " \"maximum\": 65535.0,"]
4520#[doc = " \"minimum\": 0.0"]
4521#[doc = " },"]
4522#[doc = " \"buffered_receipts_gas\": {"]
4523#[doc = " \"type\": \"string\""]
4524#[doc = " },"]
4525#[doc = " \"delayed_receipts_gas\": {"]
4526#[doc = " \"type\": \"string\""]
4527#[doc = " },"]
4528#[doc = " \"receipt_bytes\": {"]
4529#[doc = " \"type\": \"integer\","]
4530#[doc = " \"format\": \"uint64\","]
4531#[doc = " \"minimum\": 0.0"]
4532#[doc = " }"]
4533#[doc = " }"]
4534#[doc = "}"]
4535#[doc = r" ```"]
4536#[doc = r" </details>"]
4537#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4538pub struct CongestionInfoView {
4539 pub allowed_shard: u16,
4540 pub buffered_receipts_gas: ::std::string::String,
4541 pub delayed_receipts_gas: ::std::string::String,
4542 pub receipt_bytes: u64,
4543}
4544impl ::std::convert::From<&CongestionInfoView> for CongestionInfoView {
4545 fn from(value: &CongestionInfoView) -> Self {
4546 value.clone()
4547 }
4548}
4549#[doc = "`ContractCodeChangesByBlockIdChangesType`"]
4550#[doc = r""]
4551#[doc = r" <details><summary>JSON schema</summary>"]
4552#[doc = r""]
4553#[doc = r" ```json"]
4554#[doc = "{"]
4555#[doc = " \"type\": \"string\","]
4556#[doc = " \"enum\": ["]
4557#[doc = " \"contract_code_changes\""]
4558#[doc = " ]"]
4559#[doc = "}"]
4560#[doc = r" ```"]
4561#[doc = r" </details>"]
4562#[derive(
4563 :: serde :: Deserialize,
4564 :: serde :: Serialize,
4565 Clone,
4566 Copy,
4567 Debug,
4568 Eq,
4569 Hash,
4570 Ord,
4571 PartialEq,
4572 PartialOrd,
4573)]
4574pub enum ContractCodeChangesByBlockIdChangesType {
4575 #[serde(rename = "contract_code_changes")]
4576 ContractCodeChanges,
4577}
4578impl ::std::convert::From<&Self> for ContractCodeChangesByBlockIdChangesType {
4579 fn from(value: &ContractCodeChangesByBlockIdChangesType) -> Self {
4580 value.clone()
4581 }
4582}
4583impl ::std::fmt::Display for ContractCodeChangesByBlockIdChangesType {
4584 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4585 match *self {
4586 Self::ContractCodeChanges => write!(f, "contract_code_changes"),
4587 }
4588 }
4589}
4590impl ::std::str::FromStr for ContractCodeChangesByBlockIdChangesType {
4591 type Err = self::error::ConversionError;
4592 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4593 match value {
4594 "contract_code_changes" => Ok(Self::ContractCodeChanges),
4595 _ => Err("invalid value".into()),
4596 }
4597 }
4598}
4599impl ::std::convert::TryFrom<&str> for ContractCodeChangesByBlockIdChangesType {
4600 type Error = self::error::ConversionError;
4601 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4602 value.parse()
4603 }
4604}
4605impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4606 type Error = self::error::ConversionError;
4607 fn try_from(
4608 value: &::std::string::String,
4609 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4610 value.parse()
4611 }
4612}
4613impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByBlockIdChangesType {
4614 type Error = self::error::ConversionError;
4615 fn try_from(
4616 value: ::std::string::String,
4617 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4618 value.parse()
4619 }
4620}
4621#[doc = "`ContractCodeChangesByFinalityChangesType`"]
4622#[doc = r""]
4623#[doc = r" <details><summary>JSON schema</summary>"]
4624#[doc = r""]
4625#[doc = r" ```json"]
4626#[doc = "{"]
4627#[doc = " \"type\": \"string\","]
4628#[doc = " \"enum\": ["]
4629#[doc = " \"contract_code_changes\""]
4630#[doc = " ]"]
4631#[doc = "}"]
4632#[doc = r" ```"]
4633#[doc = r" </details>"]
4634#[derive(
4635 :: serde :: Deserialize,
4636 :: serde :: Serialize,
4637 Clone,
4638 Copy,
4639 Debug,
4640 Eq,
4641 Hash,
4642 Ord,
4643 PartialEq,
4644 PartialOrd,
4645)]
4646pub enum ContractCodeChangesByFinalityChangesType {
4647 #[serde(rename = "contract_code_changes")]
4648 ContractCodeChanges,
4649}
4650impl ::std::convert::From<&Self> for ContractCodeChangesByFinalityChangesType {
4651 fn from(value: &ContractCodeChangesByFinalityChangesType) -> Self {
4652 value.clone()
4653 }
4654}
4655impl ::std::fmt::Display for ContractCodeChangesByFinalityChangesType {
4656 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4657 match *self {
4658 Self::ContractCodeChanges => write!(f, "contract_code_changes"),
4659 }
4660 }
4661}
4662impl ::std::str::FromStr for ContractCodeChangesByFinalityChangesType {
4663 type Err = self::error::ConversionError;
4664 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4665 match value {
4666 "contract_code_changes" => Ok(Self::ContractCodeChanges),
4667 _ => Err("invalid value".into()),
4668 }
4669 }
4670}
4671impl ::std::convert::TryFrom<&str> for ContractCodeChangesByFinalityChangesType {
4672 type Error = self::error::ConversionError;
4673 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4674 value.parse()
4675 }
4676}
4677impl ::std::convert::TryFrom<&::std::string::String> for ContractCodeChangesByFinalityChangesType {
4678 type Error = self::error::ConversionError;
4679 fn try_from(
4680 value: &::std::string::String,
4681 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4682 value.parse()
4683 }
4684}
4685impl ::std::convert::TryFrom<::std::string::String> for ContractCodeChangesByFinalityChangesType {
4686 type Error = self::error::ConversionError;
4687 fn try_from(
4688 value: ::std::string::String,
4689 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4690 value.parse()
4691 }
4692}
4693#[doc = "`ContractCodeChangesBySyncCheckpointChangesType`"]
4694#[doc = r""]
4695#[doc = r" <details><summary>JSON schema</summary>"]
4696#[doc = r""]
4697#[doc = r" ```json"]
4698#[doc = "{"]
4699#[doc = " \"type\": \"string\","]
4700#[doc = " \"enum\": ["]
4701#[doc = " \"contract_code_changes\""]
4702#[doc = " ]"]
4703#[doc = "}"]
4704#[doc = r" ```"]
4705#[doc = r" </details>"]
4706#[derive(
4707 :: serde :: Deserialize,
4708 :: serde :: Serialize,
4709 Clone,
4710 Copy,
4711 Debug,
4712 Eq,
4713 Hash,
4714 Ord,
4715 PartialEq,
4716 PartialOrd,
4717)]
4718pub enum ContractCodeChangesBySyncCheckpointChangesType {
4719 #[serde(rename = "contract_code_changes")]
4720 ContractCodeChanges,
4721}
4722impl ::std::convert::From<&Self> for ContractCodeChangesBySyncCheckpointChangesType {
4723 fn from(value: &ContractCodeChangesBySyncCheckpointChangesType) -> Self {
4724 value.clone()
4725 }
4726}
4727impl ::std::fmt::Display for ContractCodeChangesBySyncCheckpointChangesType {
4728 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4729 match *self {
4730 Self::ContractCodeChanges => write!(f, "contract_code_changes"),
4731 }
4732 }
4733}
4734impl ::std::str::FromStr for ContractCodeChangesBySyncCheckpointChangesType {
4735 type Err = self::error::ConversionError;
4736 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4737 match value {
4738 "contract_code_changes" => Ok(Self::ContractCodeChanges),
4739 _ => Err("invalid value".into()),
4740 }
4741 }
4742}
4743impl ::std::convert::TryFrom<&str> for ContractCodeChangesBySyncCheckpointChangesType {
4744 type Error = self::error::ConversionError;
4745 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4746 value.parse()
4747 }
4748}
4749impl ::std::convert::TryFrom<&::std::string::String>
4750 for ContractCodeChangesBySyncCheckpointChangesType
4751{
4752 type Error = self::error::ConversionError;
4753 fn try_from(
4754 value: &::std::string::String,
4755 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4756 value.parse()
4757 }
4758}
4759impl ::std::convert::TryFrom<::std::string::String>
4760 for ContractCodeChangesBySyncCheckpointChangesType
4761{
4762 type Error = self::error::ConversionError;
4763 fn try_from(
4764 value: ::std::string::String,
4765 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4766 value.parse()
4767 }
4768}
4769#[doc = "A view of the contract code."]
4770#[doc = r""]
4771#[doc = r" <details><summary>JSON schema</summary>"]
4772#[doc = r""]
4773#[doc = r" ```json"]
4774#[doc = "{"]
4775#[doc = " \"description\": \"A view of the contract code.\","]
4776#[doc = " \"type\": \"object\","]
4777#[doc = " \"required\": ["]
4778#[doc = " \"code_base64\","]
4779#[doc = " \"hash\""]
4780#[doc = " ],"]
4781#[doc = " \"properties\": {"]
4782#[doc = " \"code_base64\": {"]
4783#[doc = " \"type\": \"string\""]
4784#[doc = " },"]
4785#[doc = " \"hash\": {"]
4786#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
4787#[doc = " }"]
4788#[doc = " }"]
4789#[doc = "}"]
4790#[doc = r" ```"]
4791#[doc = r" </details>"]
4792#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4793pub struct ContractCodeView {
4794 pub code_base64: ::std::string::String,
4795 pub hash: CryptoHash,
4796}
4797impl ::std::convert::From<&ContractCodeView> for ContractCodeView {
4798 fn from(value: &ContractCodeView) -> Self {
4799 value.clone()
4800 }
4801}
4802#[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)."]
4803#[doc = r""]
4804#[doc = r" <details><summary>JSON schema</summary>"]
4805#[doc = r""]
4806#[doc = r" ```json"]
4807#[doc = "{"]
4808#[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).\","]
4809#[doc = " \"type\": \"object\","]
4810#[doc = " \"required\": ["]
4811#[doc = " \"cost\","]
4812#[doc = " \"cost_category\","]
4813#[doc = " \"gas_used\""]
4814#[doc = " ],"]
4815#[doc = " \"properties\": {"]
4816#[doc = " \"cost\": {"]
4817#[doc = " \"type\": \"string\""]
4818#[doc = " },"]
4819#[doc = " \"cost_category\": {"]
4820#[doc = " \"description\": \"Either ACTION_COST or WASM_HOST_COST.\","]
4821#[doc = " \"type\": \"string\""]
4822#[doc = " },"]
4823#[doc = " \"gas_used\": {"]
4824#[doc = " \"type\": \"string\""]
4825#[doc = " }"]
4826#[doc = " }"]
4827#[doc = "}"]
4828#[doc = r" ```"]
4829#[doc = r" </details>"]
4830#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4831pub struct CostGasUsed {
4832 pub cost: ::std::string::String,
4833 #[doc = "Either ACTION_COST or WASM_HOST_COST."]
4834 pub cost_category: ::std::string::String,
4835 pub gas_used: ::std::string::String,
4836}
4837impl ::std::convert::From<&CostGasUsed> for CostGasUsed {
4838 fn from(value: &CostGasUsed) -> Self {
4839 value.clone()
4840 }
4841}
4842#[doc = "Create account action"]
4843#[doc = r""]
4844#[doc = r" <details><summary>JSON schema</summary>"]
4845#[doc = r""]
4846#[doc = r" ```json"]
4847#[doc = "{"]
4848#[doc = " \"description\": \"Create account action\","]
4849#[doc = " \"type\": \"object\""]
4850#[doc = "}"]
4851#[doc = r" ```"]
4852#[doc = r" </details>"]
4853#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4854#[serde(transparent)]
4855pub struct CreateAccountAction(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
4856impl ::std::ops::Deref for CreateAccountAction {
4857 type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
4858 fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
4859 &self.0
4860 }
4861}
4862impl ::std::convert::From<CreateAccountAction>
4863 for ::serde_json::Map<::std::string::String, ::serde_json::Value>
4864{
4865 fn from(value: CreateAccountAction) -> Self {
4866 value.0
4867 }
4868}
4869impl ::std::convert::From<&CreateAccountAction> for CreateAccountAction {
4870 fn from(value: &CreateAccountAction) -> Self {
4871 value.clone()
4872 }
4873}
4874impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
4875 for CreateAccountAction
4876{
4877 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
4878 Self(value)
4879 }
4880}
4881#[doc = "`CryptoHash`"]
4882#[doc = r""]
4883#[doc = r" <details><summary>JSON schema</summary>"]
4884#[doc = r""]
4885#[doc = r" ```json"]
4886#[doc = "{"]
4887#[doc = " \"type\": \"string\""]
4888#[doc = "}"]
4889#[doc = r" ```"]
4890#[doc = r" </details>"]
4891#[derive(
4892 :: serde :: Deserialize,
4893 :: serde :: Serialize,
4894 Clone,
4895 Debug,
4896 Eq,
4897 Hash,
4898 Ord,
4899 PartialEq,
4900 PartialOrd,
4901)]
4902#[serde(transparent)]
4903pub struct CryptoHash(pub ::std::string::String);
4904impl ::std::ops::Deref for CryptoHash {
4905 type Target = ::std::string::String;
4906 fn deref(&self) -> &::std::string::String {
4907 &self.0
4908 }
4909}
4910impl ::std::convert::From<CryptoHash> for ::std::string::String {
4911 fn from(value: CryptoHash) -> Self {
4912 value.0
4913 }
4914}
4915impl ::std::convert::From<&CryptoHash> for CryptoHash {
4916 fn from(value: &CryptoHash) -> Self {
4917 value.clone()
4918 }
4919}
4920impl ::std::convert::From<::std::string::String> for CryptoHash {
4921 fn from(value: ::std::string::String) -> Self {
4922 Self(value)
4923 }
4924}
4925impl ::std::str::FromStr for CryptoHash {
4926 type Err = ::std::convert::Infallible;
4927 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
4928 Ok(Self(value.to_string()))
4929 }
4930}
4931impl ::std::fmt::Display for CryptoHash {
4932 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4933 self.0.fmt(f)
4934 }
4935}
4936#[doc = "Describes information about the current epoch validator"]
4937#[doc = r""]
4938#[doc = r" <details><summary>JSON schema</summary>"]
4939#[doc = r""]
4940#[doc = r" ```json"]
4941#[doc = "{"]
4942#[doc = " \"description\": \"Describes information about the current epoch validator\","]
4943#[doc = " \"type\": \"object\","]
4944#[doc = " \"required\": ["]
4945#[doc = " \"account_id\","]
4946#[doc = " \"is_slashed\","]
4947#[doc = " \"num_expected_blocks\","]
4948#[doc = " \"num_produced_blocks\","]
4949#[doc = " \"public_key\","]
4950#[doc = " \"shards\","]
4951#[doc = " \"stake\""]
4952#[doc = " ],"]
4953#[doc = " \"properties\": {"]
4954#[doc = " \"account_id\": {"]
4955#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
4956#[doc = " },"]
4957#[doc = " \"is_slashed\": {"]
4958#[doc = " \"type\": \"boolean\""]
4959#[doc = " },"]
4960#[doc = " \"num_expected_blocks\": {"]
4961#[doc = " \"type\": \"integer\","]
4962#[doc = " \"format\": \"uint64\","]
4963#[doc = " \"minimum\": 0.0"]
4964#[doc = " },"]
4965#[doc = " \"num_expected_chunks\": {"]
4966#[doc = " \"default\": 0,"]
4967#[doc = " \"type\": \"integer\","]
4968#[doc = " \"format\": \"uint64\","]
4969#[doc = " \"minimum\": 0.0"]
4970#[doc = " },"]
4971#[doc = " \"num_expected_chunks_per_shard\": {"]
4972#[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.\","]
4973#[doc = " \"default\": [],"]
4974#[doc = " \"type\": \"array\","]
4975#[doc = " \"items\": {"]
4976#[doc = " \"type\": \"integer\","]
4977#[doc = " \"format\": \"uint64\","]
4978#[doc = " \"minimum\": 0.0"]
4979#[doc = " }"]
4980#[doc = " },"]
4981#[doc = " \"num_expected_endorsements\": {"]
4982#[doc = " \"default\": 0,"]
4983#[doc = " \"type\": \"integer\","]
4984#[doc = " \"format\": \"uint64\","]
4985#[doc = " \"minimum\": 0.0"]
4986#[doc = " },"]
4987#[doc = " \"num_expected_endorsements_per_shard\": {"]
4988#[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.\","]
4989#[doc = " \"default\": [],"]
4990#[doc = " \"type\": \"array\","]
4991#[doc = " \"items\": {"]
4992#[doc = " \"type\": \"integer\","]
4993#[doc = " \"format\": \"uint64\","]
4994#[doc = " \"minimum\": 0.0"]
4995#[doc = " }"]
4996#[doc = " },"]
4997#[doc = " \"num_produced_blocks\": {"]
4998#[doc = " \"type\": \"integer\","]
4999#[doc = " \"format\": \"uint64\","]
5000#[doc = " \"minimum\": 0.0"]
5001#[doc = " },"]
5002#[doc = " \"num_produced_chunks\": {"]
5003#[doc = " \"default\": 0,"]
5004#[doc = " \"type\": \"integer\","]
5005#[doc = " \"format\": \"uint64\","]
5006#[doc = " \"minimum\": 0.0"]
5007#[doc = " },"]
5008#[doc = " \"num_produced_chunks_per_shard\": {"]
5009#[doc = " \"default\": [],"]
5010#[doc = " \"type\": \"array\","]
5011#[doc = " \"items\": {"]
5012#[doc = " \"type\": \"integer\","]
5013#[doc = " \"format\": \"uint64\","]
5014#[doc = " \"minimum\": 0.0"]
5015#[doc = " }"]
5016#[doc = " },"]
5017#[doc = " \"num_produced_endorsements\": {"]
5018#[doc = " \"default\": 0,"]
5019#[doc = " \"type\": \"integer\","]
5020#[doc = " \"format\": \"uint64\","]
5021#[doc = " \"minimum\": 0.0"]
5022#[doc = " },"]
5023#[doc = " \"num_produced_endorsements_per_shard\": {"]
5024#[doc = " \"default\": [],"]
5025#[doc = " \"type\": \"array\","]
5026#[doc = " \"items\": {"]
5027#[doc = " \"type\": \"integer\","]
5028#[doc = " \"format\": \"uint64\","]
5029#[doc = " \"minimum\": 0.0"]
5030#[doc = " }"]
5031#[doc = " },"]
5032#[doc = " \"public_key\": {"]
5033#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
5034#[doc = " },"]
5035#[doc = " \"shards\": {"]
5036#[doc = " \"description\": \"Shards this validator is assigned to as chunk producer in the current epoch.\","]
5037#[doc = " \"type\": \"array\","]
5038#[doc = " \"items\": {"]
5039#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
5040#[doc = " }"]
5041#[doc = " },"]
5042#[doc = " \"shards_endorsed\": {"]
5043#[doc = " \"description\": \"Shards this validator is assigned to as chunk validator in the current epoch.\","]
5044#[doc = " \"default\": [],"]
5045#[doc = " \"type\": \"array\","]
5046#[doc = " \"items\": {"]
5047#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
5048#[doc = " }"]
5049#[doc = " },"]
5050#[doc = " \"stake\": {"]
5051#[doc = " \"type\": \"string\""]
5052#[doc = " }"]
5053#[doc = " }"]
5054#[doc = "}"]
5055#[doc = r" ```"]
5056#[doc = r" </details>"]
5057#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5058pub struct CurrentEpochValidatorInfo {
5059 pub account_id: AccountId,
5060 pub is_slashed: bool,
5061 pub num_expected_blocks: u64,
5062 #[serde(default)]
5063 pub num_expected_chunks: u64,
5064 #[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."]
5065 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5066 pub num_expected_chunks_per_shard: ::std::vec::Vec<u64>,
5067 #[serde(default)]
5068 pub num_expected_endorsements: u64,
5069 #[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."]
5070 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5071 pub num_expected_endorsements_per_shard: ::std::vec::Vec<u64>,
5072 pub num_produced_blocks: u64,
5073 #[serde(default)]
5074 pub num_produced_chunks: u64,
5075 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5076 pub num_produced_chunks_per_shard: ::std::vec::Vec<u64>,
5077 #[serde(default)]
5078 pub num_produced_endorsements: u64,
5079 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5080 pub num_produced_endorsements_per_shard: ::std::vec::Vec<u64>,
5081 pub public_key: PublicKey,
5082 #[doc = "Shards this validator is assigned to as chunk producer in the current epoch."]
5083 pub shards: ::std::vec::Vec<ShardId>,
5084 #[doc = "Shards this validator is assigned to as chunk validator in the current epoch."]
5085 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5086 pub shards_endorsed: ::std::vec::Vec<ShardId>,
5087 pub stake: ::std::string::String,
5088}
5089impl ::std::convert::From<&CurrentEpochValidatorInfo> for CurrentEpochValidatorInfo {
5090 fn from(value: &CurrentEpochValidatorInfo) -> Self {
5091 value.clone()
5092 }
5093}
5094#[doc = "`DataChangesByBlockIdChangesType`"]
5095#[doc = r""]
5096#[doc = r" <details><summary>JSON schema</summary>"]
5097#[doc = r""]
5098#[doc = r" ```json"]
5099#[doc = "{"]
5100#[doc = " \"type\": \"string\","]
5101#[doc = " \"enum\": ["]
5102#[doc = " \"data_changes\""]
5103#[doc = " ]"]
5104#[doc = "}"]
5105#[doc = r" ```"]
5106#[doc = r" </details>"]
5107#[derive(
5108 :: serde :: Deserialize,
5109 :: serde :: Serialize,
5110 Clone,
5111 Copy,
5112 Debug,
5113 Eq,
5114 Hash,
5115 Ord,
5116 PartialEq,
5117 PartialOrd,
5118)]
5119pub enum DataChangesByBlockIdChangesType {
5120 #[serde(rename = "data_changes")]
5121 DataChanges,
5122}
5123impl ::std::convert::From<&Self> for DataChangesByBlockIdChangesType {
5124 fn from(value: &DataChangesByBlockIdChangesType) -> Self {
5125 value.clone()
5126 }
5127}
5128impl ::std::fmt::Display for DataChangesByBlockIdChangesType {
5129 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5130 match *self {
5131 Self::DataChanges => write!(f, "data_changes"),
5132 }
5133 }
5134}
5135impl ::std::str::FromStr for DataChangesByBlockIdChangesType {
5136 type Err = self::error::ConversionError;
5137 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5138 match value {
5139 "data_changes" => Ok(Self::DataChanges),
5140 _ => Err("invalid value".into()),
5141 }
5142 }
5143}
5144impl ::std::convert::TryFrom<&str> for DataChangesByBlockIdChangesType {
5145 type Error = self::error::ConversionError;
5146 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5147 value.parse()
5148 }
5149}
5150impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByBlockIdChangesType {
5151 type Error = self::error::ConversionError;
5152 fn try_from(
5153 value: &::std::string::String,
5154 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5155 value.parse()
5156 }
5157}
5158impl ::std::convert::TryFrom<::std::string::String> for DataChangesByBlockIdChangesType {
5159 type Error = self::error::ConversionError;
5160 fn try_from(
5161 value: ::std::string::String,
5162 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5163 value.parse()
5164 }
5165}
5166#[doc = "`DataChangesByFinalityChangesType`"]
5167#[doc = r""]
5168#[doc = r" <details><summary>JSON schema</summary>"]
5169#[doc = r""]
5170#[doc = r" ```json"]
5171#[doc = "{"]
5172#[doc = " \"type\": \"string\","]
5173#[doc = " \"enum\": ["]
5174#[doc = " \"data_changes\""]
5175#[doc = " ]"]
5176#[doc = "}"]
5177#[doc = r" ```"]
5178#[doc = r" </details>"]
5179#[derive(
5180 :: serde :: Deserialize,
5181 :: serde :: Serialize,
5182 Clone,
5183 Copy,
5184 Debug,
5185 Eq,
5186 Hash,
5187 Ord,
5188 PartialEq,
5189 PartialOrd,
5190)]
5191pub enum DataChangesByFinalityChangesType {
5192 #[serde(rename = "data_changes")]
5193 DataChanges,
5194}
5195impl ::std::convert::From<&Self> for DataChangesByFinalityChangesType {
5196 fn from(value: &DataChangesByFinalityChangesType) -> Self {
5197 value.clone()
5198 }
5199}
5200impl ::std::fmt::Display for DataChangesByFinalityChangesType {
5201 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5202 match *self {
5203 Self::DataChanges => write!(f, "data_changes"),
5204 }
5205 }
5206}
5207impl ::std::str::FromStr for DataChangesByFinalityChangesType {
5208 type Err = self::error::ConversionError;
5209 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5210 match value {
5211 "data_changes" => Ok(Self::DataChanges),
5212 _ => Err("invalid value".into()),
5213 }
5214 }
5215}
5216impl ::std::convert::TryFrom<&str> for DataChangesByFinalityChangesType {
5217 type Error = self::error::ConversionError;
5218 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5219 value.parse()
5220 }
5221}
5222impl ::std::convert::TryFrom<&::std::string::String> for DataChangesByFinalityChangesType {
5223 type Error = self::error::ConversionError;
5224 fn try_from(
5225 value: &::std::string::String,
5226 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5227 value.parse()
5228 }
5229}
5230impl ::std::convert::TryFrom<::std::string::String> for DataChangesByFinalityChangesType {
5231 type Error = self::error::ConversionError;
5232 fn try_from(
5233 value: ::std::string::String,
5234 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5235 value.parse()
5236 }
5237}
5238#[doc = "`DataChangesBySyncCheckpointChangesType`"]
5239#[doc = r""]
5240#[doc = r" <details><summary>JSON schema</summary>"]
5241#[doc = r""]
5242#[doc = r" ```json"]
5243#[doc = "{"]
5244#[doc = " \"type\": \"string\","]
5245#[doc = " \"enum\": ["]
5246#[doc = " \"data_changes\""]
5247#[doc = " ]"]
5248#[doc = "}"]
5249#[doc = r" ```"]
5250#[doc = r" </details>"]
5251#[derive(
5252 :: serde :: Deserialize,
5253 :: serde :: Serialize,
5254 Clone,
5255 Copy,
5256 Debug,
5257 Eq,
5258 Hash,
5259 Ord,
5260 PartialEq,
5261 PartialOrd,
5262)]
5263pub enum DataChangesBySyncCheckpointChangesType {
5264 #[serde(rename = "data_changes")]
5265 DataChanges,
5266}
5267impl ::std::convert::From<&Self> for DataChangesBySyncCheckpointChangesType {
5268 fn from(value: &DataChangesBySyncCheckpointChangesType) -> Self {
5269 value.clone()
5270 }
5271}
5272impl ::std::fmt::Display for DataChangesBySyncCheckpointChangesType {
5273 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5274 match *self {
5275 Self::DataChanges => write!(f, "data_changes"),
5276 }
5277 }
5278}
5279impl ::std::str::FromStr for DataChangesBySyncCheckpointChangesType {
5280 type Err = self::error::ConversionError;
5281 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5282 match value {
5283 "data_changes" => Ok(Self::DataChanges),
5284 _ => Err("invalid value".into()),
5285 }
5286 }
5287}
5288impl ::std::convert::TryFrom<&str> for DataChangesBySyncCheckpointChangesType {
5289 type Error = self::error::ConversionError;
5290 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5291 value.parse()
5292 }
5293}
5294impl ::std::convert::TryFrom<&::std::string::String> for DataChangesBySyncCheckpointChangesType {
5295 type Error = self::error::ConversionError;
5296 fn try_from(
5297 value: &::std::string::String,
5298 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5299 value.parse()
5300 }
5301}
5302impl ::std::convert::TryFrom<::std::string::String> for DataChangesBySyncCheckpointChangesType {
5303 type Error = self::error::ConversionError;
5304 fn try_from(
5305 value: ::std::string::String,
5306 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5307 value.parse()
5308 }
5309}
5310#[doc = "The fees settings for a data receipt creation"]
5311#[doc = r""]
5312#[doc = r" <details><summary>JSON schema</summary>"]
5313#[doc = r""]
5314#[doc = r" ```json"]
5315#[doc = "{"]
5316#[doc = " \"description\": \"The fees settings for a data receipt creation\","]
5317#[doc = " \"type\": \"object\","]
5318#[doc = " \"required\": ["]
5319#[doc = " \"base_cost\","]
5320#[doc = " \"cost_per_byte\""]
5321#[doc = " ],"]
5322#[doc = " \"properties\": {"]
5323#[doc = " \"base_cost\": {"]
5324#[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).\","]
5325#[doc = " \"allOf\": ["]
5326#[doc = " {"]
5327#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
5328#[doc = " }"]
5329#[doc = " ]"]
5330#[doc = " },"]
5331#[doc = " \"cost_per_byte\": {"]
5332#[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`.\","]
5333#[doc = " \"allOf\": ["]
5334#[doc = " {"]
5335#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
5336#[doc = " }"]
5337#[doc = " ]"]
5338#[doc = " }"]
5339#[doc = " }"]
5340#[doc = "}"]
5341#[doc = r" ```"]
5342#[doc = r" </details>"]
5343#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5344pub struct DataReceiptCreationConfigView {
5345 #[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)."]
5346 pub base_cost: Fee,
5347 #[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`."]
5348 pub cost_per_byte: Fee,
5349}
5350impl ::std::convert::From<&DataReceiptCreationConfigView> for DataReceiptCreationConfigView {
5351 fn from(value: &DataReceiptCreationConfigView) -> Self {
5352 value.clone()
5353 }
5354}
5355#[doc = "`DataReceiverView`"]
5356#[doc = r""]
5357#[doc = r" <details><summary>JSON schema</summary>"]
5358#[doc = r""]
5359#[doc = r" ```json"]
5360#[doc = "{"]
5361#[doc = " \"type\": \"object\","]
5362#[doc = " \"required\": ["]
5363#[doc = " \"data_id\","]
5364#[doc = " \"receiver_id\""]
5365#[doc = " ],"]
5366#[doc = " \"properties\": {"]
5367#[doc = " \"data_id\": {"]
5368#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
5369#[doc = " },"]
5370#[doc = " \"receiver_id\": {"]
5371#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5372#[doc = " }"]
5373#[doc = " }"]
5374#[doc = "}"]
5375#[doc = r" ```"]
5376#[doc = r" </details>"]
5377#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5378pub struct DataReceiverView {
5379 pub data_id: CryptoHash,
5380 pub receiver_id: AccountId,
5381}
5382impl ::std::convert::From<&DataReceiverView> for DataReceiverView {
5383 fn from(value: &DataReceiverView) -> Self {
5384 value.clone()
5385 }
5386}
5387#[doc = "This action allows to execute the inner actions behalf of the defined sender."]
5388#[doc = r""]
5389#[doc = r" <details><summary>JSON schema</summary>"]
5390#[doc = r""]
5391#[doc = r" ```json"]
5392#[doc = "{"]
5393#[doc = " \"description\": \"This action allows to execute the inner actions behalf of the defined sender.\","]
5394#[doc = " \"type\": \"object\","]
5395#[doc = " \"required\": ["]
5396#[doc = " \"actions\","]
5397#[doc = " \"max_block_height\","]
5398#[doc = " \"nonce\","]
5399#[doc = " \"public_key\","]
5400#[doc = " \"receiver_id\","]
5401#[doc = " \"sender_id\""]
5402#[doc = " ],"]
5403#[doc = " \"properties\": {"]
5404#[doc = " \"actions\": {"]
5405#[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.\","]
5406#[doc = " \"type\": \"array\","]
5407#[doc = " \"items\": {"]
5408#[doc = " \"$ref\": \"#/components/schemas/NonDelegateAction\""]
5409#[doc = " }"]
5410#[doc = " },"]
5411#[doc = " \"max_block_height\": {"]
5412#[doc = " \"description\": \"The maximal height of the block in the blockchain below which the given DelegateAction is valid.\","]
5413#[doc = " \"type\": \"integer\","]
5414#[doc = " \"format\": \"uint64\","]
5415#[doc = " \"minimum\": 0.0"]
5416#[doc = " },"]
5417#[doc = " \"nonce\": {"]
5418#[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.\","]
5419#[doc = " \"type\": \"integer\","]
5420#[doc = " \"format\": \"uint64\","]
5421#[doc = " \"minimum\": 0.0"]
5422#[doc = " },"]
5423#[doc = " \"public_key\": {"]
5424#[doc = " \"description\": \"Public key used to sign this delegated action.\","]
5425#[doc = " \"allOf\": ["]
5426#[doc = " {"]
5427#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
5428#[doc = " }"]
5429#[doc = " ]"]
5430#[doc = " },"]
5431#[doc = " \"receiver_id\": {"]
5432#[doc = " \"description\": \"Receiver of the delegated actions.\","]
5433#[doc = " \"allOf\": ["]
5434#[doc = " {"]
5435#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5436#[doc = " }"]
5437#[doc = " ]"]
5438#[doc = " },"]
5439#[doc = " \"sender_id\": {"]
5440#[doc = " \"description\": \"Signer of the delegated actions\","]
5441#[doc = " \"allOf\": ["]
5442#[doc = " {"]
5443#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5444#[doc = " }"]
5445#[doc = " ]"]
5446#[doc = " }"]
5447#[doc = " }"]
5448#[doc = "}"]
5449#[doc = r" ```"]
5450#[doc = r" </details>"]
5451#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5452pub struct DelegateAction {
5453 #[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."]
5454 pub actions: ::std::vec::Vec<NonDelegateAction>,
5455 #[doc = "The maximal height of the block in the blockchain below which the given DelegateAction is valid."]
5456 pub max_block_height: u64,
5457 #[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."]
5458 pub nonce: u64,
5459 #[doc = "Public key used to sign this delegated action."]
5460 pub public_key: PublicKey,
5461 #[doc = "Receiver of the delegated actions."]
5462 pub receiver_id: AccountId,
5463 #[doc = "Signer of the delegated actions"]
5464 pub sender_id: AccountId,
5465}
5466impl ::std::convert::From<&DelegateAction> for DelegateAction {
5467 fn from(value: &DelegateAction) -> Self {
5468 value.clone()
5469 }
5470}
5471#[doc = "`DeleteAccountAction`"]
5472#[doc = r""]
5473#[doc = r" <details><summary>JSON schema</summary>"]
5474#[doc = r""]
5475#[doc = r" ```json"]
5476#[doc = "{"]
5477#[doc = " \"type\": \"object\","]
5478#[doc = " \"required\": ["]
5479#[doc = " \"beneficiary_id\""]
5480#[doc = " ],"]
5481#[doc = " \"properties\": {"]
5482#[doc = " \"beneficiary_id\": {"]
5483#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
5484#[doc = " }"]
5485#[doc = " }"]
5486#[doc = "}"]
5487#[doc = r" ```"]
5488#[doc = r" </details>"]
5489#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5490pub struct DeleteAccountAction {
5491 pub beneficiary_id: AccountId,
5492}
5493impl ::std::convert::From<&DeleteAccountAction> for DeleteAccountAction {
5494 fn from(value: &DeleteAccountAction) -> Self {
5495 value.clone()
5496 }
5497}
5498#[doc = "`DeleteKeyAction`"]
5499#[doc = r""]
5500#[doc = r" <details><summary>JSON schema</summary>"]
5501#[doc = r""]
5502#[doc = r" ```json"]
5503#[doc = "{"]
5504#[doc = " \"type\": \"object\","]
5505#[doc = " \"required\": ["]
5506#[doc = " \"public_key\""]
5507#[doc = " ],"]
5508#[doc = " \"properties\": {"]
5509#[doc = " \"public_key\": {"]
5510#[doc = " \"description\": \"A public key associated with the access_key to be deleted.\","]
5511#[doc = " \"allOf\": ["]
5512#[doc = " {"]
5513#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
5514#[doc = " }"]
5515#[doc = " ]"]
5516#[doc = " }"]
5517#[doc = " }"]
5518#[doc = "}"]
5519#[doc = r" ```"]
5520#[doc = r" </details>"]
5521#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5522pub struct DeleteKeyAction {
5523 #[doc = "A public key associated with the access_key to be deleted."]
5524 pub public_key: PublicKey,
5525}
5526impl ::std::convert::From<&DeleteKeyAction> for DeleteKeyAction {
5527 fn from(value: &DeleteKeyAction) -> Self {
5528 value.clone()
5529 }
5530}
5531#[doc = "Deploy contract action"]
5532#[doc = r""]
5533#[doc = r" <details><summary>JSON schema</summary>"]
5534#[doc = r""]
5535#[doc = r" ```json"]
5536#[doc = "{"]
5537#[doc = " \"description\": \"Deploy contract action\","]
5538#[doc = " \"type\": \"object\","]
5539#[doc = " \"required\": ["]
5540#[doc = " \"code\""]
5541#[doc = " ],"]
5542#[doc = " \"properties\": {"]
5543#[doc = " \"code\": {"]
5544#[doc = " \"description\": \"WebAssembly binary\","]
5545#[doc = " \"type\": \"string\""]
5546#[doc = " }"]
5547#[doc = " }"]
5548#[doc = "}"]
5549#[doc = r" ```"]
5550#[doc = r" </details>"]
5551#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5552pub struct DeployContractAction {
5553 #[doc = "WebAssembly binary"]
5554 pub code: ::std::string::String,
5555}
5556impl ::std::convert::From<&DeployContractAction> for DeployContractAction {
5557 fn from(value: &DeployContractAction) -> Self {
5558 value.clone()
5559 }
5560}
5561#[doc = "Deploy global contract action"]
5562#[doc = r""]
5563#[doc = r" <details><summary>JSON schema</summary>"]
5564#[doc = r""]
5565#[doc = r" ```json"]
5566#[doc = "{"]
5567#[doc = " \"description\": \"Deploy global contract action\","]
5568#[doc = " \"type\": \"object\","]
5569#[doc = " \"required\": ["]
5570#[doc = " \"code\","]
5571#[doc = " \"deploy_mode\""]
5572#[doc = " ],"]
5573#[doc = " \"properties\": {"]
5574#[doc = " \"code\": {"]
5575#[doc = " \"description\": \"WebAssembly binary\","]
5576#[doc = " \"type\": \"string\""]
5577#[doc = " },"]
5578#[doc = " \"deploy_mode\": {"]
5579#[doc = " \"$ref\": \"#/components/schemas/GlobalContractDeployMode\""]
5580#[doc = " }"]
5581#[doc = " }"]
5582#[doc = "}"]
5583#[doc = r" ```"]
5584#[doc = r" </details>"]
5585#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5586pub struct DeployGlobalContractAction {
5587 #[doc = "WebAssembly binary"]
5588 pub code: ::std::string::String,
5589 pub deploy_mode: GlobalContractDeployMode,
5590}
5591impl ::std::convert::From<&DeployGlobalContractAction> for DeployGlobalContractAction {
5592 fn from(value: &DeployGlobalContractAction) -> Self {
5593 value.clone()
5594 }
5595}
5596#[doc = "`DetailedDebugStatus`"]
5597#[doc = r""]
5598#[doc = r" <details><summary>JSON schema</summary>"]
5599#[doc = r""]
5600#[doc = r" ```json"]
5601#[doc = "{"]
5602#[doc = " \"type\": \"object\","]
5603#[doc = " \"required\": ["]
5604#[doc = " \"block_production_delay_millis\","]
5605#[doc = " \"catchup_status\","]
5606#[doc = " \"current_head_status\","]
5607#[doc = " \"current_header_head_status\","]
5608#[doc = " \"network_info\","]
5609#[doc = " \"sync_status\""]
5610#[doc = " ],"]
5611#[doc = " \"properties\": {"]
5612#[doc = " \"block_production_delay_millis\": {"]
5613#[doc = " \"type\": \"integer\","]
5614#[doc = " \"format\": \"uint64\","]
5615#[doc = " \"minimum\": 0.0"]
5616#[doc = " },"]
5617#[doc = " \"catchup_status\": {"]
5618#[doc = " \"type\": \"array\","]
5619#[doc = " \"items\": {"]
5620#[doc = " \"$ref\": \"#/components/schemas/CatchupStatusView\""]
5621#[doc = " }"]
5622#[doc = " },"]
5623#[doc = " \"current_head_status\": {"]
5624#[doc = " \"$ref\": \"#/components/schemas/BlockStatusView\""]
5625#[doc = " },"]
5626#[doc = " \"current_header_head_status\": {"]
5627#[doc = " \"$ref\": \"#/components/schemas/BlockStatusView\""]
5628#[doc = " },"]
5629#[doc = " \"network_info\": {"]
5630#[doc = " \"$ref\": \"#/components/schemas/NetworkInfoView\""]
5631#[doc = " },"]
5632#[doc = " \"sync_status\": {"]
5633#[doc = " \"type\": \"string\""]
5634#[doc = " }"]
5635#[doc = " }"]
5636#[doc = "}"]
5637#[doc = r" ```"]
5638#[doc = r" </details>"]
5639#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5640pub struct DetailedDebugStatus {
5641 pub block_production_delay_millis: u64,
5642 pub catchup_status: ::std::vec::Vec<CatchupStatusView>,
5643 pub current_head_status: BlockStatusView,
5644 pub current_header_head_status: BlockStatusView,
5645 pub network_info: NetworkInfoView,
5646 pub sync_status: ::std::string::String,
5647}
5648impl ::std::convert::From<&DetailedDebugStatus> for DetailedDebugStatus {
5649 fn from(value: &DetailedDebugStatus) -> Self {
5650 value.clone()
5651 }
5652}
5653#[doc = "`Direction`"]
5654#[doc = r""]
5655#[doc = r" <details><summary>JSON schema</summary>"]
5656#[doc = r""]
5657#[doc = r" ```json"]
5658#[doc = "{"]
5659#[doc = " \"type\": \"string\","]
5660#[doc = " \"enum\": ["]
5661#[doc = " \"Left\","]
5662#[doc = " \"Right\""]
5663#[doc = " ]"]
5664#[doc = "}"]
5665#[doc = r" ```"]
5666#[doc = r" </details>"]
5667#[derive(
5668 :: serde :: Deserialize,
5669 :: serde :: Serialize,
5670 Clone,
5671 Copy,
5672 Debug,
5673 Eq,
5674 Hash,
5675 Ord,
5676 PartialEq,
5677 PartialOrd,
5678)]
5679pub enum Direction {
5680 Left,
5681 Right,
5682}
5683impl ::std::convert::From<&Self> for Direction {
5684 fn from(value: &Direction) -> Self {
5685 value.clone()
5686 }
5687}
5688impl ::std::fmt::Display for Direction {
5689 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5690 match *self {
5691 Self::Left => write!(f, "Left"),
5692 Self::Right => write!(f, "Right"),
5693 }
5694 }
5695}
5696impl ::std::str::FromStr for Direction {
5697 type Err = self::error::ConversionError;
5698 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5699 match value {
5700 "Left" => Ok(Self::Left),
5701 "Right" => Ok(Self::Right),
5702 _ => Err("invalid value".into()),
5703 }
5704 }
5705}
5706impl ::std::convert::TryFrom<&str> for Direction {
5707 type Error = self::error::ConversionError;
5708 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5709 value.parse()
5710 }
5711}
5712impl ::std::convert::TryFrom<&::std::string::String> for Direction {
5713 type Error = self::error::ConversionError;
5714 fn try_from(
5715 value: &::std::string::String,
5716 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5717 value.parse()
5718 }
5719}
5720impl ::std::convert::TryFrom<::std::string::String> for Direction {
5721 type Error = self::error::ConversionError;
5722 fn try_from(
5723 value: ::std::string::String,
5724 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5725 value.parse()
5726 }
5727}
5728#[doc = "Configures how to dump state to external storage."]
5729#[doc = r""]
5730#[doc = r" <details><summary>JSON schema</summary>"]
5731#[doc = r""]
5732#[doc = r" ```json"]
5733#[doc = "{"]
5734#[doc = " \"description\": \"Configures how to dump state to external storage.\","]
5735#[doc = " \"type\": \"object\","]
5736#[doc = " \"required\": ["]
5737#[doc = " \"location\""]
5738#[doc = " ],"]
5739#[doc = " \"properties\": {"]
5740#[doc = " \"credentials_file\": {"]
5741#[doc = " \"description\": \"Location of a json file with credentials allowing write access to the bucket.\","]
5742#[doc = " \"type\": ["]
5743#[doc = " \"string\","]
5744#[doc = " \"null\""]
5745#[doc = " ]"]
5746#[doc = " },"]
5747#[doc = " \"iteration_delay\": {"]
5748#[doc = " \"description\": \"How often to check if a new epoch has started.\\nFeel free to set to `None`, defaults are sensible.\","]
5749#[doc = " \"anyOf\": ["]
5750#[doc = " {"]
5751#[doc = " \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
5752#[doc = " },"]
5753#[doc = " {"]
5754#[doc = " \"type\": \"null\""]
5755#[doc = " }"]
5756#[doc = " ]"]
5757#[doc = " },"]
5758#[doc = " \"location\": {"]
5759#[doc = " \"description\": \"Specifies where to write the obtained state parts.\","]
5760#[doc = " \"allOf\": ["]
5761#[doc = " {"]
5762#[doc = " \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
5763#[doc = " }"]
5764#[doc = " ]"]
5765#[doc = " },"]
5766#[doc = " \"restart_dump_for_shards\": {"]
5767#[doc = " \"description\": \"Use in case a node that dumps state to the external storage\\ngets in trouble.\","]
5768#[doc = " \"type\": ["]
5769#[doc = " \"array\","]
5770#[doc = " \"null\""]
5771#[doc = " ],"]
5772#[doc = " \"items\": {"]
5773#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
5774#[doc = " }"]
5775#[doc = " }"]
5776#[doc = " }"]
5777#[doc = "}"]
5778#[doc = r" ```"]
5779#[doc = r" </details>"]
5780#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5781pub struct DumpConfig {
5782 #[doc = "Location of a json file with credentials allowing write access to the bucket."]
5783 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5784 pub credentials_file: ::std::option::Option<::std::string::String>,
5785 #[doc = "How often to check if a new epoch has started.\nFeel free to set to `None`, defaults are sensible."]
5786 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5787 pub iteration_delay: ::std::option::Option<DurationAsStdSchemaProvider>,
5788 #[doc = "Specifies where to write the obtained state parts."]
5789 pub location: ExternalStorageLocation,
5790 #[doc = "Use in case a node that dumps state to the external storage\ngets in trouble."]
5791 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5792 pub restart_dump_for_shards: ::std::option::Option<::std::vec::Vec<ShardId>>,
5793}
5794impl ::std::convert::From<&DumpConfig> for DumpConfig {
5795 fn from(value: &DumpConfig) -> Self {
5796 value.clone()
5797 }
5798}
5799#[doc = "`DurationAsStdSchemaProvider`"]
5800#[doc = r""]
5801#[doc = r" <details><summary>JSON schema</summary>"]
5802#[doc = r""]
5803#[doc = r" ```json"]
5804#[doc = "{"]
5805#[doc = " \"type\": \"object\","]
5806#[doc = " \"required\": ["]
5807#[doc = " \"nanos\","]
5808#[doc = " \"secs\""]
5809#[doc = " ],"]
5810#[doc = " \"properties\": {"]
5811#[doc = " \"nanos\": {"]
5812#[doc = " \"type\": \"integer\","]
5813#[doc = " \"format\": \"int32\""]
5814#[doc = " },"]
5815#[doc = " \"secs\": {"]
5816#[doc = " \"type\": \"integer\","]
5817#[doc = " \"format\": \"int64\""]
5818#[doc = " }"]
5819#[doc = " }"]
5820#[doc = "}"]
5821#[doc = r" ```"]
5822#[doc = r" </details>"]
5823#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5824pub struct DurationAsStdSchemaProvider {
5825 pub nanos: i32,
5826 pub secs: i64,
5827}
5828impl ::std::convert::From<&DurationAsStdSchemaProvider> for DurationAsStdSchemaProvider {
5829 fn from(value: &DurationAsStdSchemaProvider) -> Self {
5830 value.clone()
5831 }
5832}
5833#[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"]
5834#[doc = r""]
5835#[doc = r" <details><summary>JSON schema</summary>"]
5836#[doc = r""]
5837#[doc = r" ```json"]
5838#[doc = "{"]
5839#[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\","]
5840#[doc = " \"allOf\": ["]
5841#[doc = " {"]
5842#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
5843#[doc = " }"]
5844#[doc = " ]"]
5845#[doc = "}"]
5846#[doc = r" ```"]
5847#[doc = r" </details>"]
5848#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5849#[serde(transparent)]
5850pub struct EpochId(pub CryptoHash);
5851impl ::std::ops::Deref for EpochId {
5852 type Target = CryptoHash;
5853 fn deref(&self) -> &CryptoHash {
5854 &self.0
5855 }
5856}
5857impl ::std::convert::From<EpochId> for CryptoHash {
5858 fn from(value: EpochId) -> Self {
5859 value.0
5860 }
5861}
5862impl ::std::convert::From<&EpochId> for EpochId {
5863 fn from(value: &EpochId) -> Self {
5864 value.clone()
5865 }
5866}
5867impl ::std::convert::From<CryptoHash> for EpochId {
5868 fn from(value: CryptoHash) -> Self {
5869 Self(value)
5870 }
5871}
5872impl ::std::str::FromStr for EpochId {
5873 type Err = <CryptoHash as ::std::str::FromStr>::Err;
5874 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
5875 Ok(Self(value.parse()?))
5876 }
5877}
5878impl ::std::convert::TryFrom<&str> for EpochId {
5879 type Error = <CryptoHash as ::std::str::FromStr>::Err;
5880 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
5881 value.parse()
5882 }
5883}
5884impl ::std::convert::TryFrom<&String> for EpochId {
5885 type Error = <CryptoHash as ::std::str::FromStr>::Err;
5886 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
5887 value.parse()
5888 }
5889}
5890impl ::std::convert::TryFrom<String> for EpochId {
5891 type Error = <CryptoHash as ::std::str::FromStr>::Err;
5892 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
5893 value.parse()
5894 }
5895}
5896impl ::std::fmt::Display for EpochId {
5897 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5898 self.0.fmt(f)
5899 }
5900}
5901#[doc = "`EpochSyncConfig`"]
5902#[doc = r""]
5903#[doc = r" <details><summary>JSON schema</summary>"]
5904#[doc = r""]
5905#[doc = r" ```json"]
5906#[doc = "{"]
5907#[doc = " \"type\": \"object\","]
5908#[doc = " \"required\": ["]
5909#[doc = " \"epoch_sync_horizon\","]
5910#[doc = " \"timeout_for_epoch_sync\""]
5911#[doc = " ],"]
5912#[doc = " \"properties\": {"]
5913#[doc = " \"disable_epoch_sync_for_bootstrapping\": {"]
5914#[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.\","]
5915#[doc = " \"default\": false,"]
5916#[doc = " \"type\": \"boolean\""]
5917#[doc = " },"]
5918#[doc = " \"epoch_sync_horizon\": {"]
5919#[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.\","]
5920#[doc = " \"type\": \"integer\","]
5921#[doc = " \"format\": \"uint64\","]
5922#[doc = " \"minimum\": 0.0"]
5923#[doc = " },"]
5924#[doc = " \"ignore_epoch_sync_network_requests\": {"]
5925#[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.\","]
5926#[doc = " \"default\": false,"]
5927#[doc = " \"type\": \"boolean\""]
5928#[doc = " },"]
5929#[doc = " \"timeout_for_epoch_sync\": {"]
5930#[doc = " \"description\": \"Timeout for epoch sync requests. The node will continue retrying indefinitely even\\nif this timeout is exceeded.\","]
5931#[doc = " \"allOf\": ["]
5932#[doc = " {"]
5933#[doc = " \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
5934#[doc = " }"]
5935#[doc = " ]"]
5936#[doc = " }"]
5937#[doc = " }"]
5938#[doc = "}"]
5939#[doc = r" ```"]
5940#[doc = r" </details>"]
5941#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5942pub struct EpochSyncConfig {
5943 #[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."]
5944 #[serde(default)]
5945 pub disable_epoch_sync_for_bootstrapping: bool,
5946 #[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."]
5947 pub epoch_sync_horizon: u64,
5948 #[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."]
5949 #[serde(default)]
5950 pub ignore_epoch_sync_network_requests: bool,
5951 #[doc = "Timeout for epoch sync requests. The node will continue retrying indefinitely even\nif this timeout is exceeded."]
5952 pub timeout_for_epoch_sync: DurationAsStdSchemaProvider,
5953}
5954impl ::std::convert::From<&EpochSyncConfig> for EpochSyncConfig {
5955 fn from(value: &EpochSyncConfig) -> Self {
5956 value.clone()
5957 }
5958}
5959#[doc = "`ExecutionMetadataView`"]
5960#[doc = r""]
5961#[doc = r" <details><summary>JSON schema</summary>"]
5962#[doc = r""]
5963#[doc = r" ```json"]
5964#[doc = "{"]
5965#[doc = " \"type\": \"object\","]
5966#[doc = " \"required\": ["]
5967#[doc = " \"version\""]
5968#[doc = " ],"]
5969#[doc = " \"properties\": {"]
5970#[doc = " \"gas_profile\": {"]
5971#[doc = " \"type\": ["]
5972#[doc = " \"array\","]
5973#[doc = " \"null\""]
5974#[doc = " ],"]
5975#[doc = " \"items\": {"]
5976#[doc = " \"$ref\": \"#/components/schemas/CostGasUsed\""]
5977#[doc = " }"]
5978#[doc = " },"]
5979#[doc = " \"version\": {"]
5980#[doc = " \"type\": \"integer\","]
5981#[doc = " \"format\": \"uint32\","]
5982#[doc = " \"minimum\": 0.0"]
5983#[doc = " }"]
5984#[doc = " }"]
5985#[doc = "}"]
5986#[doc = r" ```"]
5987#[doc = r" </details>"]
5988#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5989pub struct ExecutionMetadataView {
5990 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5991 pub gas_profile: ::std::option::Option<::std::vec::Vec<CostGasUsed>>,
5992 pub version: u32,
5993}
5994impl ::std::convert::From<&ExecutionMetadataView> for ExecutionMetadataView {
5995 fn from(value: &ExecutionMetadataView) -> Self {
5996 value.clone()
5997 }
5998}
5999#[doc = "`ExecutionOutcomeView`"]
6000#[doc = r""]
6001#[doc = r" <details><summary>JSON schema</summary>"]
6002#[doc = r""]
6003#[doc = r" ```json"]
6004#[doc = "{"]
6005#[doc = " \"type\": \"object\","]
6006#[doc = " \"required\": ["]
6007#[doc = " \"executor_id\","]
6008#[doc = " \"gas_burnt\","]
6009#[doc = " \"logs\","]
6010#[doc = " \"receipt_ids\","]
6011#[doc = " \"status\","]
6012#[doc = " \"tokens_burnt\""]
6013#[doc = " ],"]
6014#[doc = " \"properties\": {"]
6015#[doc = " \"executor_id\": {"]
6016#[doc = " \"description\": \"The id of the account on which the execution happens. For transaction this is signer_id,\\nfor receipt this is receiver_id.\","]
6017#[doc = " \"allOf\": ["]
6018#[doc = " {"]
6019#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
6020#[doc = " }"]
6021#[doc = " ]"]
6022#[doc = " },"]
6023#[doc = " \"gas_burnt\": {"]
6024#[doc = " \"description\": \"The amount of the gas burnt by the given transaction or receipt.\","]
6025#[doc = " \"type\": \"integer\","]
6026#[doc = " \"format\": \"uint64\","]
6027#[doc = " \"minimum\": 0.0"]
6028#[doc = " },"]
6029#[doc = " \"logs\": {"]
6030#[doc = " \"description\": \"Logs from this transaction or receipt.\","]
6031#[doc = " \"type\": \"array\","]
6032#[doc = " \"items\": {"]
6033#[doc = " \"type\": \"string\""]
6034#[doc = " }"]
6035#[doc = " },"]
6036#[doc = " \"metadata\": {"]
6037#[doc = " \"description\": \"Execution metadata, versioned\","]
6038#[doc = " \"default\": {"]
6039#[doc = " \"version\": 1"]
6040#[doc = " },"]
6041#[doc = " \"allOf\": ["]
6042#[doc = " {"]
6043#[doc = " \"$ref\": \"#/components/schemas/ExecutionMetadataView\""]
6044#[doc = " }"]
6045#[doc = " ]"]
6046#[doc = " },"]
6047#[doc = " \"receipt_ids\": {"]
6048#[doc = " \"description\": \"Receipt IDs generated by this transaction or receipt.\","]
6049#[doc = " \"type\": \"array\","]
6050#[doc = " \"items\": {"]
6051#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
6052#[doc = " }"]
6053#[doc = " },"]
6054#[doc = " \"status\": {"]
6055#[doc = " \"description\": \"Execution status. Contains the result in case of successful execution.\","]
6056#[doc = " \"allOf\": ["]
6057#[doc = " {"]
6058#[doc = " \"$ref\": \"#/components/schemas/ExecutionStatusView\""]
6059#[doc = " }"]
6060#[doc = " ]"]
6061#[doc = " },"]
6062#[doc = " \"tokens_burnt\": {"]
6063#[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.\","]
6064#[doc = " \"type\": \"string\""]
6065#[doc = " }"]
6066#[doc = " }"]
6067#[doc = "}"]
6068#[doc = r" ```"]
6069#[doc = r" </details>"]
6070#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6071pub struct ExecutionOutcomeView {
6072 #[doc = "The id of the account on which the execution happens. For transaction this is signer_id,\nfor receipt this is receiver_id."]
6073 pub executor_id: AccountId,
6074 #[doc = "The amount of the gas burnt by the given transaction or receipt."]
6075 pub gas_burnt: u64,
6076 #[doc = "Logs from this transaction or receipt."]
6077 pub logs: ::std::vec::Vec<::std::string::String>,
6078 #[doc = "Execution metadata, versioned"]
6079 #[serde(default = "defaults::execution_outcome_view_metadata")]
6080 pub metadata: ExecutionMetadataView,
6081 #[doc = "Receipt IDs generated by this transaction or receipt."]
6082 pub receipt_ids: ::std::vec::Vec<CryptoHash>,
6083 #[doc = "Execution status. Contains the result in case of successful execution."]
6084 pub status: ExecutionStatusView,
6085 #[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."]
6086 pub tokens_burnt: ::std::string::String,
6087}
6088impl ::std::convert::From<&ExecutionOutcomeView> for ExecutionOutcomeView {
6089 fn from(value: &ExecutionOutcomeView) -> Self {
6090 value.clone()
6091 }
6092}
6093#[doc = "`ExecutionOutcomeWithIdView`"]
6094#[doc = r""]
6095#[doc = r" <details><summary>JSON schema</summary>"]
6096#[doc = r""]
6097#[doc = r" ```json"]
6098#[doc = "{"]
6099#[doc = " \"type\": \"object\","]
6100#[doc = " \"required\": ["]
6101#[doc = " \"block_hash\","]
6102#[doc = " \"id\","]
6103#[doc = " \"outcome\","]
6104#[doc = " \"proof\""]
6105#[doc = " ],"]
6106#[doc = " \"properties\": {"]
6107#[doc = " \"block_hash\": {"]
6108#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
6109#[doc = " },"]
6110#[doc = " \"id\": {"]
6111#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
6112#[doc = " },"]
6113#[doc = " \"outcome\": {"]
6114#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeView\""]
6115#[doc = " },"]
6116#[doc = " \"proof\": {"]
6117#[doc = " \"type\": \"array\","]
6118#[doc = " \"items\": {"]
6119#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
6120#[doc = " }"]
6121#[doc = " }"]
6122#[doc = " }"]
6123#[doc = "}"]
6124#[doc = r" ```"]
6125#[doc = r" </details>"]
6126#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6127pub struct ExecutionOutcomeWithIdView {
6128 pub block_hash: CryptoHash,
6129 pub id: CryptoHash,
6130 pub outcome: ExecutionOutcomeView,
6131 pub proof: ::std::vec::Vec<MerklePathItem>,
6132}
6133impl ::std::convert::From<&ExecutionOutcomeWithIdView> for ExecutionOutcomeWithIdView {
6134 fn from(value: &ExecutionOutcomeWithIdView) -> Self {
6135 value.clone()
6136 }
6137}
6138#[doc = "`ExecutionStatusView`"]
6139#[doc = r""]
6140#[doc = r" <details><summary>JSON schema</summary>"]
6141#[doc = r""]
6142#[doc = r" ```json"]
6143#[doc = "{"]
6144#[doc = " \"oneOf\": ["]
6145#[doc = " {"]
6146#[doc = " \"description\": \"The execution is pending or unknown.\","]
6147#[doc = " \"type\": \"string\","]
6148#[doc = " \"enum\": ["]
6149#[doc = " \"Unknown\""]
6150#[doc = " ]"]
6151#[doc = " },"]
6152#[doc = " {"]
6153#[doc = " \"description\": \"The execution has failed.\","]
6154#[doc = " \"type\": \"object\","]
6155#[doc = " \"required\": ["]
6156#[doc = " \"Failure\""]
6157#[doc = " ],"]
6158#[doc = " \"properties\": {"]
6159#[doc = " \"Failure\": {"]
6160#[doc = " \"$ref\": \"#/components/schemas/TxExecutionError\""]
6161#[doc = " }"]
6162#[doc = " },"]
6163#[doc = " \"additionalProperties\": false"]
6164#[doc = " },"]
6165#[doc = " {"]
6166#[doc = " \"description\": \"The final action succeeded and returned some value or an empty vec encoded in base64.\","]
6167#[doc = " \"type\": \"object\","]
6168#[doc = " \"required\": ["]
6169#[doc = " \"SuccessValue\""]
6170#[doc = " ],"]
6171#[doc = " \"properties\": {"]
6172#[doc = " \"SuccessValue\": {"]
6173#[doc = " \"type\": \"string\""]
6174#[doc = " }"]
6175#[doc = " },"]
6176#[doc = " \"additionalProperties\": false"]
6177#[doc = " },"]
6178#[doc = " {"]
6179#[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.\","]
6180#[doc = " \"type\": \"object\","]
6181#[doc = " \"required\": ["]
6182#[doc = " \"SuccessReceiptId\""]
6183#[doc = " ],"]
6184#[doc = " \"properties\": {"]
6185#[doc = " \"SuccessReceiptId\": {"]
6186#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
6187#[doc = " }"]
6188#[doc = " },"]
6189#[doc = " \"additionalProperties\": false"]
6190#[doc = " }"]
6191#[doc = " ]"]
6192#[doc = "}"]
6193#[doc = r" ```"]
6194#[doc = r" </details>"]
6195#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6196pub enum ExecutionStatusView {
6197 #[doc = "The execution is pending or unknown."]
6198 Unknown,
6199 #[doc = "The execution has failed."]
6200 Failure(TxExecutionError),
6201 #[doc = "The final action succeeded and returned some value or an empty vec encoded in base64."]
6202 SuccessValue(::std::string::String),
6203 #[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."]
6204 SuccessReceiptId(CryptoHash),
6205}
6206impl ::std::convert::From<&Self> for ExecutionStatusView {
6207 fn from(value: &ExecutionStatusView) -> Self {
6208 value.clone()
6209 }
6210}
6211impl ::std::convert::From<TxExecutionError> for ExecutionStatusView {
6212 fn from(value: TxExecutionError) -> Self {
6213 Self::Failure(value)
6214 }
6215}
6216impl ::std::convert::From<CryptoHash> for ExecutionStatusView {
6217 fn from(value: CryptoHash) -> Self {
6218 Self::SuccessReceiptId(value)
6219 }
6220}
6221#[doc = "Typed view of ExtCostsConfig to preserve JSON output field names in protocol\nconfig RPC output."]
6222#[doc = r""]
6223#[doc = r" <details><summary>JSON schema</summary>"]
6224#[doc = r""]
6225#[doc = r" ```json"]
6226#[doc = "{"]
6227#[doc = " \"description\": \"Typed view of ExtCostsConfig to preserve JSON output field names in protocol\\nconfig RPC output.\","]
6228#[doc = " \"type\": \"object\","]
6229#[doc = " \"required\": ["]
6230#[doc = " \"alt_bn128_g1_multiexp_base\","]
6231#[doc = " \"alt_bn128_g1_multiexp_element\","]
6232#[doc = " \"alt_bn128_g1_sum_base\","]
6233#[doc = " \"alt_bn128_g1_sum_element\","]
6234#[doc = " \"alt_bn128_pairing_check_base\","]
6235#[doc = " \"alt_bn128_pairing_check_element\","]
6236#[doc = " \"base\","]
6237#[doc = " \"bls12381_g1_multiexp_base\","]
6238#[doc = " \"bls12381_g1_multiexp_element\","]
6239#[doc = " \"bls12381_g2_multiexp_base\","]
6240#[doc = " \"bls12381_g2_multiexp_element\","]
6241#[doc = " \"bls12381_map_fp2_to_g2_base\","]
6242#[doc = " \"bls12381_map_fp2_to_g2_element\","]
6243#[doc = " \"bls12381_map_fp_to_g1_base\","]
6244#[doc = " \"bls12381_map_fp_to_g1_element\","]
6245#[doc = " \"bls12381_p1_decompress_base\","]
6246#[doc = " \"bls12381_p1_decompress_element\","]
6247#[doc = " \"bls12381_p1_sum_base\","]
6248#[doc = " \"bls12381_p1_sum_element\","]
6249#[doc = " \"bls12381_p2_decompress_base\","]
6250#[doc = " \"bls12381_p2_decompress_element\","]
6251#[doc = " \"bls12381_p2_sum_base\","]
6252#[doc = " \"bls12381_p2_sum_element\","]
6253#[doc = " \"bls12381_pairing_base\","]
6254#[doc = " \"bls12381_pairing_element\","]
6255#[doc = " \"contract_compile_base\","]
6256#[doc = " \"contract_compile_bytes\","]
6257#[doc = " \"contract_loading_base\","]
6258#[doc = " \"contract_loading_bytes\","]
6259#[doc = " \"ecrecover_base\","]
6260#[doc = " \"ed25519_verify_base\","]
6261#[doc = " \"ed25519_verify_byte\","]
6262#[doc = " \"keccak256_base\","]
6263#[doc = " \"keccak256_byte\","]
6264#[doc = " \"keccak512_base\","]
6265#[doc = " \"keccak512_byte\","]
6266#[doc = " \"log_base\","]
6267#[doc = " \"log_byte\","]
6268#[doc = " \"promise_and_base\","]
6269#[doc = " \"promise_and_per_promise\","]
6270#[doc = " \"promise_return\","]
6271#[doc = " \"read_cached_trie_node\","]
6272#[doc = " \"read_memory_base\","]
6273#[doc = " \"read_memory_byte\","]
6274#[doc = " \"read_register_base\","]
6275#[doc = " \"read_register_byte\","]
6276#[doc = " \"ripemd160_base\","]
6277#[doc = " \"ripemd160_block\","]
6278#[doc = " \"sha256_base\","]
6279#[doc = " \"sha256_byte\","]
6280#[doc = " \"storage_has_key_base\","]
6281#[doc = " \"storage_has_key_byte\","]
6282#[doc = " \"storage_iter_create_from_byte\","]
6283#[doc = " \"storage_iter_create_prefix_base\","]
6284#[doc = " \"storage_iter_create_prefix_byte\","]
6285#[doc = " \"storage_iter_create_range_base\","]
6286#[doc = " \"storage_iter_create_to_byte\","]
6287#[doc = " \"storage_iter_next_base\","]
6288#[doc = " \"storage_iter_next_key_byte\","]
6289#[doc = " \"storage_iter_next_value_byte\","]
6290#[doc = " \"storage_large_read_overhead_base\","]
6291#[doc = " \"storage_large_read_overhead_byte\","]
6292#[doc = " \"storage_read_base\","]
6293#[doc = " \"storage_read_key_byte\","]
6294#[doc = " \"storage_read_value_byte\","]
6295#[doc = " \"storage_remove_base\","]
6296#[doc = " \"storage_remove_key_byte\","]
6297#[doc = " \"storage_remove_ret_value_byte\","]
6298#[doc = " \"storage_write_base\","]
6299#[doc = " \"storage_write_evicted_byte\","]
6300#[doc = " \"storage_write_key_byte\","]
6301#[doc = " \"storage_write_value_byte\","]
6302#[doc = " \"touching_trie_node\","]
6303#[doc = " \"utf16_decoding_base\","]
6304#[doc = " \"utf16_decoding_byte\","]
6305#[doc = " \"utf8_decoding_base\","]
6306#[doc = " \"utf8_decoding_byte\","]
6307#[doc = " \"validator_stake_base\","]
6308#[doc = " \"validator_total_stake_base\","]
6309#[doc = " \"write_memory_base\","]
6310#[doc = " \"write_memory_byte\","]
6311#[doc = " \"write_register_base\","]
6312#[doc = " \"write_register_byte\","]
6313#[doc = " \"yield_create_base\","]
6314#[doc = " \"yield_create_byte\","]
6315#[doc = " \"yield_resume_base\","]
6316#[doc = " \"yield_resume_byte\""]
6317#[doc = " ],"]
6318#[doc = " \"properties\": {"]
6319#[doc = " \"alt_bn128_g1_multiexp_base\": {"]
6320#[doc = " \"description\": \"Base cost for multiexp\","]
6321#[doc = " \"type\": \"integer\","]
6322#[doc = " \"format\": \"uint64\","]
6323#[doc = " \"minimum\": 0.0"]
6324#[doc = " },"]
6325#[doc = " \"alt_bn128_g1_multiexp_element\": {"]
6326#[doc = " \"description\": \"Per element cost for multiexp\","]
6327#[doc = " \"type\": \"integer\","]
6328#[doc = " \"format\": \"uint64\","]
6329#[doc = " \"minimum\": 0.0"]
6330#[doc = " },"]
6331#[doc = " \"alt_bn128_g1_sum_base\": {"]
6332#[doc = " \"description\": \"Base cost for sum\","]
6333#[doc = " \"type\": \"integer\","]
6334#[doc = " \"format\": \"uint64\","]
6335#[doc = " \"minimum\": 0.0"]
6336#[doc = " },"]
6337#[doc = " \"alt_bn128_g1_sum_element\": {"]
6338#[doc = " \"description\": \"Per element cost for sum\","]
6339#[doc = " \"type\": \"integer\","]
6340#[doc = " \"format\": \"uint64\","]
6341#[doc = " \"minimum\": 0.0"]
6342#[doc = " },"]
6343#[doc = " \"alt_bn128_pairing_check_base\": {"]
6344#[doc = " \"description\": \"Base cost for pairing check\","]
6345#[doc = " \"type\": \"integer\","]
6346#[doc = " \"format\": \"uint64\","]
6347#[doc = " \"minimum\": 0.0"]
6348#[doc = " },"]
6349#[doc = " \"alt_bn128_pairing_check_element\": {"]
6350#[doc = " \"description\": \"Per element cost for pairing check\","]
6351#[doc = " \"type\": \"integer\","]
6352#[doc = " \"format\": \"uint64\","]
6353#[doc = " \"minimum\": 0.0"]
6354#[doc = " },"]
6355#[doc = " \"base\": {"]
6356#[doc = " \"description\": \"Base cost for calling a host function.\","]
6357#[doc = " \"type\": \"integer\","]
6358#[doc = " \"format\": \"uint64\","]
6359#[doc = " \"minimum\": 0.0"]
6360#[doc = " },"]
6361#[doc = " \"bls12381_g1_multiexp_base\": {"]
6362#[doc = " \"type\": \"integer\","]
6363#[doc = " \"format\": \"uint64\","]
6364#[doc = " \"minimum\": 0.0"]
6365#[doc = " },"]
6366#[doc = " \"bls12381_g1_multiexp_element\": {"]
6367#[doc = " \"type\": \"integer\","]
6368#[doc = " \"format\": \"uint64\","]
6369#[doc = " \"minimum\": 0.0"]
6370#[doc = " },"]
6371#[doc = " \"bls12381_g2_multiexp_base\": {"]
6372#[doc = " \"type\": \"integer\","]
6373#[doc = " \"format\": \"uint64\","]
6374#[doc = " \"minimum\": 0.0"]
6375#[doc = " },"]
6376#[doc = " \"bls12381_g2_multiexp_element\": {"]
6377#[doc = " \"type\": \"integer\","]
6378#[doc = " \"format\": \"uint64\","]
6379#[doc = " \"minimum\": 0.0"]
6380#[doc = " },"]
6381#[doc = " \"bls12381_map_fp2_to_g2_base\": {"]
6382#[doc = " \"type\": \"integer\","]
6383#[doc = " \"format\": \"uint64\","]
6384#[doc = " \"minimum\": 0.0"]
6385#[doc = " },"]
6386#[doc = " \"bls12381_map_fp2_to_g2_element\": {"]
6387#[doc = " \"type\": \"integer\","]
6388#[doc = " \"format\": \"uint64\","]
6389#[doc = " \"minimum\": 0.0"]
6390#[doc = " },"]
6391#[doc = " \"bls12381_map_fp_to_g1_base\": {"]
6392#[doc = " \"type\": \"integer\","]
6393#[doc = " \"format\": \"uint64\","]
6394#[doc = " \"minimum\": 0.0"]
6395#[doc = " },"]
6396#[doc = " \"bls12381_map_fp_to_g1_element\": {"]
6397#[doc = " \"type\": \"integer\","]
6398#[doc = " \"format\": \"uint64\","]
6399#[doc = " \"minimum\": 0.0"]
6400#[doc = " },"]
6401#[doc = " \"bls12381_p1_decompress_base\": {"]
6402#[doc = " \"type\": \"integer\","]
6403#[doc = " \"format\": \"uint64\","]
6404#[doc = " \"minimum\": 0.0"]
6405#[doc = " },"]
6406#[doc = " \"bls12381_p1_decompress_element\": {"]
6407#[doc = " \"type\": \"integer\","]
6408#[doc = " \"format\": \"uint64\","]
6409#[doc = " \"minimum\": 0.0"]
6410#[doc = " },"]
6411#[doc = " \"bls12381_p1_sum_base\": {"]
6412#[doc = " \"type\": \"integer\","]
6413#[doc = " \"format\": \"uint64\","]
6414#[doc = " \"minimum\": 0.0"]
6415#[doc = " },"]
6416#[doc = " \"bls12381_p1_sum_element\": {"]
6417#[doc = " \"type\": \"integer\","]
6418#[doc = " \"format\": \"uint64\","]
6419#[doc = " \"minimum\": 0.0"]
6420#[doc = " },"]
6421#[doc = " \"bls12381_p2_decompress_base\": {"]
6422#[doc = " \"type\": \"integer\","]
6423#[doc = " \"format\": \"uint64\","]
6424#[doc = " \"minimum\": 0.0"]
6425#[doc = " },"]
6426#[doc = " \"bls12381_p2_decompress_element\": {"]
6427#[doc = " \"type\": \"integer\","]
6428#[doc = " \"format\": \"uint64\","]
6429#[doc = " \"minimum\": 0.0"]
6430#[doc = " },"]
6431#[doc = " \"bls12381_p2_sum_base\": {"]
6432#[doc = " \"type\": \"integer\","]
6433#[doc = " \"format\": \"uint64\","]
6434#[doc = " \"minimum\": 0.0"]
6435#[doc = " },"]
6436#[doc = " \"bls12381_p2_sum_element\": {"]
6437#[doc = " \"type\": \"integer\","]
6438#[doc = " \"format\": \"uint64\","]
6439#[doc = " \"minimum\": 0.0"]
6440#[doc = " },"]
6441#[doc = " \"bls12381_pairing_base\": {"]
6442#[doc = " \"type\": \"integer\","]
6443#[doc = " \"format\": \"uint64\","]
6444#[doc = " \"minimum\": 0.0"]
6445#[doc = " },"]
6446#[doc = " \"bls12381_pairing_element\": {"]
6447#[doc = " \"type\": \"integer\","]
6448#[doc = " \"format\": \"uint64\","]
6449#[doc = " \"minimum\": 0.0"]
6450#[doc = " },"]
6451#[doc = " \"contract_compile_base\": {"]
6452#[doc = " \"type\": \"integer\","]
6453#[doc = " \"format\": \"uint64\","]
6454#[doc = " \"minimum\": 0.0"]
6455#[doc = " },"]
6456#[doc = " \"contract_compile_bytes\": {"]
6457#[doc = " \"type\": \"integer\","]
6458#[doc = " \"format\": \"uint64\","]
6459#[doc = " \"minimum\": 0.0"]
6460#[doc = " },"]
6461#[doc = " \"contract_loading_base\": {"]
6462#[doc = " \"description\": \"Base cost of loading a pre-compiled contract\","]
6463#[doc = " \"type\": \"integer\","]
6464#[doc = " \"format\": \"uint64\","]
6465#[doc = " \"minimum\": 0.0"]
6466#[doc = " },"]
6467#[doc = " \"contract_loading_bytes\": {"]
6468#[doc = " \"description\": \"Cost per byte of loading a pre-compiled contract\","]
6469#[doc = " \"type\": \"integer\","]
6470#[doc = " \"format\": \"uint64\","]
6471#[doc = " \"minimum\": 0.0"]
6472#[doc = " },"]
6473#[doc = " \"ecrecover_base\": {"]
6474#[doc = " \"description\": \"Cost of calling ecrecover\","]
6475#[doc = " \"type\": \"integer\","]
6476#[doc = " \"format\": \"uint64\","]
6477#[doc = " \"minimum\": 0.0"]
6478#[doc = " },"]
6479#[doc = " \"ed25519_verify_base\": {"]
6480#[doc = " \"description\": \"Cost of getting ed25519 base\","]
6481#[doc = " \"type\": \"integer\","]
6482#[doc = " \"format\": \"uint64\","]
6483#[doc = " \"minimum\": 0.0"]
6484#[doc = " },"]
6485#[doc = " \"ed25519_verify_byte\": {"]
6486#[doc = " \"description\": \"Cost of getting ed25519 per byte\","]
6487#[doc = " \"type\": \"integer\","]
6488#[doc = " \"format\": \"uint64\","]
6489#[doc = " \"minimum\": 0.0"]
6490#[doc = " },"]
6491#[doc = " \"keccak256_base\": {"]
6492#[doc = " \"description\": \"Cost of getting sha256 base\","]
6493#[doc = " \"type\": \"integer\","]
6494#[doc = " \"format\": \"uint64\","]
6495#[doc = " \"minimum\": 0.0"]
6496#[doc = " },"]
6497#[doc = " \"keccak256_byte\": {"]
6498#[doc = " \"description\": \"Cost of getting sha256 per byte\","]
6499#[doc = " \"type\": \"integer\","]
6500#[doc = " \"format\": \"uint64\","]
6501#[doc = " \"minimum\": 0.0"]
6502#[doc = " },"]
6503#[doc = " \"keccak512_base\": {"]
6504#[doc = " \"description\": \"Cost of getting sha256 base\","]
6505#[doc = " \"type\": \"integer\","]
6506#[doc = " \"format\": \"uint64\","]
6507#[doc = " \"minimum\": 0.0"]
6508#[doc = " },"]
6509#[doc = " \"keccak512_byte\": {"]
6510#[doc = " \"description\": \"Cost of getting sha256 per byte\","]
6511#[doc = " \"type\": \"integer\","]
6512#[doc = " \"format\": \"uint64\","]
6513#[doc = " \"minimum\": 0.0"]
6514#[doc = " },"]
6515#[doc = " \"log_base\": {"]
6516#[doc = " \"description\": \"Cost for calling logging.\","]
6517#[doc = " \"type\": \"integer\","]
6518#[doc = " \"format\": \"uint64\","]
6519#[doc = " \"minimum\": 0.0"]
6520#[doc = " },"]
6521#[doc = " \"log_byte\": {"]
6522#[doc = " \"description\": \"Cost for logging per byte\","]
6523#[doc = " \"type\": \"integer\","]
6524#[doc = " \"format\": \"uint64\","]
6525#[doc = " \"minimum\": 0.0"]
6526#[doc = " },"]
6527#[doc = " \"promise_and_base\": {"]
6528#[doc = " \"description\": \"Cost for calling `promise_and`\","]
6529#[doc = " \"type\": \"integer\","]
6530#[doc = " \"format\": \"uint64\","]
6531#[doc = " \"minimum\": 0.0"]
6532#[doc = " },"]
6533#[doc = " \"promise_and_per_promise\": {"]
6534#[doc = " \"description\": \"Cost for calling `promise_and` for each promise\","]
6535#[doc = " \"type\": \"integer\","]
6536#[doc = " \"format\": \"uint64\","]
6537#[doc = " \"minimum\": 0.0"]
6538#[doc = " },"]
6539#[doc = " \"promise_return\": {"]
6540#[doc = " \"description\": \"Cost for calling `promise_return`\","]
6541#[doc = " \"type\": \"integer\","]
6542#[doc = " \"format\": \"uint64\","]
6543#[doc = " \"minimum\": 0.0"]
6544#[doc = " },"]
6545#[doc = " \"read_cached_trie_node\": {"]
6546#[doc = " \"description\": \"Cost for reading trie node from memory\","]
6547#[doc = " \"type\": \"integer\","]
6548#[doc = " \"format\": \"uint64\","]
6549#[doc = " \"minimum\": 0.0"]
6550#[doc = " },"]
6551#[doc = " \"read_memory_base\": {"]
6552#[doc = " \"description\": \"Base cost for guest memory read\","]
6553#[doc = " \"type\": \"integer\","]
6554#[doc = " \"format\": \"uint64\","]
6555#[doc = " \"minimum\": 0.0"]
6556#[doc = " },"]
6557#[doc = " \"read_memory_byte\": {"]
6558#[doc = " \"description\": \"Cost for guest memory read\","]
6559#[doc = " \"type\": \"integer\","]
6560#[doc = " \"format\": \"uint64\","]
6561#[doc = " \"minimum\": 0.0"]
6562#[doc = " },"]
6563#[doc = " \"read_register_base\": {"]
6564#[doc = " \"description\": \"Base cost for reading from register\","]
6565#[doc = " \"type\": \"integer\","]
6566#[doc = " \"format\": \"uint64\","]
6567#[doc = " \"minimum\": 0.0"]
6568#[doc = " },"]
6569#[doc = " \"read_register_byte\": {"]
6570#[doc = " \"description\": \"Cost for reading byte from register\","]
6571#[doc = " \"type\": \"integer\","]
6572#[doc = " \"format\": \"uint64\","]
6573#[doc = " \"minimum\": 0.0"]
6574#[doc = " },"]
6575#[doc = " \"ripemd160_base\": {"]
6576#[doc = " \"description\": \"Cost of getting ripemd160 base\","]
6577#[doc = " \"type\": \"integer\","]
6578#[doc = " \"format\": \"uint64\","]
6579#[doc = " \"minimum\": 0.0"]
6580#[doc = " },"]
6581#[doc = " \"ripemd160_block\": {"]
6582#[doc = " \"description\": \"Cost of getting ripemd160 per message block\","]
6583#[doc = " \"type\": \"integer\","]
6584#[doc = " \"format\": \"uint64\","]
6585#[doc = " \"minimum\": 0.0"]
6586#[doc = " },"]
6587#[doc = " \"sha256_base\": {"]
6588#[doc = " \"description\": \"Cost of getting sha256 base\","]
6589#[doc = " \"type\": \"integer\","]
6590#[doc = " \"format\": \"uint64\","]
6591#[doc = " \"minimum\": 0.0"]
6592#[doc = " },"]
6593#[doc = " \"sha256_byte\": {"]
6594#[doc = " \"description\": \"Cost of getting sha256 per byte\","]
6595#[doc = " \"type\": \"integer\","]
6596#[doc = " \"format\": \"uint64\","]
6597#[doc = " \"minimum\": 0.0"]
6598#[doc = " },"]
6599#[doc = " \"storage_has_key_base\": {"]
6600#[doc = " \"description\": \"Storage trie check for key existence cost base\","]
6601#[doc = " \"type\": \"integer\","]
6602#[doc = " \"format\": \"uint64\","]
6603#[doc = " \"minimum\": 0.0"]
6604#[doc = " },"]
6605#[doc = " \"storage_has_key_byte\": {"]
6606#[doc = " \"description\": \"Storage trie check for key existence per key byte\","]
6607#[doc = " \"type\": \"integer\","]
6608#[doc = " \"format\": \"uint64\","]
6609#[doc = " \"minimum\": 0.0"]
6610#[doc = " },"]
6611#[doc = " \"storage_iter_create_from_byte\": {"]
6612#[doc = " \"description\": \"Create trie range iterator cost per byte of from key.\","]
6613#[doc = " \"type\": \"integer\","]
6614#[doc = " \"format\": \"uint64\","]
6615#[doc = " \"minimum\": 0.0"]
6616#[doc = " },"]
6617#[doc = " \"storage_iter_create_prefix_base\": {"]
6618#[doc = " \"description\": \"Create trie prefix iterator cost base\","]
6619#[doc = " \"type\": \"integer\","]
6620#[doc = " \"format\": \"uint64\","]
6621#[doc = " \"minimum\": 0.0"]
6622#[doc = " },"]
6623#[doc = " \"storage_iter_create_prefix_byte\": {"]
6624#[doc = " \"description\": \"Create trie prefix iterator cost per byte.\","]
6625#[doc = " \"type\": \"integer\","]
6626#[doc = " \"format\": \"uint64\","]
6627#[doc = " \"minimum\": 0.0"]
6628#[doc = " },"]
6629#[doc = " \"storage_iter_create_range_base\": {"]
6630#[doc = " \"description\": \"Create trie range iterator cost base\","]
6631#[doc = " \"type\": \"integer\","]
6632#[doc = " \"format\": \"uint64\","]
6633#[doc = " \"minimum\": 0.0"]
6634#[doc = " },"]
6635#[doc = " \"storage_iter_create_to_byte\": {"]
6636#[doc = " \"description\": \"Create trie range iterator cost per byte of to key.\","]
6637#[doc = " \"type\": \"integer\","]
6638#[doc = " \"format\": \"uint64\","]
6639#[doc = " \"minimum\": 0.0"]
6640#[doc = " },"]
6641#[doc = " \"storage_iter_next_base\": {"]
6642#[doc = " \"description\": \"Trie iterator per key base cost\","]
6643#[doc = " \"type\": \"integer\","]
6644#[doc = " \"format\": \"uint64\","]
6645#[doc = " \"minimum\": 0.0"]
6646#[doc = " },"]
6647#[doc = " \"storage_iter_next_key_byte\": {"]
6648#[doc = " \"description\": \"Trie iterator next key byte cost\","]
6649#[doc = " \"type\": \"integer\","]
6650#[doc = " \"format\": \"uint64\","]
6651#[doc = " \"minimum\": 0.0"]
6652#[doc = " },"]
6653#[doc = " \"storage_iter_next_value_byte\": {"]
6654#[doc = " \"description\": \"Trie iterator next key byte cost\","]
6655#[doc = " \"type\": \"integer\","]
6656#[doc = " \"format\": \"uint64\","]
6657#[doc = " \"minimum\": 0.0"]
6658#[doc = " },"]
6659#[doc = " \"storage_large_read_overhead_base\": {"]
6660#[doc = " \"description\": \"Storage trie read key overhead base cost, when doing large reads\","]
6661#[doc = " \"type\": \"integer\","]
6662#[doc = " \"format\": \"uint64\","]
6663#[doc = " \"minimum\": 0.0"]
6664#[doc = " },"]
6665#[doc = " \"storage_large_read_overhead_byte\": {"]
6666#[doc = " \"description\": \"Storage trie read key overhead per-byte cost, when doing large reads\","]
6667#[doc = " \"type\": \"integer\","]
6668#[doc = " \"format\": \"uint64\","]
6669#[doc = " \"minimum\": 0.0"]
6670#[doc = " },"]
6671#[doc = " \"storage_read_base\": {"]
6672#[doc = " \"description\": \"Storage trie read key base cost\","]
6673#[doc = " \"type\": \"integer\","]
6674#[doc = " \"format\": \"uint64\","]
6675#[doc = " \"minimum\": 0.0"]
6676#[doc = " },"]
6677#[doc = " \"storage_read_key_byte\": {"]
6678#[doc = " \"description\": \"Storage trie read key per byte cost\","]
6679#[doc = " \"type\": \"integer\","]
6680#[doc = " \"format\": \"uint64\","]
6681#[doc = " \"minimum\": 0.0"]
6682#[doc = " },"]
6683#[doc = " \"storage_read_value_byte\": {"]
6684#[doc = " \"description\": \"Storage trie read value cost per byte cost\","]
6685#[doc = " \"type\": \"integer\","]
6686#[doc = " \"format\": \"uint64\","]
6687#[doc = " \"minimum\": 0.0"]
6688#[doc = " },"]
6689#[doc = " \"storage_remove_base\": {"]
6690#[doc = " \"description\": \"Remove key from trie base cost\","]
6691#[doc = " \"type\": \"integer\","]
6692#[doc = " \"format\": \"uint64\","]
6693#[doc = " \"minimum\": 0.0"]
6694#[doc = " },"]
6695#[doc = " \"storage_remove_key_byte\": {"]
6696#[doc = " \"description\": \"Remove key from trie per byte cost\","]
6697#[doc = " \"type\": \"integer\","]
6698#[doc = " \"format\": \"uint64\","]
6699#[doc = " \"minimum\": 0.0"]
6700#[doc = " },"]
6701#[doc = " \"storage_remove_ret_value_byte\": {"]
6702#[doc = " \"description\": \"Remove key from trie ret value byte cost\","]
6703#[doc = " \"type\": \"integer\","]
6704#[doc = " \"format\": \"uint64\","]
6705#[doc = " \"minimum\": 0.0"]
6706#[doc = " },"]
6707#[doc = " \"storage_write_base\": {"]
6708#[doc = " \"description\": \"Storage trie write key base cost\","]
6709#[doc = " \"type\": \"integer\","]
6710#[doc = " \"format\": \"uint64\","]
6711#[doc = " \"minimum\": 0.0"]
6712#[doc = " },"]
6713#[doc = " \"storage_write_evicted_byte\": {"]
6714#[doc = " \"description\": \"Storage trie write cost per byte of evicted value.\","]
6715#[doc = " \"type\": \"integer\","]
6716#[doc = " \"format\": \"uint64\","]
6717#[doc = " \"minimum\": 0.0"]
6718#[doc = " },"]
6719#[doc = " \"storage_write_key_byte\": {"]
6720#[doc = " \"description\": \"Storage trie write key per byte cost\","]
6721#[doc = " \"type\": \"integer\","]
6722#[doc = " \"format\": \"uint64\","]
6723#[doc = " \"minimum\": 0.0"]
6724#[doc = " },"]
6725#[doc = " \"storage_write_value_byte\": {"]
6726#[doc = " \"description\": \"Storage trie write value per byte cost\","]
6727#[doc = " \"type\": \"integer\","]
6728#[doc = " \"format\": \"uint64\","]
6729#[doc = " \"minimum\": 0.0"]
6730#[doc = " },"]
6731#[doc = " \"touching_trie_node\": {"]
6732#[doc = " \"description\": \"Cost per reading trie node from DB\","]
6733#[doc = " \"type\": \"integer\","]
6734#[doc = " \"format\": \"uint64\","]
6735#[doc = " \"minimum\": 0.0"]
6736#[doc = " },"]
6737#[doc = " \"utf16_decoding_base\": {"]
6738#[doc = " \"description\": \"Base cost of decoding utf16. It's used for `log_utf16`.\","]
6739#[doc = " \"type\": \"integer\","]
6740#[doc = " \"format\": \"uint64\","]
6741#[doc = " \"minimum\": 0.0"]
6742#[doc = " },"]
6743#[doc = " \"utf16_decoding_byte\": {"]
6744#[doc = " \"description\": \"Cost per byte of decoding utf16. It's used for `log_utf16`.\","]
6745#[doc = " \"type\": \"integer\","]
6746#[doc = " \"format\": \"uint64\","]
6747#[doc = " \"minimum\": 0.0"]
6748#[doc = " },"]
6749#[doc = " \"utf8_decoding_base\": {"]
6750#[doc = " \"description\": \"Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
6751#[doc = " \"type\": \"integer\","]
6752#[doc = " \"format\": \"uint64\","]
6753#[doc = " \"minimum\": 0.0"]
6754#[doc = " },"]
6755#[doc = " \"utf8_decoding_byte\": {"]
6756#[doc = " \"description\": \"Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`.\","]
6757#[doc = " \"type\": \"integer\","]
6758#[doc = " \"format\": \"uint64\","]
6759#[doc = " \"minimum\": 0.0"]
6760#[doc = " },"]
6761#[doc = " \"validator_stake_base\": {"]
6762#[doc = " \"description\": \"Cost of calling `validator_stake`.\","]
6763#[doc = " \"type\": \"integer\","]
6764#[doc = " \"format\": \"uint64\","]
6765#[doc = " \"minimum\": 0.0"]
6766#[doc = " },"]
6767#[doc = " \"validator_total_stake_base\": {"]
6768#[doc = " \"description\": \"Cost of calling `validator_total_stake`.\","]
6769#[doc = " \"type\": \"integer\","]
6770#[doc = " \"format\": \"uint64\","]
6771#[doc = " \"minimum\": 0.0"]
6772#[doc = " },"]
6773#[doc = " \"write_memory_base\": {"]
6774#[doc = " \"description\": \"Base cost for guest memory write\","]
6775#[doc = " \"type\": \"integer\","]
6776#[doc = " \"format\": \"uint64\","]
6777#[doc = " \"minimum\": 0.0"]
6778#[doc = " },"]
6779#[doc = " \"write_memory_byte\": {"]
6780#[doc = " \"description\": \"Cost for guest memory write per byte\","]
6781#[doc = " \"type\": \"integer\","]
6782#[doc = " \"format\": \"uint64\","]
6783#[doc = " \"minimum\": 0.0"]
6784#[doc = " },"]
6785#[doc = " \"write_register_base\": {"]
6786#[doc = " \"description\": \"Base cost for writing into register\","]
6787#[doc = " \"type\": \"integer\","]
6788#[doc = " \"format\": \"uint64\","]
6789#[doc = " \"minimum\": 0.0"]
6790#[doc = " },"]
6791#[doc = " \"write_register_byte\": {"]
6792#[doc = " \"description\": \"Cost for writing byte into register\","]
6793#[doc = " \"type\": \"integer\","]
6794#[doc = " \"format\": \"uint64\","]
6795#[doc = " \"minimum\": 0.0"]
6796#[doc = " },"]
6797#[doc = " \"yield_create_base\": {"]
6798#[doc = " \"description\": \"Base cost for creating a yield promise.\","]
6799#[doc = " \"type\": \"integer\","]
6800#[doc = " \"format\": \"uint64\","]
6801#[doc = " \"minimum\": 0.0"]
6802#[doc = " },"]
6803#[doc = " \"yield_create_byte\": {"]
6804#[doc = " \"description\": \"Per byte cost of arguments and method name.\","]
6805#[doc = " \"type\": \"integer\","]
6806#[doc = " \"format\": \"uint64\","]
6807#[doc = " \"minimum\": 0.0"]
6808#[doc = " },"]
6809#[doc = " \"yield_resume_base\": {"]
6810#[doc = " \"description\": \"Base cost for resuming a yield receipt.\","]
6811#[doc = " \"type\": \"integer\","]
6812#[doc = " \"format\": \"uint64\","]
6813#[doc = " \"minimum\": 0.0"]
6814#[doc = " },"]
6815#[doc = " \"yield_resume_byte\": {"]
6816#[doc = " \"description\": \"Per byte cost of resume payload.\","]
6817#[doc = " \"type\": \"integer\","]
6818#[doc = " \"format\": \"uint64\","]
6819#[doc = " \"minimum\": 0.0"]
6820#[doc = " }"]
6821#[doc = " }"]
6822#[doc = "}"]
6823#[doc = r" ```"]
6824#[doc = r" </details>"]
6825#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6826pub struct ExtCostsConfigView {
6827 #[doc = "Base cost for multiexp"]
6828 pub alt_bn128_g1_multiexp_base: u64,
6829 #[doc = "Per element cost for multiexp"]
6830 pub alt_bn128_g1_multiexp_element: u64,
6831 #[doc = "Base cost for sum"]
6832 pub alt_bn128_g1_sum_base: u64,
6833 #[doc = "Per element cost for sum"]
6834 pub alt_bn128_g1_sum_element: u64,
6835 #[doc = "Base cost for pairing check"]
6836 pub alt_bn128_pairing_check_base: u64,
6837 #[doc = "Per element cost for pairing check"]
6838 pub alt_bn128_pairing_check_element: u64,
6839 #[doc = "Base cost for calling a host function."]
6840 pub base: u64,
6841 pub bls12381_g1_multiexp_base: u64,
6842 pub bls12381_g1_multiexp_element: u64,
6843 pub bls12381_g2_multiexp_base: u64,
6844 pub bls12381_g2_multiexp_element: u64,
6845 pub bls12381_map_fp2_to_g2_base: u64,
6846 pub bls12381_map_fp2_to_g2_element: u64,
6847 pub bls12381_map_fp_to_g1_base: u64,
6848 pub bls12381_map_fp_to_g1_element: u64,
6849 pub bls12381_p1_decompress_base: u64,
6850 pub bls12381_p1_decompress_element: u64,
6851 pub bls12381_p1_sum_base: u64,
6852 pub bls12381_p1_sum_element: u64,
6853 pub bls12381_p2_decompress_base: u64,
6854 pub bls12381_p2_decompress_element: u64,
6855 pub bls12381_p2_sum_base: u64,
6856 pub bls12381_p2_sum_element: u64,
6857 pub bls12381_pairing_base: u64,
6858 pub bls12381_pairing_element: u64,
6859 pub contract_compile_base: u64,
6860 pub contract_compile_bytes: u64,
6861 #[doc = "Base cost of loading a pre-compiled contract"]
6862 pub contract_loading_base: u64,
6863 #[doc = "Cost per byte of loading a pre-compiled contract"]
6864 pub contract_loading_bytes: u64,
6865 #[doc = "Cost of calling ecrecover"]
6866 pub ecrecover_base: u64,
6867 #[doc = "Cost of getting ed25519 base"]
6868 pub ed25519_verify_base: u64,
6869 #[doc = "Cost of getting ed25519 per byte"]
6870 pub ed25519_verify_byte: u64,
6871 #[doc = "Cost of getting sha256 base"]
6872 pub keccak256_base: u64,
6873 #[doc = "Cost of getting sha256 per byte"]
6874 pub keccak256_byte: u64,
6875 #[doc = "Cost of getting sha256 base"]
6876 pub keccak512_base: u64,
6877 #[doc = "Cost of getting sha256 per byte"]
6878 pub keccak512_byte: u64,
6879 #[doc = "Cost for calling logging."]
6880 pub log_base: u64,
6881 #[doc = "Cost for logging per byte"]
6882 pub log_byte: u64,
6883 #[doc = "Cost for calling `promise_and`"]
6884 pub promise_and_base: u64,
6885 #[doc = "Cost for calling `promise_and` for each promise"]
6886 pub promise_and_per_promise: u64,
6887 #[doc = "Cost for calling `promise_return`"]
6888 pub promise_return: u64,
6889 #[doc = "Cost for reading trie node from memory"]
6890 pub read_cached_trie_node: u64,
6891 #[doc = "Base cost for guest memory read"]
6892 pub read_memory_base: u64,
6893 #[doc = "Cost for guest memory read"]
6894 pub read_memory_byte: u64,
6895 #[doc = "Base cost for reading from register"]
6896 pub read_register_base: u64,
6897 #[doc = "Cost for reading byte from register"]
6898 pub read_register_byte: u64,
6899 #[doc = "Cost of getting ripemd160 base"]
6900 pub ripemd160_base: u64,
6901 #[doc = "Cost of getting ripemd160 per message block"]
6902 pub ripemd160_block: u64,
6903 #[doc = "Cost of getting sha256 base"]
6904 pub sha256_base: u64,
6905 #[doc = "Cost of getting sha256 per byte"]
6906 pub sha256_byte: u64,
6907 #[doc = "Storage trie check for key existence cost base"]
6908 pub storage_has_key_base: u64,
6909 #[doc = "Storage trie check for key existence per key byte"]
6910 pub storage_has_key_byte: u64,
6911 #[doc = "Create trie range iterator cost per byte of from key."]
6912 pub storage_iter_create_from_byte: u64,
6913 #[doc = "Create trie prefix iterator cost base"]
6914 pub storage_iter_create_prefix_base: u64,
6915 #[doc = "Create trie prefix iterator cost per byte."]
6916 pub storage_iter_create_prefix_byte: u64,
6917 #[doc = "Create trie range iterator cost base"]
6918 pub storage_iter_create_range_base: u64,
6919 #[doc = "Create trie range iterator cost per byte of to key."]
6920 pub storage_iter_create_to_byte: u64,
6921 #[doc = "Trie iterator per key base cost"]
6922 pub storage_iter_next_base: u64,
6923 #[doc = "Trie iterator next key byte cost"]
6924 pub storage_iter_next_key_byte: u64,
6925 #[doc = "Trie iterator next key byte cost"]
6926 pub storage_iter_next_value_byte: u64,
6927 #[doc = "Storage trie read key overhead base cost, when doing large reads"]
6928 pub storage_large_read_overhead_base: u64,
6929 #[doc = "Storage trie read key overhead per-byte cost, when doing large reads"]
6930 pub storage_large_read_overhead_byte: u64,
6931 #[doc = "Storage trie read key base cost"]
6932 pub storage_read_base: u64,
6933 #[doc = "Storage trie read key per byte cost"]
6934 pub storage_read_key_byte: u64,
6935 #[doc = "Storage trie read value cost per byte cost"]
6936 pub storage_read_value_byte: u64,
6937 #[doc = "Remove key from trie base cost"]
6938 pub storage_remove_base: u64,
6939 #[doc = "Remove key from trie per byte cost"]
6940 pub storage_remove_key_byte: u64,
6941 #[doc = "Remove key from trie ret value byte cost"]
6942 pub storage_remove_ret_value_byte: u64,
6943 #[doc = "Storage trie write key base cost"]
6944 pub storage_write_base: u64,
6945 #[doc = "Storage trie write cost per byte of evicted value."]
6946 pub storage_write_evicted_byte: u64,
6947 #[doc = "Storage trie write key per byte cost"]
6948 pub storage_write_key_byte: u64,
6949 #[doc = "Storage trie write value per byte cost"]
6950 pub storage_write_value_byte: u64,
6951 #[doc = "Cost per reading trie node from DB"]
6952 pub touching_trie_node: u64,
6953 #[doc = "Base cost of decoding utf16. It's used for `log_utf16`."]
6954 pub utf16_decoding_base: u64,
6955 #[doc = "Cost per byte of decoding utf16. It's used for `log_utf16`."]
6956 pub utf16_decoding_byte: u64,
6957 #[doc = "Base cost of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
6958 pub utf8_decoding_base: u64,
6959 #[doc = "Cost per byte of decoding utf8. It's used for `log_utf8` and `panic_utf8`."]
6960 pub utf8_decoding_byte: u64,
6961 #[doc = "Cost of calling `validator_stake`."]
6962 pub validator_stake_base: u64,
6963 #[doc = "Cost of calling `validator_total_stake`."]
6964 pub validator_total_stake_base: u64,
6965 #[doc = "Base cost for guest memory write"]
6966 pub write_memory_base: u64,
6967 #[doc = "Cost for guest memory write per byte"]
6968 pub write_memory_byte: u64,
6969 #[doc = "Base cost for writing into register"]
6970 pub write_register_base: u64,
6971 #[doc = "Cost for writing byte into register"]
6972 pub write_register_byte: u64,
6973 #[doc = "Base cost for creating a yield promise."]
6974 pub yield_create_base: u64,
6975 #[doc = "Per byte cost of arguments and method name."]
6976 pub yield_create_byte: u64,
6977 #[doc = "Base cost for resuming a yield receipt."]
6978 pub yield_resume_base: u64,
6979 #[doc = "Per byte cost of resume payload."]
6980 pub yield_resume_byte: u64,
6981}
6982impl ::std::convert::From<&ExtCostsConfigView> for ExtCostsConfigView {
6983 fn from(value: &ExtCostsConfigView) -> Self {
6984 value.clone()
6985 }
6986}
6987#[doc = "`ExternalStorageConfig`"]
6988#[doc = r""]
6989#[doc = r" <details><summary>JSON schema</summary>"]
6990#[doc = r""]
6991#[doc = r" ```json"]
6992#[doc = "{"]
6993#[doc = " \"type\": \"object\","]
6994#[doc = " \"required\": ["]
6995#[doc = " \"location\""]
6996#[doc = " ],"]
6997#[doc = " \"properties\": {"]
6998#[doc = " \"external_storage_fallback_threshold\": {"]
6999#[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.\","]
7000#[doc = " \"default\": 3,"]
7001#[doc = " \"type\": \"integer\","]
7002#[doc = " \"format\": \"uint64\","]
7003#[doc = " \"minimum\": 0.0"]
7004#[doc = " },"]
7005#[doc = " \"location\": {"]
7006#[doc = " \"description\": \"Location of state parts.\","]
7007#[doc = " \"allOf\": ["]
7008#[doc = " {"]
7009#[doc = " \"$ref\": \"#/components/schemas/ExternalStorageLocation\""]
7010#[doc = " }"]
7011#[doc = " ]"]
7012#[doc = " },"]
7013#[doc = " \"num_concurrent_requests\": {"]
7014#[doc = " \"description\": \"When fetching state parts from external storage, throttle fetch requests\\nto this many concurrent requests.\","]
7015#[doc = " \"default\": 25,"]
7016#[doc = " \"type\": \"integer\","]
7017#[doc = " \"format\": \"uint32\","]
7018#[doc = " \"minimum\": 0.0"]
7019#[doc = " },"]
7020#[doc = " \"num_concurrent_requests_during_catchup\": {"]
7021#[doc = " \"description\": \"During catchup, the node will use a different number of concurrent requests\\nto reduce the performance impact of state sync.\","]
7022#[doc = " \"default\": 5,"]
7023#[doc = " \"type\": \"integer\","]
7024#[doc = " \"format\": \"uint32\","]
7025#[doc = " \"minimum\": 0.0"]
7026#[doc = " }"]
7027#[doc = " }"]
7028#[doc = "}"]
7029#[doc = r" ```"]
7030#[doc = r" </details>"]
7031#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7032pub struct ExternalStorageConfig {
7033 #[doc = "The number of attempts the node will make to obtain a part from peers in\nthe network before it fetches from external storage."]
7034 #[serde(default = "defaults::default_u64::<u64, 3>")]
7035 pub external_storage_fallback_threshold: u64,
7036 #[doc = "Location of state parts."]
7037 pub location: ExternalStorageLocation,
7038 #[doc = "When fetching state parts from external storage, throttle fetch requests\nto this many concurrent requests."]
7039 #[serde(default = "defaults::default_u64::<u32, 25>")]
7040 pub num_concurrent_requests: u32,
7041 #[doc = "During catchup, the node will use a different number of concurrent requests\nto reduce the performance impact of state sync."]
7042 #[serde(default = "defaults::default_u64::<u32, 5>")]
7043 pub num_concurrent_requests_during_catchup: u32,
7044}
7045impl ::std::convert::From<&ExternalStorageConfig> for ExternalStorageConfig {
7046 fn from(value: &ExternalStorageConfig) -> Self {
7047 value.clone()
7048 }
7049}
7050#[doc = "`ExternalStorageLocation`"]
7051#[doc = r""]
7052#[doc = r" <details><summary>JSON schema</summary>"]
7053#[doc = r""]
7054#[doc = r" ```json"]
7055#[doc = "{"]
7056#[doc = " \"oneOf\": ["]
7057#[doc = " {"]
7058#[doc = " \"type\": \"object\","]
7059#[doc = " \"required\": ["]
7060#[doc = " \"S3\""]
7061#[doc = " ],"]
7062#[doc = " \"properties\": {"]
7063#[doc = " \"S3\": {"]
7064#[doc = " \"type\": \"object\","]
7065#[doc = " \"required\": ["]
7066#[doc = " \"bucket\","]
7067#[doc = " \"region\""]
7068#[doc = " ],"]
7069#[doc = " \"properties\": {"]
7070#[doc = " \"bucket\": {"]
7071#[doc = " \"description\": \"Location of state dumps on S3.\","]
7072#[doc = " \"type\": \"string\""]
7073#[doc = " },"]
7074#[doc = " \"region\": {"]
7075#[doc = " \"description\": \"Data may only be available in certain locations.\","]
7076#[doc = " \"type\": \"string\""]
7077#[doc = " }"]
7078#[doc = " }"]
7079#[doc = " }"]
7080#[doc = " },"]
7081#[doc = " \"additionalProperties\": false"]
7082#[doc = " },"]
7083#[doc = " {"]
7084#[doc = " \"type\": \"object\","]
7085#[doc = " \"required\": ["]
7086#[doc = " \"Filesystem\""]
7087#[doc = " ],"]
7088#[doc = " \"properties\": {"]
7089#[doc = " \"Filesystem\": {"]
7090#[doc = " \"type\": \"object\","]
7091#[doc = " \"required\": ["]
7092#[doc = " \"root_dir\""]
7093#[doc = " ],"]
7094#[doc = " \"properties\": {"]
7095#[doc = " \"root_dir\": {"]
7096#[doc = " \"type\": \"string\""]
7097#[doc = " }"]
7098#[doc = " }"]
7099#[doc = " }"]
7100#[doc = " },"]
7101#[doc = " \"additionalProperties\": false"]
7102#[doc = " },"]
7103#[doc = " {"]
7104#[doc = " \"type\": \"object\","]
7105#[doc = " \"required\": ["]
7106#[doc = " \"GCS\""]
7107#[doc = " ],"]
7108#[doc = " \"properties\": {"]
7109#[doc = " \"GCS\": {"]
7110#[doc = " \"type\": \"object\","]
7111#[doc = " \"required\": ["]
7112#[doc = " \"bucket\""]
7113#[doc = " ],"]
7114#[doc = " \"properties\": {"]
7115#[doc = " \"bucket\": {"]
7116#[doc = " \"type\": \"string\""]
7117#[doc = " }"]
7118#[doc = " }"]
7119#[doc = " }"]
7120#[doc = " },"]
7121#[doc = " \"additionalProperties\": false"]
7122#[doc = " }"]
7123#[doc = " ]"]
7124#[doc = "}"]
7125#[doc = r" ```"]
7126#[doc = r" </details>"]
7127#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7128pub enum ExternalStorageLocation {
7129 S3 {
7130 #[doc = "Location of state dumps on S3."]
7131 bucket: ::std::string::String,
7132 #[doc = "Data may only be available in certain locations."]
7133 region: ::std::string::String,
7134 },
7135 Filesystem {
7136 root_dir: ::std::string::String,
7137 },
7138 #[serde(rename = "GCS")]
7139 Gcs {
7140 bucket: ::std::string::String,
7141 },
7142}
7143impl ::std::convert::From<&Self> for ExternalStorageLocation {
7144 fn from(value: &ExternalStorageLocation) -> Self {
7145 value.clone()
7146 }
7147}
7148#[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."]
7149#[doc = r""]
7150#[doc = r" <details><summary>JSON schema</summary>"]
7151#[doc = r""]
7152#[doc = r" ```json"]
7153#[doc = "{"]
7154#[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.\","]
7155#[doc = " \"type\": \"object\","]
7156#[doc = " \"required\": ["]
7157#[doc = " \"execution\","]
7158#[doc = " \"send_not_sir\","]
7159#[doc = " \"send_sir\""]
7160#[doc = " ],"]
7161#[doc = " \"properties\": {"]
7162#[doc = " \"execution\": {"]
7163#[doc = " \"description\": \"Fee for executing the object.\","]
7164#[doc = " \"type\": \"integer\","]
7165#[doc = " \"format\": \"uint64\","]
7166#[doc = " \"minimum\": 0.0"]
7167#[doc = " },"]
7168#[doc = " \"send_not_sir\": {"]
7169#[doc = " \"description\": \"Fee for sending an object potentially across the shards.\","]
7170#[doc = " \"type\": \"integer\","]
7171#[doc = " \"format\": \"uint64\","]
7172#[doc = " \"minimum\": 0.0"]
7173#[doc = " },"]
7174#[doc = " \"send_sir\": {"]
7175#[doc = " \"description\": \"Fee for sending an object from the sender to itself, guaranteeing that it does not leave\\nthe shard.\","]
7176#[doc = " \"type\": \"integer\","]
7177#[doc = " \"format\": \"uint64\","]
7178#[doc = " \"minimum\": 0.0"]
7179#[doc = " }"]
7180#[doc = " }"]
7181#[doc = "}"]
7182#[doc = r" ```"]
7183#[doc = r" </details>"]
7184#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7185pub struct Fee {
7186 #[doc = "Fee for executing the object."]
7187 pub execution: u64,
7188 #[doc = "Fee for sending an object potentially across the shards."]
7189 pub send_not_sir: u64,
7190 #[doc = "Fee for sending an object from the sender to itself, guaranteeing that it does not leave\nthe shard."]
7191 pub send_sir: u64,
7192}
7193impl ::std::convert::From<&Fee> for Fee {
7194 fn from(value: &Fee) -> Self {
7195 value.clone()
7196 }
7197}
7198#[doc = "Execution outcome of the transaction and all the subsequent receipts.\nCould be not finalized yet"]
7199#[doc = r""]
7200#[doc = r" <details><summary>JSON schema</summary>"]
7201#[doc = r""]
7202#[doc = r" ```json"]
7203#[doc = "{"]
7204#[doc = " \"description\": \"Execution outcome of the transaction and all the subsequent receipts.\\nCould be not finalized yet\","]
7205#[doc = " \"type\": \"object\","]
7206#[doc = " \"required\": ["]
7207#[doc = " \"receipts_outcome\","]
7208#[doc = " \"status\","]
7209#[doc = " \"transaction\","]
7210#[doc = " \"transaction_outcome\""]
7211#[doc = " ],"]
7212#[doc = " \"properties\": {"]
7213#[doc = " \"receipts_outcome\": {"]
7214#[doc = " \"description\": \"The execution outcome of receipts.\","]
7215#[doc = " \"type\": \"array\","]
7216#[doc = " \"items\": {"]
7217#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7218#[doc = " }"]
7219#[doc = " },"]
7220#[doc = " \"status\": {"]
7221#[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\","]
7222#[doc = " \"allOf\": ["]
7223#[doc = " {"]
7224#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
7225#[doc = " }"]
7226#[doc = " ]"]
7227#[doc = " },"]
7228#[doc = " \"transaction\": {"]
7229#[doc = " \"description\": \"Signed Transaction\","]
7230#[doc = " \"allOf\": ["]
7231#[doc = " {"]
7232#[doc = " \"$ref\": \"#/components/schemas/SignedTransactionView\""]
7233#[doc = " }"]
7234#[doc = " ]"]
7235#[doc = " },"]
7236#[doc = " \"transaction_outcome\": {"]
7237#[doc = " \"description\": \"The execution outcome of the signed transaction.\","]
7238#[doc = " \"allOf\": ["]
7239#[doc = " {"]
7240#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7241#[doc = " }"]
7242#[doc = " ]"]
7243#[doc = " }"]
7244#[doc = " }"]
7245#[doc = "}"]
7246#[doc = r" ```"]
7247#[doc = r" </details>"]
7248#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7249pub struct FinalExecutionOutcomeView {
7250 #[doc = "The execution outcome of receipts."]
7251 pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
7252 #[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"]
7253 pub status: FinalExecutionStatus,
7254 #[doc = "Signed Transaction"]
7255 pub transaction: SignedTransactionView,
7256 #[doc = "The execution outcome of the signed transaction."]
7257 pub transaction_outcome: ExecutionOutcomeWithIdView,
7258}
7259impl ::std::convert::From<&FinalExecutionOutcomeView> for FinalExecutionOutcomeView {
7260 fn from(value: &FinalExecutionOutcomeView) -> Self {
7261 value.clone()
7262 }
7263}
7264#[doc = "Final execution outcome of the transaction and all of subsequent the receipts. Also includes\nthe generated receipt."]
7265#[doc = r""]
7266#[doc = r" <details><summary>JSON schema</summary>"]
7267#[doc = r""]
7268#[doc = r" ```json"]
7269#[doc = "{"]
7270#[doc = " \"description\": \"Final execution outcome of the transaction and all of subsequent the receipts. Also includes\\nthe generated receipt.\","]
7271#[doc = " \"type\": \"object\","]
7272#[doc = " \"required\": ["]
7273#[doc = " \"receipts\","]
7274#[doc = " \"receipts_outcome\","]
7275#[doc = " \"status\","]
7276#[doc = " \"transaction\","]
7277#[doc = " \"transaction_outcome\""]
7278#[doc = " ],"]
7279#[doc = " \"properties\": {"]
7280#[doc = " \"receipts\": {"]
7281#[doc = " \"description\": \"Receipts generated from the transaction\","]
7282#[doc = " \"type\": \"array\","]
7283#[doc = " \"items\": {"]
7284#[doc = " \"$ref\": \"#/components/schemas/ReceiptView\""]
7285#[doc = " }"]
7286#[doc = " },"]
7287#[doc = " \"receipts_outcome\": {"]
7288#[doc = " \"description\": \"The execution outcome of receipts.\","]
7289#[doc = " \"type\": \"array\","]
7290#[doc = " \"items\": {"]
7291#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7292#[doc = " }"]
7293#[doc = " },"]
7294#[doc = " \"status\": {"]
7295#[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\","]
7296#[doc = " \"allOf\": ["]
7297#[doc = " {"]
7298#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionStatus\""]
7299#[doc = " }"]
7300#[doc = " ]"]
7301#[doc = " },"]
7302#[doc = " \"transaction\": {"]
7303#[doc = " \"description\": \"Signed Transaction\","]
7304#[doc = " \"allOf\": ["]
7305#[doc = " {"]
7306#[doc = " \"$ref\": \"#/components/schemas/SignedTransactionView\""]
7307#[doc = " }"]
7308#[doc = " ]"]
7309#[doc = " },"]
7310#[doc = " \"transaction_outcome\": {"]
7311#[doc = " \"description\": \"The execution outcome of the signed transaction.\","]
7312#[doc = " \"allOf\": ["]
7313#[doc = " {"]
7314#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
7315#[doc = " }"]
7316#[doc = " ]"]
7317#[doc = " }"]
7318#[doc = " }"]
7319#[doc = "}"]
7320#[doc = r" ```"]
7321#[doc = r" </details>"]
7322#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7323pub struct FinalExecutionOutcomeWithReceiptView {
7324 #[doc = "Receipts generated from the transaction"]
7325 pub receipts: ::std::vec::Vec<ReceiptView>,
7326 #[doc = "The execution outcome of receipts."]
7327 pub receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
7328 #[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"]
7329 pub status: FinalExecutionStatus,
7330 #[doc = "Signed Transaction"]
7331 pub transaction: SignedTransactionView,
7332 #[doc = "The execution outcome of the signed transaction."]
7333 pub transaction_outcome: ExecutionOutcomeWithIdView,
7334}
7335impl ::std::convert::From<&FinalExecutionOutcomeWithReceiptView>
7336 for FinalExecutionOutcomeWithReceiptView
7337{
7338 fn from(value: &FinalExecutionOutcomeWithReceiptView) -> Self {
7339 value.clone()
7340 }
7341}
7342#[doc = "`FinalExecutionStatus`"]
7343#[doc = r""]
7344#[doc = r" <details><summary>JSON schema</summary>"]
7345#[doc = r""]
7346#[doc = r" ```json"]
7347#[doc = "{"]
7348#[doc = " \"oneOf\": ["]
7349#[doc = " {"]
7350#[doc = " \"description\": \"The execution has not yet started.\","]
7351#[doc = " \"type\": \"string\","]
7352#[doc = " \"enum\": ["]
7353#[doc = " \"NotStarted\""]
7354#[doc = " ]"]
7355#[doc = " },"]
7356#[doc = " {"]
7357#[doc = " \"description\": \"The execution has started and still going.\","]
7358#[doc = " \"type\": \"string\","]
7359#[doc = " \"enum\": ["]
7360#[doc = " \"Started\""]
7361#[doc = " ]"]
7362#[doc = " },"]
7363#[doc = " {"]
7364#[doc = " \"description\": \"The execution has failed with the given error.\","]
7365#[doc = " \"type\": \"object\","]
7366#[doc = " \"required\": ["]
7367#[doc = " \"Failure\""]
7368#[doc = " ],"]
7369#[doc = " \"properties\": {"]
7370#[doc = " \"Failure\": {"]
7371#[doc = " \"$ref\": \"#/components/schemas/TxExecutionError\""]
7372#[doc = " }"]
7373#[doc = " },"]
7374#[doc = " \"additionalProperties\": false"]
7375#[doc = " },"]
7376#[doc = " {"]
7377#[doc = " \"description\": \"The execution has succeeded and returned some value or an empty vec encoded in base64.\","]
7378#[doc = " \"type\": \"object\","]
7379#[doc = " \"required\": ["]
7380#[doc = " \"SuccessValue\""]
7381#[doc = " ],"]
7382#[doc = " \"properties\": {"]
7383#[doc = " \"SuccessValue\": {"]
7384#[doc = " \"type\": \"string\""]
7385#[doc = " }"]
7386#[doc = " },"]
7387#[doc = " \"additionalProperties\": false"]
7388#[doc = " }"]
7389#[doc = " ]"]
7390#[doc = "}"]
7391#[doc = r" ```"]
7392#[doc = r" </details>"]
7393#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7394pub enum FinalExecutionStatus {
7395 #[doc = "The execution has not yet started."]
7396 NotStarted,
7397 #[doc = "The execution has started and still going."]
7398 Started,
7399 #[doc = "The execution has failed with the given error."]
7400 Failure(TxExecutionError),
7401 #[doc = "The execution has succeeded and returned some value or an empty vec encoded in base64."]
7402 SuccessValue(::std::string::String),
7403}
7404impl ::std::convert::From<&Self> for FinalExecutionStatus {
7405 fn from(value: &FinalExecutionStatus) -> Self {
7406 value.clone()
7407 }
7408}
7409impl ::std::convert::From<TxExecutionError> for FinalExecutionStatus {
7410 fn from(value: TxExecutionError) -> Self {
7411 Self::Failure(value)
7412 }
7413}
7414#[doc = "Different types of finality."]
7415#[doc = r""]
7416#[doc = r" <details><summary>JSON schema</summary>"]
7417#[doc = r""]
7418#[doc = r" ```json"]
7419#[doc = "{"]
7420#[doc = " \"description\": \"Different types of finality.\","]
7421#[doc = " \"type\": \"string\","]
7422#[doc = " \"enum\": ["]
7423#[doc = " \"optimistic\","]
7424#[doc = " \"near-final\","]
7425#[doc = " \"final\""]
7426#[doc = " ]"]
7427#[doc = "}"]
7428#[doc = r" ```"]
7429#[doc = r" </details>"]
7430#[derive(
7431 :: serde :: Deserialize,
7432 :: serde :: Serialize,
7433 Clone,
7434 Copy,
7435 Debug,
7436 Eq,
7437 Hash,
7438 Ord,
7439 PartialEq,
7440 PartialOrd,
7441)]
7442pub enum Finality {
7443 #[serde(rename = "optimistic")]
7444 Optimistic,
7445 #[serde(rename = "near-final")]
7446 NearFinal,
7447 #[serde(rename = "final")]
7448 Final,
7449}
7450impl ::std::convert::From<&Self> for Finality {
7451 fn from(value: &Finality) -> Self {
7452 value.clone()
7453 }
7454}
7455impl ::std::fmt::Display for Finality {
7456 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7457 match *self {
7458 Self::Optimistic => write!(f, "optimistic"),
7459 Self::NearFinal => write!(f, "near-final"),
7460 Self::Final => write!(f, "final"),
7461 }
7462 }
7463}
7464impl ::std::str::FromStr for Finality {
7465 type Err = self::error::ConversionError;
7466 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7467 match value {
7468 "optimistic" => Ok(Self::Optimistic),
7469 "near-final" => Ok(Self::NearFinal),
7470 "final" => Ok(Self::Final),
7471 _ => Err("invalid value".into()),
7472 }
7473 }
7474}
7475impl ::std::convert::TryFrom<&str> for Finality {
7476 type Error = self::error::ConversionError;
7477 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7478 value.parse()
7479 }
7480}
7481impl ::std::convert::TryFrom<&::std::string::String> for Finality {
7482 type Error = self::error::ConversionError;
7483 fn try_from(
7484 value: &::std::string::String,
7485 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7486 value.parse()
7487 }
7488}
7489impl ::std::convert::TryFrom<::std::string::String> for Finality {
7490 type Error = self::error::ConversionError;
7491 fn try_from(
7492 value: ::std::string::String,
7493 ) -> ::std::result::Result<Self, self::error::ConversionError> {
7494 value.parse()
7495 }
7496}
7497#[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)."]
7498#[doc = r""]
7499#[doc = r" <details><summary>JSON schema</summary>"]
7500#[doc = r""]
7501#[doc = r" ```json"]
7502#[doc = "{"]
7503#[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).\","]
7504#[doc = " \"type\": \"string\","]
7505#[doc = " \"format\": \"bytes\""]
7506#[doc = "}"]
7507#[doc = r" ```"]
7508#[doc = r" </details>"]
7509#[derive(
7510 :: serde :: Deserialize,
7511 :: serde :: Serialize,
7512 Clone,
7513 Debug,
7514 Eq,
7515 Hash,
7516 Ord,
7517 PartialEq,
7518 PartialOrd,
7519)]
7520#[serde(transparent)]
7521pub struct FunctionArgs(pub ::std::string::String);
7522impl ::std::ops::Deref for FunctionArgs {
7523 type Target = ::std::string::String;
7524 fn deref(&self) -> &::std::string::String {
7525 &self.0
7526 }
7527}
7528impl ::std::convert::From<FunctionArgs> for ::std::string::String {
7529 fn from(value: FunctionArgs) -> Self {
7530 value.0
7531 }
7532}
7533impl ::std::convert::From<&FunctionArgs> for FunctionArgs {
7534 fn from(value: &FunctionArgs) -> Self {
7535 value.clone()
7536 }
7537}
7538impl ::std::convert::From<::std::string::String> for FunctionArgs {
7539 fn from(value: ::std::string::String) -> Self {
7540 Self(value)
7541 }
7542}
7543impl ::std::str::FromStr for FunctionArgs {
7544 type Err = ::std::convert::Infallible;
7545 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7546 Ok(Self(value.to_string()))
7547 }
7548}
7549impl ::std::fmt::Display for FunctionArgs {
7550 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7551 self.0.fmt(f)
7552 }
7553}
7554#[doc = "`FunctionCallAction`"]
7555#[doc = r""]
7556#[doc = r" <details><summary>JSON schema</summary>"]
7557#[doc = r""]
7558#[doc = r" ```json"]
7559#[doc = "{"]
7560#[doc = " \"type\": \"object\","]
7561#[doc = " \"required\": ["]
7562#[doc = " \"args\","]
7563#[doc = " \"deposit\","]
7564#[doc = " \"gas\","]
7565#[doc = " \"method_name\""]
7566#[doc = " ],"]
7567#[doc = " \"properties\": {"]
7568#[doc = " \"args\": {"]
7569#[doc = " \"type\": \"string\""]
7570#[doc = " },"]
7571#[doc = " \"deposit\": {"]
7572#[doc = " \"type\": \"string\""]
7573#[doc = " },"]
7574#[doc = " \"gas\": {"]
7575#[doc = " \"type\": \"integer\","]
7576#[doc = " \"format\": \"uint64\","]
7577#[doc = " \"minimum\": 0.0"]
7578#[doc = " },"]
7579#[doc = " \"method_name\": {"]
7580#[doc = " \"type\": \"string\""]
7581#[doc = " }"]
7582#[doc = " }"]
7583#[doc = "}"]
7584#[doc = r" ```"]
7585#[doc = r" </details>"]
7586#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7587pub struct FunctionCallAction {
7588 pub args: ::std::string::String,
7589 pub deposit: ::std::string::String,
7590 pub gas: u64,
7591 pub method_name: ::std::string::String,
7592}
7593impl ::std::convert::From<&FunctionCallAction> for FunctionCallAction {
7594 fn from(value: &FunctionCallAction) -> Self {
7595 value.clone()
7596 }
7597}
7598#[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."]
7599#[doc = r""]
7600#[doc = r" <details><summary>JSON schema</summary>"]
7601#[doc = r""]
7602#[doc = r" ```json"]
7603#[doc = "{"]
7604#[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.\","]
7605#[doc = " \"oneOf\": ["]
7606#[doc = " {"]
7607#[doc = " \"type\": \"string\","]
7608#[doc = " \"enum\": ["]
7609#[doc = " \"WasmUnknownError\","]
7610#[doc = " \"_EVMError\""]
7611#[doc = " ]"]
7612#[doc = " },"]
7613#[doc = " {"]
7614#[doc = " \"description\": \"Wasm compilation error\","]
7615#[doc = " \"type\": \"object\","]
7616#[doc = " \"required\": ["]
7617#[doc = " \"CompilationError\""]
7618#[doc = " ],"]
7619#[doc = " \"properties\": {"]
7620#[doc = " \"CompilationError\": {"]
7621#[doc = " \"$ref\": \"#/components/schemas/CompilationError\""]
7622#[doc = " }"]
7623#[doc = " },"]
7624#[doc = " \"additionalProperties\": false"]
7625#[doc = " },"]
7626#[doc = " {"]
7627#[doc = " \"description\": \"Wasm binary env link error\\n\\nNote: this is only to deserialize old data, use execution error for new data\","]
7628#[doc = " \"type\": \"object\","]
7629#[doc = " \"required\": ["]
7630#[doc = " \"LinkError\""]
7631#[doc = " ],"]
7632#[doc = " \"properties\": {"]
7633#[doc = " \"LinkError\": {"]
7634#[doc = " \"type\": \"object\","]
7635#[doc = " \"required\": ["]
7636#[doc = " \"msg\""]
7637#[doc = " ],"]
7638#[doc = " \"properties\": {"]
7639#[doc = " \"msg\": {"]
7640#[doc = " \"type\": \"string\""]
7641#[doc = " }"]
7642#[doc = " }"]
7643#[doc = " }"]
7644#[doc = " },"]
7645#[doc = " \"additionalProperties\": false"]
7646#[doc = " },"]
7647#[doc = " {"]
7648#[doc = " \"description\": \"Import/export resolve error\","]
7649#[doc = " \"type\": \"object\","]
7650#[doc = " \"required\": ["]
7651#[doc = " \"MethodResolveError\""]
7652#[doc = " ],"]
7653#[doc = " \"properties\": {"]
7654#[doc = " \"MethodResolveError\": {"]
7655#[doc = " \"$ref\": \"#/components/schemas/MethodResolveError\""]
7656#[doc = " }"]
7657#[doc = " },"]
7658#[doc = " \"additionalProperties\": false"]
7659#[doc = " },"]
7660#[doc = " {"]
7661#[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\","]
7662#[doc = " \"type\": \"object\","]
7663#[doc = " \"required\": ["]
7664#[doc = " \"WasmTrap\""]
7665#[doc = " ],"]
7666#[doc = " \"properties\": {"]
7667#[doc = " \"WasmTrap\": {"]
7668#[doc = " \"$ref\": \"#/components/schemas/WasmTrap\""]
7669#[doc = " }"]
7670#[doc = " },"]
7671#[doc = " \"additionalProperties\": false"]
7672#[doc = " },"]
7673#[doc = " {"]
7674#[doc = " \"description\": \"Note: this is only to deserialize old data, use execution error for new data\","]
7675#[doc = " \"type\": \"object\","]
7676#[doc = " \"required\": ["]
7677#[doc = " \"HostError\""]
7678#[doc = " ],"]
7679#[doc = " \"properties\": {"]
7680#[doc = " \"HostError\": {"]
7681#[doc = " \"$ref\": \"#/components/schemas/HostError\""]
7682#[doc = " }"]
7683#[doc = " },"]
7684#[doc = " \"additionalProperties\": false"]
7685#[doc = " },"]
7686#[doc = " {"]
7687#[doc = " \"type\": \"object\","]
7688#[doc = " \"required\": ["]
7689#[doc = " \"ExecutionError\""]
7690#[doc = " ],"]
7691#[doc = " \"properties\": {"]
7692#[doc = " \"ExecutionError\": {"]
7693#[doc = " \"type\": \"string\""]
7694#[doc = " }"]
7695#[doc = " },"]
7696#[doc = " \"additionalProperties\": false"]
7697#[doc = " }"]
7698#[doc = " ]"]
7699#[doc = "}"]
7700#[doc = r" ```"]
7701#[doc = r" </details>"]
7702#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7703pub enum FunctionCallError {
7704 WasmUnknownError,
7705 #[serde(rename = "_EVMError")]
7706 EvmError,
7707 #[doc = "Wasm compilation error"]
7708 CompilationError(CompilationError),
7709 #[doc = "Wasm binary env link error\n\nNote: this is only to deserialize old data, use execution error for new data"]
7710 LinkError {
7711 msg: ::std::string::String,
7712 },
7713 #[doc = "Import/export resolve error"]
7714 MethodResolveError(MethodResolveError),
7715 #[doc = "A trap happened during execution of a binary\n\nNote: this is only to deserialize old data, use execution error for new data"]
7716 WasmTrap(WasmTrap),
7717 #[doc = "Note: this is only to deserialize old data, use execution error for new data"]
7718 HostError(HostError),
7719 ExecutionError(::std::string::String),
7720}
7721impl ::std::convert::From<&Self> for FunctionCallError {
7722 fn from(value: &FunctionCallError) -> Self {
7723 value.clone()
7724 }
7725}
7726impl ::std::convert::From<CompilationError> for FunctionCallError {
7727 fn from(value: CompilationError) -> Self {
7728 Self::CompilationError(value)
7729 }
7730}
7731impl ::std::convert::From<MethodResolveError> for FunctionCallError {
7732 fn from(value: MethodResolveError) -> Self {
7733 Self::MethodResolveError(value)
7734 }
7735}
7736impl ::std::convert::From<WasmTrap> for FunctionCallError {
7737 fn from(value: WasmTrap) -> Self {
7738 Self::WasmTrap(value)
7739 }
7740}
7741impl ::std::convert::From<HostError> for FunctionCallError {
7742 fn from(value: HostError) -> Self {
7743 Self::HostError(value)
7744 }
7745}
7746#[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."]
7747#[doc = r""]
7748#[doc = r" <details><summary>JSON schema</summary>"]
7749#[doc = r""]
7750#[doc = r" ```json"]
7751#[doc = "{"]
7752#[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.\","]
7753#[doc = " \"type\": \"object\","]
7754#[doc = " \"required\": ["]
7755#[doc = " \"method_names\","]
7756#[doc = " \"receiver_id\""]
7757#[doc = " ],"]
7758#[doc = " \"properties\": {"]
7759#[doc = " \"allowance\": {"]
7760#[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.\","]
7761#[doc = " \"type\": ["]
7762#[doc = " \"string\","]
7763#[doc = " \"null\""]
7764#[doc = " ]"]
7765#[doc = " },"]
7766#[doc = " \"method_names\": {"]
7767#[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.\","]
7768#[doc = " \"type\": \"array\","]
7769#[doc = " \"items\": {"]
7770#[doc = " \"type\": \"string\""]
7771#[doc = " }"]
7772#[doc = " },"]
7773#[doc = " \"receiver_id\": {"]
7774#[doc = " \"description\": \"The access key only allows transactions with the given receiver's account id.\","]
7775#[doc = " \"type\": \"string\""]
7776#[doc = " }"]
7777#[doc = " }"]
7778#[doc = "}"]
7779#[doc = r" ```"]
7780#[doc = r" </details>"]
7781#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7782pub struct FunctionCallPermission {
7783 #[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."]
7784 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7785 pub allowance: ::std::option::Option<::std::string::String>,
7786 #[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."]
7787 pub method_names: ::std::vec::Vec<::std::string::String>,
7788 #[doc = "The access key only allows transactions with the given receiver's account id."]
7789 pub receiver_id: ::std::string::String,
7790}
7791impl ::std::convert::From<&FunctionCallPermission> for FunctionCallPermission {
7792 fn from(value: &FunctionCallPermission) -> Self {
7793 value.clone()
7794 }
7795}
7796#[doc = "`GasKeyView`"]
7797#[doc = r""]
7798#[doc = r" <details><summary>JSON schema</summary>"]
7799#[doc = r""]
7800#[doc = r" ```json"]
7801#[doc = "{"]
7802#[doc = " \"type\": \"object\","]
7803#[doc = " \"required\": ["]
7804#[doc = " \"balance\","]
7805#[doc = " \"num_nonces\","]
7806#[doc = " \"permission\""]
7807#[doc = " ],"]
7808#[doc = " \"properties\": {"]
7809#[doc = " \"balance\": {"]
7810#[doc = " \"type\": \"integer\","]
7811#[doc = " \"format\": \"uint128\","]
7812#[doc = " \"minimum\": 0.0"]
7813#[doc = " },"]
7814#[doc = " \"num_nonces\": {"]
7815#[doc = " \"type\": \"integer\","]
7816#[doc = " \"format\": \"uint32\","]
7817#[doc = " \"minimum\": 0.0"]
7818#[doc = " },"]
7819#[doc = " \"permission\": {"]
7820#[doc = " \"$ref\": \"#/components/schemas/AccessKeyPermissionView\""]
7821#[doc = " }"]
7822#[doc = " }"]
7823#[doc = "}"]
7824#[doc = r" ```"]
7825#[doc = r" </details>"]
7826#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7827pub struct GasKeyView {
7828 pub balance: u64,
7829 pub num_nonces: u32,
7830 pub permission: AccessKeyPermissionView,
7831}
7832impl ::std::convert::From<&GasKeyView> for GasKeyView {
7833 fn from(value: &GasKeyView) -> Self {
7834 value.clone()
7835 }
7836}
7837#[doc = "Configuration for garbage collection."]
7838#[doc = r""]
7839#[doc = r" <details><summary>JSON schema</summary>"]
7840#[doc = r""]
7841#[doc = r" ```json"]
7842#[doc = "{"]
7843#[doc = " \"description\": \"Configuration for garbage collection.\","]
7844#[doc = " \"type\": \"object\","]
7845#[doc = " \"properties\": {"]
7846#[doc = " \"gc_blocks_limit\": {"]
7847#[doc = " \"description\": \"Maximum number of blocks to garbage collect at every garbage collection\\ncall.\","]
7848#[doc = " \"default\": 2,"]
7849#[doc = " \"type\": \"integer\","]
7850#[doc = " \"format\": \"uint64\","]
7851#[doc = " \"minimum\": 0.0"]
7852#[doc = " },"]
7853#[doc = " \"gc_fork_clean_step\": {"]
7854#[doc = " \"description\": \"Maximum number of height to go through at each garbage collection step\\nwhen cleaning forks during garbage collection.\","]
7855#[doc = " \"default\": 100,"]
7856#[doc = " \"type\": \"integer\","]
7857#[doc = " \"format\": \"uint64\","]
7858#[doc = " \"minimum\": 0.0"]
7859#[doc = " },"]
7860#[doc = " \"gc_num_epochs_to_keep\": {"]
7861#[doc = " \"description\": \"Number of epochs for which we keep store data.\","]
7862#[doc = " \"default\": 5,"]
7863#[doc = " \"type\": \"integer\","]
7864#[doc = " \"format\": \"uint64\","]
7865#[doc = " \"minimum\": 0.0"]
7866#[doc = " },"]
7867#[doc = " \"gc_step_period\": {"]
7868#[doc = " \"description\": \"How often gc should be run\","]
7869#[doc = " \"default\": {"]
7870#[doc = " \"nanos\": 500000000,"]
7871#[doc = " \"secs\": 0"]
7872#[doc = " },"]
7873#[doc = " \"allOf\": ["]
7874#[doc = " {"]
7875#[doc = " \"$ref\": \"#/components/schemas/DurationAsStdSchemaProvider\""]
7876#[doc = " }"]
7877#[doc = " ]"]
7878#[doc = " }"]
7879#[doc = " }"]
7880#[doc = "}"]
7881#[doc = r" ```"]
7882#[doc = r" </details>"]
7883#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7884pub struct GcConfig {
7885 #[doc = "Maximum number of blocks to garbage collect at every garbage collection\ncall."]
7886 #[serde(default = "defaults::default_u64::<u64, 2>")]
7887 pub gc_blocks_limit: u64,
7888 #[doc = "Maximum number of height to go through at each garbage collection step\nwhen cleaning forks during garbage collection."]
7889 #[serde(default = "defaults::default_u64::<u64, 100>")]
7890 pub gc_fork_clean_step: u64,
7891 #[doc = "Number of epochs for which we keep store data."]
7892 #[serde(default = "defaults::default_u64::<u64, 5>")]
7893 pub gc_num_epochs_to_keep: u64,
7894 #[doc = "How often gc should be run"]
7895 #[serde(default = "defaults::gc_config_gc_step_period")]
7896 pub gc_step_period: DurationAsStdSchemaProvider,
7897}
7898impl ::std::convert::From<&GcConfig> for GcConfig {
7899 fn from(value: &GcConfig) -> Self {
7900 value.clone()
7901 }
7902}
7903impl ::std::default::Default for GcConfig {
7904 fn default() -> Self {
7905 Self {
7906 gc_blocks_limit: defaults::default_u64::<u64, 2>(),
7907 gc_fork_clean_step: defaults::default_u64::<u64, 100>(),
7908 gc_num_epochs_to_keep: defaults::default_u64::<u64, 5>(),
7909 gc_step_period: defaults::gc_config_gc_step_period(),
7910 }
7911 }
7912}
7913#[doc = "`GenesisConfig`"]
7914#[doc = r""]
7915#[doc = r" <details><summary>JSON schema</summary>"]
7916#[doc = r""]
7917#[doc = r" ```json"]
7918#[doc = "{"]
7919#[doc = " \"type\": \"object\","]
7920#[doc = " \"required\": ["]
7921#[doc = " \"avg_hidden_validator_seats_per_shard\","]
7922#[doc = " \"block_producer_kickout_threshold\","]
7923#[doc = " \"chain_id\","]
7924#[doc = " \"chunk_producer_kickout_threshold\","]
7925#[doc = " \"dynamic_resharding\","]
7926#[doc = " \"epoch_length\","]
7927#[doc = " \"fishermen_threshold\","]
7928#[doc = " \"gas_limit\","]
7929#[doc = " \"gas_price_adjustment_rate\","]
7930#[doc = " \"genesis_height\","]
7931#[doc = " \"genesis_time\","]
7932#[doc = " \"max_gas_price\","]
7933#[doc = " \"max_inflation_rate\","]
7934#[doc = " \"min_gas_price\","]
7935#[doc = " \"num_block_producer_seats\","]
7936#[doc = " \"num_block_producer_seats_per_shard\","]
7937#[doc = " \"num_blocks_per_year\","]
7938#[doc = " \"protocol_reward_rate\","]
7939#[doc = " \"protocol_treasury_account\","]
7940#[doc = " \"protocol_version\","]
7941#[doc = " \"total_supply\","]
7942#[doc = " \"transaction_validity_period\","]
7943#[doc = " \"validators\""]
7944#[doc = " ],"]
7945#[doc = " \"properties\": {"]
7946#[doc = " \"avg_hidden_validator_seats_per_shard\": {"]
7947#[doc = " \"description\": \"Expected number of hidden validators per shard.\","]
7948#[doc = " \"type\": \"array\","]
7949#[doc = " \"items\": {"]
7950#[doc = " \"type\": \"integer\","]
7951#[doc = " \"format\": \"uint64\","]
7952#[doc = " \"minimum\": 0.0"]
7953#[doc = " }"]
7954#[doc = " },"]
7955#[doc = " \"block_producer_kickout_threshold\": {"]
7956#[doc = " \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
7957#[doc = " \"type\": \"integer\","]
7958#[doc = " \"format\": \"uint8\","]
7959#[doc = " \"maximum\": 255.0,"]
7960#[doc = " \"minimum\": 0.0"]
7961#[doc = " },"]
7962#[doc = " \"chain_id\": {"]
7963#[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.\","]
7964#[doc = " \"type\": \"string\""]
7965#[doc = " },"]
7966#[doc = " \"chunk_producer_assignment_changes_limit\": {"]
7967#[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.\","]
7968#[doc = " \"default\": 5,"]
7969#[doc = " \"type\": \"integer\","]
7970#[doc = " \"format\": \"uint64\","]
7971#[doc = " \"minimum\": 0.0"]
7972#[doc = " },"]
7973#[doc = " \"chunk_producer_kickout_threshold\": {"]
7974#[doc = " \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
7975#[doc = " \"type\": \"integer\","]
7976#[doc = " \"format\": \"uint8\","]
7977#[doc = " \"maximum\": 255.0,"]
7978#[doc = " \"minimum\": 0.0"]
7979#[doc = " },"]
7980#[doc = " \"chunk_validator_only_kickout_threshold\": {"]
7981#[doc = " \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
7982#[doc = " \"default\": 80,"]
7983#[doc = " \"type\": \"integer\","]
7984#[doc = " \"format\": \"uint8\","]
7985#[doc = " \"maximum\": 255.0,"]
7986#[doc = " \"minimum\": 0.0"]
7987#[doc = " },"]
7988#[doc = " \"dynamic_resharding\": {"]
7989#[doc = " \"description\": \"Enable dynamic re-sharding.\","]
7990#[doc = " \"type\": \"boolean\""]
7991#[doc = " },"]
7992#[doc = " \"epoch_length\": {"]
7993#[doc = " \"description\": \"Epoch length counted in block heights.\","]
7994#[doc = " \"type\": \"integer\","]
7995#[doc = " \"format\": \"uint64\","]
7996#[doc = " \"minimum\": 0.0"]
7997#[doc = " },"]
7998#[doc = " \"fishermen_threshold\": {"]
7999#[doc = " \"description\": \"Fishermen stake threshold.\","]
8000#[doc = " \"type\": \"string\""]
8001#[doc = " },"]
8002#[doc = " \"gas_limit\": {"]
8003#[doc = " \"description\": \"Initial gas limit.\","]
8004#[doc = " \"type\": \"integer\","]
8005#[doc = " \"format\": \"uint64\","]
8006#[doc = " \"minimum\": 0.0"]
8007#[doc = " },"]
8008#[doc = " \"gas_price_adjustment_rate\": {"]
8009#[doc = " \"description\": \"Gas price adjustment rate\","]
8010#[doc = " \"type\": \"array\","]
8011#[doc = " \"items\": {"]
8012#[doc = " \"type\": \"integer\","]
8013#[doc = " \"format\": \"int32\""]
8014#[doc = " },"]
8015#[doc = " \"maxItems\": 2,"]
8016#[doc = " \"minItems\": 2"]
8017#[doc = " },"]
8018#[doc = " \"genesis_height\": {"]
8019#[doc = " \"description\": \"Height of genesis block.\","]
8020#[doc = " \"type\": \"integer\","]
8021#[doc = " \"format\": \"uint64\","]
8022#[doc = " \"minimum\": 0.0"]
8023#[doc = " },"]
8024#[doc = " \"genesis_time\": {"]
8025#[doc = " \"description\": \"Official time of blockchain start.\","]
8026#[doc = " \"type\": \"string\","]
8027#[doc = " \"format\": \"date-time\""]
8028#[doc = " },"]
8029#[doc = " \"max_gas_price\": {"]
8030#[doc = " \"type\": \"string\""]
8031#[doc = " },"]
8032#[doc = " \"max_inflation_rate\": {"]
8033#[doc = " \"description\": \"Maximum inflation on the total supply every epoch.\","]
8034#[doc = " \"type\": \"array\","]
8035#[doc = " \"items\": {"]
8036#[doc = " \"type\": \"integer\","]
8037#[doc = " \"format\": \"int32\""]
8038#[doc = " },"]
8039#[doc = " \"maxItems\": 2,"]
8040#[doc = " \"minItems\": 2"]
8041#[doc = " },"]
8042#[doc = " \"max_kickout_stake_perc\": {"]
8043#[doc = " \"description\": \"Max stake percentage of the validators we will kick out.\","]
8044#[doc = " \"default\": 100,"]
8045#[doc = " \"type\": \"integer\","]
8046#[doc = " \"format\": \"uint8\","]
8047#[doc = " \"maximum\": 255.0,"]
8048#[doc = " \"minimum\": 0.0"]
8049#[doc = " },"]
8050#[doc = " \"min_gas_price\": {"]
8051#[doc = " \"description\": \"Minimum gas price. It is also the initial gas price.\","]
8052#[doc = " \"type\": \"string\""]
8053#[doc = " },"]
8054#[doc = " \"minimum_stake_divisor\": {"]
8055#[doc = " \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
8056#[doc = " \"default\": 10,"]
8057#[doc = " \"type\": \"integer\","]
8058#[doc = " \"format\": \"uint64\","]
8059#[doc = " \"minimum\": 0.0"]
8060#[doc = " },"]
8061#[doc = " \"minimum_stake_ratio\": {"]
8062#[doc = " \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
8063#[doc = " \"default\": ["]
8064#[doc = " 1,"]
8065#[doc = " 6250"]
8066#[doc = " ],"]
8067#[doc = " \"type\": \"array\","]
8068#[doc = " \"items\": {"]
8069#[doc = " \"type\": \"integer\","]
8070#[doc = " \"format\": \"int32\""]
8071#[doc = " },"]
8072#[doc = " \"maxItems\": 2,"]
8073#[doc = " \"minItems\": 2"]
8074#[doc = " },"]
8075#[doc = " \"minimum_validators_per_shard\": {"]
8076#[doc = " \"description\": \"The minimum number of validators each shard must have\","]
8077#[doc = " \"default\": 1,"]
8078#[doc = " \"type\": \"integer\","]
8079#[doc = " \"format\": \"uint64\","]
8080#[doc = " \"minimum\": 0.0"]
8081#[doc = " },"]
8082#[doc = " \"num_block_producer_seats\": {"]
8083#[doc = " \"description\": \"Number of block producer seats at genesis.\","]
8084#[doc = " \"type\": \"integer\","]
8085#[doc = " \"format\": \"uint64\","]
8086#[doc = " \"minimum\": 0.0"]
8087#[doc = " },"]
8088#[doc = " \"num_block_producer_seats_per_shard\": {"]
8089#[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\","]
8090#[doc = " \"type\": \"array\","]
8091#[doc = " \"items\": {"]
8092#[doc = " \"type\": \"integer\","]
8093#[doc = " \"format\": \"uint64\","]
8094#[doc = " \"minimum\": 0.0"]
8095#[doc = " }"]
8096#[doc = " },"]
8097#[doc = " \"num_blocks_per_year\": {"]
8098#[doc = " \"description\": \"Expected number of blocks per year\","]
8099#[doc = " \"type\": \"integer\","]
8100#[doc = " \"format\": \"uint64\","]
8101#[doc = " \"minimum\": 0.0"]
8102#[doc = " },"]
8103#[doc = " \"num_chunk_only_producer_seats\": {"]
8104#[doc = " \"description\": \"Deprecated.\","]
8105#[doc = " \"default\": 300,"]
8106#[doc = " \"type\": \"integer\","]
8107#[doc = " \"format\": \"uint64\","]
8108#[doc = " \"minimum\": 0.0"]
8109#[doc = " },"]
8110#[doc = " \"num_chunk_producer_seats\": {"]
8111#[doc = " \"description\": \"Number of chunk producers.\\nDon't mess it up with chunk-only producers feature which is deprecated.\","]
8112#[doc = " \"default\": 100,"]
8113#[doc = " \"type\": \"integer\","]
8114#[doc = " \"format\": \"uint64\","]
8115#[doc = " \"minimum\": 0.0"]
8116#[doc = " },"]
8117#[doc = " \"num_chunk_validator_seats\": {"]
8118#[doc = " \"default\": 300,"]
8119#[doc = " \"type\": \"integer\","]
8120#[doc = " \"format\": \"uint64\","]
8121#[doc = " \"minimum\": 0.0"]
8122#[doc = " },"]
8123#[doc = " \"online_max_threshold\": {"]
8124#[doc = " \"description\": \"Online maximum threshold above which validator gets full reward.\","]
8125#[doc = " \"default\": ["]
8126#[doc = " 99,"]
8127#[doc = " 100"]
8128#[doc = " ],"]
8129#[doc = " \"type\": \"array\","]
8130#[doc = " \"items\": {"]
8131#[doc = " \"type\": \"integer\","]
8132#[doc = " \"format\": \"int32\""]
8133#[doc = " },"]
8134#[doc = " \"maxItems\": 2,"]
8135#[doc = " \"minItems\": 2"]
8136#[doc = " },"]
8137#[doc = " \"online_min_threshold\": {"]
8138#[doc = " \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
8139#[doc = " \"default\": ["]
8140#[doc = " 9,"]
8141#[doc = " 10"]
8142#[doc = " ],"]
8143#[doc = " \"type\": \"array\","]
8144#[doc = " \"items\": {"]
8145#[doc = " \"type\": \"integer\","]
8146#[doc = " \"format\": \"int32\""]
8147#[doc = " },"]
8148#[doc = " \"maxItems\": 2,"]
8149#[doc = " \"minItems\": 2"]
8150#[doc = " },"]
8151#[doc = " \"protocol_reward_rate\": {"]
8152#[doc = " \"description\": \"Protocol treasury rate\","]
8153#[doc = " \"type\": \"array\","]
8154#[doc = " \"items\": {"]
8155#[doc = " \"type\": \"integer\","]
8156#[doc = " \"format\": \"int32\""]
8157#[doc = " },"]
8158#[doc = " \"maxItems\": 2,"]
8159#[doc = " \"minItems\": 2"]
8160#[doc = " },"]
8161#[doc = " \"protocol_treasury_account\": {"]
8162#[doc = " \"description\": \"Protocol treasury account\","]
8163#[doc = " \"allOf\": ["]
8164#[doc = " {"]
8165#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
8166#[doc = " }"]
8167#[doc = " ]"]
8168#[doc = " },"]
8169#[doc = " \"protocol_upgrade_stake_threshold\": {"]
8170#[doc = " \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
8171#[doc = " \"default\": ["]
8172#[doc = " 4,"]
8173#[doc = " 5"]
8174#[doc = " ],"]
8175#[doc = " \"type\": \"array\","]
8176#[doc = " \"items\": {"]
8177#[doc = " \"type\": \"integer\","]
8178#[doc = " \"format\": \"int32\""]
8179#[doc = " },"]
8180#[doc = " \"maxItems\": 2,"]
8181#[doc = " \"minItems\": 2"]
8182#[doc = " },"]
8183#[doc = " \"protocol_version\": {"]
8184#[doc = " \"description\": \"Protocol version that this genesis works with.\","]
8185#[doc = " \"type\": \"integer\","]
8186#[doc = " \"format\": \"uint32\","]
8187#[doc = " \"minimum\": 0.0"]
8188#[doc = " },"]
8189#[doc = " \"shard_layout\": {"]
8190#[doc = " \"description\": \"Layout information regarding how to split accounts to shards\","]
8191#[doc = " \"default\": {"]
8192#[doc = " \"V2\": {"]
8193#[doc = " \"boundary_accounts\": [],"]
8194#[doc = " \"id_to_index_map\": {"]
8195#[doc = " \"0\": 0"]
8196#[doc = " },"]
8197#[doc = " \"index_to_id_map\": {"]
8198#[doc = " \"0\": 0"]
8199#[doc = " },"]
8200#[doc = " \"shard_ids\": ["]
8201#[doc = " 0"]
8202#[doc = " ],"]
8203#[doc = " \"shards_parent_map\": null,"]
8204#[doc = " \"shards_split_map\": null,"]
8205#[doc = " \"version\": 0"]
8206#[doc = " }"]
8207#[doc = " },"]
8208#[doc = " \"allOf\": ["]
8209#[doc = " {"]
8210#[doc = " \"$ref\": \"#/components/schemas/ShardLayout\""]
8211#[doc = " }"]
8212#[doc = " ]"]
8213#[doc = " },"]
8214#[doc = " \"shuffle_shard_assignment_for_chunk_producers\": {"]
8215#[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]`.\","]
8216#[doc = " \"default\": false,"]
8217#[doc = " \"type\": \"boolean\""]
8218#[doc = " },"]
8219#[doc = " \"target_validator_mandates_per_shard\": {"]
8220#[doc = " \"description\": \"Number of target chunk validator mandates for each shard.\","]
8221#[doc = " \"default\": 68,"]
8222#[doc = " \"type\": \"integer\","]
8223#[doc = " \"format\": \"uint64\","]
8224#[doc = " \"minimum\": 0.0"]
8225#[doc = " },"]
8226#[doc = " \"total_supply\": {"]
8227#[doc = " \"description\": \"Total supply of tokens at genesis.\","]
8228#[doc = " \"type\": \"string\""]
8229#[doc = " },"]
8230#[doc = " \"transaction_validity_period\": {"]
8231#[doc = " \"description\": \"Number of blocks for which a given transaction is valid\","]
8232#[doc = " \"type\": \"integer\","]
8233#[doc = " \"format\": \"uint64\","]
8234#[doc = " \"minimum\": 0.0"]
8235#[doc = " },"]
8236#[doc = " \"use_production_config\": {"]
8237#[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.\","]
8238#[doc = " \"default\": false,"]
8239#[doc = " \"type\": \"boolean\""]
8240#[doc = " },"]
8241#[doc = " \"validators\": {"]
8242#[doc = " \"description\": \"List of initial validators.\","]
8243#[doc = " \"type\": \"array\","]
8244#[doc = " \"items\": {"]
8245#[doc = " \"$ref\": \"#/components/schemas/AccountInfo\""]
8246#[doc = " }"]
8247#[doc = " }"]
8248#[doc = " }"]
8249#[doc = "}"]
8250#[doc = r" ```"]
8251#[doc = r" </details>"]
8252#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8253pub struct GenesisConfig {
8254 #[doc = "Expected number of hidden validators per shard."]
8255 pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
8256 #[doc = "Threshold for kicking out block producers, between 0 and 100."]
8257 pub block_producer_kickout_threshold: u8,
8258 #[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."]
8259 pub chain_id: ::std::string::String,
8260 #[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."]
8261 #[serde(default = "defaults::default_u64::<u64, 5>")]
8262 pub chunk_producer_assignment_changes_limit: u64,
8263 #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
8264 pub chunk_producer_kickout_threshold: u8,
8265 #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
8266 #[serde(default = "defaults::default_u64::<u8, 80>")]
8267 pub chunk_validator_only_kickout_threshold: u8,
8268 #[doc = "Enable dynamic re-sharding."]
8269 pub dynamic_resharding: bool,
8270 #[doc = "Epoch length counted in block heights."]
8271 pub epoch_length: u64,
8272 #[doc = "Fishermen stake threshold."]
8273 pub fishermen_threshold: ::std::string::String,
8274 #[doc = "Initial gas limit."]
8275 pub gas_limit: u64,
8276 #[doc = "Gas price adjustment rate"]
8277 pub gas_price_adjustment_rate: [i32; 2usize],
8278 #[doc = "Height of genesis block."]
8279 pub genesis_height: u64,
8280 #[doc = "Official time of blockchain start."]
8281 pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
8282 pub max_gas_price: ::std::string::String,
8283 #[doc = "Maximum inflation on the total supply every epoch."]
8284 pub max_inflation_rate: [i32; 2usize],
8285 #[doc = "Max stake percentage of the validators we will kick out."]
8286 #[serde(default = "defaults::default_u64::<u8, 100>")]
8287 pub max_kickout_stake_perc: u8,
8288 #[doc = "Minimum gas price. It is also the initial gas price."]
8289 pub min_gas_price: ::std::string::String,
8290 #[doc = "The minimum stake required for staking is last seat price divided by this number."]
8291 #[serde(default = "defaults::default_u64::<u64, 10>")]
8292 pub minimum_stake_divisor: u64,
8293 #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
8294 #[serde(default = "defaults::genesis_config_minimum_stake_ratio")]
8295 pub minimum_stake_ratio: [i32; 2usize],
8296 #[doc = "The minimum number of validators each shard must have"]
8297 #[serde(default = "defaults::default_u64::<u64, 1>")]
8298 pub minimum_validators_per_shard: u64,
8299 #[doc = "Number of block producer seats at genesis."]
8300 pub num_block_producer_seats: u64,
8301 #[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"]
8302 pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
8303 #[doc = "Expected number of blocks per year"]
8304 pub num_blocks_per_year: u64,
8305 #[doc = "Deprecated."]
8306 #[serde(default = "defaults::default_u64::<u64, 300>")]
8307 pub num_chunk_only_producer_seats: u64,
8308 #[doc = "Number of chunk producers.\nDon't mess it up with chunk-only producers feature which is deprecated."]
8309 #[serde(default = "defaults::default_u64::<u64, 100>")]
8310 pub num_chunk_producer_seats: u64,
8311 #[serde(default = "defaults::default_u64::<u64, 300>")]
8312 pub num_chunk_validator_seats: u64,
8313 #[doc = "Online maximum threshold above which validator gets full reward."]
8314 #[serde(default = "defaults::genesis_config_online_max_threshold")]
8315 pub online_max_threshold: [i32; 2usize],
8316 #[doc = "Online minimum threshold below which validator doesn't receive reward."]
8317 #[serde(default = "defaults::genesis_config_online_min_threshold")]
8318 pub online_min_threshold: [i32; 2usize],
8319 #[doc = "Protocol treasury rate"]
8320 pub protocol_reward_rate: [i32; 2usize],
8321 #[doc = "Protocol treasury account"]
8322 pub protocol_treasury_account: AccountId,
8323 #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
8324 #[serde(default = "defaults::genesis_config_protocol_upgrade_stake_threshold")]
8325 pub protocol_upgrade_stake_threshold: [i32; 2usize],
8326 #[doc = "Protocol version that this genesis works with."]
8327 pub protocol_version: u32,
8328 #[doc = "Layout information regarding how to split accounts to shards"]
8329 #[serde(default = "defaults::genesis_config_shard_layout")]
8330 pub shard_layout: ShardLayout,
8331 #[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]`."]
8332 #[serde(default)]
8333 pub shuffle_shard_assignment_for_chunk_producers: bool,
8334 #[doc = "Number of target chunk validator mandates for each shard."]
8335 #[serde(default = "defaults::default_u64::<u64, 68>")]
8336 pub target_validator_mandates_per_shard: u64,
8337 #[doc = "Total supply of tokens at genesis."]
8338 pub total_supply: ::std::string::String,
8339 #[doc = "Number of blocks for which a given transaction is valid"]
8340 pub transaction_validity_period: u64,
8341 #[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."]
8342 #[serde(default)]
8343 pub use_production_config: bool,
8344 #[doc = "List of initial validators."]
8345 pub validators: ::std::vec::Vec<AccountInfo>,
8346}
8347impl ::std::convert::From<&GenesisConfig> for GenesisConfig {
8348 fn from(value: &GenesisConfig) -> Self {
8349 value.clone()
8350 }
8351}
8352#[doc = "`GenesisConfigRequest`"]
8353#[doc = r""]
8354#[doc = r" <details><summary>JSON schema</summary>"]
8355#[doc = r""]
8356#[doc = r" ```json"]
8357#[doc = "{"]
8358#[doc = " \"title\": \"GenesisConfigRequest\","]
8359#[doc = " \"type\": \"null\""]
8360#[doc = "}"]
8361#[doc = r" ```"]
8362#[doc = r" </details>"]
8363#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8364#[serde(transparent)]
8365pub struct GenesisConfigRequest(pub ());
8366impl ::std::ops::Deref for GenesisConfigRequest {
8367 type Target = ();
8368 fn deref(&self) -> &() {
8369 &self.0
8370 }
8371}
8372impl ::std::convert::From<GenesisConfigRequest> for () {
8373 fn from(value: GenesisConfigRequest) -> Self {
8374 value.0
8375 }
8376}
8377impl ::std::convert::From<&GenesisConfigRequest> for GenesisConfigRequest {
8378 fn from(value: &GenesisConfigRequest) -> Self {
8379 value.clone()
8380 }
8381}
8382impl ::std::convert::From<()> for GenesisConfigRequest {
8383 fn from(value: ()) -> Self {
8384 Self(value)
8385 }
8386}
8387#[doc = "`GlobalContractDeployMode`"]
8388#[doc = r""]
8389#[doc = r" <details><summary>JSON schema</summary>"]
8390#[doc = r""]
8391#[doc = r" ```json"]
8392#[doc = "{"]
8393#[doc = " \"oneOf\": ["]
8394#[doc = " {"]
8395#[doc = " \"description\": \"Contract is deployed under its code hash.\\nUsers will be able reference it by that hash.\\nThis effectively makes the contract immutable.\","]
8396#[doc = " \"type\": \"string\","]
8397#[doc = " \"enum\": ["]
8398#[doc = " \"CodeHash\""]
8399#[doc = " ]"]
8400#[doc = " },"]
8401#[doc = " {"]
8402#[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.\","]
8403#[doc = " \"type\": \"string\","]
8404#[doc = " \"enum\": ["]
8405#[doc = " \"AccountId\""]
8406#[doc = " ]"]
8407#[doc = " }"]
8408#[doc = " ]"]
8409#[doc = "}"]
8410#[doc = r" ```"]
8411#[doc = r" </details>"]
8412#[derive(
8413 :: serde :: Deserialize,
8414 :: serde :: Serialize,
8415 Clone,
8416 Copy,
8417 Debug,
8418 Eq,
8419 Hash,
8420 Ord,
8421 PartialEq,
8422 PartialOrd,
8423)]
8424pub enum GlobalContractDeployMode {
8425 #[doc = "Contract is deployed under its code hash.\nUsers will be able reference it by that hash.\nThis effectively makes the contract immutable."]
8426 CodeHash,
8427 #[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."]
8428 AccountId,
8429}
8430impl ::std::convert::From<&Self> for GlobalContractDeployMode {
8431 fn from(value: &GlobalContractDeployMode) -> Self {
8432 value.clone()
8433 }
8434}
8435impl ::std::fmt::Display for GlobalContractDeployMode {
8436 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8437 match *self {
8438 Self::CodeHash => write!(f, "CodeHash"),
8439 Self::AccountId => write!(f, "AccountId"),
8440 }
8441 }
8442}
8443impl ::std::str::FromStr for GlobalContractDeployMode {
8444 type Err = self::error::ConversionError;
8445 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8446 match value {
8447 "CodeHash" => Ok(Self::CodeHash),
8448 "AccountId" => Ok(Self::AccountId),
8449 _ => Err("invalid value".into()),
8450 }
8451 }
8452}
8453impl ::std::convert::TryFrom<&str> for GlobalContractDeployMode {
8454 type Error = self::error::ConversionError;
8455 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8456 value.parse()
8457 }
8458}
8459impl ::std::convert::TryFrom<&::std::string::String> for GlobalContractDeployMode {
8460 type Error = self::error::ConversionError;
8461 fn try_from(
8462 value: &::std::string::String,
8463 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8464 value.parse()
8465 }
8466}
8467impl ::std::convert::TryFrom<::std::string::String> for GlobalContractDeployMode {
8468 type Error = self::error::ConversionError;
8469 fn try_from(
8470 value: ::std::string::String,
8471 ) -> ::std::result::Result<Self, self::error::ConversionError> {
8472 value.parse()
8473 }
8474}
8475#[doc = "`GlobalContractIdentifier`"]
8476#[doc = r""]
8477#[doc = r" <details><summary>JSON schema</summary>"]
8478#[doc = r""]
8479#[doc = r" ```json"]
8480#[doc = "{"]
8481#[doc = " \"oneOf\": ["]
8482#[doc = " {"]
8483#[doc = " \"type\": \"object\","]
8484#[doc = " \"required\": ["]
8485#[doc = " \"CodeHash\""]
8486#[doc = " ],"]
8487#[doc = " \"properties\": {"]
8488#[doc = " \"CodeHash\": {"]
8489#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
8490#[doc = " }"]
8491#[doc = " },"]
8492#[doc = " \"additionalProperties\": false"]
8493#[doc = " },"]
8494#[doc = " {"]
8495#[doc = " \"type\": \"object\","]
8496#[doc = " \"required\": ["]
8497#[doc = " \"AccountId\""]
8498#[doc = " ],"]
8499#[doc = " \"properties\": {"]
8500#[doc = " \"AccountId\": {"]
8501#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
8502#[doc = " }"]
8503#[doc = " },"]
8504#[doc = " \"additionalProperties\": false"]
8505#[doc = " }"]
8506#[doc = " ]"]
8507#[doc = "}"]
8508#[doc = r" ```"]
8509#[doc = r" </details>"]
8510#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8511pub enum GlobalContractIdentifier {
8512 CodeHash(CryptoHash),
8513 AccountId(AccountId),
8514}
8515impl ::std::convert::From<&Self> for GlobalContractIdentifier {
8516 fn from(value: &GlobalContractIdentifier) -> Self {
8517 value.clone()
8518 }
8519}
8520impl ::std::convert::From<CryptoHash> for GlobalContractIdentifier {
8521 fn from(value: CryptoHash) -> Self {
8522 Self::CodeHash(value)
8523 }
8524}
8525impl ::std::convert::From<AccountId> for GlobalContractIdentifier {
8526 fn from(value: AccountId) -> Self {
8527 Self::AccountId(value)
8528 }
8529}
8530#[doc = "`HostError`"]
8531#[doc = r""]
8532#[doc = r" <details><summary>JSON schema</summary>"]
8533#[doc = r""]
8534#[doc = r" ```json"]
8535#[doc = "{"]
8536#[doc = " \"oneOf\": ["]
8537#[doc = " {"]
8538#[doc = " \"description\": \"String encoding is bad UTF-16 sequence\","]
8539#[doc = " \"type\": \"string\","]
8540#[doc = " \"enum\": ["]
8541#[doc = " \"BadUTF16\""]
8542#[doc = " ]"]
8543#[doc = " },"]
8544#[doc = " {"]
8545#[doc = " \"description\": \"String encoding is bad UTF-8 sequence\","]
8546#[doc = " \"type\": \"string\","]
8547#[doc = " \"enum\": ["]
8548#[doc = " \"BadUTF8\""]
8549#[doc = " ]"]
8550#[doc = " },"]
8551#[doc = " {"]
8552#[doc = " \"description\": \"Exceeded the prepaid gas\","]
8553#[doc = " \"type\": \"string\","]
8554#[doc = " \"enum\": ["]
8555#[doc = " \"GasExceeded\""]
8556#[doc = " ]"]
8557#[doc = " },"]
8558#[doc = " {"]
8559#[doc = " \"description\": \"Exceeded the maximum amount of gas allowed to burn per contract\","]
8560#[doc = " \"type\": \"string\","]
8561#[doc = " \"enum\": ["]
8562#[doc = " \"GasLimitExceeded\""]
8563#[doc = " ]"]
8564#[doc = " },"]
8565#[doc = " {"]
8566#[doc = " \"description\": \"Exceeded the account balance\","]
8567#[doc = " \"type\": \"string\","]
8568#[doc = " \"enum\": ["]
8569#[doc = " \"BalanceExceeded\""]
8570#[doc = " ]"]
8571#[doc = " },"]
8572#[doc = " {"]
8573#[doc = " \"description\": \"Tried to call an empty method name\","]
8574#[doc = " \"type\": \"string\","]
8575#[doc = " \"enum\": ["]
8576#[doc = " \"EmptyMethodName\""]
8577#[doc = " ]"]
8578#[doc = " },"]
8579#[doc = " {"]
8580#[doc = " \"description\": \"Smart contract panicked\","]
8581#[doc = " \"type\": \"object\","]
8582#[doc = " \"required\": ["]
8583#[doc = " \"GuestPanic\""]
8584#[doc = " ],"]
8585#[doc = " \"properties\": {"]
8586#[doc = " \"GuestPanic\": {"]
8587#[doc = " \"type\": \"object\","]
8588#[doc = " \"required\": ["]
8589#[doc = " \"panic_msg\""]
8590#[doc = " ],"]
8591#[doc = " \"properties\": {"]
8592#[doc = " \"panic_msg\": {"]
8593#[doc = " \"type\": \"string\""]
8594#[doc = " }"]
8595#[doc = " }"]
8596#[doc = " }"]
8597#[doc = " },"]
8598#[doc = " \"additionalProperties\": false"]
8599#[doc = " },"]
8600#[doc = " {"]
8601#[doc = " \"description\": \"IntegerOverflow happened during a contract execution\","]
8602#[doc = " \"type\": \"string\","]
8603#[doc = " \"enum\": ["]
8604#[doc = " \"IntegerOverflow\""]
8605#[doc = " ]"]
8606#[doc = " },"]
8607#[doc = " {"]
8608#[doc = " \"description\": \"`promise_idx` does not correspond to existing promises\","]
8609#[doc = " \"type\": \"object\","]
8610#[doc = " \"required\": ["]
8611#[doc = " \"InvalidPromiseIndex\""]
8612#[doc = " ],"]
8613#[doc = " \"properties\": {"]
8614#[doc = " \"InvalidPromiseIndex\": {"]
8615#[doc = " \"type\": \"object\","]
8616#[doc = " \"required\": ["]
8617#[doc = " \"promise_idx\""]
8618#[doc = " ],"]
8619#[doc = " \"properties\": {"]
8620#[doc = " \"promise_idx\": {"]
8621#[doc = " \"type\": \"integer\","]
8622#[doc = " \"format\": \"uint64\","]
8623#[doc = " \"minimum\": 0.0"]
8624#[doc = " }"]
8625#[doc = " }"]
8626#[doc = " }"]
8627#[doc = " },"]
8628#[doc = " \"additionalProperties\": false"]
8629#[doc = " },"]
8630#[doc = " {"]
8631#[doc = " \"description\": \"Actions can only be appended to non-joint promise.\","]
8632#[doc = " \"type\": \"string\","]
8633#[doc = " \"enum\": ["]
8634#[doc = " \"CannotAppendActionToJointPromise\""]
8635#[doc = " ]"]
8636#[doc = " },"]
8637#[doc = " {"]
8638#[doc = " \"description\": \"Returning joint promise is currently prohibited\","]
8639#[doc = " \"type\": \"string\","]
8640#[doc = " \"enum\": ["]
8641#[doc = " \"CannotReturnJointPromise\""]
8642#[doc = " ]"]
8643#[doc = " },"]
8644#[doc = " {"]
8645#[doc = " \"description\": \"Accessed invalid promise result index\","]
8646#[doc = " \"type\": \"object\","]
8647#[doc = " \"required\": ["]
8648#[doc = " \"InvalidPromiseResultIndex\""]
8649#[doc = " ],"]
8650#[doc = " \"properties\": {"]
8651#[doc = " \"InvalidPromiseResultIndex\": {"]
8652#[doc = " \"type\": \"object\","]
8653#[doc = " \"required\": ["]
8654#[doc = " \"result_idx\""]
8655#[doc = " ],"]
8656#[doc = " \"properties\": {"]
8657#[doc = " \"result_idx\": {"]
8658#[doc = " \"type\": \"integer\","]
8659#[doc = " \"format\": \"uint64\","]
8660#[doc = " \"minimum\": 0.0"]
8661#[doc = " }"]
8662#[doc = " }"]
8663#[doc = " }"]
8664#[doc = " },"]
8665#[doc = " \"additionalProperties\": false"]
8666#[doc = " },"]
8667#[doc = " {"]
8668#[doc = " \"description\": \"Accessed invalid register id\","]
8669#[doc = " \"type\": \"object\","]
8670#[doc = " \"required\": ["]
8671#[doc = " \"InvalidRegisterId\""]
8672#[doc = " ],"]
8673#[doc = " \"properties\": {"]
8674#[doc = " \"InvalidRegisterId\": {"]
8675#[doc = " \"type\": \"object\","]
8676#[doc = " \"required\": ["]
8677#[doc = " \"register_id\""]
8678#[doc = " ],"]
8679#[doc = " \"properties\": {"]
8680#[doc = " \"register_id\": {"]
8681#[doc = " \"type\": \"integer\","]
8682#[doc = " \"format\": \"uint64\","]
8683#[doc = " \"minimum\": 0.0"]
8684#[doc = " }"]
8685#[doc = " }"]
8686#[doc = " }"]
8687#[doc = " },"]
8688#[doc = " \"additionalProperties\": false"]
8689#[doc = " },"]
8690#[doc = " {"]
8691#[doc = " \"description\": \"Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie\","]
8692#[doc = " \"type\": \"object\","]
8693#[doc = " \"required\": ["]
8694#[doc = " \"IteratorWasInvalidated\""]
8695#[doc = " ],"]
8696#[doc = " \"properties\": {"]
8697#[doc = " \"IteratorWasInvalidated\": {"]
8698#[doc = " \"type\": \"object\","]
8699#[doc = " \"required\": ["]
8700#[doc = " \"iterator_index\""]
8701#[doc = " ],"]
8702#[doc = " \"properties\": {"]
8703#[doc = " \"iterator_index\": {"]
8704#[doc = " \"type\": \"integer\","]
8705#[doc = " \"format\": \"uint64\","]
8706#[doc = " \"minimum\": 0.0"]
8707#[doc = " }"]
8708#[doc = " }"]
8709#[doc = " }"]
8710#[doc = " },"]
8711#[doc = " \"additionalProperties\": false"]
8712#[doc = " },"]
8713#[doc = " {"]
8714#[doc = " \"description\": \"Accessed memory outside the bounds\","]
8715#[doc = " \"type\": \"string\","]
8716#[doc = " \"enum\": ["]
8717#[doc = " \"MemoryAccessViolation\""]
8718#[doc = " ]"]
8719#[doc = " },"]
8720#[doc = " {"]
8721#[doc = " \"description\": \"VM Logic returned an invalid receipt index\","]
8722#[doc = " \"type\": \"object\","]
8723#[doc = " \"required\": ["]
8724#[doc = " \"InvalidReceiptIndex\""]
8725#[doc = " ],"]
8726#[doc = " \"properties\": {"]
8727#[doc = " \"InvalidReceiptIndex\": {"]
8728#[doc = " \"type\": \"object\","]
8729#[doc = " \"required\": ["]
8730#[doc = " \"receipt_index\""]
8731#[doc = " ],"]
8732#[doc = " \"properties\": {"]
8733#[doc = " \"receipt_index\": {"]
8734#[doc = " \"type\": \"integer\","]
8735#[doc = " \"format\": \"uint64\","]
8736#[doc = " \"minimum\": 0.0"]
8737#[doc = " }"]
8738#[doc = " }"]
8739#[doc = " }"]
8740#[doc = " },"]
8741#[doc = " \"additionalProperties\": false"]
8742#[doc = " },"]
8743#[doc = " {"]
8744#[doc = " \"description\": \"Iterator index `iterator_index` does not exist\","]
8745#[doc = " \"type\": \"object\","]
8746#[doc = " \"required\": ["]
8747#[doc = " \"InvalidIteratorIndex\""]
8748#[doc = " ],"]
8749#[doc = " \"properties\": {"]
8750#[doc = " \"InvalidIteratorIndex\": {"]
8751#[doc = " \"type\": \"object\","]
8752#[doc = " \"required\": ["]
8753#[doc = " \"iterator_index\""]
8754#[doc = " ],"]
8755#[doc = " \"properties\": {"]
8756#[doc = " \"iterator_index\": {"]
8757#[doc = " \"type\": \"integer\","]
8758#[doc = " \"format\": \"uint64\","]
8759#[doc = " \"minimum\": 0.0"]
8760#[doc = " }"]
8761#[doc = " }"]
8762#[doc = " }"]
8763#[doc = " },"]
8764#[doc = " \"additionalProperties\": false"]
8765#[doc = " },"]
8766#[doc = " {"]
8767#[doc = " \"description\": \"VM Logic returned an invalid account id\","]
8768#[doc = " \"type\": \"string\","]
8769#[doc = " \"enum\": ["]
8770#[doc = " \"InvalidAccountId\""]
8771#[doc = " ]"]
8772#[doc = " },"]
8773#[doc = " {"]
8774#[doc = " \"description\": \"VM Logic returned an invalid method name\","]
8775#[doc = " \"type\": \"string\","]
8776#[doc = " \"enum\": ["]
8777#[doc = " \"InvalidMethodName\""]
8778#[doc = " ]"]
8779#[doc = " },"]
8780#[doc = " {"]
8781#[doc = " \"description\": \"VM Logic provided an invalid public key\","]
8782#[doc = " \"type\": \"string\","]
8783#[doc = " \"enum\": ["]
8784#[doc = " \"InvalidPublicKey\""]
8785#[doc = " ]"]
8786#[doc = " },"]
8787#[doc = " {"]
8788#[doc = " \"description\": \"`method_name` is not allowed in view calls\","]
8789#[doc = " \"type\": \"object\","]
8790#[doc = " \"required\": ["]
8791#[doc = " \"ProhibitedInView\""]
8792#[doc = " ],"]
8793#[doc = " \"properties\": {"]
8794#[doc = " \"ProhibitedInView\": {"]
8795#[doc = " \"type\": \"object\","]
8796#[doc = " \"required\": ["]
8797#[doc = " \"method_name\""]
8798#[doc = " ],"]
8799#[doc = " \"properties\": {"]
8800#[doc = " \"method_name\": {"]
8801#[doc = " \"type\": \"string\""]
8802#[doc = " }"]
8803#[doc = " }"]
8804#[doc = " }"]
8805#[doc = " },"]
8806#[doc = " \"additionalProperties\": false"]
8807#[doc = " },"]
8808#[doc = " {"]
8809#[doc = " \"description\": \"The total number of logs will exceed the limit.\","]
8810#[doc = " \"type\": \"object\","]
8811#[doc = " \"required\": ["]
8812#[doc = " \"NumberOfLogsExceeded\""]
8813#[doc = " ],"]
8814#[doc = " \"properties\": {"]
8815#[doc = " \"NumberOfLogsExceeded\": {"]
8816#[doc = " \"type\": \"object\","]
8817#[doc = " \"required\": ["]
8818#[doc = " \"limit\""]
8819#[doc = " ],"]
8820#[doc = " \"properties\": {"]
8821#[doc = " \"limit\": {"]
8822#[doc = " \"type\": \"integer\","]
8823#[doc = " \"format\": \"uint64\","]
8824#[doc = " \"minimum\": 0.0"]
8825#[doc = " }"]
8826#[doc = " }"]
8827#[doc = " }"]
8828#[doc = " },"]
8829#[doc = " \"additionalProperties\": false"]
8830#[doc = " },"]
8831#[doc = " {"]
8832#[doc = " \"description\": \"The storage key length exceeded the limit.\","]
8833#[doc = " \"type\": \"object\","]
8834#[doc = " \"required\": ["]
8835#[doc = " \"KeyLengthExceeded\""]
8836#[doc = " ],"]
8837#[doc = " \"properties\": {"]
8838#[doc = " \"KeyLengthExceeded\": {"]
8839#[doc = " \"type\": \"object\","]
8840#[doc = " \"required\": ["]
8841#[doc = " \"length\","]
8842#[doc = " \"limit\""]
8843#[doc = " ],"]
8844#[doc = " \"properties\": {"]
8845#[doc = " \"length\": {"]
8846#[doc = " \"type\": \"integer\","]
8847#[doc = " \"format\": \"uint64\","]
8848#[doc = " \"minimum\": 0.0"]
8849#[doc = " },"]
8850#[doc = " \"limit\": {"]
8851#[doc = " \"type\": \"integer\","]
8852#[doc = " \"format\": \"uint64\","]
8853#[doc = " \"minimum\": 0.0"]
8854#[doc = " }"]
8855#[doc = " }"]
8856#[doc = " }"]
8857#[doc = " },"]
8858#[doc = " \"additionalProperties\": false"]
8859#[doc = " },"]
8860#[doc = " {"]
8861#[doc = " \"description\": \"The storage value length exceeded the limit.\","]
8862#[doc = " \"type\": \"object\","]
8863#[doc = " \"required\": ["]
8864#[doc = " \"ValueLengthExceeded\""]
8865#[doc = " ],"]
8866#[doc = " \"properties\": {"]
8867#[doc = " \"ValueLengthExceeded\": {"]
8868#[doc = " \"type\": \"object\","]
8869#[doc = " \"required\": ["]
8870#[doc = " \"length\","]
8871#[doc = " \"limit\""]
8872#[doc = " ],"]
8873#[doc = " \"properties\": {"]
8874#[doc = " \"length\": {"]
8875#[doc = " \"type\": \"integer\","]
8876#[doc = " \"format\": \"uint64\","]
8877#[doc = " \"minimum\": 0.0"]
8878#[doc = " },"]
8879#[doc = " \"limit\": {"]
8880#[doc = " \"type\": \"integer\","]
8881#[doc = " \"format\": \"uint64\","]
8882#[doc = " \"minimum\": 0.0"]
8883#[doc = " }"]
8884#[doc = " }"]
8885#[doc = " }"]
8886#[doc = " },"]
8887#[doc = " \"additionalProperties\": false"]
8888#[doc = " },"]
8889#[doc = " {"]
8890#[doc = " \"description\": \"The total log length exceeded the limit.\","]
8891#[doc = " \"type\": \"object\","]
8892#[doc = " \"required\": ["]
8893#[doc = " \"TotalLogLengthExceeded\""]
8894#[doc = " ],"]
8895#[doc = " \"properties\": {"]
8896#[doc = " \"TotalLogLengthExceeded\": {"]
8897#[doc = " \"type\": \"object\","]
8898#[doc = " \"required\": ["]
8899#[doc = " \"length\","]
8900#[doc = " \"limit\""]
8901#[doc = " ],"]
8902#[doc = " \"properties\": {"]
8903#[doc = " \"length\": {"]
8904#[doc = " \"type\": \"integer\","]
8905#[doc = " \"format\": \"uint64\","]
8906#[doc = " \"minimum\": 0.0"]
8907#[doc = " },"]
8908#[doc = " \"limit\": {"]
8909#[doc = " \"type\": \"integer\","]
8910#[doc = " \"format\": \"uint64\","]
8911#[doc = " \"minimum\": 0.0"]
8912#[doc = " }"]
8913#[doc = " }"]
8914#[doc = " }"]
8915#[doc = " },"]
8916#[doc = " \"additionalProperties\": false"]
8917#[doc = " },"]
8918#[doc = " {"]
8919#[doc = " \"description\": \"The maximum number of promises within a FunctionCall exceeded the limit.\","]
8920#[doc = " \"type\": \"object\","]
8921#[doc = " \"required\": ["]
8922#[doc = " \"NumberPromisesExceeded\""]
8923#[doc = " ],"]
8924#[doc = " \"properties\": {"]
8925#[doc = " \"NumberPromisesExceeded\": {"]
8926#[doc = " \"type\": \"object\","]
8927#[doc = " \"required\": ["]
8928#[doc = " \"limit\","]
8929#[doc = " \"number_of_promises\""]
8930#[doc = " ],"]
8931#[doc = " \"properties\": {"]
8932#[doc = " \"limit\": {"]
8933#[doc = " \"type\": \"integer\","]
8934#[doc = " \"format\": \"uint64\","]
8935#[doc = " \"minimum\": 0.0"]
8936#[doc = " },"]
8937#[doc = " \"number_of_promises\": {"]
8938#[doc = " \"type\": \"integer\","]
8939#[doc = " \"format\": \"uint64\","]
8940#[doc = " \"minimum\": 0.0"]
8941#[doc = " }"]
8942#[doc = " }"]
8943#[doc = " }"]
8944#[doc = " },"]
8945#[doc = " \"additionalProperties\": false"]
8946#[doc = " },"]
8947#[doc = " {"]
8948#[doc = " \"description\": \"The maximum number of input data dependencies exceeded the limit.\","]
8949#[doc = " \"type\": \"object\","]
8950#[doc = " \"required\": ["]
8951#[doc = " \"NumberInputDataDependenciesExceeded\""]
8952#[doc = " ],"]
8953#[doc = " \"properties\": {"]
8954#[doc = " \"NumberInputDataDependenciesExceeded\": {"]
8955#[doc = " \"type\": \"object\","]
8956#[doc = " \"required\": ["]
8957#[doc = " \"limit\","]
8958#[doc = " \"number_of_input_data_dependencies\""]
8959#[doc = " ],"]
8960#[doc = " \"properties\": {"]
8961#[doc = " \"limit\": {"]
8962#[doc = " \"type\": \"integer\","]
8963#[doc = " \"format\": \"uint64\","]
8964#[doc = " \"minimum\": 0.0"]
8965#[doc = " },"]
8966#[doc = " \"number_of_input_data_dependencies\": {"]
8967#[doc = " \"type\": \"integer\","]
8968#[doc = " \"format\": \"uint64\","]
8969#[doc = " \"minimum\": 0.0"]
8970#[doc = " }"]
8971#[doc = " }"]
8972#[doc = " }"]
8973#[doc = " },"]
8974#[doc = " \"additionalProperties\": false"]
8975#[doc = " },"]
8976#[doc = " {"]
8977#[doc = " \"description\": \"The returned value length exceeded the limit.\","]
8978#[doc = " \"type\": \"object\","]
8979#[doc = " \"required\": ["]
8980#[doc = " \"ReturnedValueLengthExceeded\""]
8981#[doc = " ],"]
8982#[doc = " \"properties\": {"]
8983#[doc = " \"ReturnedValueLengthExceeded\": {"]
8984#[doc = " \"type\": \"object\","]
8985#[doc = " \"required\": ["]
8986#[doc = " \"length\","]
8987#[doc = " \"limit\""]
8988#[doc = " ],"]
8989#[doc = " \"properties\": {"]
8990#[doc = " \"length\": {"]
8991#[doc = " \"type\": \"integer\","]
8992#[doc = " \"format\": \"uint64\","]
8993#[doc = " \"minimum\": 0.0"]
8994#[doc = " },"]
8995#[doc = " \"limit\": {"]
8996#[doc = " \"type\": \"integer\","]
8997#[doc = " \"format\": \"uint64\","]
8998#[doc = " \"minimum\": 0.0"]
8999#[doc = " }"]
9000#[doc = " }"]
9001#[doc = " }"]
9002#[doc = " },"]
9003#[doc = " \"additionalProperties\": false"]
9004#[doc = " },"]
9005#[doc = " {"]
9006#[doc = " \"description\": \"The contract size for DeployContract action exceeded the limit.\","]
9007#[doc = " \"type\": \"object\","]
9008#[doc = " \"required\": ["]
9009#[doc = " \"ContractSizeExceeded\""]
9010#[doc = " ],"]
9011#[doc = " \"properties\": {"]
9012#[doc = " \"ContractSizeExceeded\": {"]
9013#[doc = " \"type\": \"object\","]
9014#[doc = " \"required\": ["]
9015#[doc = " \"limit\","]
9016#[doc = " \"size\""]
9017#[doc = " ],"]
9018#[doc = " \"properties\": {"]
9019#[doc = " \"limit\": {"]
9020#[doc = " \"type\": \"integer\","]
9021#[doc = " \"format\": \"uint64\","]
9022#[doc = " \"minimum\": 0.0"]
9023#[doc = " },"]
9024#[doc = " \"size\": {"]
9025#[doc = " \"type\": \"integer\","]
9026#[doc = " \"format\": \"uint64\","]
9027#[doc = " \"minimum\": 0.0"]
9028#[doc = " }"]
9029#[doc = " }"]
9030#[doc = " }"]
9031#[doc = " },"]
9032#[doc = " \"additionalProperties\": false"]
9033#[doc = " },"]
9034#[doc = " {"]
9035#[doc = " \"description\": \"The host function was deprecated.\","]
9036#[doc = " \"type\": \"object\","]
9037#[doc = " \"required\": ["]
9038#[doc = " \"Deprecated\""]
9039#[doc = " ],"]
9040#[doc = " \"properties\": {"]
9041#[doc = " \"Deprecated\": {"]
9042#[doc = " \"type\": \"object\","]
9043#[doc = " \"required\": ["]
9044#[doc = " \"method_name\""]
9045#[doc = " ],"]
9046#[doc = " \"properties\": {"]
9047#[doc = " \"method_name\": {"]
9048#[doc = " \"type\": \"string\""]
9049#[doc = " }"]
9050#[doc = " }"]
9051#[doc = " }"]
9052#[doc = " },"]
9053#[doc = " \"additionalProperties\": false"]
9054#[doc = " },"]
9055#[doc = " {"]
9056#[doc = " \"description\": \"General errors for ECDSA recover.\","]
9057#[doc = " \"type\": \"object\","]
9058#[doc = " \"required\": ["]
9059#[doc = " \"ECRecoverError\""]
9060#[doc = " ],"]
9061#[doc = " \"properties\": {"]
9062#[doc = " \"ECRecoverError\": {"]
9063#[doc = " \"type\": \"object\","]
9064#[doc = " \"required\": ["]
9065#[doc = " \"msg\""]
9066#[doc = " ],"]
9067#[doc = " \"properties\": {"]
9068#[doc = " \"msg\": {"]
9069#[doc = " \"type\": \"string\""]
9070#[doc = " }"]
9071#[doc = " }"]
9072#[doc = " }"]
9073#[doc = " },"]
9074#[doc = " \"additionalProperties\": false"]
9075#[doc = " },"]
9076#[doc = " {"]
9077#[doc = " \"description\": \"Invalid input to alt_bn128 family of functions (e.g., point which isn't\\non the curve).\","]
9078#[doc = " \"type\": \"object\","]
9079#[doc = " \"required\": ["]
9080#[doc = " \"AltBn128InvalidInput\""]
9081#[doc = " ],"]
9082#[doc = " \"properties\": {"]
9083#[doc = " \"AltBn128InvalidInput\": {"]
9084#[doc = " \"type\": \"object\","]
9085#[doc = " \"required\": ["]
9086#[doc = " \"msg\""]
9087#[doc = " ],"]
9088#[doc = " \"properties\": {"]
9089#[doc = " \"msg\": {"]
9090#[doc = " \"type\": \"string\""]
9091#[doc = " }"]
9092#[doc = " }"]
9093#[doc = " }"]
9094#[doc = " },"]
9095#[doc = " \"additionalProperties\": false"]
9096#[doc = " },"]
9097#[doc = " {"]
9098#[doc = " \"description\": \"Invalid input to ed25519 signature verification function (e.g. signature cannot be\\nderived from bytes).\","]
9099#[doc = " \"type\": \"object\","]
9100#[doc = " \"required\": ["]
9101#[doc = " \"Ed25519VerifyInvalidInput\""]
9102#[doc = " ],"]
9103#[doc = " \"properties\": {"]
9104#[doc = " \"Ed25519VerifyInvalidInput\": {"]
9105#[doc = " \"type\": \"object\","]
9106#[doc = " \"required\": ["]
9107#[doc = " \"msg\""]
9108#[doc = " ],"]
9109#[doc = " \"properties\": {"]
9110#[doc = " \"msg\": {"]
9111#[doc = " \"type\": \"string\""]
9112#[doc = " }"]
9113#[doc = " }"]
9114#[doc = " }"]
9115#[doc = " },"]
9116#[doc = " \"additionalProperties\": false"]
9117#[doc = " }"]
9118#[doc = " ]"]
9119#[doc = "}"]
9120#[doc = r" ```"]
9121#[doc = r" </details>"]
9122#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9123pub enum HostError {
9124 #[doc = "String encoding is bad UTF-16 sequence"]
9125 #[serde(rename = "BadUTF16")]
9126 BadUtf16,
9127 #[doc = "String encoding is bad UTF-8 sequence"]
9128 #[serde(rename = "BadUTF8")]
9129 BadUtf8,
9130 #[doc = "Exceeded the prepaid gas"]
9131 GasExceeded,
9132 #[doc = "Exceeded the maximum amount of gas allowed to burn per contract"]
9133 GasLimitExceeded,
9134 #[doc = "Exceeded the account balance"]
9135 BalanceExceeded,
9136 #[doc = "Tried to call an empty method name"]
9137 EmptyMethodName,
9138 #[doc = "Smart contract panicked"]
9139 GuestPanic { panic_msg: ::std::string::String },
9140 #[doc = "IntegerOverflow happened during a contract execution"]
9141 IntegerOverflow,
9142 #[doc = "`promise_idx` does not correspond to existing promises"]
9143 InvalidPromiseIndex { promise_idx: u64 },
9144 #[doc = "Actions can only be appended to non-joint promise."]
9145 CannotAppendActionToJointPromise,
9146 #[doc = "Returning joint promise is currently prohibited"]
9147 CannotReturnJointPromise,
9148 #[doc = "Accessed invalid promise result index"]
9149 InvalidPromiseResultIndex { result_idx: u64 },
9150 #[doc = "Accessed invalid register id"]
9151 InvalidRegisterId { register_id: u64 },
9152 #[doc = "Iterator `iterator_index` was invalidated after its creation by performing a mutable operation on trie"]
9153 IteratorWasInvalidated { iterator_index: u64 },
9154 #[doc = "Accessed memory outside the bounds"]
9155 MemoryAccessViolation,
9156 #[doc = "VM Logic returned an invalid receipt index"]
9157 InvalidReceiptIndex { receipt_index: u64 },
9158 #[doc = "Iterator index `iterator_index` does not exist"]
9159 InvalidIteratorIndex { iterator_index: u64 },
9160 #[doc = "VM Logic returned an invalid account id"]
9161 InvalidAccountId,
9162 #[doc = "VM Logic returned an invalid method name"]
9163 InvalidMethodName,
9164 #[doc = "VM Logic provided an invalid public key"]
9165 InvalidPublicKey,
9166 #[doc = "`method_name` is not allowed in view calls"]
9167 ProhibitedInView { method_name: ::std::string::String },
9168 #[doc = "The total number of logs will exceed the limit."]
9169 NumberOfLogsExceeded { limit: u64 },
9170 #[doc = "The storage key length exceeded the limit."]
9171 KeyLengthExceeded { length: u64, limit: u64 },
9172 #[doc = "The storage value length exceeded the limit."]
9173 ValueLengthExceeded { length: u64, limit: u64 },
9174 #[doc = "The total log length exceeded the limit."]
9175 TotalLogLengthExceeded { length: u64, limit: u64 },
9176 #[doc = "The maximum number of promises within a FunctionCall exceeded the limit."]
9177 NumberPromisesExceeded { limit: u64, number_of_promises: u64 },
9178 #[doc = "The maximum number of input data dependencies exceeded the limit."]
9179 NumberInputDataDependenciesExceeded {
9180 limit: u64,
9181 number_of_input_data_dependencies: u64,
9182 },
9183 #[doc = "The returned value length exceeded the limit."]
9184 ReturnedValueLengthExceeded { length: u64, limit: u64 },
9185 #[doc = "The contract size for DeployContract action exceeded the limit."]
9186 ContractSizeExceeded { limit: u64, size: u64 },
9187 #[doc = "The host function was deprecated."]
9188 Deprecated { method_name: ::std::string::String },
9189 #[doc = "General errors for ECDSA recover."]
9190 #[serde(rename = "ECRecoverError")]
9191 EcRecoverError { msg: ::std::string::String },
9192 #[doc = "Invalid input to alt_bn128 family of functions (e.g., point which isn't\non the curve)."]
9193 AltBn128InvalidInput { msg: ::std::string::String },
9194 #[doc = "Invalid input to ed25519 signature verification function (e.g. signature cannot be\nderived from bytes)."]
9195 Ed25519VerifyInvalidInput { msg: ::std::string::String },
9196}
9197impl ::std::convert::From<&Self> for HostError {
9198 fn from(value: &HostError) -> Self {
9199 value.clone()
9200 }
9201}
9202#[doc = "`InvalidAccessKeyError`"]
9203#[doc = r""]
9204#[doc = r" <details><summary>JSON schema</summary>"]
9205#[doc = r""]
9206#[doc = r" ```json"]
9207#[doc = "{"]
9208#[doc = " \"oneOf\": ["]
9209#[doc = " {"]
9210#[doc = " \"description\": \"The access key identified by the `public_key` doesn't exist for the account\","]
9211#[doc = " \"type\": \"object\","]
9212#[doc = " \"required\": ["]
9213#[doc = " \"AccessKeyNotFound\""]
9214#[doc = " ],"]
9215#[doc = " \"properties\": {"]
9216#[doc = " \"AccessKeyNotFound\": {"]
9217#[doc = " \"type\": \"object\","]
9218#[doc = " \"required\": ["]
9219#[doc = " \"account_id\","]
9220#[doc = " \"public_key\""]
9221#[doc = " ],"]
9222#[doc = " \"properties\": {"]
9223#[doc = " \"account_id\": {"]
9224#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
9225#[doc = " },"]
9226#[doc = " \"public_key\": {"]
9227#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
9228#[doc = " }"]
9229#[doc = " }"]
9230#[doc = " }"]
9231#[doc = " },"]
9232#[doc = " \"additionalProperties\": false"]
9233#[doc = " },"]
9234#[doc = " {"]
9235#[doc = " \"description\": \"Transaction `receiver_id` doesn't match the access key receiver_id\","]
9236#[doc = " \"type\": \"object\","]
9237#[doc = " \"required\": ["]
9238#[doc = " \"ReceiverMismatch\""]
9239#[doc = " ],"]
9240#[doc = " \"properties\": {"]
9241#[doc = " \"ReceiverMismatch\": {"]
9242#[doc = " \"type\": \"object\","]
9243#[doc = " \"required\": ["]
9244#[doc = " \"ak_receiver\","]
9245#[doc = " \"tx_receiver\""]
9246#[doc = " ],"]
9247#[doc = " \"properties\": {"]
9248#[doc = " \"ak_receiver\": {"]
9249#[doc = " \"type\": \"string\""]
9250#[doc = " },"]
9251#[doc = " \"tx_receiver\": {"]
9252#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
9253#[doc = " }"]
9254#[doc = " }"]
9255#[doc = " }"]
9256#[doc = " },"]
9257#[doc = " \"additionalProperties\": false"]
9258#[doc = " },"]
9259#[doc = " {"]
9260#[doc = " \"description\": \"Transaction method name isn't allowed by the access key\","]
9261#[doc = " \"type\": \"object\","]
9262#[doc = " \"required\": ["]
9263#[doc = " \"MethodNameMismatch\""]
9264#[doc = " ],"]
9265#[doc = " \"properties\": {"]
9266#[doc = " \"MethodNameMismatch\": {"]
9267#[doc = " \"type\": \"object\","]
9268#[doc = " \"required\": ["]
9269#[doc = " \"method_name\""]
9270#[doc = " ],"]
9271#[doc = " \"properties\": {"]
9272#[doc = " \"method_name\": {"]
9273#[doc = " \"type\": \"string\""]
9274#[doc = " }"]
9275#[doc = " }"]
9276#[doc = " }"]
9277#[doc = " },"]
9278#[doc = " \"additionalProperties\": false"]
9279#[doc = " },"]
9280#[doc = " {"]
9281#[doc = " \"description\": \"Transaction requires a full permission access key.\","]
9282#[doc = " \"type\": \"string\","]
9283#[doc = " \"enum\": ["]
9284#[doc = " \"RequiresFullAccess\""]
9285#[doc = " ]"]
9286#[doc = " },"]
9287#[doc = " {"]
9288#[doc = " \"description\": \"Access Key does not have enough allowance to cover transaction cost\","]
9289#[doc = " \"type\": \"object\","]
9290#[doc = " \"required\": ["]
9291#[doc = " \"NotEnoughAllowance\""]
9292#[doc = " ],"]
9293#[doc = " \"properties\": {"]
9294#[doc = " \"NotEnoughAllowance\": {"]
9295#[doc = " \"type\": \"object\","]
9296#[doc = " \"required\": ["]
9297#[doc = " \"account_id\","]
9298#[doc = " \"allowance\","]
9299#[doc = " \"cost\","]
9300#[doc = " \"public_key\""]
9301#[doc = " ],"]
9302#[doc = " \"properties\": {"]
9303#[doc = " \"account_id\": {"]
9304#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
9305#[doc = " },"]
9306#[doc = " \"allowance\": {"]
9307#[doc = " \"type\": \"string\""]
9308#[doc = " },"]
9309#[doc = " \"cost\": {"]
9310#[doc = " \"type\": \"string\""]
9311#[doc = " },"]
9312#[doc = " \"public_key\": {"]
9313#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
9314#[doc = " }"]
9315#[doc = " }"]
9316#[doc = " }"]
9317#[doc = " },"]
9318#[doc = " \"additionalProperties\": false"]
9319#[doc = " },"]
9320#[doc = " {"]
9321#[doc = " \"description\": \"Having a deposit with a function call action is not allowed with a function call access key.\","]
9322#[doc = " \"type\": \"string\","]
9323#[doc = " \"enum\": ["]
9324#[doc = " \"DepositWithFunctionCall\""]
9325#[doc = " ]"]
9326#[doc = " }"]
9327#[doc = " ]"]
9328#[doc = "}"]
9329#[doc = r" ```"]
9330#[doc = r" </details>"]
9331#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9332pub enum InvalidAccessKeyError {
9333 #[doc = "The access key identified by the `public_key` doesn't exist for the account"]
9334 AccessKeyNotFound {
9335 account_id: AccountId,
9336 public_key: PublicKey,
9337 },
9338 #[doc = "Transaction `receiver_id` doesn't match the access key receiver_id"]
9339 ReceiverMismatch {
9340 ak_receiver: ::std::string::String,
9341 tx_receiver: AccountId,
9342 },
9343 #[doc = "Transaction method name isn't allowed by the access key"]
9344 MethodNameMismatch { method_name: ::std::string::String },
9345 #[doc = "Transaction requires a full permission access key."]
9346 RequiresFullAccess,
9347 #[doc = "Access Key does not have enough allowance to cover transaction cost"]
9348 NotEnoughAllowance {
9349 account_id: AccountId,
9350 allowance: ::std::string::String,
9351 cost: ::std::string::String,
9352 public_key: PublicKey,
9353 },
9354 #[doc = "Having a deposit with a function call action is not allowed with a function call access key."]
9355 DepositWithFunctionCall,
9356}
9357impl ::std::convert::From<&Self> for InvalidAccessKeyError {
9358 fn from(value: &InvalidAccessKeyError) -> Self {
9359 value.clone()
9360 }
9361}
9362#[doc = "An error happened during TX execution"]
9363#[doc = r""]
9364#[doc = r" <details><summary>JSON schema</summary>"]
9365#[doc = r""]
9366#[doc = r" ```json"]
9367#[doc = "{"]
9368#[doc = " \"description\": \"An error happened during TX execution\","]
9369#[doc = " \"oneOf\": ["]
9370#[doc = " {"]
9371#[doc = " \"description\": \"Happens if a wrong AccessKey used or AccessKey has not enough permissions\","]
9372#[doc = " \"type\": \"object\","]
9373#[doc = " \"required\": ["]
9374#[doc = " \"InvalidAccessKeyError\""]
9375#[doc = " ],"]
9376#[doc = " \"properties\": {"]
9377#[doc = " \"InvalidAccessKeyError\": {"]
9378#[doc = " \"$ref\": \"#/components/schemas/InvalidAccessKeyError\""]
9379#[doc = " }"]
9380#[doc = " },"]
9381#[doc = " \"additionalProperties\": false"]
9382#[doc = " },"]
9383#[doc = " {"]
9384#[doc = " \"description\": \"TX signer_id is not a valid [`AccountId`]\","]
9385#[doc = " \"type\": \"object\","]
9386#[doc = " \"required\": ["]
9387#[doc = " \"InvalidSignerId\""]
9388#[doc = " ],"]
9389#[doc = " \"properties\": {"]
9390#[doc = " \"InvalidSignerId\": {"]
9391#[doc = " \"type\": \"object\","]
9392#[doc = " \"required\": ["]
9393#[doc = " \"signer_id\""]
9394#[doc = " ],"]
9395#[doc = " \"properties\": {"]
9396#[doc = " \"signer_id\": {"]
9397#[doc = " \"type\": \"string\""]
9398#[doc = " }"]
9399#[doc = " }"]
9400#[doc = " }"]
9401#[doc = " },"]
9402#[doc = " \"additionalProperties\": false"]
9403#[doc = " },"]
9404#[doc = " {"]
9405#[doc = " \"description\": \"TX signer_id is not found in a storage\","]
9406#[doc = " \"type\": \"object\","]
9407#[doc = " \"required\": ["]
9408#[doc = " \"SignerDoesNotExist\""]
9409#[doc = " ],"]
9410#[doc = " \"properties\": {"]
9411#[doc = " \"SignerDoesNotExist\": {"]
9412#[doc = " \"type\": \"object\","]
9413#[doc = " \"required\": ["]
9414#[doc = " \"signer_id\""]
9415#[doc = " ],"]
9416#[doc = " \"properties\": {"]
9417#[doc = " \"signer_id\": {"]
9418#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
9419#[doc = " }"]
9420#[doc = " }"]
9421#[doc = " }"]
9422#[doc = " },"]
9423#[doc = " \"additionalProperties\": false"]
9424#[doc = " },"]
9425#[doc = " {"]
9426#[doc = " \"description\": \"Transaction nonce must be strictly greater than `account[access_key].nonce`.\","]
9427#[doc = " \"type\": \"object\","]
9428#[doc = " \"required\": ["]
9429#[doc = " \"InvalidNonce\""]
9430#[doc = " ],"]
9431#[doc = " \"properties\": {"]
9432#[doc = " \"InvalidNonce\": {"]
9433#[doc = " \"type\": \"object\","]
9434#[doc = " \"required\": ["]
9435#[doc = " \"ak_nonce\","]
9436#[doc = " \"tx_nonce\""]
9437#[doc = " ],"]
9438#[doc = " \"properties\": {"]
9439#[doc = " \"ak_nonce\": {"]
9440#[doc = " \"type\": \"integer\","]
9441#[doc = " \"format\": \"uint64\","]
9442#[doc = " \"minimum\": 0.0"]
9443#[doc = " },"]
9444#[doc = " \"tx_nonce\": {"]
9445#[doc = " \"type\": \"integer\","]
9446#[doc = " \"format\": \"uint64\","]
9447#[doc = " \"minimum\": 0.0"]
9448#[doc = " }"]
9449#[doc = " }"]
9450#[doc = " }"]
9451#[doc = " },"]
9452#[doc = " \"additionalProperties\": false"]
9453#[doc = " },"]
9454#[doc = " {"]
9455#[doc = " \"description\": \"Transaction nonce is larger than the upper bound given by the block height\","]
9456#[doc = " \"type\": \"object\","]
9457#[doc = " \"required\": ["]
9458#[doc = " \"NonceTooLarge\""]
9459#[doc = " ],"]
9460#[doc = " \"properties\": {"]
9461#[doc = " \"NonceTooLarge\": {"]
9462#[doc = " \"type\": \"object\","]
9463#[doc = " \"required\": ["]
9464#[doc = " \"tx_nonce\","]
9465#[doc = " \"upper_bound\""]
9466#[doc = " ],"]
9467#[doc = " \"properties\": {"]
9468#[doc = " \"tx_nonce\": {"]
9469#[doc = " \"type\": \"integer\","]
9470#[doc = " \"format\": \"uint64\","]
9471#[doc = " \"minimum\": 0.0"]
9472#[doc = " },"]
9473#[doc = " \"upper_bound\": {"]
9474#[doc = " \"type\": \"integer\","]
9475#[doc = " \"format\": \"uint64\","]
9476#[doc = " \"minimum\": 0.0"]
9477#[doc = " }"]
9478#[doc = " }"]
9479#[doc = " }"]
9480#[doc = " },"]
9481#[doc = " \"additionalProperties\": false"]
9482#[doc = " },"]
9483#[doc = " {"]
9484#[doc = " \"description\": \"TX receiver_id is not a valid AccountId\","]
9485#[doc = " \"type\": \"object\","]
9486#[doc = " \"required\": ["]
9487#[doc = " \"InvalidReceiverId\""]
9488#[doc = " ],"]
9489#[doc = " \"properties\": {"]
9490#[doc = " \"InvalidReceiverId\": {"]
9491#[doc = " \"type\": \"object\","]
9492#[doc = " \"required\": ["]
9493#[doc = " \"receiver_id\""]
9494#[doc = " ],"]
9495#[doc = " \"properties\": {"]
9496#[doc = " \"receiver_id\": {"]
9497#[doc = " \"type\": \"string\""]
9498#[doc = " }"]
9499#[doc = " }"]
9500#[doc = " }"]
9501#[doc = " },"]
9502#[doc = " \"additionalProperties\": false"]
9503#[doc = " },"]
9504#[doc = " {"]
9505#[doc = " \"description\": \"TX signature is not valid\","]
9506#[doc = " \"type\": \"string\","]
9507#[doc = " \"enum\": ["]
9508#[doc = " \"InvalidSignature\""]
9509#[doc = " ]"]
9510#[doc = " },"]
9511#[doc = " {"]
9512#[doc = " \"description\": \"Account does not have enough balance to cover TX cost\","]
9513#[doc = " \"type\": \"object\","]
9514#[doc = " \"required\": ["]
9515#[doc = " \"NotEnoughBalance\""]
9516#[doc = " ],"]
9517#[doc = " \"properties\": {"]
9518#[doc = " \"NotEnoughBalance\": {"]
9519#[doc = " \"type\": \"object\","]
9520#[doc = " \"required\": ["]
9521#[doc = " \"balance\","]
9522#[doc = " \"cost\","]
9523#[doc = " \"signer_id\""]
9524#[doc = " ],"]
9525#[doc = " \"properties\": {"]
9526#[doc = " \"balance\": {"]
9527#[doc = " \"type\": \"string\""]
9528#[doc = " },"]
9529#[doc = " \"cost\": {"]
9530#[doc = " \"type\": \"string\""]
9531#[doc = " },"]
9532#[doc = " \"signer_id\": {"]
9533#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
9534#[doc = " }"]
9535#[doc = " }"]
9536#[doc = " }"]
9537#[doc = " },"]
9538#[doc = " \"additionalProperties\": false"]
9539#[doc = " },"]
9540#[doc = " {"]
9541#[doc = " \"description\": \"Signer account doesn't have enough balance after transaction.\","]
9542#[doc = " \"type\": \"object\","]
9543#[doc = " \"required\": ["]
9544#[doc = " \"LackBalanceForState\""]
9545#[doc = " ],"]
9546#[doc = " \"properties\": {"]
9547#[doc = " \"LackBalanceForState\": {"]
9548#[doc = " \"type\": \"object\","]
9549#[doc = " \"required\": ["]
9550#[doc = " \"amount\","]
9551#[doc = " \"signer_id\""]
9552#[doc = " ],"]
9553#[doc = " \"properties\": {"]
9554#[doc = " \"amount\": {"]
9555#[doc = " \"description\": \"Required balance to cover the state.\","]
9556#[doc = " \"type\": \"string\""]
9557#[doc = " },"]
9558#[doc = " \"signer_id\": {"]
9559#[doc = " \"description\": \"An account which doesn't have enough balance to cover storage.\","]
9560#[doc = " \"allOf\": ["]
9561#[doc = " {"]
9562#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
9563#[doc = " }"]
9564#[doc = " ]"]
9565#[doc = " }"]
9566#[doc = " }"]
9567#[doc = " }"]
9568#[doc = " },"]
9569#[doc = " \"additionalProperties\": false"]
9570#[doc = " },"]
9571#[doc = " {"]
9572#[doc = " \"description\": \"An integer overflow occurred during transaction cost estimation.\","]
9573#[doc = " \"type\": \"string\","]
9574#[doc = " \"enum\": ["]
9575#[doc = " \"CostOverflow\""]
9576#[doc = " ]"]
9577#[doc = " },"]
9578#[doc = " {"]
9579#[doc = " \"description\": \"Transaction parent block hash doesn't belong to the current chain\","]
9580#[doc = " \"type\": \"string\","]
9581#[doc = " \"enum\": ["]
9582#[doc = " \"InvalidChain\""]
9583#[doc = " ]"]
9584#[doc = " },"]
9585#[doc = " {"]
9586#[doc = " \"description\": \"Transaction has expired\","]
9587#[doc = " \"type\": \"string\","]
9588#[doc = " \"enum\": ["]
9589#[doc = " \"Expired\""]
9590#[doc = " ]"]
9591#[doc = " },"]
9592#[doc = " {"]
9593#[doc = " \"description\": \"An error occurred while validating actions of a Transaction.\","]
9594#[doc = " \"type\": \"object\","]
9595#[doc = " \"required\": ["]
9596#[doc = " \"ActionsValidation\""]
9597#[doc = " ],"]
9598#[doc = " \"properties\": {"]
9599#[doc = " \"ActionsValidation\": {"]
9600#[doc = " \"$ref\": \"#/components/schemas/ActionsValidationError\""]
9601#[doc = " }"]
9602#[doc = " },"]
9603#[doc = " \"additionalProperties\": false"]
9604#[doc = " },"]
9605#[doc = " {"]
9606#[doc = " \"description\": \"The size of serialized transaction exceeded the limit.\","]
9607#[doc = " \"type\": \"object\","]
9608#[doc = " \"required\": ["]
9609#[doc = " \"TransactionSizeExceeded\""]
9610#[doc = " ],"]
9611#[doc = " \"properties\": {"]
9612#[doc = " \"TransactionSizeExceeded\": {"]
9613#[doc = " \"type\": \"object\","]
9614#[doc = " \"required\": ["]
9615#[doc = " \"limit\","]
9616#[doc = " \"size\""]
9617#[doc = " ],"]
9618#[doc = " \"properties\": {"]
9619#[doc = " \"limit\": {"]
9620#[doc = " \"type\": \"integer\","]
9621#[doc = " \"format\": \"uint64\","]
9622#[doc = " \"minimum\": 0.0"]
9623#[doc = " },"]
9624#[doc = " \"size\": {"]
9625#[doc = " \"type\": \"integer\","]
9626#[doc = " \"format\": \"uint64\","]
9627#[doc = " \"minimum\": 0.0"]
9628#[doc = " }"]
9629#[doc = " }"]
9630#[doc = " }"]
9631#[doc = " },"]
9632#[doc = " \"additionalProperties\": false"]
9633#[doc = " },"]
9634#[doc = " {"]
9635#[doc = " \"description\": \"Transaction version is invalid.\","]
9636#[doc = " \"type\": \"string\","]
9637#[doc = " \"enum\": ["]
9638#[doc = " \"InvalidTransactionVersion\""]
9639#[doc = " ]"]
9640#[doc = " },"]
9641#[doc = " {"]
9642#[doc = " \"type\": \"object\","]
9643#[doc = " \"required\": ["]
9644#[doc = " \"StorageError\""]
9645#[doc = " ],"]
9646#[doc = " \"properties\": {"]
9647#[doc = " \"StorageError\": {"]
9648#[doc = " \"$ref\": \"#/components/schemas/StorageError\""]
9649#[doc = " }"]
9650#[doc = " },"]
9651#[doc = " \"additionalProperties\": false"]
9652#[doc = " },"]
9653#[doc = " {"]
9654#[doc = " \"description\": \"The receiver shard of the transaction is too congested to accept new\\ntransactions at the moment.\","]
9655#[doc = " \"type\": \"object\","]
9656#[doc = " \"required\": ["]
9657#[doc = " \"ShardCongested\""]
9658#[doc = " ],"]
9659#[doc = " \"properties\": {"]
9660#[doc = " \"ShardCongested\": {"]
9661#[doc = " \"type\": \"object\","]
9662#[doc = " \"required\": ["]
9663#[doc = " \"congestion_level\","]
9664#[doc = " \"shard_id\""]
9665#[doc = " ],"]
9666#[doc = " \"properties\": {"]
9667#[doc = " \"congestion_level\": {"]
9668#[doc = " \"description\": \"A value between 0 (no congestion) and 1 (max congestion).\","]
9669#[doc = " \"type\": \"number\","]
9670#[doc = " \"format\": \"double\""]
9671#[doc = " },"]
9672#[doc = " \"shard_id\": {"]
9673#[doc = " \"description\": \"The congested shard.\","]
9674#[doc = " \"type\": \"integer\","]
9675#[doc = " \"format\": \"uint32\","]
9676#[doc = " \"minimum\": 0.0"]
9677#[doc = " }"]
9678#[doc = " }"]
9679#[doc = " }"]
9680#[doc = " },"]
9681#[doc = " \"additionalProperties\": false"]
9682#[doc = " },"]
9683#[doc = " {"]
9684#[doc = " \"description\": \"The receiver shard of the transaction missed several chunks and rejects\\nnew transaction until it can make progress again.\","]
9685#[doc = " \"type\": \"object\","]
9686#[doc = " \"required\": ["]
9687#[doc = " \"ShardStuck\""]
9688#[doc = " ],"]
9689#[doc = " \"properties\": {"]
9690#[doc = " \"ShardStuck\": {"]
9691#[doc = " \"type\": \"object\","]
9692#[doc = " \"required\": ["]
9693#[doc = " \"missed_chunks\","]
9694#[doc = " \"shard_id\""]
9695#[doc = " ],"]
9696#[doc = " \"properties\": {"]
9697#[doc = " \"missed_chunks\": {"]
9698#[doc = " \"description\": \"The number of blocks since the last included chunk of the shard.\","]
9699#[doc = " \"type\": \"integer\","]
9700#[doc = " \"format\": \"uint64\","]
9701#[doc = " \"minimum\": 0.0"]
9702#[doc = " },"]
9703#[doc = " \"shard_id\": {"]
9704#[doc = " \"description\": \"The shard that fails making progress.\","]
9705#[doc = " \"type\": \"integer\","]
9706#[doc = " \"format\": \"uint32\","]
9707#[doc = " \"minimum\": 0.0"]
9708#[doc = " }"]
9709#[doc = " }"]
9710#[doc = " }"]
9711#[doc = " },"]
9712#[doc = " \"additionalProperties\": false"]
9713#[doc = " }"]
9714#[doc = " ]"]
9715#[doc = "}"]
9716#[doc = r" ```"]
9717#[doc = r" </details>"]
9718#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9719pub enum InvalidTxError {
9720 #[doc = "Happens if a wrong AccessKey used or AccessKey has not enough permissions"]
9721 InvalidAccessKeyError(InvalidAccessKeyError),
9722 #[doc = "TX signer_id is not a valid [`AccountId`]"]
9723 InvalidSignerId {
9724 signer_id: ::std::string::String,
9725 },
9726 #[doc = "TX signer_id is not found in a storage"]
9727 SignerDoesNotExist {
9728 signer_id: AccountId,
9729 },
9730 #[doc = "Transaction nonce must be strictly greater than `account[access_key].nonce`."]
9731 InvalidNonce {
9732 ak_nonce: u64,
9733 tx_nonce: u64,
9734 },
9735 #[doc = "Transaction nonce is larger than the upper bound given by the block height"]
9736 NonceTooLarge {
9737 tx_nonce: u64,
9738 upper_bound: u64,
9739 },
9740 #[doc = "TX receiver_id is not a valid AccountId"]
9741 InvalidReceiverId {
9742 receiver_id: ::std::string::String,
9743 },
9744 #[doc = "TX signature is not valid"]
9745 InvalidSignature,
9746 #[doc = "Account does not have enough balance to cover TX cost"]
9747 NotEnoughBalance {
9748 balance: ::std::string::String,
9749 cost: ::std::string::String,
9750 signer_id: AccountId,
9751 },
9752 #[doc = "Signer account doesn't have enough balance after transaction."]
9753 LackBalanceForState {
9754 #[doc = "Required balance to cover the state."]
9755 amount: ::std::string::String,
9756 #[doc = "An account which doesn't have enough balance to cover storage."]
9757 signer_id: AccountId,
9758 },
9759 #[doc = "An integer overflow occurred during transaction cost estimation."]
9760 CostOverflow,
9761 #[doc = "Transaction parent block hash doesn't belong to the current chain"]
9762 InvalidChain,
9763 #[doc = "Transaction has expired"]
9764 Expired,
9765 #[doc = "An error occurred while validating actions of a Transaction."]
9766 ActionsValidation(ActionsValidationError),
9767 #[doc = "The size of serialized transaction exceeded the limit."]
9768 TransactionSizeExceeded {
9769 limit: u64,
9770 size: u64,
9771 },
9772 #[doc = "Transaction version is invalid."]
9773 InvalidTransactionVersion,
9774 StorageError(StorageError),
9775 #[doc = "The receiver shard of the transaction is too congested to accept new\ntransactions at the moment."]
9776 ShardCongested {
9777 congestion_level: f64,
9778 #[doc = "The congested shard."]
9779 shard_id: u32,
9780 },
9781 #[doc = "The receiver shard of the transaction missed several chunks and rejects\nnew transaction until it can make progress again."]
9782 ShardStuck {
9783 #[doc = "The number of blocks since the last included chunk of the shard."]
9784 missed_chunks: u64,
9785 #[doc = "The shard that fails making progress."]
9786 shard_id: u32,
9787 },
9788}
9789impl ::std::convert::From<&Self> for InvalidTxError {
9790 fn from(value: &InvalidTxError) -> Self {
9791 value.clone()
9792 }
9793}
9794impl ::std::convert::From<InvalidAccessKeyError> for InvalidTxError {
9795 fn from(value: InvalidAccessKeyError) -> Self {
9796 Self::InvalidAccessKeyError(value)
9797 }
9798}
9799impl ::std::convert::From<ActionsValidationError> for InvalidTxError {
9800 fn from(value: ActionsValidationError) -> Self {
9801 Self::ActionsValidation(value)
9802 }
9803}
9804impl ::std::convert::From<StorageError> for InvalidTxError {
9805 fn from(value: StorageError) -> Self {
9806 Self::StorageError(value)
9807 }
9808}
9809#[doc = "`JsonRpcRequestForBlock`"]
9810#[doc = r""]
9811#[doc = r" <details><summary>JSON schema</summary>"]
9812#[doc = r""]
9813#[doc = r" ```json"]
9814#[doc = "{"]
9815#[doc = " \"title\": \"JsonRpcRequest_for_block\","]
9816#[doc = " \"type\": \"object\","]
9817#[doc = " \"required\": ["]
9818#[doc = " \"id\","]
9819#[doc = " \"jsonrpc\","]
9820#[doc = " \"method\","]
9821#[doc = " \"params\""]
9822#[doc = " ],"]
9823#[doc = " \"properties\": {"]
9824#[doc = " \"id\": {"]
9825#[doc = " \"type\": \"string\""]
9826#[doc = " },"]
9827#[doc = " \"jsonrpc\": {"]
9828#[doc = " \"type\": \"string\""]
9829#[doc = " },"]
9830#[doc = " \"method\": {"]
9831#[doc = " \"type\": \"string\","]
9832#[doc = " \"enum\": ["]
9833#[doc = " \"block\""]
9834#[doc = " ]"]
9835#[doc = " },"]
9836#[doc = " \"params\": {"]
9837#[doc = " \"$ref\": \"#/components/schemas/RpcBlockRequest\""]
9838#[doc = " }"]
9839#[doc = " }"]
9840#[doc = "}"]
9841#[doc = r" ```"]
9842#[doc = r" </details>"]
9843#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9844pub struct JsonRpcRequestForBlock {
9845 pub id: ::std::string::String,
9846 pub jsonrpc: ::std::string::String,
9847 pub method: JsonRpcRequestForBlockMethod,
9848 pub params: RpcBlockRequest,
9849}
9850impl ::std::convert::From<&JsonRpcRequestForBlock> for JsonRpcRequestForBlock {
9851 fn from(value: &JsonRpcRequestForBlock) -> Self {
9852 value.clone()
9853 }
9854}
9855#[doc = "`JsonRpcRequestForBlockMethod`"]
9856#[doc = r""]
9857#[doc = r" <details><summary>JSON schema</summary>"]
9858#[doc = r""]
9859#[doc = r" ```json"]
9860#[doc = "{"]
9861#[doc = " \"type\": \"string\","]
9862#[doc = " \"enum\": ["]
9863#[doc = " \"block\""]
9864#[doc = " ]"]
9865#[doc = "}"]
9866#[doc = r" ```"]
9867#[doc = r" </details>"]
9868#[derive(
9869 :: serde :: Deserialize,
9870 :: serde :: Serialize,
9871 Clone,
9872 Copy,
9873 Debug,
9874 Eq,
9875 Hash,
9876 Ord,
9877 PartialEq,
9878 PartialOrd,
9879)]
9880pub enum JsonRpcRequestForBlockMethod {
9881 #[serde(rename = "block")]
9882 Block,
9883}
9884impl ::std::convert::From<&Self> for JsonRpcRequestForBlockMethod {
9885 fn from(value: &JsonRpcRequestForBlockMethod) -> Self {
9886 value.clone()
9887 }
9888}
9889impl ::std::fmt::Display for JsonRpcRequestForBlockMethod {
9890 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9891 match *self {
9892 Self::Block => write!(f, "block"),
9893 }
9894 }
9895}
9896impl ::std::str::FromStr for JsonRpcRequestForBlockMethod {
9897 type Err = self::error::ConversionError;
9898 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9899 match value {
9900 "block" => Ok(Self::Block),
9901 _ => Err("invalid value".into()),
9902 }
9903 }
9904}
9905impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBlockMethod {
9906 type Error = self::error::ConversionError;
9907 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9908 value.parse()
9909 }
9910}
9911impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBlockMethod {
9912 type Error = self::error::ConversionError;
9913 fn try_from(
9914 value: &::std::string::String,
9915 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9916 value.parse()
9917 }
9918}
9919impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBlockMethod {
9920 type Error = self::error::ConversionError;
9921 fn try_from(
9922 value: ::std::string::String,
9923 ) -> ::std::result::Result<Self, self::error::ConversionError> {
9924 value.parse()
9925 }
9926}
9927#[doc = "`JsonRpcRequestForBroadcastTxAsync`"]
9928#[doc = r""]
9929#[doc = r" <details><summary>JSON schema</summary>"]
9930#[doc = r""]
9931#[doc = r" ```json"]
9932#[doc = "{"]
9933#[doc = " \"title\": \"JsonRpcRequest_for_broadcast_tx_async\","]
9934#[doc = " \"type\": \"object\","]
9935#[doc = " \"required\": ["]
9936#[doc = " \"id\","]
9937#[doc = " \"jsonrpc\","]
9938#[doc = " \"method\","]
9939#[doc = " \"params\""]
9940#[doc = " ],"]
9941#[doc = " \"properties\": {"]
9942#[doc = " \"id\": {"]
9943#[doc = " \"type\": \"string\""]
9944#[doc = " },"]
9945#[doc = " \"jsonrpc\": {"]
9946#[doc = " \"type\": \"string\""]
9947#[doc = " },"]
9948#[doc = " \"method\": {"]
9949#[doc = " \"type\": \"string\","]
9950#[doc = " \"enum\": ["]
9951#[doc = " \"broadcast_tx_async\""]
9952#[doc = " ]"]
9953#[doc = " },"]
9954#[doc = " \"params\": {"]
9955#[doc = " \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
9956#[doc = " }"]
9957#[doc = " }"]
9958#[doc = "}"]
9959#[doc = r" ```"]
9960#[doc = r" </details>"]
9961#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9962pub struct JsonRpcRequestForBroadcastTxAsync {
9963 pub id: ::std::string::String,
9964 pub jsonrpc: ::std::string::String,
9965 pub method: JsonRpcRequestForBroadcastTxAsyncMethod,
9966 pub params: RpcSendTransactionRequest,
9967}
9968impl ::std::convert::From<&JsonRpcRequestForBroadcastTxAsync>
9969 for JsonRpcRequestForBroadcastTxAsync
9970{
9971 fn from(value: &JsonRpcRequestForBroadcastTxAsync) -> Self {
9972 value.clone()
9973 }
9974}
9975#[doc = "`JsonRpcRequestForBroadcastTxAsyncMethod`"]
9976#[doc = r""]
9977#[doc = r" <details><summary>JSON schema</summary>"]
9978#[doc = r""]
9979#[doc = r" ```json"]
9980#[doc = "{"]
9981#[doc = " \"type\": \"string\","]
9982#[doc = " \"enum\": ["]
9983#[doc = " \"broadcast_tx_async\""]
9984#[doc = " ]"]
9985#[doc = "}"]
9986#[doc = r" ```"]
9987#[doc = r" </details>"]
9988#[derive(
9989 :: serde :: Deserialize,
9990 :: serde :: Serialize,
9991 Clone,
9992 Copy,
9993 Debug,
9994 Eq,
9995 Hash,
9996 Ord,
9997 PartialEq,
9998 PartialOrd,
9999)]
10000pub enum JsonRpcRequestForBroadcastTxAsyncMethod {
10001 #[serde(rename = "broadcast_tx_async")]
10002 BroadcastTxAsync,
10003}
10004impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxAsyncMethod {
10005 fn from(value: &JsonRpcRequestForBroadcastTxAsyncMethod) -> Self {
10006 value.clone()
10007 }
10008}
10009impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxAsyncMethod {
10010 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10011 match *self {
10012 Self::BroadcastTxAsync => write!(f, "broadcast_tx_async"),
10013 }
10014 }
10015}
10016impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxAsyncMethod {
10017 type Err = self::error::ConversionError;
10018 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10019 match value {
10020 "broadcast_tx_async" => Ok(Self::BroadcastTxAsync),
10021 _ => Err("invalid value".into()),
10022 }
10023 }
10024}
10025impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxAsyncMethod {
10026 type Error = self::error::ConversionError;
10027 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10028 value.parse()
10029 }
10030}
10031impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
10032 type Error = self::error::ConversionError;
10033 fn try_from(
10034 value: &::std::string::String,
10035 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10036 value.parse()
10037 }
10038}
10039impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxAsyncMethod {
10040 type Error = self::error::ConversionError;
10041 fn try_from(
10042 value: ::std::string::String,
10043 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10044 value.parse()
10045 }
10046}
10047#[doc = "`JsonRpcRequestForBroadcastTxCommit`"]
10048#[doc = r""]
10049#[doc = r" <details><summary>JSON schema</summary>"]
10050#[doc = r""]
10051#[doc = r" ```json"]
10052#[doc = "{"]
10053#[doc = " \"title\": \"JsonRpcRequest_for_broadcast_tx_commit\","]
10054#[doc = " \"type\": \"object\","]
10055#[doc = " \"required\": ["]
10056#[doc = " \"id\","]
10057#[doc = " \"jsonrpc\","]
10058#[doc = " \"method\","]
10059#[doc = " \"params\""]
10060#[doc = " ],"]
10061#[doc = " \"properties\": {"]
10062#[doc = " \"id\": {"]
10063#[doc = " \"type\": \"string\""]
10064#[doc = " },"]
10065#[doc = " \"jsonrpc\": {"]
10066#[doc = " \"type\": \"string\""]
10067#[doc = " },"]
10068#[doc = " \"method\": {"]
10069#[doc = " \"type\": \"string\","]
10070#[doc = " \"enum\": ["]
10071#[doc = " \"broadcast_tx_commit\""]
10072#[doc = " ]"]
10073#[doc = " },"]
10074#[doc = " \"params\": {"]
10075#[doc = " \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
10076#[doc = " }"]
10077#[doc = " }"]
10078#[doc = "}"]
10079#[doc = r" ```"]
10080#[doc = r" </details>"]
10081#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10082pub struct JsonRpcRequestForBroadcastTxCommit {
10083 pub id: ::std::string::String,
10084 pub jsonrpc: ::std::string::String,
10085 pub method: JsonRpcRequestForBroadcastTxCommitMethod,
10086 pub params: RpcSendTransactionRequest,
10087}
10088impl ::std::convert::From<&JsonRpcRequestForBroadcastTxCommit>
10089 for JsonRpcRequestForBroadcastTxCommit
10090{
10091 fn from(value: &JsonRpcRequestForBroadcastTxCommit) -> Self {
10092 value.clone()
10093 }
10094}
10095#[doc = "`JsonRpcRequestForBroadcastTxCommitMethod`"]
10096#[doc = r""]
10097#[doc = r" <details><summary>JSON schema</summary>"]
10098#[doc = r""]
10099#[doc = r" ```json"]
10100#[doc = "{"]
10101#[doc = " \"type\": \"string\","]
10102#[doc = " \"enum\": ["]
10103#[doc = " \"broadcast_tx_commit\""]
10104#[doc = " ]"]
10105#[doc = "}"]
10106#[doc = r" ```"]
10107#[doc = r" </details>"]
10108#[derive(
10109 :: serde :: Deserialize,
10110 :: serde :: Serialize,
10111 Clone,
10112 Copy,
10113 Debug,
10114 Eq,
10115 Hash,
10116 Ord,
10117 PartialEq,
10118 PartialOrd,
10119)]
10120pub enum JsonRpcRequestForBroadcastTxCommitMethod {
10121 #[serde(rename = "broadcast_tx_commit")]
10122 BroadcastTxCommit,
10123}
10124impl ::std::convert::From<&Self> for JsonRpcRequestForBroadcastTxCommitMethod {
10125 fn from(value: &JsonRpcRequestForBroadcastTxCommitMethod) -> Self {
10126 value.clone()
10127 }
10128}
10129impl ::std::fmt::Display for JsonRpcRequestForBroadcastTxCommitMethod {
10130 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10131 match *self {
10132 Self::BroadcastTxCommit => write!(f, "broadcast_tx_commit"),
10133 }
10134 }
10135}
10136impl ::std::str::FromStr for JsonRpcRequestForBroadcastTxCommitMethod {
10137 type Err = self::error::ConversionError;
10138 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10139 match value {
10140 "broadcast_tx_commit" => Ok(Self::BroadcastTxCommit),
10141 _ => Err("invalid value".into()),
10142 }
10143 }
10144}
10145impl ::std::convert::TryFrom<&str> for JsonRpcRequestForBroadcastTxCommitMethod {
10146 type Error = self::error::ConversionError;
10147 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10148 value.parse()
10149 }
10150}
10151impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
10152 type Error = self::error::ConversionError;
10153 fn try_from(
10154 value: &::std::string::String,
10155 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10156 value.parse()
10157 }
10158}
10159impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForBroadcastTxCommitMethod {
10160 type Error = self::error::ConversionError;
10161 fn try_from(
10162 value: ::std::string::String,
10163 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10164 value.parse()
10165 }
10166}
10167#[doc = "`JsonRpcRequestForChanges`"]
10168#[doc = r""]
10169#[doc = r" <details><summary>JSON schema</summary>"]
10170#[doc = r""]
10171#[doc = r" ```json"]
10172#[doc = "{"]
10173#[doc = " \"title\": \"JsonRpcRequest_for_changes\","]
10174#[doc = " \"type\": \"object\","]
10175#[doc = " \"required\": ["]
10176#[doc = " \"id\","]
10177#[doc = " \"jsonrpc\","]
10178#[doc = " \"method\","]
10179#[doc = " \"params\""]
10180#[doc = " ],"]
10181#[doc = " \"properties\": {"]
10182#[doc = " \"id\": {"]
10183#[doc = " \"type\": \"string\""]
10184#[doc = " },"]
10185#[doc = " \"jsonrpc\": {"]
10186#[doc = " \"type\": \"string\""]
10187#[doc = " },"]
10188#[doc = " \"method\": {"]
10189#[doc = " \"type\": \"string\","]
10190#[doc = " \"enum\": ["]
10191#[doc = " \"changes\""]
10192#[doc = " ]"]
10193#[doc = " },"]
10194#[doc = " \"params\": {"]
10195#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
10196#[doc = " }"]
10197#[doc = " }"]
10198#[doc = "}"]
10199#[doc = r" ```"]
10200#[doc = r" </details>"]
10201#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10202pub struct JsonRpcRequestForChanges {
10203 pub id: ::std::string::String,
10204 pub jsonrpc: ::std::string::String,
10205 pub method: JsonRpcRequestForChangesMethod,
10206 pub params: RpcStateChangesInBlockByTypeRequest,
10207}
10208impl ::std::convert::From<&JsonRpcRequestForChanges> for JsonRpcRequestForChanges {
10209 fn from(value: &JsonRpcRequestForChanges) -> Self {
10210 value.clone()
10211 }
10212}
10213#[doc = "`JsonRpcRequestForChangesMethod`"]
10214#[doc = r""]
10215#[doc = r" <details><summary>JSON schema</summary>"]
10216#[doc = r""]
10217#[doc = r" ```json"]
10218#[doc = "{"]
10219#[doc = " \"type\": \"string\","]
10220#[doc = " \"enum\": ["]
10221#[doc = " \"changes\""]
10222#[doc = " ]"]
10223#[doc = "}"]
10224#[doc = r" ```"]
10225#[doc = r" </details>"]
10226#[derive(
10227 :: serde :: Deserialize,
10228 :: serde :: Serialize,
10229 Clone,
10230 Copy,
10231 Debug,
10232 Eq,
10233 Hash,
10234 Ord,
10235 PartialEq,
10236 PartialOrd,
10237)]
10238pub enum JsonRpcRequestForChangesMethod {
10239 #[serde(rename = "changes")]
10240 Changes,
10241}
10242impl ::std::convert::From<&Self> for JsonRpcRequestForChangesMethod {
10243 fn from(value: &JsonRpcRequestForChangesMethod) -> Self {
10244 value.clone()
10245 }
10246}
10247impl ::std::fmt::Display for JsonRpcRequestForChangesMethod {
10248 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10249 match *self {
10250 Self::Changes => write!(f, "changes"),
10251 }
10252 }
10253}
10254impl ::std::str::FromStr for JsonRpcRequestForChangesMethod {
10255 type Err = self::error::ConversionError;
10256 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10257 match value {
10258 "changes" => Ok(Self::Changes),
10259 _ => Err("invalid value".into()),
10260 }
10261 }
10262}
10263impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChangesMethod {
10264 type Error = self::error::ConversionError;
10265 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10266 value.parse()
10267 }
10268}
10269impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChangesMethod {
10270 type Error = self::error::ConversionError;
10271 fn try_from(
10272 value: &::std::string::String,
10273 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10274 value.parse()
10275 }
10276}
10277impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChangesMethod {
10278 type Error = self::error::ConversionError;
10279 fn try_from(
10280 value: ::std::string::String,
10281 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10282 value.parse()
10283 }
10284}
10285#[doc = "`JsonRpcRequestForChunk`"]
10286#[doc = r""]
10287#[doc = r" <details><summary>JSON schema</summary>"]
10288#[doc = r""]
10289#[doc = r" ```json"]
10290#[doc = "{"]
10291#[doc = " \"title\": \"JsonRpcRequest_for_chunk\","]
10292#[doc = " \"type\": \"object\","]
10293#[doc = " \"required\": ["]
10294#[doc = " \"id\","]
10295#[doc = " \"jsonrpc\","]
10296#[doc = " \"method\","]
10297#[doc = " \"params\""]
10298#[doc = " ],"]
10299#[doc = " \"properties\": {"]
10300#[doc = " \"id\": {"]
10301#[doc = " \"type\": \"string\""]
10302#[doc = " },"]
10303#[doc = " \"jsonrpc\": {"]
10304#[doc = " \"type\": \"string\""]
10305#[doc = " },"]
10306#[doc = " \"method\": {"]
10307#[doc = " \"type\": \"string\","]
10308#[doc = " \"enum\": ["]
10309#[doc = " \"chunk\""]
10310#[doc = " ]"]
10311#[doc = " },"]
10312#[doc = " \"params\": {"]
10313#[doc = " \"$ref\": \"#/components/schemas/RpcChunkRequest\""]
10314#[doc = " }"]
10315#[doc = " }"]
10316#[doc = "}"]
10317#[doc = r" ```"]
10318#[doc = r" </details>"]
10319#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10320pub struct JsonRpcRequestForChunk {
10321 pub id: ::std::string::String,
10322 pub jsonrpc: ::std::string::String,
10323 pub method: JsonRpcRequestForChunkMethod,
10324 pub params: RpcChunkRequest,
10325}
10326impl ::std::convert::From<&JsonRpcRequestForChunk> for JsonRpcRequestForChunk {
10327 fn from(value: &JsonRpcRequestForChunk) -> Self {
10328 value.clone()
10329 }
10330}
10331#[doc = "`JsonRpcRequestForChunkMethod`"]
10332#[doc = r""]
10333#[doc = r" <details><summary>JSON schema</summary>"]
10334#[doc = r""]
10335#[doc = r" ```json"]
10336#[doc = "{"]
10337#[doc = " \"type\": \"string\","]
10338#[doc = " \"enum\": ["]
10339#[doc = " \"chunk\""]
10340#[doc = " ]"]
10341#[doc = "}"]
10342#[doc = r" ```"]
10343#[doc = r" </details>"]
10344#[derive(
10345 :: serde :: Deserialize,
10346 :: serde :: Serialize,
10347 Clone,
10348 Copy,
10349 Debug,
10350 Eq,
10351 Hash,
10352 Ord,
10353 PartialEq,
10354 PartialOrd,
10355)]
10356pub enum JsonRpcRequestForChunkMethod {
10357 #[serde(rename = "chunk")]
10358 Chunk,
10359}
10360impl ::std::convert::From<&Self> for JsonRpcRequestForChunkMethod {
10361 fn from(value: &JsonRpcRequestForChunkMethod) -> Self {
10362 value.clone()
10363 }
10364}
10365impl ::std::fmt::Display for JsonRpcRequestForChunkMethod {
10366 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10367 match *self {
10368 Self::Chunk => write!(f, "chunk"),
10369 }
10370 }
10371}
10372impl ::std::str::FromStr for JsonRpcRequestForChunkMethod {
10373 type Err = self::error::ConversionError;
10374 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10375 match value {
10376 "chunk" => Ok(Self::Chunk),
10377 _ => Err("invalid value".into()),
10378 }
10379 }
10380}
10381impl ::std::convert::TryFrom<&str> for JsonRpcRequestForChunkMethod {
10382 type Error = self::error::ConversionError;
10383 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10384 value.parse()
10385 }
10386}
10387impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForChunkMethod {
10388 type Error = self::error::ConversionError;
10389 fn try_from(
10390 value: &::std::string::String,
10391 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10392 value.parse()
10393 }
10394}
10395impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForChunkMethod {
10396 type Error = self::error::ConversionError;
10397 fn try_from(
10398 value: ::std::string::String,
10399 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10400 value.parse()
10401 }
10402}
10403#[doc = "`JsonRpcRequestForClientConfig`"]
10404#[doc = r""]
10405#[doc = r" <details><summary>JSON schema</summary>"]
10406#[doc = r""]
10407#[doc = r" ```json"]
10408#[doc = "{"]
10409#[doc = " \"title\": \"JsonRpcRequest_for_client_config\","]
10410#[doc = " \"type\": \"object\","]
10411#[doc = " \"required\": ["]
10412#[doc = " \"id\","]
10413#[doc = " \"jsonrpc\","]
10414#[doc = " \"method\","]
10415#[doc = " \"params\""]
10416#[doc = " ],"]
10417#[doc = " \"properties\": {"]
10418#[doc = " \"id\": {"]
10419#[doc = " \"type\": \"string\""]
10420#[doc = " },"]
10421#[doc = " \"jsonrpc\": {"]
10422#[doc = " \"type\": \"string\""]
10423#[doc = " },"]
10424#[doc = " \"method\": {"]
10425#[doc = " \"type\": \"string\","]
10426#[doc = " \"enum\": ["]
10427#[doc = " \"client_config\""]
10428#[doc = " ]"]
10429#[doc = " },"]
10430#[doc = " \"params\": {"]
10431#[doc = " \"$ref\": \"#/components/schemas/RpcClientConfigRequest\""]
10432#[doc = " }"]
10433#[doc = " }"]
10434#[doc = "}"]
10435#[doc = r" ```"]
10436#[doc = r" </details>"]
10437#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10438pub struct JsonRpcRequestForClientConfig {
10439 pub id: ::std::string::String,
10440 pub jsonrpc: ::std::string::String,
10441 pub method: JsonRpcRequestForClientConfigMethod,
10442 pub params: RpcClientConfigRequest,
10443}
10444impl ::std::convert::From<&JsonRpcRequestForClientConfig> for JsonRpcRequestForClientConfig {
10445 fn from(value: &JsonRpcRequestForClientConfig) -> Self {
10446 value.clone()
10447 }
10448}
10449#[doc = "`JsonRpcRequestForClientConfigMethod`"]
10450#[doc = r""]
10451#[doc = r" <details><summary>JSON schema</summary>"]
10452#[doc = r""]
10453#[doc = r" ```json"]
10454#[doc = "{"]
10455#[doc = " \"type\": \"string\","]
10456#[doc = " \"enum\": ["]
10457#[doc = " \"client_config\""]
10458#[doc = " ]"]
10459#[doc = "}"]
10460#[doc = r" ```"]
10461#[doc = r" </details>"]
10462#[derive(
10463 :: serde :: Deserialize,
10464 :: serde :: Serialize,
10465 Clone,
10466 Copy,
10467 Debug,
10468 Eq,
10469 Hash,
10470 Ord,
10471 PartialEq,
10472 PartialOrd,
10473)]
10474pub enum JsonRpcRequestForClientConfigMethod {
10475 #[serde(rename = "client_config")]
10476 ClientConfig,
10477}
10478impl ::std::convert::From<&Self> for JsonRpcRequestForClientConfigMethod {
10479 fn from(value: &JsonRpcRequestForClientConfigMethod) -> Self {
10480 value.clone()
10481 }
10482}
10483impl ::std::fmt::Display for JsonRpcRequestForClientConfigMethod {
10484 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10485 match *self {
10486 Self::ClientConfig => write!(f, "client_config"),
10487 }
10488 }
10489}
10490impl ::std::str::FromStr for JsonRpcRequestForClientConfigMethod {
10491 type Err = self::error::ConversionError;
10492 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10493 match value {
10494 "client_config" => Ok(Self::ClientConfig),
10495 _ => Err("invalid value".into()),
10496 }
10497 }
10498}
10499impl ::std::convert::TryFrom<&str> for JsonRpcRequestForClientConfigMethod {
10500 type Error = self::error::ConversionError;
10501 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10502 value.parse()
10503 }
10504}
10505impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForClientConfigMethod {
10506 type Error = self::error::ConversionError;
10507 fn try_from(
10508 value: &::std::string::String,
10509 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10510 value.parse()
10511 }
10512}
10513impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForClientConfigMethod {
10514 type Error = self::error::ConversionError;
10515 fn try_from(
10516 value: ::std::string::String,
10517 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10518 value.parse()
10519 }
10520}
10521#[doc = "`JsonRpcRequestForExperimentalChanges`"]
10522#[doc = r""]
10523#[doc = r" <details><summary>JSON schema</summary>"]
10524#[doc = r""]
10525#[doc = r" ```json"]
10526#[doc = "{"]
10527#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes\","]
10528#[doc = " \"type\": \"object\","]
10529#[doc = " \"required\": ["]
10530#[doc = " \"id\","]
10531#[doc = " \"jsonrpc\","]
10532#[doc = " \"method\","]
10533#[doc = " \"params\""]
10534#[doc = " ],"]
10535#[doc = " \"properties\": {"]
10536#[doc = " \"id\": {"]
10537#[doc = " \"type\": \"string\""]
10538#[doc = " },"]
10539#[doc = " \"jsonrpc\": {"]
10540#[doc = " \"type\": \"string\""]
10541#[doc = " },"]
10542#[doc = " \"method\": {"]
10543#[doc = " \"type\": \"string\","]
10544#[doc = " \"enum\": ["]
10545#[doc = " \"EXPERIMENTAL_changes\""]
10546#[doc = " ]"]
10547#[doc = " },"]
10548#[doc = " \"params\": {"]
10549#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeRequest\""]
10550#[doc = " }"]
10551#[doc = " }"]
10552#[doc = "}"]
10553#[doc = r" ```"]
10554#[doc = r" </details>"]
10555#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10556pub struct JsonRpcRequestForExperimentalChanges {
10557 pub id: ::std::string::String,
10558 pub jsonrpc: ::std::string::String,
10559 pub method: JsonRpcRequestForExperimentalChangesMethod,
10560 pub params: RpcStateChangesInBlockByTypeRequest,
10561}
10562impl ::std::convert::From<&JsonRpcRequestForExperimentalChanges>
10563 for JsonRpcRequestForExperimentalChanges
10564{
10565 fn from(value: &JsonRpcRequestForExperimentalChanges) -> Self {
10566 value.clone()
10567 }
10568}
10569#[doc = "`JsonRpcRequestForExperimentalChangesInBlock`"]
10570#[doc = r""]
10571#[doc = r" <details><summary>JSON schema</summary>"]
10572#[doc = r""]
10573#[doc = r" ```json"]
10574#[doc = "{"]
10575#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_changes_in_block\","]
10576#[doc = " \"type\": \"object\","]
10577#[doc = " \"required\": ["]
10578#[doc = " \"id\","]
10579#[doc = " \"jsonrpc\","]
10580#[doc = " \"method\","]
10581#[doc = " \"params\""]
10582#[doc = " ],"]
10583#[doc = " \"properties\": {"]
10584#[doc = " \"id\": {"]
10585#[doc = " \"type\": \"string\""]
10586#[doc = " },"]
10587#[doc = " \"jsonrpc\": {"]
10588#[doc = " \"type\": \"string\""]
10589#[doc = " },"]
10590#[doc = " \"method\": {"]
10591#[doc = " \"type\": \"string\","]
10592#[doc = " \"enum\": ["]
10593#[doc = " \"EXPERIMENTAL_changes_in_block\""]
10594#[doc = " ]"]
10595#[doc = " },"]
10596#[doc = " \"params\": {"]
10597#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockRequest\""]
10598#[doc = " }"]
10599#[doc = " }"]
10600#[doc = "}"]
10601#[doc = r" ```"]
10602#[doc = r" </details>"]
10603#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10604pub struct JsonRpcRequestForExperimentalChangesInBlock {
10605 pub id: ::std::string::String,
10606 pub jsonrpc: ::std::string::String,
10607 pub method: JsonRpcRequestForExperimentalChangesInBlockMethod,
10608 pub params: RpcStateChangesInBlockRequest,
10609}
10610impl ::std::convert::From<&JsonRpcRequestForExperimentalChangesInBlock>
10611 for JsonRpcRequestForExperimentalChangesInBlock
10612{
10613 fn from(value: &JsonRpcRequestForExperimentalChangesInBlock) -> Self {
10614 value.clone()
10615 }
10616}
10617#[doc = "`JsonRpcRequestForExperimentalChangesInBlockMethod`"]
10618#[doc = r""]
10619#[doc = r" <details><summary>JSON schema</summary>"]
10620#[doc = r""]
10621#[doc = r" ```json"]
10622#[doc = "{"]
10623#[doc = " \"type\": \"string\","]
10624#[doc = " \"enum\": ["]
10625#[doc = " \"EXPERIMENTAL_changes_in_block\""]
10626#[doc = " ]"]
10627#[doc = "}"]
10628#[doc = r" ```"]
10629#[doc = r" </details>"]
10630#[derive(
10631 :: serde :: Deserialize,
10632 :: serde :: Serialize,
10633 Clone,
10634 Copy,
10635 Debug,
10636 Eq,
10637 Hash,
10638 Ord,
10639 PartialEq,
10640 PartialOrd,
10641)]
10642pub enum JsonRpcRequestForExperimentalChangesInBlockMethod {
10643 #[serde(rename = "EXPERIMENTAL_changes_in_block")]
10644 ExperimentalChangesInBlock,
10645}
10646impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesInBlockMethod {
10647 fn from(value: &JsonRpcRequestForExperimentalChangesInBlockMethod) -> Self {
10648 value.clone()
10649 }
10650}
10651impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesInBlockMethod {
10652 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10653 match *self {
10654 Self::ExperimentalChangesInBlock => write!(f, "EXPERIMENTAL_changes_in_block"),
10655 }
10656 }
10657}
10658impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesInBlockMethod {
10659 type Err = self::error::ConversionError;
10660 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10661 match value {
10662 "EXPERIMENTAL_changes_in_block" => Ok(Self::ExperimentalChangesInBlock),
10663 _ => Err("invalid value".into()),
10664 }
10665 }
10666}
10667impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesInBlockMethod {
10668 type Error = self::error::ConversionError;
10669 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10670 value.parse()
10671 }
10672}
10673impl ::std::convert::TryFrom<&::std::string::String>
10674 for JsonRpcRequestForExperimentalChangesInBlockMethod
10675{
10676 type Error = self::error::ConversionError;
10677 fn try_from(
10678 value: &::std::string::String,
10679 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10680 value.parse()
10681 }
10682}
10683impl ::std::convert::TryFrom<::std::string::String>
10684 for JsonRpcRequestForExperimentalChangesInBlockMethod
10685{
10686 type Error = self::error::ConversionError;
10687 fn try_from(
10688 value: ::std::string::String,
10689 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10690 value.parse()
10691 }
10692}
10693#[doc = "`JsonRpcRequestForExperimentalChangesMethod`"]
10694#[doc = r""]
10695#[doc = r" <details><summary>JSON schema</summary>"]
10696#[doc = r""]
10697#[doc = r" ```json"]
10698#[doc = "{"]
10699#[doc = " \"type\": \"string\","]
10700#[doc = " \"enum\": ["]
10701#[doc = " \"EXPERIMENTAL_changes\""]
10702#[doc = " ]"]
10703#[doc = "}"]
10704#[doc = r" ```"]
10705#[doc = r" </details>"]
10706#[derive(
10707 :: serde :: Deserialize,
10708 :: serde :: Serialize,
10709 Clone,
10710 Copy,
10711 Debug,
10712 Eq,
10713 Hash,
10714 Ord,
10715 PartialEq,
10716 PartialOrd,
10717)]
10718pub enum JsonRpcRequestForExperimentalChangesMethod {
10719 #[serde(rename = "EXPERIMENTAL_changes")]
10720 ExperimentalChanges,
10721}
10722impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalChangesMethod {
10723 fn from(value: &JsonRpcRequestForExperimentalChangesMethod) -> Self {
10724 value.clone()
10725 }
10726}
10727impl ::std::fmt::Display for JsonRpcRequestForExperimentalChangesMethod {
10728 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10729 match *self {
10730 Self::ExperimentalChanges => write!(f, "EXPERIMENTAL_changes"),
10731 }
10732 }
10733}
10734impl ::std::str::FromStr for JsonRpcRequestForExperimentalChangesMethod {
10735 type Err = self::error::ConversionError;
10736 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10737 match value {
10738 "EXPERIMENTAL_changes" => Ok(Self::ExperimentalChanges),
10739 _ => Err("invalid value".into()),
10740 }
10741 }
10742}
10743impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalChangesMethod {
10744 type Error = self::error::ConversionError;
10745 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10746 value.parse()
10747 }
10748}
10749impl ::std::convert::TryFrom<&::std::string::String>
10750 for JsonRpcRequestForExperimentalChangesMethod
10751{
10752 type Error = self::error::ConversionError;
10753 fn try_from(
10754 value: &::std::string::String,
10755 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10756 value.parse()
10757 }
10758}
10759impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalChangesMethod {
10760 type Error = self::error::ConversionError;
10761 fn try_from(
10762 value: ::std::string::String,
10763 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10764 value.parse()
10765 }
10766}
10767#[doc = "`JsonRpcRequestForExperimentalCongestionLevel`"]
10768#[doc = r""]
10769#[doc = r" <details><summary>JSON schema</summary>"]
10770#[doc = r""]
10771#[doc = r" ```json"]
10772#[doc = "{"]
10773#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_congestion_level\","]
10774#[doc = " \"type\": \"object\","]
10775#[doc = " \"required\": ["]
10776#[doc = " \"id\","]
10777#[doc = " \"jsonrpc\","]
10778#[doc = " \"method\","]
10779#[doc = " \"params\""]
10780#[doc = " ],"]
10781#[doc = " \"properties\": {"]
10782#[doc = " \"id\": {"]
10783#[doc = " \"type\": \"string\""]
10784#[doc = " },"]
10785#[doc = " \"jsonrpc\": {"]
10786#[doc = " \"type\": \"string\""]
10787#[doc = " },"]
10788#[doc = " \"method\": {"]
10789#[doc = " \"type\": \"string\","]
10790#[doc = " \"enum\": ["]
10791#[doc = " \"EXPERIMENTAL_congestion_level\""]
10792#[doc = " ]"]
10793#[doc = " },"]
10794#[doc = " \"params\": {"]
10795#[doc = " \"$ref\": \"#/components/schemas/RpcCongestionLevelRequest\""]
10796#[doc = " }"]
10797#[doc = " }"]
10798#[doc = "}"]
10799#[doc = r" ```"]
10800#[doc = r" </details>"]
10801#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10802pub struct JsonRpcRequestForExperimentalCongestionLevel {
10803 pub id: ::std::string::String,
10804 pub jsonrpc: ::std::string::String,
10805 pub method: JsonRpcRequestForExperimentalCongestionLevelMethod,
10806 pub params: RpcCongestionLevelRequest,
10807}
10808impl ::std::convert::From<&JsonRpcRequestForExperimentalCongestionLevel>
10809 for JsonRpcRequestForExperimentalCongestionLevel
10810{
10811 fn from(value: &JsonRpcRequestForExperimentalCongestionLevel) -> Self {
10812 value.clone()
10813 }
10814}
10815#[doc = "`JsonRpcRequestForExperimentalCongestionLevelMethod`"]
10816#[doc = r""]
10817#[doc = r" <details><summary>JSON schema</summary>"]
10818#[doc = r""]
10819#[doc = r" ```json"]
10820#[doc = "{"]
10821#[doc = " \"type\": \"string\","]
10822#[doc = " \"enum\": ["]
10823#[doc = " \"EXPERIMENTAL_congestion_level\""]
10824#[doc = " ]"]
10825#[doc = "}"]
10826#[doc = r" ```"]
10827#[doc = r" </details>"]
10828#[derive(
10829 :: serde :: Deserialize,
10830 :: serde :: Serialize,
10831 Clone,
10832 Copy,
10833 Debug,
10834 Eq,
10835 Hash,
10836 Ord,
10837 PartialEq,
10838 PartialOrd,
10839)]
10840pub enum JsonRpcRequestForExperimentalCongestionLevelMethod {
10841 #[serde(rename = "EXPERIMENTAL_congestion_level")]
10842 ExperimentalCongestionLevel,
10843}
10844impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalCongestionLevelMethod {
10845 fn from(value: &JsonRpcRequestForExperimentalCongestionLevelMethod) -> Self {
10846 value.clone()
10847 }
10848}
10849impl ::std::fmt::Display for JsonRpcRequestForExperimentalCongestionLevelMethod {
10850 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10851 match *self {
10852 Self::ExperimentalCongestionLevel => write!(f, "EXPERIMENTAL_congestion_level"),
10853 }
10854 }
10855}
10856impl ::std::str::FromStr for JsonRpcRequestForExperimentalCongestionLevelMethod {
10857 type Err = self::error::ConversionError;
10858 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10859 match value {
10860 "EXPERIMENTAL_congestion_level" => Ok(Self::ExperimentalCongestionLevel),
10861 _ => Err("invalid value".into()),
10862 }
10863 }
10864}
10865impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalCongestionLevelMethod {
10866 type Error = self::error::ConversionError;
10867 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10868 value.parse()
10869 }
10870}
10871impl ::std::convert::TryFrom<&::std::string::String>
10872 for JsonRpcRequestForExperimentalCongestionLevelMethod
10873{
10874 type Error = self::error::ConversionError;
10875 fn try_from(
10876 value: &::std::string::String,
10877 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10878 value.parse()
10879 }
10880}
10881impl ::std::convert::TryFrom<::std::string::String>
10882 for JsonRpcRequestForExperimentalCongestionLevelMethod
10883{
10884 type Error = self::error::ConversionError;
10885 fn try_from(
10886 value: ::std::string::String,
10887 ) -> ::std::result::Result<Self, self::error::ConversionError> {
10888 value.parse()
10889 }
10890}
10891#[doc = "`JsonRpcRequestForExperimentalGenesisConfig`"]
10892#[doc = r""]
10893#[doc = r" <details><summary>JSON schema</summary>"]
10894#[doc = r""]
10895#[doc = r" ```json"]
10896#[doc = "{"]
10897#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_genesis_config\","]
10898#[doc = " \"type\": \"object\","]
10899#[doc = " \"required\": ["]
10900#[doc = " \"id\","]
10901#[doc = " \"jsonrpc\","]
10902#[doc = " \"method\","]
10903#[doc = " \"params\""]
10904#[doc = " ],"]
10905#[doc = " \"properties\": {"]
10906#[doc = " \"id\": {"]
10907#[doc = " \"type\": \"string\""]
10908#[doc = " },"]
10909#[doc = " \"jsonrpc\": {"]
10910#[doc = " \"type\": \"string\""]
10911#[doc = " },"]
10912#[doc = " \"method\": {"]
10913#[doc = " \"type\": \"string\","]
10914#[doc = " \"enum\": ["]
10915#[doc = " \"EXPERIMENTAL_genesis_config\""]
10916#[doc = " ]"]
10917#[doc = " },"]
10918#[doc = " \"params\": {"]
10919#[doc = " \"$ref\": \"#/components/schemas/GenesisConfigRequest\""]
10920#[doc = " }"]
10921#[doc = " }"]
10922#[doc = "}"]
10923#[doc = r" ```"]
10924#[doc = r" </details>"]
10925#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10926pub struct JsonRpcRequestForExperimentalGenesisConfig {
10927 pub id: ::std::string::String,
10928 pub jsonrpc: ::std::string::String,
10929 pub method: JsonRpcRequestForExperimentalGenesisConfigMethod,
10930 pub params: GenesisConfigRequest,
10931}
10932impl ::std::convert::From<&JsonRpcRequestForExperimentalGenesisConfig>
10933 for JsonRpcRequestForExperimentalGenesisConfig
10934{
10935 fn from(value: &JsonRpcRequestForExperimentalGenesisConfig) -> Self {
10936 value.clone()
10937 }
10938}
10939#[doc = "`JsonRpcRequestForExperimentalGenesisConfigMethod`"]
10940#[doc = r""]
10941#[doc = r" <details><summary>JSON schema</summary>"]
10942#[doc = r""]
10943#[doc = r" ```json"]
10944#[doc = "{"]
10945#[doc = " \"type\": \"string\","]
10946#[doc = " \"enum\": ["]
10947#[doc = " \"EXPERIMENTAL_genesis_config\""]
10948#[doc = " ]"]
10949#[doc = "}"]
10950#[doc = r" ```"]
10951#[doc = r" </details>"]
10952#[derive(
10953 :: serde :: Deserialize,
10954 :: serde :: Serialize,
10955 Clone,
10956 Copy,
10957 Debug,
10958 Eq,
10959 Hash,
10960 Ord,
10961 PartialEq,
10962 PartialOrd,
10963)]
10964pub enum JsonRpcRequestForExperimentalGenesisConfigMethod {
10965 #[serde(rename = "EXPERIMENTAL_genesis_config")]
10966 ExperimentalGenesisConfig,
10967}
10968impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalGenesisConfigMethod {
10969 fn from(value: &JsonRpcRequestForExperimentalGenesisConfigMethod) -> Self {
10970 value.clone()
10971 }
10972}
10973impl ::std::fmt::Display for JsonRpcRequestForExperimentalGenesisConfigMethod {
10974 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10975 match *self {
10976 Self::ExperimentalGenesisConfig => write!(f, "EXPERIMENTAL_genesis_config"),
10977 }
10978 }
10979}
10980impl ::std::str::FromStr for JsonRpcRequestForExperimentalGenesisConfigMethod {
10981 type Err = self::error::ConversionError;
10982 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10983 match value {
10984 "EXPERIMENTAL_genesis_config" => Ok(Self::ExperimentalGenesisConfig),
10985 _ => Err("invalid value".into()),
10986 }
10987 }
10988}
10989impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalGenesisConfigMethod {
10990 type Error = self::error::ConversionError;
10991 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10992 value.parse()
10993 }
10994}
10995impl ::std::convert::TryFrom<&::std::string::String>
10996 for JsonRpcRequestForExperimentalGenesisConfigMethod
10997{
10998 type Error = self::error::ConversionError;
10999 fn try_from(
11000 value: &::std::string::String,
11001 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11002 value.parse()
11003 }
11004}
11005impl ::std::convert::TryFrom<::std::string::String>
11006 for JsonRpcRequestForExperimentalGenesisConfigMethod
11007{
11008 type Error = self::error::ConversionError;
11009 fn try_from(
11010 value: ::std::string::String,
11011 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11012 value.parse()
11013 }
11014}
11015#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProof`"]
11016#[doc = r""]
11017#[doc = r" <details><summary>JSON schema</summary>"]
11018#[doc = r""]
11019#[doc = r" ```json"]
11020#[doc = "{"]
11021#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_block_proof\","]
11022#[doc = " \"type\": \"object\","]
11023#[doc = " \"required\": ["]
11024#[doc = " \"id\","]
11025#[doc = " \"jsonrpc\","]
11026#[doc = " \"method\","]
11027#[doc = " \"params\""]
11028#[doc = " ],"]
11029#[doc = " \"properties\": {"]
11030#[doc = " \"id\": {"]
11031#[doc = " \"type\": \"string\""]
11032#[doc = " },"]
11033#[doc = " \"jsonrpc\": {"]
11034#[doc = " \"type\": \"string\""]
11035#[doc = " },"]
11036#[doc = " \"method\": {"]
11037#[doc = " \"type\": \"string\","]
11038#[doc = " \"enum\": ["]
11039#[doc = " \"EXPERIMENTAL_light_client_block_proof\""]
11040#[doc = " ]"]
11041#[doc = " },"]
11042#[doc = " \"params\": {"]
11043#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientBlockProofRequest\""]
11044#[doc = " }"]
11045#[doc = " }"]
11046#[doc = "}"]
11047#[doc = r" ```"]
11048#[doc = r" </details>"]
11049#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11050pub struct JsonRpcRequestForExperimentalLightClientBlockProof {
11051 pub id: ::std::string::String,
11052 pub jsonrpc: ::std::string::String,
11053 pub method: JsonRpcRequestForExperimentalLightClientBlockProofMethod,
11054 pub params: RpcLightClientBlockProofRequest,
11055}
11056impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientBlockProof>
11057 for JsonRpcRequestForExperimentalLightClientBlockProof
11058{
11059 fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProof) -> Self {
11060 value.clone()
11061 }
11062}
11063#[doc = "`JsonRpcRequestForExperimentalLightClientBlockProofMethod`"]
11064#[doc = r""]
11065#[doc = r" <details><summary>JSON schema</summary>"]
11066#[doc = r""]
11067#[doc = r" ```json"]
11068#[doc = "{"]
11069#[doc = " \"type\": \"string\","]
11070#[doc = " \"enum\": ["]
11071#[doc = " \"EXPERIMENTAL_light_client_block_proof\""]
11072#[doc = " ]"]
11073#[doc = "}"]
11074#[doc = r" ```"]
11075#[doc = r" </details>"]
11076#[derive(
11077 :: serde :: Deserialize,
11078 :: serde :: Serialize,
11079 Clone,
11080 Copy,
11081 Debug,
11082 Eq,
11083 Hash,
11084 Ord,
11085 PartialEq,
11086 PartialOrd,
11087)]
11088pub enum JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11089 #[serde(rename = "EXPERIMENTAL_light_client_block_proof")]
11090 ExperimentalLightClientBlockProof,
11091}
11092impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11093 fn from(value: &JsonRpcRequestForExperimentalLightClientBlockProofMethod) -> Self {
11094 value.clone()
11095 }
11096}
11097impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11098 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11099 match *self {
11100 Self::ExperimentalLightClientBlockProof => {
11101 write!(f, "EXPERIMENTAL_light_client_block_proof")
11102 }
11103 }
11104 }
11105}
11106impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11107 type Err = self::error::ConversionError;
11108 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11109 match value {
11110 "EXPERIMENTAL_light_client_block_proof" => Ok(Self::ExperimentalLightClientBlockProof),
11111 _ => Err("invalid value".into()),
11112 }
11113 }
11114}
11115impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientBlockProofMethod {
11116 type Error = self::error::ConversionError;
11117 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11118 value.parse()
11119 }
11120}
11121impl ::std::convert::TryFrom<&::std::string::String>
11122 for JsonRpcRequestForExperimentalLightClientBlockProofMethod
11123{
11124 type Error = self::error::ConversionError;
11125 fn try_from(
11126 value: &::std::string::String,
11127 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11128 value.parse()
11129 }
11130}
11131impl ::std::convert::TryFrom<::std::string::String>
11132 for JsonRpcRequestForExperimentalLightClientBlockProofMethod
11133{
11134 type Error = self::error::ConversionError;
11135 fn try_from(
11136 value: ::std::string::String,
11137 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11138 value.parse()
11139 }
11140}
11141#[doc = "`JsonRpcRequestForExperimentalLightClientProof`"]
11142#[doc = r""]
11143#[doc = r" <details><summary>JSON schema</summary>"]
11144#[doc = r""]
11145#[doc = r" ```json"]
11146#[doc = "{"]
11147#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_light_client_proof\","]
11148#[doc = " \"type\": \"object\","]
11149#[doc = " \"required\": ["]
11150#[doc = " \"id\","]
11151#[doc = " \"jsonrpc\","]
11152#[doc = " \"method\","]
11153#[doc = " \"params\""]
11154#[doc = " ],"]
11155#[doc = " \"properties\": {"]
11156#[doc = " \"id\": {"]
11157#[doc = " \"type\": \"string\""]
11158#[doc = " },"]
11159#[doc = " \"jsonrpc\": {"]
11160#[doc = " \"type\": \"string\""]
11161#[doc = " },"]
11162#[doc = " \"method\": {"]
11163#[doc = " \"type\": \"string\","]
11164#[doc = " \"enum\": ["]
11165#[doc = " \"EXPERIMENTAL_light_client_proof\""]
11166#[doc = " ]"]
11167#[doc = " },"]
11168#[doc = " \"params\": {"]
11169#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
11170#[doc = " }"]
11171#[doc = " }"]
11172#[doc = "}"]
11173#[doc = r" ```"]
11174#[doc = r" </details>"]
11175#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11176pub struct JsonRpcRequestForExperimentalLightClientProof {
11177 pub id: ::std::string::String,
11178 pub jsonrpc: ::std::string::String,
11179 pub method: JsonRpcRequestForExperimentalLightClientProofMethod,
11180 pub params: RpcLightClientExecutionProofRequest,
11181}
11182impl ::std::convert::From<&JsonRpcRequestForExperimentalLightClientProof>
11183 for JsonRpcRequestForExperimentalLightClientProof
11184{
11185 fn from(value: &JsonRpcRequestForExperimentalLightClientProof) -> Self {
11186 value.clone()
11187 }
11188}
11189#[doc = "`JsonRpcRequestForExperimentalLightClientProofMethod`"]
11190#[doc = r""]
11191#[doc = r" <details><summary>JSON schema</summary>"]
11192#[doc = r""]
11193#[doc = r" ```json"]
11194#[doc = "{"]
11195#[doc = " \"type\": \"string\","]
11196#[doc = " \"enum\": ["]
11197#[doc = " \"EXPERIMENTAL_light_client_proof\""]
11198#[doc = " ]"]
11199#[doc = "}"]
11200#[doc = r" ```"]
11201#[doc = r" </details>"]
11202#[derive(
11203 :: serde :: Deserialize,
11204 :: serde :: Serialize,
11205 Clone,
11206 Copy,
11207 Debug,
11208 Eq,
11209 Hash,
11210 Ord,
11211 PartialEq,
11212 PartialOrd,
11213)]
11214pub enum JsonRpcRequestForExperimentalLightClientProofMethod {
11215 #[serde(rename = "EXPERIMENTAL_light_client_proof")]
11216 ExperimentalLightClientProof,
11217}
11218impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalLightClientProofMethod {
11219 fn from(value: &JsonRpcRequestForExperimentalLightClientProofMethod) -> Self {
11220 value.clone()
11221 }
11222}
11223impl ::std::fmt::Display for JsonRpcRequestForExperimentalLightClientProofMethod {
11224 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11225 match *self {
11226 Self::ExperimentalLightClientProof => write!(f, "EXPERIMENTAL_light_client_proof"),
11227 }
11228 }
11229}
11230impl ::std::str::FromStr for JsonRpcRequestForExperimentalLightClientProofMethod {
11231 type Err = self::error::ConversionError;
11232 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11233 match value {
11234 "EXPERIMENTAL_light_client_proof" => Ok(Self::ExperimentalLightClientProof),
11235 _ => Err("invalid value".into()),
11236 }
11237 }
11238}
11239impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalLightClientProofMethod {
11240 type Error = self::error::ConversionError;
11241 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11242 value.parse()
11243 }
11244}
11245impl ::std::convert::TryFrom<&::std::string::String>
11246 for JsonRpcRequestForExperimentalLightClientProofMethod
11247{
11248 type Error = self::error::ConversionError;
11249 fn try_from(
11250 value: &::std::string::String,
11251 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11252 value.parse()
11253 }
11254}
11255impl ::std::convert::TryFrom<::std::string::String>
11256 for JsonRpcRequestForExperimentalLightClientProofMethod
11257{
11258 type Error = self::error::ConversionError;
11259 fn try_from(
11260 value: ::std::string::String,
11261 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11262 value.parse()
11263 }
11264}
11265#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindows`"]
11266#[doc = r""]
11267#[doc = r" <details><summary>JSON schema</summary>"]
11268#[doc = r""]
11269#[doc = r" ```json"]
11270#[doc = "{"]
11271#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_maintenance_windows\","]
11272#[doc = " \"type\": \"object\","]
11273#[doc = " \"required\": ["]
11274#[doc = " \"id\","]
11275#[doc = " \"jsonrpc\","]
11276#[doc = " \"method\","]
11277#[doc = " \"params\""]
11278#[doc = " ],"]
11279#[doc = " \"properties\": {"]
11280#[doc = " \"id\": {"]
11281#[doc = " \"type\": \"string\""]
11282#[doc = " },"]
11283#[doc = " \"jsonrpc\": {"]
11284#[doc = " \"type\": \"string\""]
11285#[doc = " },"]
11286#[doc = " \"method\": {"]
11287#[doc = " \"type\": \"string\","]
11288#[doc = " \"enum\": ["]
11289#[doc = " \"EXPERIMENTAL_maintenance_windows\""]
11290#[doc = " ]"]
11291#[doc = " },"]
11292#[doc = " \"params\": {"]
11293#[doc = " \"$ref\": \"#/components/schemas/RpcMaintenanceWindowsRequest\""]
11294#[doc = " }"]
11295#[doc = " }"]
11296#[doc = "}"]
11297#[doc = r" ```"]
11298#[doc = r" </details>"]
11299#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11300pub struct JsonRpcRequestForExperimentalMaintenanceWindows {
11301 pub id: ::std::string::String,
11302 pub jsonrpc: ::std::string::String,
11303 pub method: JsonRpcRequestForExperimentalMaintenanceWindowsMethod,
11304 pub params: RpcMaintenanceWindowsRequest,
11305}
11306impl ::std::convert::From<&JsonRpcRequestForExperimentalMaintenanceWindows>
11307 for JsonRpcRequestForExperimentalMaintenanceWindows
11308{
11309 fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindows) -> Self {
11310 value.clone()
11311 }
11312}
11313#[doc = "`JsonRpcRequestForExperimentalMaintenanceWindowsMethod`"]
11314#[doc = r""]
11315#[doc = r" <details><summary>JSON schema</summary>"]
11316#[doc = r""]
11317#[doc = r" ```json"]
11318#[doc = "{"]
11319#[doc = " \"type\": \"string\","]
11320#[doc = " \"enum\": ["]
11321#[doc = " \"EXPERIMENTAL_maintenance_windows\""]
11322#[doc = " ]"]
11323#[doc = "}"]
11324#[doc = r" ```"]
11325#[doc = r" </details>"]
11326#[derive(
11327 :: serde :: Deserialize,
11328 :: serde :: Serialize,
11329 Clone,
11330 Copy,
11331 Debug,
11332 Eq,
11333 Hash,
11334 Ord,
11335 PartialEq,
11336 PartialOrd,
11337)]
11338pub enum JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11339 #[serde(rename = "EXPERIMENTAL_maintenance_windows")]
11340 ExperimentalMaintenanceWindows,
11341}
11342impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11343 fn from(value: &JsonRpcRequestForExperimentalMaintenanceWindowsMethod) -> Self {
11344 value.clone()
11345 }
11346}
11347impl ::std::fmt::Display for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11348 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11349 match *self {
11350 Self::ExperimentalMaintenanceWindows => {
11351 write!(f, "EXPERIMENTAL_maintenance_windows")
11352 }
11353 }
11354 }
11355}
11356impl ::std::str::FromStr for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11357 type Err = self::error::ConversionError;
11358 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11359 match value {
11360 "EXPERIMENTAL_maintenance_windows" => Ok(Self::ExperimentalMaintenanceWindows),
11361 _ => Err("invalid value".into()),
11362 }
11363 }
11364}
11365impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalMaintenanceWindowsMethod {
11366 type Error = self::error::ConversionError;
11367 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11368 value.parse()
11369 }
11370}
11371impl ::std::convert::TryFrom<&::std::string::String>
11372 for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
11373{
11374 type Error = self::error::ConversionError;
11375 fn try_from(
11376 value: &::std::string::String,
11377 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11378 value.parse()
11379 }
11380}
11381impl ::std::convert::TryFrom<::std::string::String>
11382 for JsonRpcRequestForExperimentalMaintenanceWindowsMethod
11383{
11384 type Error = self::error::ConversionError;
11385 fn try_from(
11386 value: ::std::string::String,
11387 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11388 value.parse()
11389 }
11390}
11391#[doc = "`JsonRpcRequestForExperimentalProtocolConfig`"]
11392#[doc = r""]
11393#[doc = r" <details><summary>JSON schema</summary>"]
11394#[doc = r""]
11395#[doc = r" ```json"]
11396#[doc = "{"]
11397#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_protocol_config\","]
11398#[doc = " \"type\": \"object\","]
11399#[doc = " \"required\": ["]
11400#[doc = " \"id\","]
11401#[doc = " \"jsonrpc\","]
11402#[doc = " \"method\","]
11403#[doc = " \"params\""]
11404#[doc = " ],"]
11405#[doc = " \"properties\": {"]
11406#[doc = " \"id\": {"]
11407#[doc = " \"type\": \"string\""]
11408#[doc = " },"]
11409#[doc = " \"jsonrpc\": {"]
11410#[doc = " \"type\": \"string\""]
11411#[doc = " },"]
11412#[doc = " \"method\": {"]
11413#[doc = " \"type\": \"string\","]
11414#[doc = " \"enum\": ["]
11415#[doc = " \"EXPERIMENTAL_protocol_config\""]
11416#[doc = " ]"]
11417#[doc = " },"]
11418#[doc = " \"params\": {"]
11419#[doc = " \"$ref\": \"#/components/schemas/RpcProtocolConfigRequest\""]
11420#[doc = " }"]
11421#[doc = " }"]
11422#[doc = "}"]
11423#[doc = r" ```"]
11424#[doc = r" </details>"]
11425#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11426pub struct JsonRpcRequestForExperimentalProtocolConfig {
11427 pub id: ::std::string::String,
11428 pub jsonrpc: ::std::string::String,
11429 pub method: JsonRpcRequestForExperimentalProtocolConfigMethod,
11430 pub params: RpcProtocolConfigRequest,
11431}
11432impl ::std::convert::From<&JsonRpcRequestForExperimentalProtocolConfig>
11433 for JsonRpcRequestForExperimentalProtocolConfig
11434{
11435 fn from(value: &JsonRpcRequestForExperimentalProtocolConfig) -> Self {
11436 value.clone()
11437 }
11438}
11439#[doc = "`JsonRpcRequestForExperimentalProtocolConfigMethod`"]
11440#[doc = r""]
11441#[doc = r" <details><summary>JSON schema</summary>"]
11442#[doc = r""]
11443#[doc = r" ```json"]
11444#[doc = "{"]
11445#[doc = " \"type\": \"string\","]
11446#[doc = " \"enum\": ["]
11447#[doc = " \"EXPERIMENTAL_protocol_config\""]
11448#[doc = " ]"]
11449#[doc = "}"]
11450#[doc = r" ```"]
11451#[doc = r" </details>"]
11452#[derive(
11453 :: serde :: Deserialize,
11454 :: serde :: Serialize,
11455 Clone,
11456 Copy,
11457 Debug,
11458 Eq,
11459 Hash,
11460 Ord,
11461 PartialEq,
11462 PartialOrd,
11463)]
11464pub enum JsonRpcRequestForExperimentalProtocolConfigMethod {
11465 #[serde(rename = "EXPERIMENTAL_protocol_config")]
11466 ExperimentalProtocolConfig,
11467}
11468impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalProtocolConfigMethod {
11469 fn from(value: &JsonRpcRequestForExperimentalProtocolConfigMethod) -> Self {
11470 value.clone()
11471 }
11472}
11473impl ::std::fmt::Display for JsonRpcRequestForExperimentalProtocolConfigMethod {
11474 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11475 match *self {
11476 Self::ExperimentalProtocolConfig => write!(f, "EXPERIMENTAL_protocol_config"),
11477 }
11478 }
11479}
11480impl ::std::str::FromStr for JsonRpcRequestForExperimentalProtocolConfigMethod {
11481 type Err = self::error::ConversionError;
11482 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11483 match value {
11484 "EXPERIMENTAL_protocol_config" => Ok(Self::ExperimentalProtocolConfig),
11485 _ => Err("invalid value".into()),
11486 }
11487 }
11488}
11489impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalProtocolConfigMethod {
11490 type Error = self::error::ConversionError;
11491 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11492 value.parse()
11493 }
11494}
11495impl ::std::convert::TryFrom<&::std::string::String>
11496 for JsonRpcRequestForExperimentalProtocolConfigMethod
11497{
11498 type Error = self::error::ConversionError;
11499 fn try_from(
11500 value: &::std::string::String,
11501 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11502 value.parse()
11503 }
11504}
11505impl ::std::convert::TryFrom<::std::string::String>
11506 for JsonRpcRequestForExperimentalProtocolConfigMethod
11507{
11508 type Error = self::error::ConversionError;
11509 fn try_from(
11510 value: ::std::string::String,
11511 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11512 value.parse()
11513 }
11514}
11515#[doc = "`JsonRpcRequestForExperimentalReceipt`"]
11516#[doc = r""]
11517#[doc = r" <details><summary>JSON schema</summary>"]
11518#[doc = r""]
11519#[doc = r" ```json"]
11520#[doc = "{"]
11521#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_receipt\","]
11522#[doc = " \"type\": \"object\","]
11523#[doc = " \"required\": ["]
11524#[doc = " \"id\","]
11525#[doc = " \"jsonrpc\","]
11526#[doc = " \"method\","]
11527#[doc = " \"params\""]
11528#[doc = " ],"]
11529#[doc = " \"properties\": {"]
11530#[doc = " \"id\": {"]
11531#[doc = " \"type\": \"string\""]
11532#[doc = " },"]
11533#[doc = " \"jsonrpc\": {"]
11534#[doc = " \"type\": \"string\""]
11535#[doc = " },"]
11536#[doc = " \"method\": {"]
11537#[doc = " \"type\": \"string\","]
11538#[doc = " \"enum\": ["]
11539#[doc = " \"EXPERIMENTAL_receipt\""]
11540#[doc = " ]"]
11541#[doc = " },"]
11542#[doc = " \"params\": {"]
11543#[doc = " \"$ref\": \"#/components/schemas/RpcReceiptRequest\""]
11544#[doc = " }"]
11545#[doc = " }"]
11546#[doc = "}"]
11547#[doc = r" ```"]
11548#[doc = r" </details>"]
11549#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11550pub struct JsonRpcRequestForExperimentalReceipt {
11551 pub id: ::std::string::String,
11552 pub jsonrpc: ::std::string::String,
11553 pub method: JsonRpcRequestForExperimentalReceiptMethod,
11554 pub params: RpcReceiptRequest,
11555}
11556impl ::std::convert::From<&JsonRpcRequestForExperimentalReceipt>
11557 for JsonRpcRequestForExperimentalReceipt
11558{
11559 fn from(value: &JsonRpcRequestForExperimentalReceipt) -> Self {
11560 value.clone()
11561 }
11562}
11563#[doc = "`JsonRpcRequestForExperimentalReceiptMethod`"]
11564#[doc = r""]
11565#[doc = r" <details><summary>JSON schema</summary>"]
11566#[doc = r""]
11567#[doc = r" ```json"]
11568#[doc = "{"]
11569#[doc = " \"type\": \"string\","]
11570#[doc = " \"enum\": ["]
11571#[doc = " \"EXPERIMENTAL_receipt\""]
11572#[doc = " ]"]
11573#[doc = "}"]
11574#[doc = r" ```"]
11575#[doc = r" </details>"]
11576#[derive(
11577 :: serde :: Deserialize,
11578 :: serde :: Serialize,
11579 Clone,
11580 Copy,
11581 Debug,
11582 Eq,
11583 Hash,
11584 Ord,
11585 PartialEq,
11586 PartialOrd,
11587)]
11588pub enum JsonRpcRequestForExperimentalReceiptMethod {
11589 #[serde(rename = "EXPERIMENTAL_receipt")]
11590 ExperimentalReceipt,
11591}
11592impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalReceiptMethod {
11593 fn from(value: &JsonRpcRequestForExperimentalReceiptMethod) -> Self {
11594 value.clone()
11595 }
11596}
11597impl ::std::fmt::Display for JsonRpcRequestForExperimentalReceiptMethod {
11598 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11599 match *self {
11600 Self::ExperimentalReceipt => write!(f, "EXPERIMENTAL_receipt"),
11601 }
11602 }
11603}
11604impl ::std::str::FromStr for JsonRpcRequestForExperimentalReceiptMethod {
11605 type Err = self::error::ConversionError;
11606 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11607 match value {
11608 "EXPERIMENTAL_receipt" => Ok(Self::ExperimentalReceipt),
11609 _ => Err("invalid value".into()),
11610 }
11611 }
11612}
11613impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalReceiptMethod {
11614 type Error = self::error::ConversionError;
11615 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11616 value.parse()
11617 }
11618}
11619impl ::std::convert::TryFrom<&::std::string::String>
11620 for JsonRpcRequestForExperimentalReceiptMethod
11621{
11622 type Error = self::error::ConversionError;
11623 fn try_from(
11624 value: &::std::string::String,
11625 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11626 value.parse()
11627 }
11628}
11629impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForExperimentalReceiptMethod {
11630 type Error = self::error::ConversionError;
11631 fn try_from(
11632 value: ::std::string::String,
11633 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11634 value.parse()
11635 }
11636}
11637#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfo`"]
11638#[doc = r""]
11639#[doc = r" <details><summary>JSON schema</summary>"]
11640#[doc = r""]
11641#[doc = r" ```json"]
11642#[doc = "{"]
11643#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_split_storage_info\","]
11644#[doc = " \"type\": \"object\","]
11645#[doc = " \"required\": ["]
11646#[doc = " \"id\","]
11647#[doc = " \"jsonrpc\","]
11648#[doc = " \"method\","]
11649#[doc = " \"params\""]
11650#[doc = " ],"]
11651#[doc = " \"properties\": {"]
11652#[doc = " \"id\": {"]
11653#[doc = " \"type\": \"string\""]
11654#[doc = " },"]
11655#[doc = " \"jsonrpc\": {"]
11656#[doc = " \"type\": \"string\""]
11657#[doc = " },"]
11658#[doc = " \"method\": {"]
11659#[doc = " \"type\": \"string\","]
11660#[doc = " \"enum\": ["]
11661#[doc = " \"EXPERIMENTAL_split_storage_info\""]
11662#[doc = " ]"]
11663#[doc = " },"]
11664#[doc = " \"params\": {"]
11665#[doc = " \"$ref\": \"#/components/schemas/RpcSplitStorageInfoRequest\""]
11666#[doc = " }"]
11667#[doc = " }"]
11668#[doc = "}"]
11669#[doc = r" ```"]
11670#[doc = r" </details>"]
11671#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11672pub struct JsonRpcRequestForExperimentalSplitStorageInfo {
11673 pub id: ::std::string::String,
11674 pub jsonrpc: ::std::string::String,
11675 pub method: JsonRpcRequestForExperimentalSplitStorageInfoMethod,
11676 pub params: RpcSplitStorageInfoRequest,
11677}
11678impl ::std::convert::From<&JsonRpcRequestForExperimentalSplitStorageInfo>
11679 for JsonRpcRequestForExperimentalSplitStorageInfo
11680{
11681 fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfo) -> Self {
11682 value.clone()
11683 }
11684}
11685#[doc = "`JsonRpcRequestForExperimentalSplitStorageInfoMethod`"]
11686#[doc = r""]
11687#[doc = r" <details><summary>JSON schema</summary>"]
11688#[doc = r""]
11689#[doc = r" ```json"]
11690#[doc = "{"]
11691#[doc = " \"type\": \"string\","]
11692#[doc = " \"enum\": ["]
11693#[doc = " \"EXPERIMENTAL_split_storage_info\""]
11694#[doc = " ]"]
11695#[doc = "}"]
11696#[doc = r" ```"]
11697#[doc = r" </details>"]
11698#[derive(
11699 :: serde :: Deserialize,
11700 :: serde :: Serialize,
11701 Clone,
11702 Copy,
11703 Debug,
11704 Eq,
11705 Hash,
11706 Ord,
11707 PartialEq,
11708 PartialOrd,
11709)]
11710pub enum JsonRpcRequestForExperimentalSplitStorageInfoMethod {
11711 #[serde(rename = "EXPERIMENTAL_split_storage_info")]
11712 ExperimentalSplitStorageInfo,
11713}
11714impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
11715 fn from(value: &JsonRpcRequestForExperimentalSplitStorageInfoMethod) -> Self {
11716 value.clone()
11717 }
11718}
11719impl ::std::fmt::Display for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
11720 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11721 match *self {
11722 Self::ExperimentalSplitStorageInfo => write!(f, "EXPERIMENTAL_split_storage_info"),
11723 }
11724 }
11725}
11726impl ::std::str::FromStr for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
11727 type Err = self::error::ConversionError;
11728 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11729 match value {
11730 "EXPERIMENTAL_split_storage_info" => Ok(Self::ExperimentalSplitStorageInfo),
11731 _ => Err("invalid value".into()),
11732 }
11733 }
11734}
11735impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalSplitStorageInfoMethod {
11736 type Error = self::error::ConversionError;
11737 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11738 value.parse()
11739 }
11740}
11741impl ::std::convert::TryFrom<&::std::string::String>
11742 for JsonRpcRequestForExperimentalSplitStorageInfoMethod
11743{
11744 type Error = self::error::ConversionError;
11745 fn try_from(
11746 value: &::std::string::String,
11747 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11748 value.parse()
11749 }
11750}
11751impl ::std::convert::TryFrom<::std::string::String>
11752 for JsonRpcRequestForExperimentalSplitStorageInfoMethod
11753{
11754 type Error = self::error::ConversionError;
11755 fn try_from(
11756 value: ::std::string::String,
11757 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11758 value.parse()
11759 }
11760}
11761#[doc = "`JsonRpcRequestForExperimentalTxStatus`"]
11762#[doc = r""]
11763#[doc = r" <details><summary>JSON schema</summary>"]
11764#[doc = r""]
11765#[doc = r" ```json"]
11766#[doc = "{"]
11767#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_tx_status\","]
11768#[doc = " \"type\": \"object\","]
11769#[doc = " \"required\": ["]
11770#[doc = " \"id\","]
11771#[doc = " \"jsonrpc\","]
11772#[doc = " \"method\","]
11773#[doc = " \"params\""]
11774#[doc = " ],"]
11775#[doc = " \"properties\": {"]
11776#[doc = " \"id\": {"]
11777#[doc = " \"type\": \"string\""]
11778#[doc = " },"]
11779#[doc = " \"jsonrpc\": {"]
11780#[doc = " \"type\": \"string\""]
11781#[doc = " },"]
11782#[doc = " \"method\": {"]
11783#[doc = " \"type\": \"string\","]
11784#[doc = " \"enum\": ["]
11785#[doc = " \"EXPERIMENTAL_tx_status\""]
11786#[doc = " ]"]
11787#[doc = " },"]
11788#[doc = " \"params\": {"]
11789#[doc = " \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
11790#[doc = " }"]
11791#[doc = " }"]
11792#[doc = "}"]
11793#[doc = r" ```"]
11794#[doc = r" </details>"]
11795#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11796pub struct JsonRpcRequestForExperimentalTxStatus {
11797 pub id: ::std::string::String,
11798 pub jsonrpc: ::std::string::String,
11799 pub method: JsonRpcRequestForExperimentalTxStatusMethod,
11800 pub params: RpcTransactionStatusRequest,
11801}
11802impl ::std::convert::From<&JsonRpcRequestForExperimentalTxStatus>
11803 for JsonRpcRequestForExperimentalTxStatus
11804{
11805 fn from(value: &JsonRpcRequestForExperimentalTxStatus) -> Self {
11806 value.clone()
11807 }
11808}
11809#[doc = "`JsonRpcRequestForExperimentalTxStatusMethod`"]
11810#[doc = r""]
11811#[doc = r" <details><summary>JSON schema</summary>"]
11812#[doc = r""]
11813#[doc = r" ```json"]
11814#[doc = "{"]
11815#[doc = " \"type\": \"string\","]
11816#[doc = " \"enum\": ["]
11817#[doc = " \"EXPERIMENTAL_tx_status\""]
11818#[doc = " ]"]
11819#[doc = "}"]
11820#[doc = r" ```"]
11821#[doc = r" </details>"]
11822#[derive(
11823 :: serde :: Deserialize,
11824 :: serde :: Serialize,
11825 Clone,
11826 Copy,
11827 Debug,
11828 Eq,
11829 Hash,
11830 Ord,
11831 PartialEq,
11832 PartialOrd,
11833)]
11834pub enum JsonRpcRequestForExperimentalTxStatusMethod {
11835 #[serde(rename = "EXPERIMENTAL_tx_status")]
11836 ExperimentalTxStatus,
11837}
11838impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalTxStatusMethod {
11839 fn from(value: &JsonRpcRequestForExperimentalTxStatusMethod) -> Self {
11840 value.clone()
11841 }
11842}
11843impl ::std::fmt::Display for JsonRpcRequestForExperimentalTxStatusMethod {
11844 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11845 match *self {
11846 Self::ExperimentalTxStatus => write!(f, "EXPERIMENTAL_tx_status"),
11847 }
11848 }
11849}
11850impl ::std::str::FromStr for JsonRpcRequestForExperimentalTxStatusMethod {
11851 type Err = self::error::ConversionError;
11852 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11853 match value {
11854 "EXPERIMENTAL_tx_status" => Ok(Self::ExperimentalTxStatus),
11855 _ => Err("invalid value".into()),
11856 }
11857 }
11858}
11859impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalTxStatusMethod {
11860 type Error = self::error::ConversionError;
11861 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11862 value.parse()
11863 }
11864}
11865impl ::std::convert::TryFrom<&::std::string::String>
11866 for JsonRpcRequestForExperimentalTxStatusMethod
11867{
11868 type Error = self::error::ConversionError;
11869 fn try_from(
11870 value: &::std::string::String,
11871 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11872 value.parse()
11873 }
11874}
11875impl ::std::convert::TryFrom<::std::string::String>
11876 for JsonRpcRequestForExperimentalTxStatusMethod
11877{
11878 type Error = self::error::ConversionError;
11879 fn try_from(
11880 value: ::std::string::String,
11881 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11882 value.parse()
11883 }
11884}
11885#[doc = "`JsonRpcRequestForExperimentalValidatorsOrdered`"]
11886#[doc = r""]
11887#[doc = r" <details><summary>JSON schema</summary>"]
11888#[doc = r""]
11889#[doc = r" ```json"]
11890#[doc = "{"]
11891#[doc = " \"title\": \"JsonRpcRequest_for_EXPERIMENTAL_validators_ordered\","]
11892#[doc = " \"type\": \"object\","]
11893#[doc = " \"required\": ["]
11894#[doc = " \"id\","]
11895#[doc = " \"jsonrpc\","]
11896#[doc = " \"method\","]
11897#[doc = " \"params\""]
11898#[doc = " ],"]
11899#[doc = " \"properties\": {"]
11900#[doc = " \"id\": {"]
11901#[doc = " \"type\": \"string\""]
11902#[doc = " },"]
11903#[doc = " \"jsonrpc\": {"]
11904#[doc = " \"type\": \"string\""]
11905#[doc = " },"]
11906#[doc = " \"method\": {"]
11907#[doc = " \"type\": \"string\","]
11908#[doc = " \"enum\": ["]
11909#[doc = " \"EXPERIMENTAL_validators_ordered\""]
11910#[doc = " ]"]
11911#[doc = " },"]
11912#[doc = " \"params\": {"]
11913#[doc = " \"$ref\": \"#/components/schemas/RpcValidatorsOrderedRequest\""]
11914#[doc = " }"]
11915#[doc = " }"]
11916#[doc = "}"]
11917#[doc = r" ```"]
11918#[doc = r" </details>"]
11919#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11920pub struct JsonRpcRequestForExperimentalValidatorsOrdered {
11921 pub id: ::std::string::String,
11922 pub jsonrpc: ::std::string::String,
11923 pub method: JsonRpcRequestForExperimentalValidatorsOrderedMethod,
11924 pub params: RpcValidatorsOrderedRequest,
11925}
11926impl ::std::convert::From<&JsonRpcRequestForExperimentalValidatorsOrdered>
11927 for JsonRpcRequestForExperimentalValidatorsOrdered
11928{
11929 fn from(value: &JsonRpcRequestForExperimentalValidatorsOrdered) -> Self {
11930 value.clone()
11931 }
11932}
11933#[doc = "`JsonRpcRequestForExperimentalValidatorsOrderedMethod`"]
11934#[doc = r""]
11935#[doc = r" <details><summary>JSON schema</summary>"]
11936#[doc = r""]
11937#[doc = r" ```json"]
11938#[doc = "{"]
11939#[doc = " \"type\": \"string\","]
11940#[doc = " \"enum\": ["]
11941#[doc = " \"EXPERIMENTAL_validators_ordered\""]
11942#[doc = " ]"]
11943#[doc = "}"]
11944#[doc = r" ```"]
11945#[doc = r" </details>"]
11946#[derive(
11947 :: serde :: Deserialize,
11948 :: serde :: Serialize,
11949 Clone,
11950 Copy,
11951 Debug,
11952 Eq,
11953 Hash,
11954 Ord,
11955 PartialEq,
11956 PartialOrd,
11957)]
11958pub enum JsonRpcRequestForExperimentalValidatorsOrderedMethod {
11959 #[serde(rename = "EXPERIMENTAL_validators_ordered")]
11960 ExperimentalValidatorsOrdered,
11961}
11962impl ::std::convert::From<&Self> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
11963 fn from(value: &JsonRpcRequestForExperimentalValidatorsOrderedMethod) -> Self {
11964 value.clone()
11965 }
11966}
11967impl ::std::fmt::Display for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
11968 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11969 match *self {
11970 Self::ExperimentalValidatorsOrdered => write!(f, "EXPERIMENTAL_validators_ordered"),
11971 }
11972 }
11973}
11974impl ::std::str::FromStr for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
11975 type Err = self::error::ConversionError;
11976 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11977 match value {
11978 "EXPERIMENTAL_validators_ordered" => Ok(Self::ExperimentalValidatorsOrdered),
11979 _ => Err("invalid value".into()),
11980 }
11981 }
11982}
11983impl ::std::convert::TryFrom<&str> for JsonRpcRequestForExperimentalValidatorsOrderedMethod {
11984 type Error = self::error::ConversionError;
11985 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11986 value.parse()
11987 }
11988}
11989impl ::std::convert::TryFrom<&::std::string::String>
11990 for JsonRpcRequestForExperimentalValidatorsOrderedMethod
11991{
11992 type Error = self::error::ConversionError;
11993 fn try_from(
11994 value: &::std::string::String,
11995 ) -> ::std::result::Result<Self, self::error::ConversionError> {
11996 value.parse()
11997 }
11998}
11999impl ::std::convert::TryFrom<::std::string::String>
12000 for JsonRpcRequestForExperimentalValidatorsOrderedMethod
12001{
12002 type Error = self::error::ConversionError;
12003 fn try_from(
12004 value: ::std::string::String,
12005 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12006 value.parse()
12007 }
12008}
12009#[doc = "`JsonRpcRequestForGasPrice`"]
12010#[doc = r""]
12011#[doc = r" <details><summary>JSON schema</summary>"]
12012#[doc = r""]
12013#[doc = r" ```json"]
12014#[doc = "{"]
12015#[doc = " \"title\": \"JsonRpcRequest_for_gas_price\","]
12016#[doc = " \"type\": \"object\","]
12017#[doc = " \"required\": ["]
12018#[doc = " \"id\","]
12019#[doc = " \"jsonrpc\","]
12020#[doc = " \"method\","]
12021#[doc = " \"params\""]
12022#[doc = " ],"]
12023#[doc = " \"properties\": {"]
12024#[doc = " \"id\": {"]
12025#[doc = " \"type\": \"string\""]
12026#[doc = " },"]
12027#[doc = " \"jsonrpc\": {"]
12028#[doc = " \"type\": \"string\""]
12029#[doc = " },"]
12030#[doc = " \"method\": {"]
12031#[doc = " \"type\": \"string\","]
12032#[doc = " \"enum\": ["]
12033#[doc = " \"gas_price\""]
12034#[doc = " ]"]
12035#[doc = " },"]
12036#[doc = " \"params\": {"]
12037#[doc = " \"$ref\": \"#/components/schemas/RpcGasPriceRequest\""]
12038#[doc = " }"]
12039#[doc = " }"]
12040#[doc = "}"]
12041#[doc = r" ```"]
12042#[doc = r" </details>"]
12043#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12044pub struct JsonRpcRequestForGasPrice {
12045 pub id: ::std::string::String,
12046 pub jsonrpc: ::std::string::String,
12047 pub method: JsonRpcRequestForGasPriceMethod,
12048 pub params: RpcGasPriceRequest,
12049}
12050impl ::std::convert::From<&JsonRpcRequestForGasPrice> for JsonRpcRequestForGasPrice {
12051 fn from(value: &JsonRpcRequestForGasPrice) -> Self {
12052 value.clone()
12053 }
12054}
12055#[doc = "`JsonRpcRequestForGasPriceMethod`"]
12056#[doc = r""]
12057#[doc = r" <details><summary>JSON schema</summary>"]
12058#[doc = r""]
12059#[doc = r" ```json"]
12060#[doc = "{"]
12061#[doc = " \"type\": \"string\","]
12062#[doc = " \"enum\": ["]
12063#[doc = " \"gas_price\""]
12064#[doc = " ]"]
12065#[doc = "}"]
12066#[doc = r" ```"]
12067#[doc = r" </details>"]
12068#[derive(
12069 :: serde :: Deserialize,
12070 :: serde :: Serialize,
12071 Clone,
12072 Copy,
12073 Debug,
12074 Eq,
12075 Hash,
12076 Ord,
12077 PartialEq,
12078 PartialOrd,
12079)]
12080pub enum JsonRpcRequestForGasPriceMethod {
12081 #[serde(rename = "gas_price")]
12082 GasPrice,
12083}
12084impl ::std::convert::From<&Self> for JsonRpcRequestForGasPriceMethod {
12085 fn from(value: &JsonRpcRequestForGasPriceMethod) -> Self {
12086 value.clone()
12087 }
12088}
12089impl ::std::fmt::Display for JsonRpcRequestForGasPriceMethod {
12090 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12091 match *self {
12092 Self::GasPrice => write!(f, "gas_price"),
12093 }
12094 }
12095}
12096impl ::std::str::FromStr for JsonRpcRequestForGasPriceMethod {
12097 type Err = self::error::ConversionError;
12098 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12099 match value {
12100 "gas_price" => Ok(Self::GasPrice),
12101 _ => Err("invalid value".into()),
12102 }
12103 }
12104}
12105impl ::std::convert::TryFrom<&str> for JsonRpcRequestForGasPriceMethod {
12106 type Error = self::error::ConversionError;
12107 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12108 value.parse()
12109 }
12110}
12111impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForGasPriceMethod {
12112 type Error = self::error::ConversionError;
12113 fn try_from(
12114 value: &::std::string::String,
12115 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12116 value.parse()
12117 }
12118}
12119impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForGasPriceMethod {
12120 type Error = self::error::ConversionError;
12121 fn try_from(
12122 value: ::std::string::String,
12123 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12124 value.parse()
12125 }
12126}
12127#[doc = "`JsonRpcRequestForHealth`"]
12128#[doc = r""]
12129#[doc = r" <details><summary>JSON schema</summary>"]
12130#[doc = r""]
12131#[doc = r" ```json"]
12132#[doc = "{"]
12133#[doc = " \"title\": \"JsonRpcRequest_for_health\","]
12134#[doc = " \"type\": \"object\","]
12135#[doc = " \"required\": ["]
12136#[doc = " \"id\","]
12137#[doc = " \"jsonrpc\","]
12138#[doc = " \"method\","]
12139#[doc = " \"params\""]
12140#[doc = " ],"]
12141#[doc = " \"properties\": {"]
12142#[doc = " \"id\": {"]
12143#[doc = " \"type\": \"string\""]
12144#[doc = " },"]
12145#[doc = " \"jsonrpc\": {"]
12146#[doc = " \"type\": \"string\""]
12147#[doc = " },"]
12148#[doc = " \"method\": {"]
12149#[doc = " \"type\": \"string\","]
12150#[doc = " \"enum\": ["]
12151#[doc = " \"health\""]
12152#[doc = " ]"]
12153#[doc = " },"]
12154#[doc = " \"params\": {"]
12155#[doc = " \"$ref\": \"#/components/schemas/RpcHealthRequest\""]
12156#[doc = " }"]
12157#[doc = " }"]
12158#[doc = "}"]
12159#[doc = r" ```"]
12160#[doc = r" </details>"]
12161#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12162pub struct JsonRpcRequestForHealth {
12163 pub id: ::std::string::String,
12164 pub jsonrpc: ::std::string::String,
12165 pub method: JsonRpcRequestForHealthMethod,
12166 pub params: RpcHealthRequest,
12167}
12168impl ::std::convert::From<&JsonRpcRequestForHealth> for JsonRpcRequestForHealth {
12169 fn from(value: &JsonRpcRequestForHealth) -> Self {
12170 value.clone()
12171 }
12172}
12173#[doc = "`JsonRpcRequestForHealthMethod`"]
12174#[doc = r""]
12175#[doc = r" <details><summary>JSON schema</summary>"]
12176#[doc = r""]
12177#[doc = r" ```json"]
12178#[doc = "{"]
12179#[doc = " \"type\": \"string\","]
12180#[doc = " \"enum\": ["]
12181#[doc = " \"health\""]
12182#[doc = " ]"]
12183#[doc = "}"]
12184#[doc = r" ```"]
12185#[doc = r" </details>"]
12186#[derive(
12187 :: serde :: Deserialize,
12188 :: serde :: Serialize,
12189 Clone,
12190 Copy,
12191 Debug,
12192 Eq,
12193 Hash,
12194 Ord,
12195 PartialEq,
12196 PartialOrd,
12197)]
12198pub enum JsonRpcRequestForHealthMethod {
12199 #[serde(rename = "health")]
12200 Health,
12201}
12202impl ::std::convert::From<&Self> for JsonRpcRequestForHealthMethod {
12203 fn from(value: &JsonRpcRequestForHealthMethod) -> Self {
12204 value.clone()
12205 }
12206}
12207impl ::std::fmt::Display for JsonRpcRequestForHealthMethod {
12208 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12209 match *self {
12210 Self::Health => write!(f, "health"),
12211 }
12212 }
12213}
12214impl ::std::str::FromStr for JsonRpcRequestForHealthMethod {
12215 type Err = self::error::ConversionError;
12216 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12217 match value {
12218 "health" => Ok(Self::Health),
12219 _ => Err("invalid value".into()),
12220 }
12221 }
12222}
12223impl ::std::convert::TryFrom<&str> for JsonRpcRequestForHealthMethod {
12224 type Error = self::error::ConversionError;
12225 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12226 value.parse()
12227 }
12228}
12229impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForHealthMethod {
12230 type Error = self::error::ConversionError;
12231 fn try_from(
12232 value: &::std::string::String,
12233 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12234 value.parse()
12235 }
12236}
12237impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForHealthMethod {
12238 type Error = self::error::ConversionError;
12239 fn try_from(
12240 value: ::std::string::String,
12241 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12242 value.parse()
12243 }
12244}
12245#[doc = "`JsonRpcRequestForLightClientProof`"]
12246#[doc = r""]
12247#[doc = r" <details><summary>JSON schema</summary>"]
12248#[doc = r""]
12249#[doc = r" ```json"]
12250#[doc = "{"]
12251#[doc = " \"title\": \"JsonRpcRequest_for_light_client_proof\","]
12252#[doc = " \"type\": \"object\","]
12253#[doc = " \"required\": ["]
12254#[doc = " \"id\","]
12255#[doc = " \"jsonrpc\","]
12256#[doc = " \"method\","]
12257#[doc = " \"params\""]
12258#[doc = " ],"]
12259#[doc = " \"properties\": {"]
12260#[doc = " \"id\": {"]
12261#[doc = " \"type\": \"string\""]
12262#[doc = " },"]
12263#[doc = " \"jsonrpc\": {"]
12264#[doc = " \"type\": \"string\""]
12265#[doc = " },"]
12266#[doc = " \"method\": {"]
12267#[doc = " \"type\": \"string\","]
12268#[doc = " \"enum\": ["]
12269#[doc = " \"light_client_proof\""]
12270#[doc = " ]"]
12271#[doc = " },"]
12272#[doc = " \"params\": {"]
12273#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofRequest\""]
12274#[doc = " }"]
12275#[doc = " }"]
12276#[doc = "}"]
12277#[doc = r" ```"]
12278#[doc = r" </details>"]
12279#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12280pub struct JsonRpcRequestForLightClientProof {
12281 pub id: ::std::string::String,
12282 pub jsonrpc: ::std::string::String,
12283 pub method: JsonRpcRequestForLightClientProofMethod,
12284 pub params: RpcLightClientExecutionProofRequest,
12285}
12286impl ::std::convert::From<&JsonRpcRequestForLightClientProof>
12287 for JsonRpcRequestForLightClientProof
12288{
12289 fn from(value: &JsonRpcRequestForLightClientProof) -> Self {
12290 value.clone()
12291 }
12292}
12293#[doc = "`JsonRpcRequestForLightClientProofMethod`"]
12294#[doc = r""]
12295#[doc = r" <details><summary>JSON schema</summary>"]
12296#[doc = r""]
12297#[doc = r" ```json"]
12298#[doc = "{"]
12299#[doc = " \"type\": \"string\","]
12300#[doc = " \"enum\": ["]
12301#[doc = " \"light_client_proof\""]
12302#[doc = " ]"]
12303#[doc = "}"]
12304#[doc = r" ```"]
12305#[doc = r" </details>"]
12306#[derive(
12307 :: serde :: Deserialize,
12308 :: serde :: Serialize,
12309 Clone,
12310 Copy,
12311 Debug,
12312 Eq,
12313 Hash,
12314 Ord,
12315 PartialEq,
12316 PartialOrd,
12317)]
12318pub enum JsonRpcRequestForLightClientProofMethod {
12319 #[serde(rename = "light_client_proof")]
12320 LightClientProof,
12321}
12322impl ::std::convert::From<&Self> for JsonRpcRequestForLightClientProofMethod {
12323 fn from(value: &JsonRpcRequestForLightClientProofMethod) -> Self {
12324 value.clone()
12325 }
12326}
12327impl ::std::fmt::Display for JsonRpcRequestForLightClientProofMethod {
12328 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12329 match *self {
12330 Self::LightClientProof => write!(f, "light_client_proof"),
12331 }
12332 }
12333}
12334impl ::std::str::FromStr for JsonRpcRequestForLightClientProofMethod {
12335 type Err = self::error::ConversionError;
12336 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12337 match value {
12338 "light_client_proof" => Ok(Self::LightClientProof),
12339 _ => Err("invalid value".into()),
12340 }
12341 }
12342}
12343impl ::std::convert::TryFrom<&str> for JsonRpcRequestForLightClientProofMethod {
12344 type Error = self::error::ConversionError;
12345 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12346 value.parse()
12347 }
12348}
12349impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForLightClientProofMethod {
12350 type Error = self::error::ConversionError;
12351 fn try_from(
12352 value: &::std::string::String,
12353 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12354 value.parse()
12355 }
12356}
12357impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForLightClientProofMethod {
12358 type Error = self::error::ConversionError;
12359 fn try_from(
12360 value: ::std::string::String,
12361 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12362 value.parse()
12363 }
12364}
12365#[doc = "`JsonRpcRequestForNetworkInfo`"]
12366#[doc = r""]
12367#[doc = r" <details><summary>JSON schema</summary>"]
12368#[doc = r""]
12369#[doc = r" ```json"]
12370#[doc = "{"]
12371#[doc = " \"title\": \"JsonRpcRequest_for_network_info\","]
12372#[doc = " \"type\": \"object\","]
12373#[doc = " \"required\": ["]
12374#[doc = " \"id\","]
12375#[doc = " \"jsonrpc\","]
12376#[doc = " \"method\","]
12377#[doc = " \"params\""]
12378#[doc = " ],"]
12379#[doc = " \"properties\": {"]
12380#[doc = " \"id\": {"]
12381#[doc = " \"type\": \"string\""]
12382#[doc = " },"]
12383#[doc = " \"jsonrpc\": {"]
12384#[doc = " \"type\": \"string\""]
12385#[doc = " },"]
12386#[doc = " \"method\": {"]
12387#[doc = " \"type\": \"string\","]
12388#[doc = " \"enum\": ["]
12389#[doc = " \"network_info\""]
12390#[doc = " ]"]
12391#[doc = " },"]
12392#[doc = " \"params\": {"]
12393#[doc = " \"$ref\": \"#/components/schemas/RpcNetworkInfoRequest\""]
12394#[doc = " }"]
12395#[doc = " }"]
12396#[doc = "}"]
12397#[doc = r" ```"]
12398#[doc = r" </details>"]
12399#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12400pub struct JsonRpcRequestForNetworkInfo {
12401 pub id: ::std::string::String,
12402 pub jsonrpc: ::std::string::String,
12403 pub method: JsonRpcRequestForNetworkInfoMethod,
12404 pub params: RpcNetworkInfoRequest,
12405}
12406impl ::std::convert::From<&JsonRpcRequestForNetworkInfo> for JsonRpcRequestForNetworkInfo {
12407 fn from(value: &JsonRpcRequestForNetworkInfo) -> Self {
12408 value.clone()
12409 }
12410}
12411#[doc = "`JsonRpcRequestForNetworkInfoMethod`"]
12412#[doc = r""]
12413#[doc = r" <details><summary>JSON schema</summary>"]
12414#[doc = r""]
12415#[doc = r" ```json"]
12416#[doc = "{"]
12417#[doc = " \"type\": \"string\","]
12418#[doc = " \"enum\": ["]
12419#[doc = " \"network_info\""]
12420#[doc = " ]"]
12421#[doc = "}"]
12422#[doc = r" ```"]
12423#[doc = r" </details>"]
12424#[derive(
12425 :: serde :: Deserialize,
12426 :: serde :: Serialize,
12427 Clone,
12428 Copy,
12429 Debug,
12430 Eq,
12431 Hash,
12432 Ord,
12433 PartialEq,
12434 PartialOrd,
12435)]
12436pub enum JsonRpcRequestForNetworkInfoMethod {
12437 #[serde(rename = "network_info")]
12438 NetworkInfo,
12439}
12440impl ::std::convert::From<&Self> for JsonRpcRequestForNetworkInfoMethod {
12441 fn from(value: &JsonRpcRequestForNetworkInfoMethod) -> Self {
12442 value.clone()
12443 }
12444}
12445impl ::std::fmt::Display for JsonRpcRequestForNetworkInfoMethod {
12446 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12447 match *self {
12448 Self::NetworkInfo => write!(f, "network_info"),
12449 }
12450 }
12451}
12452impl ::std::str::FromStr for JsonRpcRequestForNetworkInfoMethod {
12453 type Err = self::error::ConversionError;
12454 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12455 match value {
12456 "network_info" => Ok(Self::NetworkInfo),
12457 _ => Err("invalid value".into()),
12458 }
12459 }
12460}
12461impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNetworkInfoMethod {
12462 type Error = self::error::ConversionError;
12463 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12464 value.parse()
12465 }
12466}
12467impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
12468 type Error = self::error::ConversionError;
12469 fn try_from(
12470 value: &::std::string::String,
12471 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12472 value.parse()
12473 }
12474}
12475impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForNetworkInfoMethod {
12476 type Error = self::error::ConversionError;
12477 fn try_from(
12478 value: ::std::string::String,
12479 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12480 value.parse()
12481 }
12482}
12483#[doc = "`JsonRpcRequestForNextLightClientBlock`"]
12484#[doc = r""]
12485#[doc = r" <details><summary>JSON schema</summary>"]
12486#[doc = r""]
12487#[doc = r" ```json"]
12488#[doc = "{"]
12489#[doc = " \"title\": \"JsonRpcRequest_for_next_light_client_block\","]
12490#[doc = " \"type\": \"object\","]
12491#[doc = " \"required\": ["]
12492#[doc = " \"id\","]
12493#[doc = " \"jsonrpc\","]
12494#[doc = " \"method\","]
12495#[doc = " \"params\""]
12496#[doc = " ],"]
12497#[doc = " \"properties\": {"]
12498#[doc = " \"id\": {"]
12499#[doc = " \"type\": \"string\""]
12500#[doc = " },"]
12501#[doc = " \"jsonrpc\": {"]
12502#[doc = " \"type\": \"string\""]
12503#[doc = " },"]
12504#[doc = " \"method\": {"]
12505#[doc = " \"type\": \"string\","]
12506#[doc = " \"enum\": ["]
12507#[doc = " \"next_light_client_block\""]
12508#[doc = " ]"]
12509#[doc = " },"]
12510#[doc = " \"params\": {"]
12511#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientNextBlockRequest\""]
12512#[doc = " }"]
12513#[doc = " }"]
12514#[doc = "}"]
12515#[doc = r" ```"]
12516#[doc = r" </details>"]
12517#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12518pub struct JsonRpcRequestForNextLightClientBlock {
12519 pub id: ::std::string::String,
12520 pub jsonrpc: ::std::string::String,
12521 pub method: JsonRpcRequestForNextLightClientBlockMethod,
12522 pub params: RpcLightClientNextBlockRequest,
12523}
12524impl ::std::convert::From<&JsonRpcRequestForNextLightClientBlock>
12525 for JsonRpcRequestForNextLightClientBlock
12526{
12527 fn from(value: &JsonRpcRequestForNextLightClientBlock) -> Self {
12528 value.clone()
12529 }
12530}
12531#[doc = "`JsonRpcRequestForNextLightClientBlockMethod`"]
12532#[doc = r""]
12533#[doc = r" <details><summary>JSON schema</summary>"]
12534#[doc = r""]
12535#[doc = r" ```json"]
12536#[doc = "{"]
12537#[doc = " \"type\": \"string\","]
12538#[doc = " \"enum\": ["]
12539#[doc = " \"next_light_client_block\""]
12540#[doc = " ]"]
12541#[doc = "}"]
12542#[doc = r" ```"]
12543#[doc = r" </details>"]
12544#[derive(
12545 :: serde :: Deserialize,
12546 :: serde :: Serialize,
12547 Clone,
12548 Copy,
12549 Debug,
12550 Eq,
12551 Hash,
12552 Ord,
12553 PartialEq,
12554 PartialOrd,
12555)]
12556pub enum JsonRpcRequestForNextLightClientBlockMethod {
12557 #[serde(rename = "next_light_client_block")]
12558 NextLightClientBlock,
12559}
12560impl ::std::convert::From<&Self> for JsonRpcRequestForNextLightClientBlockMethod {
12561 fn from(value: &JsonRpcRequestForNextLightClientBlockMethod) -> Self {
12562 value.clone()
12563 }
12564}
12565impl ::std::fmt::Display for JsonRpcRequestForNextLightClientBlockMethod {
12566 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12567 match *self {
12568 Self::NextLightClientBlock => write!(f, "next_light_client_block"),
12569 }
12570 }
12571}
12572impl ::std::str::FromStr for JsonRpcRequestForNextLightClientBlockMethod {
12573 type Err = self::error::ConversionError;
12574 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12575 match value {
12576 "next_light_client_block" => Ok(Self::NextLightClientBlock),
12577 _ => Err("invalid value".into()),
12578 }
12579 }
12580}
12581impl ::std::convert::TryFrom<&str> for JsonRpcRequestForNextLightClientBlockMethod {
12582 type Error = self::error::ConversionError;
12583 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12584 value.parse()
12585 }
12586}
12587impl ::std::convert::TryFrom<&::std::string::String>
12588 for JsonRpcRequestForNextLightClientBlockMethod
12589{
12590 type Error = self::error::ConversionError;
12591 fn try_from(
12592 value: &::std::string::String,
12593 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12594 value.parse()
12595 }
12596}
12597impl ::std::convert::TryFrom<::std::string::String>
12598 for JsonRpcRequestForNextLightClientBlockMethod
12599{
12600 type Error = self::error::ConversionError;
12601 fn try_from(
12602 value: ::std::string::String,
12603 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12604 value.parse()
12605 }
12606}
12607#[doc = "`JsonRpcRequestForQuery`"]
12608#[doc = r""]
12609#[doc = r" <details><summary>JSON schema</summary>"]
12610#[doc = r""]
12611#[doc = r" ```json"]
12612#[doc = "{"]
12613#[doc = " \"title\": \"JsonRpcRequest_for_query\","]
12614#[doc = " \"type\": \"object\","]
12615#[doc = " \"required\": ["]
12616#[doc = " \"id\","]
12617#[doc = " \"jsonrpc\","]
12618#[doc = " \"method\","]
12619#[doc = " \"params\""]
12620#[doc = " ],"]
12621#[doc = " \"properties\": {"]
12622#[doc = " \"id\": {"]
12623#[doc = " \"type\": \"string\""]
12624#[doc = " },"]
12625#[doc = " \"jsonrpc\": {"]
12626#[doc = " \"type\": \"string\""]
12627#[doc = " },"]
12628#[doc = " \"method\": {"]
12629#[doc = " \"type\": \"string\","]
12630#[doc = " \"enum\": ["]
12631#[doc = " \"query\""]
12632#[doc = " ]"]
12633#[doc = " },"]
12634#[doc = " \"params\": {"]
12635#[doc = " \"$ref\": \"#/components/schemas/RpcQueryRequest\""]
12636#[doc = " }"]
12637#[doc = " }"]
12638#[doc = "}"]
12639#[doc = r" ```"]
12640#[doc = r" </details>"]
12641#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12642pub struct JsonRpcRequestForQuery {
12643 pub id: ::std::string::String,
12644 pub jsonrpc: ::std::string::String,
12645 pub method: JsonRpcRequestForQueryMethod,
12646 pub params: RpcQueryRequest,
12647}
12648impl ::std::convert::From<&JsonRpcRequestForQuery> for JsonRpcRequestForQuery {
12649 fn from(value: &JsonRpcRequestForQuery) -> Self {
12650 value.clone()
12651 }
12652}
12653#[doc = "`JsonRpcRequestForQueryMethod`"]
12654#[doc = r""]
12655#[doc = r" <details><summary>JSON schema</summary>"]
12656#[doc = r""]
12657#[doc = r" ```json"]
12658#[doc = "{"]
12659#[doc = " \"type\": \"string\","]
12660#[doc = " \"enum\": ["]
12661#[doc = " \"query\""]
12662#[doc = " ]"]
12663#[doc = "}"]
12664#[doc = r" ```"]
12665#[doc = r" </details>"]
12666#[derive(
12667 :: serde :: Deserialize,
12668 :: serde :: Serialize,
12669 Clone,
12670 Copy,
12671 Debug,
12672 Eq,
12673 Hash,
12674 Ord,
12675 PartialEq,
12676 PartialOrd,
12677)]
12678pub enum JsonRpcRequestForQueryMethod {
12679 #[serde(rename = "query")]
12680 Query,
12681}
12682impl ::std::convert::From<&Self> for JsonRpcRequestForQueryMethod {
12683 fn from(value: &JsonRpcRequestForQueryMethod) -> Self {
12684 value.clone()
12685 }
12686}
12687impl ::std::fmt::Display for JsonRpcRequestForQueryMethod {
12688 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12689 match *self {
12690 Self::Query => write!(f, "query"),
12691 }
12692 }
12693}
12694impl ::std::str::FromStr for JsonRpcRequestForQueryMethod {
12695 type Err = self::error::ConversionError;
12696 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12697 match value {
12698 "query" => Ok(Self::Query),
12699 _ => Err("invalid value".into()),
12700 }
12701 }
12702}
12703impl ::std::convert::TryFrom<&str> for JsonRpcRequestForQueryMethod {
12704 type Error = self::error::ConversionError;
12705 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12706 value.parse()
12707 }
12708}
12709impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForQueryMethod {
12710 type Error = self::error::ConversionError;
12711 fn try_from(
12712 value: &::std::string::String,
12713 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12714 value.parse()
12715 }
12716}
12717impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForQueryMethod {
12718 type Error = self::error::ConversionError;
12719 fn try_from(
12720 value: ::std::string::String,
12721 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12722 value.parse()
12723 }
12724}
12725#[doc = "`JsonRpcRequestForSendTx`"]
12726#[doc = r""]
12727#[doc = r" <details><summary>JSON schema</summary>"]
12728#[doc = r""]
12729#[doc = r" ```json"]
12730#[doc = "{"]
12731#[doc = " \"title\": \"JsonRpcRequest_for_send_tx\","]
12732#[doc = " \"type\": \"object\","]
12733#[doc = " \"required\": ["]
12734#[doc = " \"id\","]
12735#[doc = " \"jsonrpc\","]
12736#[doc = " \"method\","]
12737#[doc = " \"params\""]
12738#[doc = " ],"]
12739#[doc = " \"properties\": {"]
12740#[doc = " \"id\": {"]
12741#[doc = " \"type\": \"string\""]
12742#[doc = " },"]
12743#[doc = " \"jsonrpc\": {"]
12744#[doc = " \"type\": \"string\""]
12745#[doc = " },"]
12746#[doc = " \"method\": {"]
12747#[doc = " \"type\": \"string\","]
12748#[doc = " \"enum\": ["]
12749#[doc = " \"send_tx\""]
12750#[doc = " ]"]
12751#[doc = " },"]
12752#[doc = " \"params\": {"]
12753#[doc = " \"$ref\": \"#/components/schemas/RpcSendTransactionRequest\""]
12754#[doc = " }"]
12755#[doc = " }"]
12756#[doc = "}"]
12757#[doc = r" ```"]
12758#[doc = r" </details>"]
12759#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12760pub struct JsonRpcRequestForSendTx {
12761 pub id: ::std::string::String,
12762 pub jsonrpc: ::std::string::String,
12763 pub method: JsonRpcRequestForSendTxMethod,
12764 pub params: RpcSendTransactionRequest,
12765}
12766impl ::std::convert::From<&JsonRpcRequestForSendTx> for JsonRpcRequestForSendTx {
12767 fn from(value: &JsonRpcRequestForSendTx) -> Self {
12768 value.clone()
12769 }
12770}
12771#[doc = "`JsonRpcRequestForSendTxMethod`"]
12772#[doc = r""]
12773#[doc = r" <details><summary>JSON schema</summary>"]
12774#[doc = r""]
12775#[doc = r" ```json"]
12776#[doc = "{"]
12777#[doc = " \"type\": \"string\","]
12778#[doc = " \"enum\": ["]
12779#[doc = " \"send_tx\""]
12780#[doc = " ]"]
12781#[doc = "}"]
12782#[doc = r" ```"]
12783#[doc = r" </details>"]
12784#[derive(
12785 :: serde :: Deserialize,
12786 :: serde :: Serialize,
12787 Clone,
12788 Copy,
12789 Debug,
12790 Eq,
12791 Hash,
12792 Ord,
12793 PartialEq,
12794 PartialOrd,
12795)]
12796pub enum JsonRpcRequestForSendTxMethod {
12797 #[serde(rename = "send_tx")]
12798 SendTx,
12799}
12800impl ::std::convert::From<&Self> for JsonRpcRequestForSendTxMethod {
12801 fn from(value: &JsonRpcRequestForSendTxMethod) -> Self {
12802 value.clone()
12803 }
12804}
12805impl ::std::fmt::Display for JsonRpcRequestForSendTxMethod {
12806 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12807 match *self {
12808 Self::SendTx => write!(f, "send_tx"),
12809 }
12810 }
12811}
12812impl ::std::str::FromStr for JsonRpcRequestForSendTxMethod {
12813 type Err = self::error::ConversionError;
12814 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12815 match value {
12816 "send_tx" => Ok(Self::SendTx),
12817 _ => Err("invalid value".into()),
12818 }
12819 }
12820}
12821impl ::std::convert::TryFrom<&str> for JsonRpcRequestForSendTxMethod {
12822 type Error = self::error::ConversionError;
12823 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12824 value.parse()
12825 }
12826}
12827impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForSendTxMethod {
12828 type Error = self::error::ConversionError;
12829 fn try_from(
12830 value: &::std::string::String,
12831 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12832 value.parse()
12833 }
12834}
12835impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForSendTxMethod {
12836 type Error = self::error::ConversionError;
12837 fn try_from(
12838 value: ::std::string::String,
12839 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12840 value.parse()
12841 }
12842}
12843#[doc = "`JsonRpcRequestForStatus`"]
12844#[doc = r""]
12845#[doc = r" <details><summary>JSON schema</summary>"]
12846#[doc = r""]
12847#[doc = r" ```json"]
12848#[doc = "{"]
12849#[doc = " \"title\": \"JsonRpcRequest_for_status\","]
12850#[doc = " \"type\": \"object\","]
12851#[doc = " \"required\": ["]
12852#[doc = " \"id\","]
12853#[doc = " \"jsonrpc\","]
12854#[doc = " \"method\","]
12855#[doc = " \"params\""]
12856#[doc = " ],"]
12857#[doc = " \"properties\": {"]
12858#[doc = " \"id\": {"]
12859#[doc = " \"type\": \"string\""]
12860#[doc = " },"]
12861#[doc = " \"jsonrpc\": {"]
12862#[doc = " \"type\": \"string\""]
12863#[doc = " },"]
12864#[doc = " \"method\": {"]
12865#[doc = " \"type\": \"string\","]
12866#[doc = " \"enum\": ["]
12867#[doc = " \"status\""]
12868#[doc = " ]"]
12869#[doc = " },"]
12870#[doc = " \"params\": {"]
12871#[doc = " \"$ref\": \"#/components/schemas/RpcStatusRequest\""]
12872#[doc = " }"]
12873#[doc = " }"]
12874#[doc = "}"]
12875#[doc = r" ```"]
12876#[doc = r" </details>"]
12877#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12878pub struct JsonRpcRequestForStatus {
12879 pub id: ::std::string::String,
12880 pub jsonrpc: ::std::string::String,
12881 pub method: JsonRpcRequestForStatusMethod,
12882 pub params: RpcStatusRequest,
12883}
12884impl ::std::convert::From<&JsonRpcRequestForStatus> for JsonRpcRequestForStatus {
12885 fn from(value: &JsonRpcRequestForStatus) -> Self {
12886 value.clone()
12887 }
12888}
12889#[doc = "`JsonRpcRequestForStatusMethod`"]
12890#[doc = r""]
12891#[doc = r" <details><summary>JSON schema</summary>"]
12892#[doc = r""]
12893#[doc = r" ```json"]
12894#[doc = "{"]
12895#[doc = " \"type\": \"string\","]
12896#[doc = " \"enum\": ["]
12897#[doc = " \"status\""]
12898#[doc = " ]"]
12899#[doc = "}"]
12900#[doc = r" ```"]
12901#[doc = r" </details>"]
12902#[derive(
12903 :: serde :: Deserialize,
12904 :: serde :: Serialize,
12905 Clone,
12906 Copy,
12907 Debug,
12908 Eq,
12909 Hash,
12910 Ord,
12911 PartialEq,
12912 PartialOrd,
12913)]
12914pub enum JsonRpcRequestForStatusMethod {
12915 #[serde(rename = "status")]
12916 Status,
12917}
12918impl ::std::convert::From<&Self> for JsonRpcRequestForStatusMethod {
12919 fn from(value: &JsonRpcRequestForStatusMethod) -> Self {
12920 value.clone()
12921 }
12922}
12923impl ::std::fmt::Display for JsonRpcRequestForStatusMethod {
12924 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12925 match *self {
12926 Self::Status => write!(f, "status"),
12927 }
12928 }
12929}
12930impl ::std::str::FromStr for JsonRpcRequestForStatusMethod {
12931 type Err = self::error::ConversionError;
12932 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12933 match value {
12934 "status" => Ok(Self::Status),
12935 _ => Err("invalid value".into()),
12936 }
12937 }
12938}
12939impl ::std::convert::TryFrom<&str> for JsonRpcRequestForStatusMethod {
12940 type Error = self::error::ConversionError;
12941 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12942 value.parse()
12943 }
12944}
12945impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForStatusMethod {
12946 type Error = self::error::ConversionError;
12947 fn try_from(
12948 value: &::std::string::String,
12949 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12950 value.parse()
12951 }
12952}
12953impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForStatusMethod {
12954 type Error = self::error::ConversionError;
12955 fn try_from(
12956 value: ::std::string::String,
12957 ) -> ::std::result::Result<Self, self::error::ConversionError> {
12958 value.parse()
12959 }
12960}
12961#[doc = "`JsonRpcRequestForTx`"]
12962#[doc = r""]
12963#[doc = r" <details><summary>JSON schema</summary>"]
12964#[doc = r""]
12965#[doc = r" ```json"]
12966#[doc = "{"]
12967#[doc = " \"title\": \"JsonRpcRequest_for_tx\","]
12968#[doc = " \"type\": \"object\","]
12969#[doc = " \"required\": ["]
12970#[doc = " \"id\","]
12971#[doc = " \"jsonrpc\","]
12972#[doc = " \"method\","]
12973#[doc = " \"params\""]
12974#[doc = " ],"]
12975#[doc = " \"properties\": {"]
12976#[doc = " \"id\": {"]
12977#[doc = " \"type\": \"string\""]
12978#[doc = " },"]
12979#[doc = " \"jsonrpc\": {"]
12980#[doc = " \"type\": \"string\""]
12981#[doc = " },"]
12982#[doc = " \"method\": {"]
12983#[doc = " \"type\": \"string\","]
12984#[doc = " \"enum\": ["]
12985#[doc = " \"tx\""]
12986#[doc = " ]"]
12987#[doc = " },"]
12988#[doc = " \"params\": {"]
12989#[doc = " \"$ref\": \"#/components/schemas/RpcTransactionStatusRequest\""]
12990#[doc = " }"]
12991#[doc = " }"]
12992#[doc = "}"]
12993#[doc = r" ```"]
12994#[doc = r" </details>"]
12995#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12996pub struct JsonRpcRequestForTx {
12997 pub id: ::std::string::String,
12998 pub jsonrpc: ::std::string::String,
12999 pub method: JsonRpcRequestForTxMethod,
13000 pub params: RpcTransactionStatusRequest,
13001}
13002impl ::std::convert::From<&JsonRpcRequestForTx> for JsonRpcRequestForTx {
13003 fn from(value: &JsonRpcRequestForTx) -> Self {
13004 value.clone()
13005 }
13006}
13007#[doc = "`JsonRpcRequestForTxMethod`"]
13008#[doc = r""]
13009#[doc = r" <details><summary>JSON schema</summary>"]
13010#[doc = r""]
13011#[doc = r" ```json"]
13012#[doc = "{"]
13013#[doc = " \"type\": \"string\","]
13014#[doc = " \"enum\": ["]
13015#[doc = " \"tx\""]
13016#[doc = " ]"]
13017#[doc = "}"]
13018#[doc = r" ```"]
13019#[doc = r" </details>"]
13020#[derive(
13021 :: serde :: Deserialize,
13022 :: serde :: Serialize,
13023 Clone,
13024 Copy,
13025 Debug,
13026 Eq,
13027 Hash,
13028 Ord,
13029 PartialEq,
13030 PartialOrd,
13031)]
13032pub enum JsonRpcRequestForTxMethod {
13033 #[serde(rename = "tx")]
13034 Tx,
13035}
13036impl ::std::convert::From<&Self> for JsonRpcRequestForTxMethod {
13037 fn from(value: &JsonRpcRequestForTxMethod) -> Self {
13038 value.clone()
13039 }
13040}
13041impl ::std::fmt::Display for JsonRpcRequestForTxMethod {
13042 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13043 match *self {
13044 Self::Tx => write!(f, "tx"),
13045 }
13046 }
13047}
13048impl ::std::str::FromStr for JsonRpcRequestForTxMethod {
13049 type Err = self::error::ConversionError;
13050 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13051 match value {
13052 "tx" => Ok(Self::Tx),
13053 _ => Err("invalid value".into()),
13054 }
13055 }
13056}
13057impl ::std::convert::TryFrom<&str> for JsonRpcRequestForTxMethod {
13058 type Error = self::error::ConversionError;
13059 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13060 value.parse()
13061 }
13062}
13063impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForTxMethod {
13064 type Error = self::error::ConversionError;
13065 fn try_from(
13066 value: &::std::string::String,
13067 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13068 value.parse()
13069 }
13070}
13071impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForTxMethod {
13072 type Error = self::error::ConversionError;
13073 fn try_from(
13074 value: ::std::string::String,
13075 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13076 value.parse()
13077 }
13078}
13079#[doc = "`JsonRpcRequestForValidators`"]
13080#[doc = r""]
13081#[doc = r" <details><summary>JSON schema</summary>"]
13082#[doc = r""]
13083#[doc = r" ```json"]
13084#[doc = "{"]
13085#[doc = " \"title\": \"JsonRpcRequest_for_validators\","]
13086#[doc = " \"type\": \"object\","]
13087#[doc = " \"required\": ["]
13088#[doc = " \"id\","]
13089#[doc = " \"jsonrpc\","]
13090#[doc = " \"method\","]
13091#[doc = " \"params\""]
13092#[doc = " ],"]
13093#[doc = " \"properties\": {"]
13094#[doc = " \"id\": {"]
13095#[doc = " \"type\": \"string\""]
13096#[doc = " },"]
13097#[doc = " \"jsonrpc\": {"]
13098#[doc = " \"type\": \"string\""]
13099#[doc = " },"]
13100#[doc = " \"method\": {"]
13101#[doc = " \"type\": \"string\","]
13102#[doc = " \"enum\": ["]
13103#[doc = " \"validators\""]
13104#[doc = " ]"]
13105#[doc = " },"]
13106#[doc = " \"params\": {"]
13107#[doc = " \"$ref\": \"#/components/schemas/RpcValidatorRequest\""]
13108#[doc = " }"]
13109#[doc = " }"]
13110#[doc = "}"]
13111#[doc = r" ```"]
13112#[doc = r" </details>"]
13113#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13114pub struct JsonRpcRequestForValidators {
13115 pub id: ::std::string::String,
13116 pub jsonrpc: ::std::string::String,
13117 pub method: JsonRpcRequestForValidatorsMethod,
13118 pub params: RpcValidatorRequest,
13119}
13120impl ::std::convert::From<&JsonRpcRequestForValidators> for JsonRpcRequestForValidators {
13121 fn from(value: &JsonRpcRequestForValidators) -> Self {
13122 value.clone()
13123 }
13124}
13125#[doc = "`JsonRpcRequestForValidatorsMethod`"]
13126#[doc = r""]
13127#[doc = r" <details><summary>JSON schema</summary>"]
13128#[doc = r""]
13129#[doc = r" ```json"]
13130#[doc = "{"]
13131#[doc = " \"type\": \"string\","]
13132#[doc = " \"enum\": ["]
13133#[doc = " \"validators\""]
13134#[doc = " ]"]
13135#[doc = "}"]
13136#[doc = r" ```"]
13137#[doc = r" </details>"]
13138#[derive(
13139 :: serde :: Deserialize,
13140 :: serde :: Serialize,
13141 Clone,
13142 Copy,
13143 Debug,
13144 Eq,
13145 Hash,
13146 Ord,
13147 PartialEq,
13148 PartialOrd,
13149)]
13150pub enum JsonRpcRequestForValidatorsMethod {
13151 #[serde(rename = "validators")]
13152 Validators,
13153}
13154impl ::std::convert::From<&Self> for JsonRpcRequestForValidatorsMethod {
13155 fn from(value: &JsonRpcRequestForValidatorsMethod) -> Self {
13156 value.clone()
13157 }
13158}
13159impl ::std::fmt::Display for JsonRpcRequestForValidatorsMethod {
13160 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13161 match *self {
13162 Self::Validators => write!(f, "validators"),
13163 }
13164 }
13165}
13166impl ::std::str::FromStr for JsonRpcRequestForValidatorsMethod {
13167 type Err = self::error::ConversionError;
13168 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13169 match value {
13170 "validators" => Ok(Self::Validators),
13171 _ => Err("invalid value".into()),
13172 }
13173 }
13174}
13175impl ::std::convert::TryFrom<&str> for JsonRpcRequestForValidatorsMethod {
13176 type Error = self::error::ConversionError;
13177 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13178 value.parse()
13179 }
13180}
13181impl ::std::convert::TryFrom<&::std::string::String> for JsonRpcRequestForValidatorsMethod {
13182 type Error = self::error::ConversionError;
13183 fn try_from(
13184 value: &::std::string::String,
13185 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13186 value.parse()
13187 }
13188}
13189impl ::std::convert::TryFrom<::std::string::String> for JsonRpcRequestForValidatorsMethod {
13190 type Error = self::error::ConversionError;
13191 fn try_from(
13192 value: ::std::string::String,
13193 ) -> ::std::result::Result<Self, self::error::ConversionError> {
13194 value.parse()
13195 }
13196}
13197#[doc = "`JsonRpcResponseForArrayOfRangeOfUint64AndRpcError`"]
13198#[doc = r""]
13199#[doc = r" <details><summary>JSON schema</summary>"]
13200#[doc = r""]
13201#[doc = r" ```json"]
13202#[doc = "{"]
13203#[doc = " \"title\": \"JsonRpcResponse_for_Array_of_Range_of_uint64_and_RpcError\","]
13204#[doc = " \"type\": \"object\","]
13205#[doc = " \"oneOf\": ["]
13206#[doc = " {"]
13207#[doc = " \"type\": \"object\","]
13208#[doc = " \"required\": ["]
13209#[doc = " \"result\""]
13210#[doc = " ],"]
13211#[doc = " \"properties\": {"]
13212#[doc = " \"result\": {"]
13213#[doc = " \"type\": \"array\","]
13214#[doc = " \"items\": {"]
13215#[doc = " \"$ref\": \"#/components/schemas/Range_of_uint64\""]
13216#[doc = " }"]
13217#[doc = " }"]
13218#[doc = " }"]
13219#[doc = " },"]
13220#[doc = " {"]
13221#[doc = " \"type\": \"object\","]
13222#[doc = " \"required\": ["]
13223#[doc = " \"error\""]
13224#[doc = " ],"]
13225#[doc = " \"properties\": {"]
13226#[doc = " \"error\": {"]
13227#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13228#[doc = " }"]
13229#[doc = " }"]
13230#[doc = " }"]
13231#[doc = " ],"]
13232#[doc = " \"required\": ["]
13233#[doc = " \"id\","]
13234#[doc = " \"jsonrpc\""]
13235#[doc = " ],"]
13236#[doc = " \"properties\": {"]
13237#[doc = " \"id\": {"]
13238#[doc = " \"type\": \"string\""]
13239#[doc = " },"]
13240#[doc = " \"jsonrpc\": {"]
13241#[doc = " \"type\": \"string\""]
13242#[doc = " }"]
13243#[doc = " }"]
13244#[doc = "}"]
13245#[doc = r" ```"]
13246#[doc = r" </details>"]
13247#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13248#[serde(untagged)]
13249pub enum JsonRpcResponseForArrayOfRangeOfUint64AndRpcError {
13250 Variant0 {
13251 id: ::std::string::String,
13252 jsonrpc: ::std::string::String,
13253 result: ::std::vec::Vec<RangeOfUint64>,
13254 },
13255 Variant1 {
13256 error: RpcError,
13257 id: ::std::string::String,
13258 jsonrpc: ::std::string::String,
13259 },
13260}
13261impl ::std::convert::From<&Self> for JsonRpcResponseForArrayOfRangeOfUint64AndRpcError {
13262 fn from(value: &JsonRpcResponseForArrayOfRangeOfUint64AndRpcError) -> Self {
13263 value.clone()
13264 }
13265}
13266#[doc = "`JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError`"]
13267#[doc = r""]
13268#[doc = r" <details><summary>JSON schema</summary>"]
13269#[doc = r""]
13270#[doc = r" ```json"]
13271#[doc = "{"]
13272#[doc = " \"title\": \"JsonRpcResponse_for_Array_of_ValidatorStakeView_and_RpcError\","]
13273#[doc = " \"type\": \"object\","]
13274#[doc = " \"oneOf\": ["]
13275#[doc = " {"]
13276#[doc = " \"type\": \"object\","]
13277#[doc = " \"required\": ["]
13278#[doc = " \"result\""]
13279#[doc = " ],"]
13280#[doc = " \"properties\": {"]
13281#[doc = " \"result\": {"]
13282#[doc = " \"type\": \"array\","]
13283#[doc = " \"items\": {"]
13284#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
13285#[doc = " }"]
13286#[doc = " }"]
13287#[doc = " }"]
13288#[doc = " },"]
13289#[doc = " {"]
13290#[doc = " \"type\": \"object\","]
13291#[doc = " \"required\": ["]
13292#[doc = " \"error\""]
13293#[doc = " ],"]
13294#[doc = " \"properties\": {"]
13295#[doc = " \"error\": {"]
13296#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13297#[doc = " }"]
13298#[doc = " }"]
13299#[doc = " }"]
13300#[doc = " ],"]
13301#[doc = " \"required\": ["]
13302#[doc = " \"id\","]
13303#[doc = " \"jsonrpc\""]
13304#[doc = " ],"]
13305#[doc = " \"properties\": {"]
13306#[doc = " \"id\": {"]
13307#[doc = " \"type\": \"string\""]
13308#[doc = " },"]
13309#[doc = " \"jsonrpc\": {"]
13310#[doc = " \"type\": \"string\""]
13311#[doc = " }"]
13312#[doc = " }"]
13313#[doc = "}"]
13314#[doc = r" ```"]
13315#[doc = r" </details>"]
13316#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13317#[serde(untagged)]
13318pub enum JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError {
13319 Variant0 {
13320 id: ::std::string::String,
13321 jsonrpc: ::std::string::String,
13322 result: ::std::vec::Vec<ValidatorStakeView>,
13323 },
13324 Variant1 {
13325 error: RpcError,
13326 id: ::std::string::String,
13327 jsonrpc: ::std::string::String,
13328 },
13329}
13330impl ::std::convert::From<&Self> for JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError {
13331 fn from(value: &JsonRpcResponseForArrayOfValidatorStakeViewAndRpcError) -> Self {
13332 value.clone()
13333 }
13334}
13335#[doc = "`JsonRpcResponseForCryptoHashAndRpcError`"]
13336#[doc = r""]
13337#[doc = r" <details><summary>JSON schema</summary>"]
13338#[doc = r""]
13339#[doc = r" ```json"]
13340#[doc = "{"]
13341#[doc = " \"title\": \"JsonRpcResponse_for_CryptoHash_and_RpcError\","]
13342#[doc = " \"type\": \"object\","]
13343#[doc = " \"oneOf\": ["]
13344#[doc = " {"]
13345#[doc = " \"type\": \"object\","]
13346#[doc = " \"required\": ["]
13347#[doc = " \"result\""]
13348#[doc = " ],"]
13349#[doc = " \"properties\": {"]
13350#[doc = " \"result\": {"]
13351#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
13352#[doc = " }"]
13353#[doc = " }"]
13354#[doc = " },"]
13355#[doc = " {"]
13356#[doc = " \"type\": \"object\","]
13357#[doc = " \"required\": ["]
13358#[doc = " \"error\""]
13359#[doc = " ],"]
13360#[doc = " \"properties\": {"]
13361#[doc = " \"error\": {"]
13362#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13363#[doc = " }"]
13364#[doc = " }"]
13365#[doc = " }"]
13366#[doc = " ],"]
13367#[doc = " \"required\": ["]
13368#[doc = " \"id\","]
13369#[doc = " \"jsonrpc\""]
13370#[doc = " ],"]
13371#[doc = " \"properties\": {"]
13372#[doc = " \"id\": {"]
13373#[doc = " \"type\": \"string\""]
13374#[doc = " },"]
13375#[doc = " \"jsonrpc\": {"]
13376#[doc = " \"type\": \"string\""]
13377#[doc = " }"]
13378#[doc = " }"]
13379#[doc = "}"]
13380#[doc = r" ```"]
13381#[doc = r" </details>"]
13382#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13383#[serde(untagged)]
13384pub enum JsonRpcResponseForCryptoHashAndRpcError {
13385 Variant0 {
13386 id: ::std::string::String,
13387 jsonrpc: ::std::string::String,
13388 result: CryptoHash,
13389 },
13390 Variant1 {
13391 error: RpcError,
13392 id: ::std::string::String,
13393 jsonrpc: ::std::string::String,
13394 },
13395}
13396impl ::std::convert::From<&Self> for JsonRpcResponseForCryptoHashAndRpcError {
13397 fn from(value: &JsonRpcResponseForCryptoHashAndRpcError) -> Self {
13398 value.clone()
13399 }
13400}
13401#[doc = "`JsonRpcResponseForGenesisConfigAndRpcError`"]
13402#[doc = r""]
13403#[doc = r" <details><summary>JSON schema</summary>"]
13404#[doc = r""]
13405#[doc = r" ```json"]
13406#[doc = "{"]
13407#[doc = " \"title\": \"JsonRpcResponse_for_GenesisConfig_and_RpcError\","]
13408#[doc = " \"type\": \"object\","]
13409#[doc = " \"oneOf\": ["]
13410#[doc = " {"]
13411#[doc = " \"type\": \"object\","]
13412#[doc = " \"required\": ["]
13413#[doc = " \"result\""]
13414#[doc = " ],"]
13415#[doc = " \"properties\": {"]
13416#[doc = " \"result\": {"]
13417#[doc = " \"$ref\": \"#/components/schemas/GenesisConfig\""]
13418#[doc = " }"]
13419#[doc = " }"]
13420#[doc = " },"]
13421#[doc = " {"]
13422#[doc = " \"type\": \"object\","]
13423#[doc = " \"required\": ["]
13424#[doc = " \"error\""]
13425#[doc = " ],"]
13426#[doc = " \"properties\": {"]
13427#[doc = " \"error\": {"]
13428#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13429#[doc = " }"]
13430#[doc = " }"]
13431#[doc = " }"]
13432#[doc = " ],"]
13433#[doc = " \"required\": ["]
13434#[doc = " \"id\","]
13435#[doc = " \"jsonrpc\""]
13436#[doc = " ],"]
13437#[doc = " \"properties\": {"]
13438#[doc = " \"id\": {"]
13439#[doc = " \"type\": \"string\""]
13440#[doc = " },"]
13441#[doc = " \"jsonrpc\": {"]
13442#[doc = " \"type\": \"string\""]
13443#[doc = " }"]
13444#[doc = " }"]
13445#[doc = "}"]
13446#[doc = r" ```"]
13447#[doc = r" </details>"]
13448#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13449#[serde(untagged)]
13450pub enum JsonRpcResponseForGenesisConfigAndRpcError {
13451 Variant0 {
13452 id: ::std::string::String,
13453 jsonrpc: ::std::string::String,
13454 result: GenesisConfig,
13455 },
13456 Variant1 {
13457 error: RpcError,
13458 id: ::std::string::String,
13459 jsonrpc: ::std::string::String,
13460 },
13461}
13462impl ::std::convert::From<&Self> for JsonRpcResponseForGenesisConfigAndRpcError {
13463 fn from(value: &JsonRpcResponseForGenesisConfigAndRpcError) -> Self {
13464 value.clone()
13465 }
13466}
13467#[doc = "`JsonRpcResponseForNullableRpcHealthResponseAndRpcError`"]
13468#[doc = r""]
13469#[doc = r" <details><summary>JSON schema</summary>"]
13470#[doc = r""]
13471#[doc = r" ```json"]
13472#[doc = "{"]
13473#[doc = " \"title\": \"JsonRpcResponse_for_Nullable_RpcHealthResponse_and_RpcError\","]
13474#[doc = " \"type\": \"object\","]
13475#[doc = " \"oneOf\": ["]
13476#[doc = " {"]
13477#[doc = " \"type\": \"object\","]
13478#[doc = " \"required\": ["]
13479#[doc = " \"result\""]
13480#[doc = " ],"]
13481#[doc = " \"properties\": {"]
13482#[doc = " \"result\": {"]
13483#[doc = " \"anyOf\": ["]
13484#[doc = " {"]
13485#[doc = " \"$ref\": \"#/components/schemas/RpcHealthResponse\""]
13486#[doc = " },"]
13487#[doc = " {"]
13488#[doc = " \"type\": \"null\""]
13489#[doc = " }"]
13490#[doc = " ]"]
13491#[doc = " }"]
13492#[doc = " }"]
13493#[doc = " },"]
13494#[doc = " {"]
13495#[doc = " \"type\": \"object\","]
13496#[doc = " \"required\": ["]
13497#[doc = " \"error\""]
13498#[doc = " ],"]
13499#[doc = " \"properties\": {"]
13500#[doc = " \"error\": {"]
13501#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13502#[doc = " }"]
13503#[doc = " }"]
13504#[doc = " }"]
13505#[doc = " ],"]
13506#[doc = " \"required\": ["]
13507#[doc = " \"id\","]
13508#[doc = " \"jsonrpc\""]
13509#[doc = " ],"]
13510#[doc = " \"properties\": {"]
13511#[doc = " \"id\": {"]
13512#[doc = " \"type\": \"string\""]
13513#[doc = " },"]
13514#[doc = " \"jsonrpc\": {"]
13515#[doc = " \"type\": \"string\""]
13516#[doc = " }"]
13517#[doc = " }"]
13518#[doc = "}"]
13519#[doc = r" ```"]
13520#[doc = r" </details>"]
13521#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13522#[serde(untagged)]
13523pub enum JsonRpcResponseForNullableRpcHealthResponseAndRpcError {
13524 Variant0 {
13525 id: ::std::string::String,
13526 jsonrpc: ::std::string::String,
13527 result: ::std::option::Option<RpcHealthResponse>,
13528 },
13529 Variant1 {
13530 error: RpcError,
13531 id: ::std::string::String,
13532 jsonrpc: ::std::string::String,
13533 },
13534}
13535impl ::std::convert::From<&Self> for JsonRpcResponseForNullableRpcHealthResponseAndRpcError {
13536 fn from(value: &JsonRpcResponseForNullableRpcHealthResponseAndRpcError) -> Self {
13537 value.clone()
13538 }
13539}
13540#[doc = "`JsonRpcResponseForRpcBlockResponseAndRpcError`"]
13541#[doc = r""]
13542#[doc = r" <details><summary>JSON schema</summary>"]
13543#[doc = r""]
13544#[doc = r" ```json"]
13545#[doc = "{"]
13546#[doc = " \"title\": \"JsonRpcResponse_for_RpcBlockResponse_and_RpcError\","]
13547#[doc = " \"type\": \"object\","]
13548#[doc = " \"oneOf\": ["]
13549#[doc = " {"]
13550#[doc = " \"type\": \"object\","]
13551#[doc = " \"required\": ["]
13552#[doc = " \"result\""]
13553#[doc = " ],"]
13554#[doc = " \"properties\": {"]
13555#[doc = " \"result\": {"]
13556#[doc = " \"$ref\": \"#/components/schemas/RpcBlockResponse\""]
13557#[doc = " }"]
13558#[doc = " }"]
13559#[doc = " },"]
13560#[doc = " {"]
13561#[doc = " \"type\": \"object\","]
13562#[doc = " \"required\": ["]
13563#[doc = " \"error\""]
13564#[doc = " ],"]
13565#[doc = " \"properties\": {"]
13566#[doc = " \"error\": {"]
13567#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13568#[doc = " }"]
13569#[doc = " }"]
13570#[doc = " }"]
13571#[doc = " ],"]
13572#[doc = " \"required\": ["]
13573#[doc = " \"id\","]
13574#[doc = " \"jsonrpc\""]
13575#[doc = " ],"]
13576#[doc = " \"properties\": {"]
13577#[doc = " \"id\": {"]
13578#[doc = " \"type\": \"string\""]
13579#[doc = " },"]
13580#[doc = " \"jsonrpc\": {"]
13581#[doc = " \"type\": \"string\""]
13582#[doc = " }"]
13583#[doc = " }"]
13584#[doc = "}"]
13585#[doc = r" ```"]
13586#[doc = r" </details>"]
13587#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13588#[serde(untagged)]
13589pub enum JsonRpcResponseForRpcBlockResponseAndRpcError {
13590 Variant0 {
13591 id: ::std::string::String,
13592 jsonrpc: ::std::string::String,
13593 result: RpcBlockResponse,
13594 },
13595 Variant1 {
13596 error: RpcError,
13597 id: ::std::string::String,
13598 jsonrpc: ::std::string::String,
13599 },
13600}
13601impl ::std::convert::From<&Self> for JsonRpcResponseForRpcBlockResponseAndRpcError {
13602 fn from(value: &JsonRpcResponseForRpcBlockResponseAndRpcError) -> Self {
13603 value.clone()
13604 }
13605}
13606#[doc = "`JsonRpcResponseForRpcChunkResponseAndRpcError`"]
13607#[doc = r""]
13608#[doc = r" <details><summary>JSON schema</summary>"]
13609#[doc = r""]
13610#[doc = r" ```json"]
13611#[doc = "{"]
13612#[doc = " \"title\": \"JsonRpcResponse_for_RpcChunkResponse_and_RpcError\","]
13613#[doc = " \"type\": \"object\","]
13614#[doc = " \"oneOf\": ["]
13615#[doc = " {"]
13616#[doc = " \"type\": \"object\","]
13617#[doc = " \"required\": ["]
13618#[doc = " \"result\""]
13619#[doc = " ],"]
13620#[doc = " \"properties\": {"]
13621#[doc = " \"result\": {"]
13622#[doc = " \"$ref\": \"#/components/schemas/RpcChunkResponse\""]
13623#[doc = " }"]
13624#[doc = " }"]
13625#[doc = " },"]
13626#[doc = " {"]
13627#[doc = " \"type\": \"object\","]
13628#[doc = " \"required\": ["]
13629#[doc = " \"error\""]
13630#[doc = " ],"]
13631#[doc = " \"properties\": {"]
13632#[doc = " \"error\": {"]
13633#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13634#[doc = " }"]
13635#[doc = " }"]
13636#[doc = " }"]
13637#[doc = " ],"]
13638#[doc = " \"required\": ["]
13639#[doc = " \"id\","]
13640#[doc = " \"jsonrpc\""]
13641#[doc = " ],"]
13642#[doc = " \"properties\": {"]
13643#[doc = " \"id\": {"]
13644#[doc = " \"type\": \"string\""]
13645#[doc = " },"]
13646#[doc = " \"jsonrpc\": {"]
13647#[doc = " \"type\": \"string\""]
13648#[doc = " }"]
13649#[doc = " }"]
13650#[doc = "}"]
13651#[doc = r" ```"]
13652#[doc = r" </details>"]
13653#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13654#[serde(untagged)]
13655pub enum JsonRpcResponseForRpcChunkResponseAndRpcError {
13656 Variant0 {
13657 id: ::std::string::String,
13658 jsonrpc: ::std::string::String,
13659 result: RpcChunkResponse,
13660 },
13661 Variant1 {
13662 error: RpcError,
13663 id: ::std::string::String,
13664 jsonrpc: ::std::string::String,
13665 },
13666}
13667impl ::std::convert::From<&Self> for JsonRpcResponseForRpcChunkResponseAndRpcError {
13668 fn from(value: &JsonRpcResponseForRpcChunkResponseAndRpcError) -> Self {
13669 value.clone()
13670 }
13671}
13672#[doc = "`JsonRpcResponseForRpcClientConfigResponseAndRpcError`"]
13673#[doc = r""]
13674#[doc = r" <details><summary>JSON schema</summary>"]
13675#[doc = r""]
13676#[doc = r" ```json"]
13677#[doc = "{"]
13678#[doc = " \"title\": \"JsonRpcResponse_for_RpcClientConfigResponse_and_RpcError\","]
13679#[doc = " \"type\": \"object\","]
13680#[doc = " \"oneOf\": ["]
13681#[doc = " {"]
13682#[doc = " \"type\": \"object\","]
13683#[doc = " \"required\": ["]
13684#[doc = " \"result\""]
13685#[doc = " ],"]
13686#[doc = " \"properties\": {"]
13687#[doc = " \"result\": {"]
13688#[doc = " \"$ref\": \"#/components/schemas/RpcClientConfigResponse\""]
13689#[doc = " }"]
13690#[doc = " }"]
13691#[doc = " },"]
13692#[doc = " {"]
13693#[doc = " \"type\": \"object\","]
13694#[doc = " \"required\": ["]
13695#[doc = " \"error\""]
13696#[doc = " ],"]
13697#[doc = " \"properties\": {"]
13698#[doc = " \"error\": {"]
13699#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13700#[doc = " }"]
13701#[doc = " }"]
13702#[doc = " }"]
13703#[doc = " ],"]
13704#[doc = " \"required\": ["]
13705#[doc = " \"id\","]
13706#[doc = " \"jsonrpc\""]
13707#[doc = " ],"]
13708#[doc = " \"properties\": {"]
13709#[doc = " \"id\": {"]
13710#[doc = " \"type\": \"string\""]
13711#[doc = " },"]
13712#[doc = " \"jsonrpc\": {"]
13713#[doc = " \"type\": \"string\""]
13714#[doc = " }"]
13715#[doc = " }"]
13716#[doc = "}"]
13717#[doc = r" ```"]
13718#[doc = r" </details>"]
13719#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13720#[serde(untagged)]
13721pub enum JsonRpcResponseForRpcClientConfigResponseAndRpcError {
13722 Variant0 {
13723 id: ::std::string::String,
13724 jsonrpc: ::std::string::String,
13725 result: RpcClientConfigResponse,
13726 },
13727 Variant1 {
13728 error: RpcError,
13729 id: ::std::string::String,
13730 jsonrpc: ::std::string::String,
13731 },
13732}
13733impl ::std::convert::From<&Self> for JsonRpcResponseForRpcClientConfigResponseAndRpcError {
13734 fn from(value: &JsonRpcResponseForRpcClientConfigResponseAndRpcError) -> Self {
13735 value.clone()
13736 }
13737}
13738#[doc = "`JsonRpcResponseForRpcCongestionLevelResponseAndRpcError`"]
13739#[doc = r""]
13740#[doc = r" <details><summary>JSON schema</summary>"]
13741#[doc = r""]
13742#[doc = r" ```json"]
13743#[doc = "{"]
13744#[doc = " \"title\": \"JsonRpcResponse_for_RpcCongestionLevelResponse_and_RpcError\","]
13745#[doc = " \"type\": \"object\","]
13746#[doc = " \"oneOf\": ["]
13747#[doc = " {"]
13748#[doc = " \"type\": \"object\","]
13749#[doc = " \"required\": ["]
13750#[doc = " \"result\""]
13751#[doc = " ],"]
13752#[doc = " \"properties\": {"]
13753#[doc = " \"result\": {"]
13754#[doc = " \"$ref\": \"#/components/schemas/RpcCongestionLevelResponse\""]
13755#[doc = " }"]
13756#[doc = " }"]
13757#[doc = " },"]
13758#[doc = " {"]
13759#[doc = " \"type\": \"object\","]
13760#[doc = " \"required\": ["]
13761#[doc = " \"error\""]
13762#[doc = " ],"]
13763#[doc = " \"properties\": {"]
13764#[doc = " \"error\": {"]
13765#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13766#[doc = " }"]
13767#[doc = " }"]
13768#[doc = " }"]
13769#[doc = " ],"]
13770#[doc = " \"required\": ["]
13771#[doc = " \"id\","]
13772#[doc = " \"jsonrpc\""]
13773#[doc = " ],"]
13774#[doc = " \"properties\": {"]
13775#[doc = " \"id\": {"]
13776#[doc = " \"type\": \"string\""]
13777#[doc = " },"]
13778#[doc = " \"jsonrpc\": {"]
13779#[doc = " \"type\": \"string\""]
13780#[doc = " }"]
13781#[doc = " }"]
13782#[doc = "}"]
13783#[doc = r" ```"]
13784#[doc = r" </details>"]
13785#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13786#[serde(untagged)]
13787pub enum JsonRpcResponseForRpcCongestionLevelResponseAndRpcError {
13788 Variant0 {
13789 id: ::std::string::String,
13790 jsonrpc: ::std::string::String,
13791 result: RpcCongestionLevelResponse,
13792 },
13793 Variant1 {
13794 error: RpcError,
13795 id: ::std::string::String,
13796 jsonrpc: ::std::string::String,
13797 },
13798}
13799impl ::std::convert::From<&Self> for JsonRpcResponseForRpcCongestionLevelResponseAndRpcError {
13800 fn from(value: &JsonRpcResponseForRpcCongestionLevelResponseAndRpcError) -> Self {
13801 value.clone()
13802 }
13803}
13804#[doc = "`JsonRpcResponseForRpcGasPriceResponseAndRpcError`"]
13805#[doc = r""]
13806#[doc = r" <details><summary>JSON schema</summary>"]
13807#[doc = r""]
13808#[doc = r" ```json"]
13809#[doc = "{"]
13810#[doc = " \"title\": \"JsonRpcResponse_for_RpcGasPriceResponse_and_RpcError\","]
13811#[doc = " \"type\": \"object\","]
13812#[doc = " \"oneOf\": ["]
13813#[doc = " {"]
13814#[doc = " \"type\": \"object\","]
13815#[doc = " \"required\": ["]
13816#[doc = " \"result\""]
13817#[doc = " ],"]
13818#[doc = " \"properties\": {"]
13819#[doc = " \"result\": {"]
13820#[doc = " \"$ref\": \"#/components/schemas/RpcGasPriceResponse\""]
13821#[doc = " }"]
13822#[doc = " }"]
13823#[doc = " },"]
13824#[doc = " {"]
13825#[doc = " \"type\": \"object\","]
13826#[doc = " \"required\": ["]
13827#[doc = " \"error\""]
13828#[doc = " ],"]
13829#[doc = " \"properties\": {"]
13830#[doc = " \"error\": {"]
13831#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13832#[doc = " }"]
13833#[doc = " }"]
13834#[doc = " }"]
13835#[doc = " ],"]
13836#[doc = " \"required\": ["]
13837#[doc = " \"id\","]
13838#[doc = " \"jsonrpc\""]
13839#[doc = " ],"]
13840#[doc = " \"properties\": {"]
13841#[doc = " \"id\": {"]
13842#[doc = " \"type\": \"string\""]
13843#[doc = " },"]
13844#[doc = " \"jsonrpc\": {"]
13845#[doc = " \"type\": \"string\""]
13846#[doc = " }"]
13847#[doc = " }"]
13848#[doc = "}"]
13849#[doc = r" ```"]
13850#[doc = r" </details>"]
13851#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13852#[serde(untagged)]
13853pub enum JsonRpcResponseForRpcGasPriceResponseAndRpcError {
13854 Variant0 {
13855 id: ::std::string::String,
13856 jsonrpc: ::std::string::String,
13857 result: RpcGasPriceResponse,
13858 },
13859 Variant1 {
13860 error: RpcError,
13861 id: ::std::string::String,
13862 jsonrpc: ::std::string::String,
13863 },
13864}
13865impl ::std::convert::From<&Self> for JsonRpcResponseForRpcGasPriceResponseAndRpcError {
13866 fn from(value: &JsonRpcResponseForRpcGasPriceResponseAndRpcError) -> Self {
13867 value.clone()
13868 }
13869}
13870#[doc = "`JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError`"]
13871#[doc = r""]
13872#[doc = r" <details><summary>JSON schema</summary>"]
13873#[doc = r""]
13874#[doc = r" ```json"]
13875#[doc = "{"]
13876#[doc = " \"title\": \"JsonRpcResponse_for_RpcLightClientBlockProofResponse_and_RpcError\","]
13877#[doc = " \"type\": \"object\","]
13878#[doc = " \"oneOf\": ["]
13879#[doc = " {"]
13880#[doc = " \"type\": \"object\","]
13881#[doc = " \"required\": ["]
13882#[doc = " \"result\""]
13883#[doc = " ],"]
13884#[doc = " \"properties\": {"]
13885#[doc = " \"result\": {"]
13886#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientBlockProofResponse\""]
13887#[doc = " }"]
13888#[doc = " }"]
13889#[doc = " },"]
13890#[doc = " {"]
13891#[doc = " \"type\": \"object\","]
13892#[doc = " \"required\": ["]
13893#[doc = " \"error\""]
13894#[doc = " ],"]
13895#[doc = " \"properties\": {"]
13896#[doc = " \"error\": {"]
13897#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13898#[doc = " }"]
13899#[doc = " }"]
13900#[doc = " }"]
13901#[doc = " ],"]
13902#[doc = " \"required\": ["]
13903#[doc = " \"id\","]
13904#[doc = " \"jsonrpc\""]
13905#[doc = " ],"]
13906#[doc = " \"properties\": {"]
13907#[doc = " \"id\": {"]
13908#[doc = " \"type\": \"string\""]
13909#[doc = " },"]
13910#[doc = " \"jsonrpc\": {"]
13911#[doc = " \"type\": \"string\""]
13912#[doc = " }"]
13913#[doc = " }"]
13914#[doc = "}"]
13915#[doc = r" ```"]
13916#[doc = r" </details>"]
13917#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13918#[serde(untagged)]
13919pub enum JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError {
13920 Variant0 {
13921 id: ::std::string::String,
13922 jsonrpc: ::std::string::String,
13923 result: RpcLightClientBlockProofResponse,
13924 },
13925 Variant1 {
13926 error: RpcError,
13927 id: ::std::string::String,
13928 jsonrpc: ::std::string::String,
13929 },
13930}
13931impl ::std::convert::From<&Self> for JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError {
13932 fn from(value: &JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcError) -> Self {
13933 value.clone()
13934 }
13935}
13936#[doc = "`JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError`"]
13937#[doc = r""]
13938#[doc = r" <details><summary>JSON schema</summary>"]
13939#[doc = r""]
13940#[doc = r" ```json"]
13941#[doc = "{"]
13942#[doc = " \"title\": \"JsonRpcResponse_for_RpcLightClientExecutionProofResponse_and_RpcError\","]
13943#[doc = " \"type\": \"object\","]
13944#[doc = " \"oneOf\": ["]
13945#[doc = " {"]
13946#[doc = " \"type\": \"object\","]
13947#[doc = " \"required\": ["]
13948#[doc = " \"result\""]
13949#[doc = " ],"]
13950#[doc = " \"properties\": {"]
13951#[doc = " \"result\": {"]
13952#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientExecutionProofResponse\""]
13953#[doc = " }"]
13954#[doc = " }"]
13955#[doc = " },"]
13956#[doc = " {"]
13957#[doc = " \"type\": \"object\","]
13958#[doc = " \"required\": ["]
13959#[doc = " \"error\""]
13960#[doc = " ],"]
13961#[doc = " \"properties\": {"]
13962#[doc = " \"error\": {"]
13963#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
13964#[doc = " }"]
13965#[doc = " }"]
13966#[doc = " }"]
13967#[doc = " ],"]
13968#[doc = " \"required\": ["]
13969#[doc = " \"id\","]
13970#[doc = " \"jsonrpc\""]
13971#[doc = " ],"]
13972#[doc = " \"properties\": {"]
13973#[doc = " \"id\": {"]
13974#[doc = " \"type\": \"string\""]
13975#[doc = " },"]
13976#[doc = " \"jsonrpc\": {"]
13977#[doc = " \"type\": \"string\""]
13978#[doc = " }"]
13979#[doc = " }"]
13980#[doc = "}"]
13981#[doc = r" ```"]
13982#[doc = r" </details>"]
13983#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13984#[serde(untagged)]
13985pub enum JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError {
13986 Variant0 {
13987 id: ::std::string::String,
13988 jsonrpc: ::std::string::String,
13989 result: RpcLightClientExecutionProofResponse,
13990 },
13991 Variant1 {
13992 error: RpcError,
13993 id: ::std::string::String,
13994 jsonrpc: ::std::string::String,
13995 },
13996}
13997impl ::std::convert::From<&Self>
13998 for JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError
13999{
14000 fn from(value: &JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcError) -> Self {
14001 value.clone()
14002 }
14003}
14004#[doc = "`JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError`"]
14005#[doc = r""]
14006#[doc = r" <details><summary>JSON schema</summary>"]
14007#[doc = r""]
14008#[doc = r" ```json"]
14009#[doc = "{"]
14010#[doc = " \"title\": \"JsonRpcResponse_for_RpcLightClientNextBlockResponse_and_RpcError\","]
14011#[doc = " \"type\": \"object\","]
14012#[doc = " \"oneOf\": ["]
14013#[doc = " {"]
14014#[doc = " \"type\": \"object\","]
14015#[doc = " \"required\": ["]
14016#[doc = " \"result\""]
14017#[doc = " ],"]
14018#[doc = " \"properties\": {"]
14019#[doc = " \"result\": {"]
14020#[doc = " \"$ref\": \"#/components/schemas/RpcLightClientNextBlockResponse\""]
14021#[doc = " }"]
14022#[doc = " }"]
14023#[doc = " },"]
14024#[doc = " {"]
14025#[doc = " \"type\": \"object\","]
14026#[doc = " \"required\": ["]
14027#[doc = " \"error\""]
14028#[doc = " ],"]
14029#[doc = " \"properties\": {"]
14030#[doc = " \"error\": {"]
14031#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14032#[doc = " }"]
14033#[doc = " }"]
14034#[doc = " }"]
14035#[doc = " ],"]
14036#[doc = " \"required\": ["]
14037#[doc = " \"id\","]
14038#[doc = " \"jsonrpc\""]
14039#[doc = " ],"]
14040#[doc = " \"properties\": {"]
14041#[doc = " \"id\": {"]
14042#[doc = " \"type\": \"string\""]
14043#[doc = " },"]
14044#[doc = " \"jsonrpc\": {"]
14045#[doc = " \"type\": \"string\""]
14046#[doc = " }"]
14047#[doc = " }"]
14048#[doc = "}"]
14049#[doc = r" ```"]
14050#[doc = r" </details>"]
14051#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14052#[serde(untagged)]
14053pub enum JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError {
14054 Variant0 {
14055 id: ::std::string::String,
14056 jsonrpc: ::std::string::String,
14057 result: RpcLightClientNextBlockResponse,
14058 },
14059 Variant1 {
14060 error: RpcError,
14061 id: ::std::string::String,
14062 jsonrpc: ::std::string::String,
14063 },
14064}
14065impl ::std::convert::From<&Self> for JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError {
14066 fn from(value: &JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcError) -> Self {
14067 value.clone()
14068 }
14069}
14070#[doc = "`JsonRpcResponseForRpcNetworkInfoResponseAndRpcError`"]
14071#[doc = r""]
14072#[doc = r" <details><summary>JSON schema</summary>"]
14073#[doc = r""]
14074#[doc = r" ```json"]
14075#[doc = "{"]
14076#[doc = " \"title\": \"JsonRpcResponse_for_RpcNetworkInfoResponse_and_RpcError\","]
14077#[doc = " \"type\": \"object\","]
14078#[doc = " \"oneOf\": ["]
14079#[doc = " {"]
14080#[doc = " \"type\": \"object\","]
14081#[doc = " \"required\": ["]
14082#[doc = " \"result\""]
14083#[doc = " ],"]
14084#[doc = " \"properties\": {"]
14085#[doc = " \"result\": {"]
14086#[doc = " \"$ref\": \"#/components/schemas/RpcNetworkInfoResponse\""]
14087#[doc = " }"]
14088#[doc = " }"]
14089#[doc = " },"]
14090#[doc = " {"]
14091#[doc = " \"type\": \"object\","]
14092#[doc = " \"required\": ["]
14093#[doc = " \"error\""]
14094#[doc = " ],"]
14095#[doc = " \"properties\": {"]
14096#[doc = " \"error\": {"]
14097#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14098#[doc = " }"]
14099#[doc = " }"]
14100#[doc = " }"]
14101#[doc = " ],"]
14102#[doc = " \"required\": ["]
14103#[doc = " \"id\","]
14104#[doc = " \"jsonrpc\""]
14105#[doc = " ],"]
14106#[doc = " \"properties\": {"]
14107#[doc = " \"id\": {"]
14108#[doc = " \"type\": \"string\""]
14109#[doc = " },"]
14110#[doc = " \"jsonrpc\": {"]
14111#[doc = " \"type\": \"string\""]
14112#[doc = " }"]
14113#[doc = " }"]
14114#[doc = "}"]
14115#[doc = r" ```"]
14116#[doc = r" </details>"]
14117#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14118#[serde(untagged)]
14119pub enum JsonRpcResponseForRpcNetworkInfoResponseAndRpcError {
14120 Variant0 {
14121 id: ::std::string::String,
14122 jsonrpc: ::std::string::String,
14123 result: RpcNetworkInfoResponse,
14124 },
14125 Variant1 {
14126 error: RpcError,
14127 id: ::std::string::String,
14128 jsonrpc: ::std::string::String,
14129 },
14130}
14131impl ::std::convert::From<&Self> for JsonRpcResponseForRpcNetworkInfoResponseAndRpcError {
14132 fn from(value: &JsonRpcResponseForRpcNetworkInfoResponseAndRpcError) -> Self {
14133 value.clone()
14134 }
14135}
14136#[doc = "`JsonRpcResponseForRpcProtocolConfigResponseAndRpcError`"]
14137#[doc = r""]
14138#[doc = r" <details><summary>JSON schema</summary>"]
14139#[doc = r""]
14140#[doc = r" ```json"]
14141#[doc = "{"]
14142#[doc = " \"title\": \"JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcError\","]
14143#[doc = " \"type\": \"object\","]
14144#[doc = " \"oneOf\": ["]
14145#[doc = " {"]
14146#[doc = " \"type\": \"object\","]
14147#[doc = " \"required\": ["]
14148#[doc = " \"result\""]
14149#[doc = " ],"]
14150#[doc = " \"properties\": {"]
14151#[doc = " \"result\": {"]
14152#[doc = " \"$ref\": \"#/components/schemas/RpcProtocolConfigResponse\""]
14153#[doc = " }"]
14154#[doc = " }"]
14155#[doc = " },"]
14156#[doc = " {"]
14157#[doc = " \"type\": \"object\","]
14158#[doc = " \"required\": ["]
14159#[doc = " \"error\""]
14160#[doc = " ],"]
14161#[doc = " \"properties\": {"]
14162#[doc = " \"error\": {"]
14163#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14164#[doc = " }"]
14165#[doc = " }"]
14166#[doc = " }"]
14167#[doc = " ],"]
14168#[doc = " \"required\": ["]
14169#[doc = " \"id\","]
14170#[doc = " \"jsonrpc\""]
14171#[doc = " ],"]
14172#[doc = " \"properties\": {"]
14173#[doc = " \"id\": {"]
14174#[doc = " \"type\": \"string\""]
14175#[doc = " },"]
14176#[doc = " \"jsonrpc\": {"]
14177#[doc = " \"type\": \"string\""]
14178#[doc = " }"]
14179#[doc = " }"]
14180#[doc = "}"]
14181#[doc = r" ```"]
14182#[doc = r" </details>"]
14183#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14184#[serde(untagged)]
14185pub enum JsonRpcResponseForRpcProtocolConfigResponseAndRpcError {
14186 Variant0 {
14187 id: ::std::string::String,
14188 jsonrpc: ::std::string::String,
14189 result: RpcProtocolConfigResponse,
14190 },
14191 Variant1 {
14192 error: RpcError,
14193 id: ::std::string::String,
14194 jsonrpc: ::std::string::String,
14195 },
14196}
14197impl ::std::convert::From<&Self> for JsonRpcResponseForRpcProtocolConfigResponseAndRpcError {
14198 fn from(value: &JsonRpcResponseForRpcProtocolConfigResponseAndRpcError) -> Self {
14199 value.clone()
14200 }
14201}
14202#[doc = "`JsonRpcResponseForRpcQueryResponseAndRpcError`"]
14203#[doc = r""]
14204#[doc = r" <details><summary>JSON schema</summary>"]
14205#[doc = r""]
14206#[doc = r" ```json"]
14207#[doc = "{"]
14208#[doc = " \"title\": \"JsonRpcResponse_for_RpcQueryResponse_and_RpcError\","]
14209#[doc = " \"type\": \"object\","]
14210#[doc = " \"oneOf\": ["]
14211#[doc = " {"]
14212#[doc = " \"type\": \"object\","]
14213#[doc = " \"required\": ["]
14214#[doc = " \"result\""]
14215#[doc = " ],"]
14216#[doc = " \"properties\": {"]
14217#[doc = " \"result\": {"]
14218#[doc = " \"$ref\": \"#/components/schemas/RpcQueryResponse\""]
14219#[doc = " }"]
14220#[doc = " }"]
14221#[doc = " },"]
14222#[doc = " {"]
14223#[doc = " \"type\": \"object\","]
14224#[doc = " \"required\": ["]
14225#[doc = " \"error\""]
14226#[doc = " ],"]
14227#[doc = " \"properties\": {"]
14228#[doc = " \"error\": {"]
14229#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14230#[doc = " }"]
14231#[doc = " }"]
14232#[doc = " }"]
14233#[doc = " ],"]
14234#[doc = " \"required\": ["]
14235#[doc = " \"id\","]
14236#[doc = " \"jsonrpc\""]
14237#[doc = " ],"]
14238#[doc = " \"properties\": {"]
14239#[doc = " \"id\": {"]
14240#[doc = " \"type\": \"string\""]
14241#[doc = " },"]
14242#[doc = " \"jsonrpc\": {"]
14243#[doc = " \"type\": \"string\""]
14244#[doc = " }"]
14245#[doc = " }"]
14246#[doc = "}"]
14247#[doc = r" ```"]
14248#[doc = r" </details>"]
14249#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14250#[serde(untagged)]
14251pub enum JsonRpcResponseForRpcQueryResponseAndRpcError {
14252 Variant0 {
14253 id: ::std::string::String,
14254 jsonrpc: ::std::string::String,
14255 result: RpcQueryResponse,
14256 },
14257 Variant1 {
14258 error: RpcError,
14259 id: ::std::string::String,
14260 jsonrpc: ::std::string::String,
14261 },
14262}
14263impl ::std::convert::From<&Self> for JsonRpcResponseForRpcQueryResponseAndRpcError {
14264 fn from(value: &JsonRpcResponseForRpcQueryResponseAndRpcError) -> Self {
14265 value.clone()
14266 }
14267}
14268#[doc = "`JsonRpcResponseForRpcReceiptResponseAndRpcError`"]
14269#[doc = r""]
14270#[doc = r" <details><summary>JSON schema</summary>"]
14271#[doc = r""]
14272#[doc = r" ```json"]
14273#[doc = "{"]
14274#[doc = " \"title\": \"JsonRpcResponse_for_RpcReceiptResponse_and_RpcError\","]
14275#[doc = " \"type\": \"object\","]
14276#[doc = " \"oneOf\": ["]
14277#[doc = " {"]
14278#[doc = " \"type\": \"object\","]
14279#[doc = " \"required\": ["]
14280#[doc = " \"result\""]
14281#[doc = " ],"]
14282#[doc = " \"properties\": {"]
14283#[doc = " \"result\": {"]
14284#[doc = " \"$ref\": \"#/components/schemas/RpcReceiptResponse\""]
14285#[doc = " }"]
14286#[doc = " }"]
14287#[doc = " },"]
14288#[doc = " {"]
14289#[doc = " \"type\": \"object\","]
14290#[doc = " \"required\": ["]
14291#[doc = " \"error\""]
14292#[doc = " ],"]
14293#[doc = " \"properties\": {"]
14294#[doc = " \"error\": {"]
14295#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14296#[doc = " }"]
14297#[doc = " }"]
14298#[doc = " }"]
14299#[doc = " ],"]
14300#[doc = " \"required\": ["]
14301#[doc = " \"id\","]
14302#[doc = " \"jsonrpc\""]
14303#[doc = " ],"]
14304#[doc = " \"properties\": {"]
14305#[doc = " \"id\": {"]
14306#[doc = " \"type\": \"string\""]
14307#[doc = " },"]
14308#[doc = " \"jsonrpc\": {"]
14309#[doc = " \"type\": \"string\""]
14310#[doc = " }"]
14311#[doc = " }"]
14312#[doc = "}"]
14313#[doc = r" ```"]
14314#[doc = r" </details>"]
14315#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14316#[serde(untagged)]
14317pub enum JsonRpcResponseForRpcReceiptResponseAndRpcError {
14318 Variant0 {
14319 id: ::std::string::String,
14320 jsonrpc: ::std::string::String,
14321 result: RpcReceiptResponse,
14322 },
14323 Variant1 {
14324 error: RpcError,
14325 id: ::std::string::String,
14326 jsonrpc: ::std::string::String,
14327 },
14328}
14329impl ::std::convert::From<&Self> for JsonRpcResponseForRpcReceiptResponseAndRpcError {
14330 fn from(value: &JsonRpcResponseForRpcReceiptResponseAndRpcError) -> Self {
14331 value.clone()
14332 }
14333}
14334#[doc = "`JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError`"]
14335#[doc = r""]
14336#[doc = r" <details><summary>JSON schema</summary>"]
14337#[doc = r""]
14338#[doc = r" ```json"]
14339#[doc = "{"]
14340#[doc = " \"title\": \"JsonRpcResponse_for_RpcSplitStorageInfoResponse_and_RpcError\","]
14341#[doc = " \"type\": \"object\","]
14342#[doc = " \"oneOf\": ["]
14343#[doc = " {"]
14344#[doc = " \"type\": \"object\","]
14345#[doc = " \"required\": ["]
14346#[doc = " \"result\""]
14347#[doc = " ],"]
14348#[doc = " \"properties\": {"]
14349#[doc = " \"result\": {"]
14350#[doc = " \"$ref\": \"#/components/schemas/RpcSplitStorageInfoResponse\""]
14351#[doc = " }"]
14352#[doc = " }"]
14353#[doc = " },"]
14354#[doc = " {"]
14355#[doc = " \"type\": \"object\","]
14356#[doc = " \"required\": ["]
14357#[doc = " \"error\""]
14358#[doc = " ],"]
14359#[doc = " \"properties\": {"]
14360#[doc = " \"error\": {"]
14361#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14362#[doc = " }"]
14363#[doc = " }"]
14364#[doc = " }"]
14365#[doc = " ],"]
14366#[doc = " \"required\": ["]
14367#[doc = " \"id\","]
14368#[doc = " \"jsonrpc\""]
14369#[doc = " ],"]
14370#[doc = " \"properties\": {"]
14371#[doc = " \"id\": {"]
14372#[doc = " \"type\": \"string\""]
14373#[doc = " },"]
14374#[doc = " \"jsonrpc\": {"]
14375#[doc = " \"type\": \"string\""]
14376#[doc = " }"]
14377#[doc = " }"]
14378#[doc = "}"]
14379#[doc = r" ```"]
14380#[doc = r" </details>"]
14381#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14382#[serde(untagged)]
14383pub enum JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError {
14384 Variant0 {
14385 id: ::std::string::String,
14386 jsonrpc: ::std::string::String,
14387 result: RpcSplitStorageInfoResponse,
14388 },
14389 Variant1 {
14390 error: RpcError,
14391 id: ::std::string::String,
14392 jsonrpc: ::std::string::String,
14393 },
14394}
14395impl ::std::convert::From<&Self> for JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError {
14396 fn from(value: &JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcError) -> Self {
14397 value.clone()
14398 }
14399}
14400#[doc = "`JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError`"]
14401#[doc = r""]
14402#[doc = r" <details><summary>JSON schema</summary>"]
14403#[doc = r""]
14404#[doc = r" ```json"]
14405#[doc = "{"]
14406#[doc = " \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcError\","]
14407#[doc = " \"type\": \"object\","]
14408#[doc = " \"oneOf\": ["]
14409#[doc = " {"]
14410#[doc = " \"type\": \"object\","]
14411#[doc = " \"required\": ["]
14412#[doc = " \"result\""]
14413#[doc = " ],"]
14414#[doc = " \"properties\": {"]
14415#[doc = " \"result\": {"]
14416#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockByTypeResponse\""]
14417#[doc = " }"]
14418#[doc = " }"]
14419#[doc = " },"]
14420#[doc = " {"]
14421#[doc = " \"type\": \"object\","]
14422#[doc = " \"required\": ["]
14423#[doc = " \"error\""]
14424#[doc = " ],"]
14425#[doc = " \"properties\": {"]
14426#[doc = " \"error\": {"]
14427#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14428#[doc = " }"]
14429#[doc = " }"]
14430#[doc = " }"]
14431#[doc = " ],"]
14432#[doc = " \"required\": ["]
14433#[doc = " \"id\","]
14434#[doc = " \"jsonrpc\""]
14435#[doc = " ],"]
14436#[doc = " \"properties\": {"]
14437#[doc = " \"id\": {"]
14438#[doc = " \"type\": \"string\""]
14439#[doc = " },"]
14440#[doc = " \"jsonrpc\": {"]
14441#[doc = " \"type\": \"string\""]
14442#[doc = " }"]
14443#[doc = " }"]
14444#[doc = "}"]
14445#[doc = r" ```"]
14446#[doc = r" </details>"]
14447#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14448#[serde(untagged)]
14449pub enum JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError {
14450 Variant0 {
14451 id: ::std::string::String,
14452 jsonrpc: ::std::string::String,
14453 result: RpcStateChangesInBlockByTypeResponse,
14454 },
14455 Variant1 {
14456 error: RpcError,
14457 id: ::std::string::String,
14458 jsonrpc: ::std::string::String,
14459 },
14460}
14461impl ::std::convert::From<&Self>
14462 for JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError
14463{
14464 fn from(value: &JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcError) -> Self {
14465 value.clone()
14466 }
14467}
14468#[doc = "`JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError`"]
14469#[doc = r""]
14470#[doc = r" <details><summary>JSON schema</summary>"]
14471#[doc = r""]
14472#[doc = r" ```json"]
14473#[doc = "{"]
14474#[doc = " \"title\": \"JsonRpcResponse_for_RpcStateChangesInBlockResponse_and_RpcError\","]
14475#[doc = " \"type\": \"object\","]
14476#[doc = " \"oneOf\": ["]
14477#[doc = " {"]
14478#[doc = " \"type\": \"object\","]
14479#[doc = " \"required\": ["]
14480#[doc = " \"result\""]
14481#[doc = " ],"]
14482#[doc = " \"properties\": {"]
14483#[doc = " \"result\": {"]
14484#[doc = " \"$ref\": \"#/components/schemas/RpcStateChangesInBlockResponse\""]
14485#[doc = " }"]
14486#[doc = " }"]
14487#[doc = " },"]
14488#[doc = " {"]
14489#[doc = " \"type\": \"object\","]
14490#[doc = " \"required\": ["]
14491#[doc = " \"error\""]
14492#[doc = " ],"]
14493#[doc = " \"properties\": {"]
14494#[doc = " \"error\": {"]
14495#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14496#[doc = " }"]
14497#[doc = " }"]
14498#[doc = " }"]
14499#[doc = " ],"]
14500#[doc = " \"required\": ["]
14501#[doc = " \"id\","]
14502#[doc = " \"jsonrpc\""]
14503#[doc = " ],"]
14504#[doc = " \"properties\": {"]
14505#[doc = " \"id\": {"]
14506#[doc = " \"type\": \"string\""]
14507#[doc = " },"]
14508#[doc = " \"jsonrpc\": {"]
14509#[doc = " \"type\": \"string\""]
14510#[doc = " }"]
14511#[doc = " }"]
14512#[doc = "}"]
14513#[doc = r" ```"]
14514#[doc = r" </details>"]
14515#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14516#[serde(untagged)]
14517pub enum JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError {
14518 Variant0 {
14519 id: ::std::string::String,
14520 jsonrpc: ::std::string::String,
14521 result: RpcStateChangesInBlockResponse,
14522 },
14523 Variant1 {
14524 error: RpcError,
14525 id: ::std::string::String,
14526 jsonrpc: ::std::string::String,
14527 },
14528}
14529impl ::std::convert::From<&Self> for JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError {
14530 fn from(value: &JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcError) -> Self {
14531 value.clone()
14532 }
14533}
14534#[doc = "`JsonRpcResponseForRpcStatusResponseAndRpcError`"]
14535#[doc = r""]
14536#[doc = r" <details><summary>JSON schema</summary>"]
14537#[doc = r""]
14538#[doc = r" ```json"]
14539#[doc = "{"]
14540#[doc = " \"title\": \"JsonRpcResponse_for_RpcStatusResponse_and_RpcError\","]
14541#[doc = " \"type\": \"object\","]
14542#[doc = " \"oneOf\": ["]
14543#[doc = " {"]
14544#[doc = " \"type\": \"object\","]
14545#[doc = " \"required\": ["]
14546#[doc = " \"result\""]
14547#[doc = " ],"]
14548#[doc = " \"properties\": {"]
14549#[doc = " \"result\": {"]
14550#[doc = " \"$ref\": \"#/components/schemas/RpcStatusResponse\""]
14551#[doc = " }"]
14552#[doc = " }"]
14553#[doc = " },"]
14554#[doc = " {"]
14555#[doc = " \"type\": \"object\","]
14556#[doc = " \"required\": ["]
14557#[doc = " \"error\""]
14558#[doc = " ],"]
14559#[doc = " \"properties\": {"]
14560#[doc = " \"error\": {"]
14561#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14562#[doc = " }"]
14563#[doc = " }"]
14564#[doc = " }"]
14565#[doc = " ],"]
14566#[doc = " \"required\": ["]
14567#[doc = " \"id\","]
14568#[doc = " \"jsonrpc\""]
14569#[doc = " ],"]
14570#[doc = " \"properties\": {"]
14571#[doc = " \"id\": {"]
14572#[doc = " \"type\": \"string\""]
14573#[doc = " },"]
14574#[doc = " \"jsonrpc\": {"]
14575#[doc = " \"type\": \"string\""]
14576#[doc = " }"]
14577#[doc = " }"]
14578#[doc = "}"]
14579#[doc = r" ```"]
14580#[doc = r" </details>"]
14581#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14582#[serde(untagged)]
14583pub enum JsonRpcResponseForRpcStatusResponseAndRpcError {
14584 Variant0 {
14585 id: ::std::string::String,
14586 jsonrpc: ::std::string::String,
14587 result: RpcStatusResponse,
14588 },
14589 Variant1 {
14590 error: RpcError,
14591 id: ::std::string::String,
14592 jsonrpc: ::std::string::String,
14593 },
14594}
14595impl ::std::convert::From<&Self> for JsonRpcResponseForRpcStatusResponseAndRpcError {
14596 fn from(value: &JsonRpcResponseForRpcStatusResponseAndRpcError) -> Self {
14597 value.clone()
14598 }
14599}
14600#[doc = "`JsonRpcResponseForRpcTransactionResponseAndRpcError`"]
14601#[doc = r""]
14602#[doc = r" <details><summary>JSON schema</summary>"]
14603#[doc = r""]
14604#[doc = r" ```json"]
14605#[doc = "{"]
14606#[doc = " \"title\": \"JsonRpcResponse_for_RpcTransactionResponse_and_RpcError\","]
14607#[doc = " \"type\": \"object\","]
14608#[doc = " \"oneOf\": ["]
14609#[doc = " {"]
14610#[doc = " \"type\": \"object\","]
14611#[doc = " \"required\": ["]
14612#[doc = " \"result\""]
14613#[doc = " ],"]
14614#[doc = " \"properties\": {"]
14615#[doc = " \"result\": {"]
14616#[doc = " \"$ref\": \"#/components/schemas/RpcTransactionResponse\""]
14617#[doc = " }"]
14618#[doc = " }"]
14619#[doc = " },"]
14620#[doc = " {"]
14621#[doc = " \"type\": \"object\","]
14622#[doc = " \"required\": ["]
14623#[doc = " \"error\""]
14624#[doc = " ],"]
14625#[doc = " \"properties\": {"]
14626#[doc = " \"error\": {"]
14627#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14628#[doc = " }"]
14629#[doc = " }"]
14630#[doc = " }"]
14631#[doc = " ],"]
14632#[doc = " \"required\": ["]
14633#[doc = " \"id\","]
14634#[doc = " \"jsonrpc\""]
14635#[doc = " ],"]
14636#[doc = " \"properties\": {"]
14637#[doc = " \"id\": {"]
14638#[doc = " \"type\": \"string\""]
14639#[doc = " },"]
14640#[doc = " \"jsonrpc\": {"]
14641#[doc = " \"type\": \"string\""]
14642#[doc = " }"]
14643#[doc = " }"]
14644#[doc = "}"]
14645#[doc = r" ```"]
14646#[doc = r" </details>"]
14647#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14648#[serde(untagged)]
14649pub enum JsonRpcResponseForRpcTransactionResponseAndRpcError {
14650 Variant0 {
14651 id: ::std::string::String,
14652 jsonrpc: ::std::string::String,
14653 result: RpcTransactionResponse,
14654 },
14655 Variant1 {
14656 error: RpcError,
14657 id: ::std::string::String,
14658 jsonrpc: ::std::string::String,
14659 },
14660}
14661impl ::std::convert::From<&Self> for JsonRpcResponseForRpcTransactionResponseAndRpcError {
14662 fn from(value: &JsonRpcResponseForRpcTransactionResponseAndRpcError) -> Self {
14663 value.clone()
14664 }
14665}
14666#[doc = "`JsonRpcResponseForRpcValidatorResponseAndRpcError`"]
14667#[doc = r""]
14668#[doc = r" <details><summary>JSON schema</summary>"]
14669#[doc = r""]
14670#[doc = r" ```json"]
14671#[doc = "{"]
14672#[doc = " \"title\": \"JsonRpcResponse_for_RpcValidatorResponse_and_RpcError\","]
14673#[doc = " \"type\": \"object\","]
14674#[doc = " \"oneOf\": ["]
14675#[doc = " {"]
14676#[doc = " \"type\": \"object\","]
14677#[doc = " \"required\": ["]
14678#[doc = " \"result\""]
14679#[doc = " ],"]
14680#[doc = " \"properties\": {"]
14681#[doc = " \"result\": {"]
14682#[doc = " \"$ref\": \"#/components/schemas/RpcValidatorResponse\""]
14683#[doc = " }"]
14684#[doc = " }"]
14685#[doc = " },"]
14686#[doc = " {"]
14687#[doc = " \"type\": \"object\","]
14688#[doc = " \"required\": ["]
14689#[doc = " \"error\""]
14690#[doc = " ],"]
14691#[doc = " \"properties\": {"]
14692#[doc = " \"error\": {"]
14693#[doc = " \"$ref\": \"#/components/schemas/RpcError\""]
14694#[doc = " }"]
14695#[doc = " }"]
14696#[doc = " }"]
14697#[doc = " ],"]
14698#[doc = " \"required\": ["]
14699#[doc = " \"id\","]
14700#[doc = " \"jsonrpc\""]
14701#[doc = " ],"]
14702#[doc = " \"properties\": {"]
14703#[doc = " \"id\": {"]
14704#[doc = " \"type\": \"string\""]
14705#[doc = " },"]
14706#[doc = " \"jsonrpc\": {"]
14707#[doc = " \"type\": \"string\""]
14708#[doc = " }"]
14709#[doc = " }"]
14710#[doc = "}"]
14711#[doc = r" ```"]
14712#[doc = r" </details>"]
14713#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14714#[serde(untagged)]
14715pub enum JsonRpcResponseForRpcValidatorResponseAndRpcError {
14716 Variant0 {
14717 id: ::std::string::String,
14718 jsonrpc: ::std::string::String,
14719 result: RpcValidatorResponse,
14720 },
14721 Variant1 {
14722 error: RpcError,
14723 id: ::std::string::String,
14724 jsonrpc: ::std::string::String,
14725 },
14726}
14727impl ::std::convert::From<&Self> for JsonRpcResponseForRpcValidatorResponseAndRpcError {
14728 fn from(value: &JsonRpcResponseForRpcValidatorResponseAndRpcError) -> Self {
14729 value.clone()
14730 }
14731}
14732#[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."]
14733#[doc = r""]
14734#[doc = r" <details><summary>JSON schema</summary>"]
14735#[doc = r""]
14736#[doc = r" ```json"]
14737#[doc = "{"]
14738#[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.\","]
14739#[doc = " \"type\": \"object\","]
14740#[doc = " \"required\": ["]
14741#[doc = " \"account_id\","]
14742#[doc = " \"peer_id\""]
14743#[doc = " ],"]
14744#[doc = " \"properties\": {"]
14745#[doc = " \"account_id\": {"]
14746#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
14747#[doc = " },"]
14748#[doc = " \"next_hops\": {"]
14749#[doc = " \"type\": ["]
14750#[doc = " \"array\","]
14751#[doc = " \"null\""]
14752#[doc = " ],"]
14753#[doc = " \"items\": {"]
14754#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
14755#[doc = " }"]
14756#[doc = " },"]
14757#[doc = " \"peer_id\": {"]
14758#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
14759#[doc = " }"]
14760#[doc = " }"]
14761#[doc = "}"]
14762#[doc = r" ```"]
14763#[doc = r" </details>"]
14764#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14765pub struct KnownProducerView {
14766 pub account_id: AccountId,
14767 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14768 pub next_hops: ::std::option::Option<::std::vec::Vec<PublicKey>>,
14769 pub peer_id: PublicKey,
14770}
14771impl ::std::convert::From<&KnownProducerView> for KnownProducerView {
14772 fn from(value: &KnownProducerView) -> Self {
14773 value.clone()
14774 }
14775}
14776#[doc = "`LightClientBlockLiteView`"]
14777#[doc = r""]
14778#[doc = r" <details><summary>JSON schema</summary>"]
14779#[doc = r""]
14780#[doc = r" ```json"]
14781#[doc = "{"]
14782#[doc = " \"type\": \"object\","]
14783#[doc = " \"required\": ["]
14784#[doc = " \"inner_lite\","]
14785#[doc = " \"inner_rest_hash\","]
14786#[doc = " \"prev_block_hash\""]
14787#[doc = " ],"]
14788#[doc = " \"properties\": {"]
14789#[doc = " \"inner_lite\": {"]
14790#[doc = " \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
14791#[doc = " },"]
14792#[doc = " \"inner_rest_hash\": {"]
14793#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
14794#[doc = " },"]
14795#[doc = " \"prev_block_hash\": {"]
14796#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
14797#[doc = " }"]
14798#[doc = " }"]
14799#[doc = "}"]
14800#[doc = r" ```"]
14801#[doc = r" </details>"]
14802#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14803pub struct LightClientBlockLiteView {
14804 pub inner_lite: BlockHeaderInnerLiteView,
14805 pub inner_rest_hash: CryptoHash,
14806 pub prev_block_hash: CryptoHash,
14807}
14808impl ::std::convert::From<&LightClientBlockLiteView> for LightClientBlockLiteView {
14809 fn from(value: &LightClientBlockLiteView) -> Self {
14810 value.clone()
14811 }
14812}
14813#[doc = "Describes limits for VM and Runtime.\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities"]
14814#[doc = r""]
14815#[doc = r" <details><summary>JSON schema</summary>"]
14816#[doc = r""]
14817#[doc = r" ```json"]
14818#[doc = "{"]
14819#[doc = " \"description\": \"Describes limits for VM and Runtime.\\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities\","]
14820#[doc = " \"type\": \"object\","]
14821#[doc = " \"required\": ["]
14822#[doc = " \"initial_memory_pages\","]
14823#[doc = " \"max_actions_per_receipt\","]
14824#[doc = " \"max_arguments_length\","]
14825#[doc = " \"max_contract_size\","]
14826#[doc = " \"max_gas_burnt\","]
14827#[doc = " \"max_length_method_name\","]
14828#[doc = " \"max_length_returned_data\","]
14829#[doc = " \"max_length_storage_key\","]
14830#[doc = " \"max_length_storage_value\","]
14831#[doc = " \"max_memory_pages\","]
14832#[doc = " \"max_number_bytes_method_names\","]
14833#[doc = " \"max_number_input_data_dependencies\","]
14834#[doc = " \"max_number_logs\","]
14835#[doc = " \"max_number_registers\","]
14836#[doc = " \"max_promises_per_function_call_action\","]
14837#[doc = " \"max_receipt_size\","]
14838#[doc = " \"max_register_size\","]
14839#[doc = " \"max_stack_height\","]
14840#[doc = " \"max_total_log_length\","]
14841#[doc = " \"max_total_prepaid_gas\","]
14842#[doc = " \"max_transaction_size\","]
14843#[doc = " \"max_yield_payload_size\","]
14844#[doc = " \"per_receipt_storage_proof_size_limit\","]
14845#[doc = " \"registers_memory_limit\","]
14846#[doc = " \"yield_timeout_length_in_blocks\""]
14847#[doc = " ],"]
14848#[doc = " \"properties\": {"]
14849#[doc = " \"account_id_validity_rules_version\": {"]
14850#[doc = " \"description\": \"Whether to enforce account_id well-formed-ness where it wasn't enforced\\nhistorically.\","]
14851#[doc = " \"default\": 0,"]
14852#[doc = " \"allOf\": ["]
14853#[doc = " {"]
14854#[doc = " \"$ref\": \"#/components/schemas/AccountIdValidityRulesVersion\""]
14855#[doc = " }"]
14856#[doc = " ]"]
14857#[doc = " },"]
14858#[doc = " \"initial_memory_pages\": {"]
14859#[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.\","]
14860#[doc = " \"type\": \"integer\","]
14861#[doc = " \"format\": \"uint32\","]
14862#[doc = " \"minimum\": 0.0"]
14863#[doc = " },"]
14864#[doc = " \"max_actions_per_receipt\": {"]
14865#[doc = " \"description\": \"Max number of actions per receipt.\","]
14866#[doc = " \"type\": \"integer\","]
14867#[doc = " \"format\": \"uint64\","]
14868#[doc = " \"minimum\": 0.0"]
14869#[doc = " },"]
14870#[doc = " \"max_arguments_length\": {"]
14871#[doc = " \"description\": \"Max length of arguments in a function call action.\","]
14872#[doc = " \"type\": \"integer\","]
14873#[doc = " \"format\": \"uint64\","]
14874#[doc = " \"minimum\": 0.0"]
14875#[doc = " },"]
14876#[doc = " \"max_contract_size\": {"]
14877#[doc = " \"description\": \"Max contract size\","]
14878#[doc = " \"type\": \"integer\","]
14879#[doc = " \"format\": \"uint64\","]
14880#[doc = " \"minimum\": 0.0"]
14881#[doc = " },"]
14882#[doc = " \"max_functions_number_per_contract\": {"]
14883#[doc = " \"description\": \"If present, stores max number of functions in one contract\","]
14884#[doc = " \"type\": ["]
14885#[doc = " \"integer\","]
14886#[doc = " \"null\""]
14887#[doc = " ],"]
14888#[doc = " \"format\": \"uint64\","]
14889#[doc = " \"minimum\": 0.0"]
14890#[doc = " },"]
14891#[doc = " \"max_gas_burnt\": {"]
14892#[doc = " \"description\": \"Max amount of gas that can be used, excluding gas attached to promises.\","]
14893#[doc = " \"type\": \"integer\","]
14894#[doc = " \"format\": \"uint64\","]
14895#[doc = " \"minimum\": 0.0"]
14896#[doc = " },"]
14897#[doc = " \"max_length_method_name\": {"]
14898#[doc = " \"description\": \"Max length of any method name (without terminating character).\","]
14899#[doc = " \"type\": \"integer\","]
14900#[doc = " \"format\": \"uint64\","]
14901#[doc = " \"minimum\": 0.0"]
14902#[doc = " },"]
14903#[doc = " \"max_length_returned_data\": {"]
14904#[doc = " \"description\": \"Max length of returned data\","]
14905#[doc = " \"type\": \"integer\","]
14906#[doc = " \"format\": \"uint64\","]
14907#[doc = " \"minimum\": 0.0"]
14908#[doc = " },"]
14909#[doc = " \"max_length_storage_key\": {"]
14910#[doc = " \"description\": \"Max storage key size\","]
14911#[doc = " \"type\": \"integer\","]
14912#[doc = " \"format\": \"uint64\","]
14913#[doc = " \"minimum\": 0.0"]
14914#[doc = " },"]
14915#[doc = " \"max_length_storage_value\": {"]
14916#[doc = " \"description\": \"Max storage value size\","]
14917#[doc = " \"type\": \"integer\","]
14918#[doc = " \"format\": \"uint64\","]
14919#[doc = " \"minimum\": 0.0"]
14920#[doc = " },"]
14921#[doc = " \"max_locals_per_contract\": {"]
14922#[doc = " \"description\": \"If present, stores max number of locals declared globally in one contract\","]
14923#[doc = " \"type\": ["]
14924#[doc = " \"integer\","]
14925#[doc = " \"null\""]
14926#[doc = " ],"]
14927#[doc = " \"format\": \"uint64\","]
14928#[doc = " \"minimum\": 0.0"]
14929#[doc = " },"]
14930#[doc = " \"max_memory_pages\": {"]
14931#[doc = " \"description\": \"What is the maximal memory pages amount is allowed to have for a contract.\","]
14932#[doc = " \"type\": \"integer\","]
14933#[doc = " \"format\": \"uint32\","]
14934#[doc = " \"minimum\": 0.0"]
14935#[doc = " },"]
14936#[doc = " \"max_number_bytes_method_names\": {"]
14937#[doc = " \"description\": \"Max total length of all method names (including terminating character) for a function call\\npermission access key.\","]
14938#[doc = " \"type\": \"integer\","]
14939#[doc = " \"format\": \"uint64\","]
14940#[doc = " \"minimum\": 0.0"]
14941#[doc = " },"]
14942#[doc = " \"max_number_input_data_dependencies\": {"]
14943#[doc = " \"description\": \"Max number of input data dependencies\","]
14944#[doc = " \"type\": \"integer\","]
14945#[doc = " \"format\": \"uint64\","]
14946#[doc = " \"minimum\": 0.0"]
14947#[doc = " },"]
14948#[doc = " \"max_number_logs\": {"]
14949#[doc = " \"description\": \"Maximum number of log entries.\","]
14950#[doc = " \"type\": \"integer\","]
14951#[doc = " \"format\": \"uint64\","]
14952#[doc = " \"minimum\": 0.0"]
14953#[doc = " },"]
14954#[doc = " \"max_number_registers\": {"]
14955#[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.\","]
14956#[doc = " \"type\": \"integer\","]
14957#[doc = " \"format\": \"uint64\","]
14958#[doc = " \"minimum\": 0.0"]
14959#[doc = " },"]
14960#[doc = " \"max_promises_per_function_call_action\": {"]
14961#[doc = " \"description\": \"Max number of promises that a function call can create\","]
14962#[doc = " \"type\": \"integer\","]
14963#[doc = " \"format\": \"uint64\","]
14964#[doc = " \"minimum\": 0.0"]
14965#[doc = " },"]
14966#[doc = " \"max_receipt_size\": {"]
14967#[doc = " \"description\": \"Max receipt size\","]
14968#[doc = " \"type\": \"integer\","]
14969#[doc = " \"format\": \"uint64\","]
14970#[doc = " \"minimum\": 0.0"]
14971#[doc = " },"]
14972#[doc = " \"max_register_size\": {"]
14973#[doc = " \"description\": \"Maximum number of bytes that can be stored in a single register.\","]
14974#[doc = " \"type\": \"integer\","]
14975#[doc = " \"format\": \"uint64\","]
14976#[doc = " \"minimum\": 0.0"]
14977#[doc = " },"]
14978#[doc = " \"max_stack_height\": {"]
14979#[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.\","]
14980#[doc = " \"type\": \"integer\","]
14981#[doc = " \"format\": \"uint32\","]
14982#[doc = " \"minimum\": 0.0"]
14983#[doc = " },"]
14984#[doc = " \"max_total_log_length\": {"]
14985#[doc = " \"description\": \"Maximum total length in bytes of all log messages.\","]
14986#[doc = " \"type\": \"integer\","]
14987#[doc = " \"format\": \"uint64\","]
14988#[doc = " \"minimum\": 0.0"]
14989#[doc = " },"]
14990#[doc = " \"max_total_prepaid_gas\": {"]
14991#[doc = " \"description\": \"Max total prepaid gas for all function call actions per receipt.\","]
14992#[doc = " \"type\": \"integer\","]
14993#[doc = " \"format\": \"uint64\","]
14994#[doc = " \"minimum\": 0.0"]
14995#[doc = " },"]
14996#[doc = " \"max_transaction_size\": {"]
14997#[doc = " \"description\": \"Max transaction size\","]
14998#[doc = " \"type\": \"integer\","]
14999#[doc = " \"format\": \"uint64\","]
15000#[doc = " \"minimum\": 0.0"]
15001#[doc = " },"]
15002#[doc = " \"max_yield_payload_size\": {"]
15003#[doc = " \"description\": \"Maximum number of bytes for payload passed over a yield resume.\","]
15004#[doc = " \"type\": \"integer\","]
15005#[doc = " \"format\": \"uint64\","]
15006#[doc = " \"minimum\": 0.0"]
15007#[doc = " },"]
15008#[doc = " \"per_receipt_storage_proof_size_limit\": {"]
15009#[doc = " \"description\": \"Hard limit on the size of storage proof generated while executing a single receipt.\","]
15010#[doc = " \"type\": \"integer\","]
15011#[doc = " \"format\": \"uint\","]
15012#[doc = " \"minimum\": 0.0"]
15013#[doc = " },"]
15014#[doc = " \"registers_memory_limit\": {"]
15015#[doc = " \"description\": \"Limit of memory used by registers.\","]
15016#[doc = " \"type\": \"integer\","]
15017#[doc = " \"format\": \"uint64\","]
15018#[doc = " \"minimum\": 0.0"]
15019#[doc = " },"]
15020#[doc = " \"yield_timeout_length_in_blocks\": {"]
15021#[doc = " \"description\": \"Number of blocks after which a yielded promise times out.\","]
15022#[doc = " \"type\": \"integer\","]
15023#[doc = " \"format\": \"uint64\","]
15024#[doc = " \"minimum\": 0.0"]
15025#[doc = " }"]
15026#[doc = " }"]
15027#[doc = "}"]
15028#[doc = r" ```"]
15029#[doc = r" </details>"]
15030#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15031pub struct LimitConfig {
15032 #[doc = "Whether to enforce account_id well-formed-ness where it wasn't enforced\nhistorically."]
15033 #[serde(default = "defaults::limit_config_account_id_validity_rules_version")]
15034 pub account_id_validity_rules_version: AccountIdValidityRulesVersion,
15035 #[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."]
15036 pub initial_memory_pages: u32,
15037 #[doc = "Max number of actions per receipt."]
15038 pub max_actions_per_receipt: u64,
15039 #[doc = "Max length of arguments in a function call action."]
15040 pub max_arguments_length: u64,
15041 #[doc = "Max contract size"]
15042 pub max_contract_size: u64,
15043 #[doc = "If present, stores max number of functions in one contract"]
15044 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15045 pub max_functions_number_per_contract: ::std::option::Option<u64>,
15046 #[doc = "Max amount of gas that can be used, excluding gas attached to promises."]
15047 pub max_gas_burnt: u64,
15048 #[doc = "Max length of any method name (without terminating character)."]
15049 pub max_length_method_name: u64,
15050 #[doc = "Max length of returned data"]
15051 pub max_length_returned_data: u64,
15052 #[doc = "Max storage key size"]
15053 pub max_length_storage_key: u64,
15054 #[doc = "Max storage value size"]
15055 pub max_length_storage_value: u64,
15056 #[doc = "If present, stores max number of locals declared globally in one contract"]
15057 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15058 pub max_locals_per_contract: ::std::option::Option<u64>,
15059 #[doc = "What is the maximal memory pages amount is allowed to have for a contract."]
15060 pub max_memory_pages: u32,
15061 #[doc = "Max total length of all method names (including terminating character) for a function call\npermission access key."]
15062 pub max_number_bytes_method_names: u64,
15063 #[doc = "Max number of input data dependencies"]
15064 pub max_number_input_data_dependencies: u64,
15065 #[doc = "Maximum number of log entries."]
15066 pub max_number_logs: u64,
15067 #[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."]
15068 pub max_number_registers: u64,
15069 #[doc = "Max number of promises that a function call can create"]
15070 pub max_promises_per_function_call_action: u64,
15071 #[doc = "Max receipt size"]
15072 pub max_receipt_size: u64,
15073 #[doc = "Maximum number of bytes that can be stored in a single register."]
15074 pub max_register_size: u64,
15075 #[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."]
15076 pub max_stack_height: u32,
15077 #[doc = "Maximum total length in bytes of all log messages."]
15078 pub max_total_log_length: u64,
15079 #[doc = "Max total prepaid gas for all function call actions per receipt."]
15080 pub max_total_prepaid_gas: u64,
15081 #[doc = "Max transaction size"]
15082 pub max_transaction_size: u64,
15083 #[doc = "Maximum number of bytes for payload passed over a yield resume."]
15084 pub max_yield_payload_size: u64,
15085 #[doc = "Hard limit on the size of storage proof generated while executing a single receipt."]
15086 pub per_receipt_storage_proof_size_limit: u32,
15087 #[doc = "Limit of memory used by registers."]
15088 pub registers_memory_limit: u64,
15089 #[doc = "Number of blocks after which a yielded promise times out."]
15090 pub yield_timeout_length_in_blocks: u64,
15091}
15092impl ::std::convert::From<&LimitConfig> for LimitConfig {
15093 fn from(value: &LimitConfig) -> Self {
15094 value.clone()
15095 }
15096}
15097#[doc = "`LogSummaryStyle`"]
15098#[doc = r""]
15099#[doc = r" <details><summary>JSON schema</summary>"]
15100#[doc = r""]
15101#[doc = r" ```json"]
15102#[doc = "{"]
15103#[doc = " \"type\": \"string\","]
15104#[doc = " \"enum\": ["]
15105#[doc = " \"plain\","]
15106#[doc = " \"colored\""]
15107#[doc = " ]"]
15108#[doc = "}"]
15109#[doc = r" ```"]
15110#[doc = r" </details>"]
15111#[derive(
15112 :: serde :: Deserialize,
15113 :: serde :: Serialize,
15114 Clone,
15115 Copy,
15116 Debug,
15117 Eq,
15118 Hash,
15119 Ord,
15120 PartialEq,
15121 PartialOrd,
15122)]
15123pub enum LogSummaryStyle {
15124 #[serde(rename = "plain")]
15125 Plain,
15126 #[serde(rename = "colored")]
15127 Colored,
15128}
15129impl ::std::convert::From<&Self> for LogSummaryStyle {
15130 fn from(value: &LogSummaryStyle) -> Self {
15131 value.clone()
15132 }
15133}
15134impl ::std::fmt::Display for LogSummaryStyle {
15135 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15136 match *self {
15137 Self::Plain => write!(f, "plain"),
15138 Self::Colored => write!(f, "colored"),
15139 }
15140 }
15141}
15142impl ::std::str::FromStr for LogSummaryStyle {
15143 type Err = self::error::ConversionError;
15144 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15145 match value {
15146 "plain" => Ok(Self::Plain),
15147 "colored" => Ok(Self::Colored),
15148 _ => Err("invalid value".into()),
15149 }
15150 }
15151}
15152impl ::std::convert::TryFrom<&str> for LogSummaryStyle {
15153 type Error = self::error::ConversionError;
15154 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15155 value.parse()
15156 }
15157}
15158impl ::std::convert::TryFrom<&::std::string::String> for LogSummaryStyle {
15159 type Error = self::error::ConversionError;
15160 fn try_from(
15161 value: &::std::string::String,
15162 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15163 value.parse()
15164 }
15165}
15166impl ::std::convert::TryFrom<::std::string::String> for LogSummaryStyle {
15167 type Error = self::error::ConversionError;
15168 fn try_from(
15169 value: ::std::string::String,
15170 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15171 value.parse()
15172 }
15173}
15174#[doc = "`MerklePathItem`"]
15175#[doc = r""]
15176#[doc = r" <details><summary>JSON schema</summary>"]
15177#[doc = r""]
15178#[doc = r" ```json"]
15179#[doc = "{"]
15180#[doc = " \"type\": \"object\","]
15181#[doc = " \"required\": ["]
15182#[doc = " \"direction\","]
15183#[doc = " \"hash\""]
15184#[doc = " ],"]
15185#[doc = " \"properties\": {"]
15186#[doc = " \"direction\": {"]
15187#[doc = " \"$ref\": \"#/components/schemas/Direction\""]
15188#[doc = " },"]
15189#[doc = " \"hash\": {"]
15190#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
15191#[doc = " }"]
15192#[doc = " }"]
15193#[doc = "}"]
15194#[doc = r" ```"]
15195#[doc = r" </details>"]
15196#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15197pub struct MerklePathItem {
15198 pub direction: Direction,
15199 pub hash: CryptoHash,
15200}
15201impl ::std::convert::From<&MerklePathItem> for MerklePathItem {
15202 fn from(value: &MerklePathItem) -> Self {
15203 value.clone()
15204 }
15205}
15206#[doc = "`MethodResolveError`"]
15207#[doc = r""]
15208#[doc = r" <details><summary>JSON schema</summary>"]
15209#[doc = r""]
15210#[doc = r" ```json"]
15211#[doc = "{"]
15212#[doc = " \"type\": \"string\","]
15213#[doc = " \"enum\": ["]
15214#[doc = " \"MethodEmptyName\","]
15215#[doc = " \"MethodNotFound\","]
15216#[doc = " \"MethodInvalidSignature\""]
15217#[doc = " ]"]
15218#[doc = "}"]
15219#[doc = r" ```"]
15220#[doc = r" </details>"]
15221#[derive(
15222 :: serde :: Deserialize,
15223 :: serde :: Serialize,
15224 Clone,
15225 Copy,
15226 Debug,
15227 Eq,
15228 Hash,
15229 Ord,
15230 PartialEq,
15231 PartialOrd,
15232)]
15233pub enum MethodResolveError {
15234 MethodEmptyName,
15235 MethodNotFound,
15236 MethodInvalidSignature,
15237}
15238impl ::std::convert::From<&Self> for MethodResolveError {
15239 fn from(value: &MethodResolveError) -> Self {
15240 value.clone()
15241 }
15242}
15243impl ::std::fmt::Display for MethodResolveError {
15244 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15245 match *self {
15246 Self::MethodEmptyName => write!(f, "MethodEmptyName"),
15247 Self::MethodNotFound => write!(f, "MethodNotFound"),
15248 Self::MethodInvalidSignature => write!(f, "MethodInvalidSignature"),
15249 }
15250 }
15251}
15252impl ::std::str::FromStr for MethodResolveError {
15253 type Err = self::error::ConversionError;
15254 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15255 match value {
15256 "MethodEmptyName" => Ok(Self::MethodEmptyName),
15257 "MethodNotFound" => Ok(Self::MethodNotFound),
15258 "MethodInvalidSignature" => Ok(Self::MethodInvalidSignature),
15259 _ => Err("invalid value".into()),
15260 }
15261 }
15262}
15263impl ::std::convert::TryFrom<&str> for MethodResolveError {
15264 type Error = self::error::ConversionError;
15265 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15266 value.parse()
15267 }
15268}
15269impl ::std::convert::TryFrom<&::std::string::String> for MethodResolveError {
15270 type Error = self::error::ConversionError;
15271 fn try_from(
15272 value: &::std::string::String,
15273 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15274 value.parse()
15275 }
15276}
15277impl ::std::convert::TryFrom<::std::string::String> for MethodResolveError {
15278 type Error = self::error::ConversionError;
15279 fn try_from(
15280 value: ::std::string::String,
15281 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15282 value.parse()
15283 }
15284}
15285#[doc = "`MissingTrieValue`"]
15286#[doc = r""]
15287#[doc = r" <details><summary>JSON schema</summary>"]
15288#[doc = r""]
15289#[doc = r" ```json"]
15290#[doc = "{"]
15291#[doc = " \"type\": \"object\","]
15292#[doc = " \"required\": ["]
15293#[doc = " \"context\","]
15294#[doc = " \"hash\""]
15295#[doc = " ],"]
15296#[doc = " \"properties\": {"]
15297#[doc = " \"context\": {"]
15298#[doc = " \"$ref\": \"#/components/schemas/MissingTrieValueContext\""]
15299#[doc = " },"]
15300#[doc = " \"hash\": {"]
15301#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
15302#[doc = " }"]
15303#[doc = " }"]
15304#[doc = "}"]
15305#[doc = r" ```"]
15306#[doc = r" </details>"]
15307#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15308pub struct MissingTrieValue {
15309 pub context: MissingTrieValueContext,
15310 pub hash: CryptoHash,
15311}
15312impl ::std::convert::From<&MissingTrieValue> for MissingTrieValue {
15313 fn from(value: &MissingTrieValue) -> Self {
15314 value.clone()
15315 }
15316}
15317#[doc = "Contexts in which `StorageError::MissingTrieValue` error might occur."]
15318#[doc = r""]
15319#[doc = r" <details><summary>JSON schema</summary>"]
15320#[doc = r""]
15321#[doc = r" ```json"]
15322#[doc = "{"]
15323#[doc = " \"description\": \"Contexts in which `StorageError::MissingTrieValue` error might occur.\","]
15324#[doc = " \"oneOf\": ["]
15325#[doc = " {"]
15326#[doc = " \"description\": \"Missing trie value when reading from TrieIterator.\","]
15327#[doc = " \"type\": \"string\","]
15328#[doc = " \"enum\": ["]
15329#[doc = " \"TrieIterator\""]
15330#[doc = " ]"]
15331#[doc = " },"]
15332#[doc = " {"]
15333#[doc = " \"description\": \"Missing trie value when reading from TriePrefetchingStorage.\","]
15334#[doc = " \"type\": \"string\","]
15335#[doc = " \"enum\": ["]
15336#[doc = " \"TriePrefetchingStorage\""]
15337#[doc = " ]"]
15338#[doc = " },"]
15339#[doc = " {"]
15340#[doc = " \"description\": \"Missing trie value when reading from TrieMemoryPartialStorage.\","]
15341#[doc = " \"type\": \"string\","]
15342#[doc = " \"enum\": ["]
15343#[doc = " \"TrieMemoryPartialStorage\""]
15344#[doc = " ]"]
15345#[doc = " },"]
15346#[doc = " {"]
15347#[doc = " \"description\": \"Missing trie value when reading from TrieStorage.\","]
15348#[doc = " \"type\": \"string\","]
15349#[doc = " \"enum\": ["]
15350#[doc = " \"TrieStorage\""]
15351#[doc = " ]"]
15352#[doc = " }"]
15353#[doc = " ]"]
15354#[doc = "}"]
15355#[doc = r" ```"]
15356#[doc = r" </details>"]
15357#[derive(
15358 :: serde :: Deserialize,
15359 :: serde :: Serialize,
15360 Clone,
15361 Copy,
15362 Debug,
15363 Eq,
15364 Hash,
15365 Ord,
15366 PartialEq,
15367 PartialOrd,
15368)]
15369pub enum MissingTrieValueContext {
15370 #[doc = "Missing trie value when reading from TrieIterator."]
15371 TrieIterator,
15372 #[doc = "Missing trie value when reading from TriePrefetchingStorage."]
15373 TriePrefetchingStorage,
15374 #[doc = "Missing trie value when reading from TrieMemoryPartialStorage."]
15375 TrieMemoryPartialStorage,
15376 #[doc = "Missing trie value when reading from TrieStorage."]
15377 TrieStorage,
15378}
15379impl ::std::convert::From<&Self> for MissingTrieValueContext {
15380 fn from(value: &MissingTrieValueContext) -> Self {
15381 value.clone()
15382 }
15383}
15384impl ::std::fmt::Display for MissingTrieValueContext {
15385 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15386 match *self {
15387 Self::TrieIterator => write!(f, "TrieIterator"),
15388 Self::TriePrefetchingStorage => write!(f, "TriePrefetchingStorage"),
15389 Self::TrieMemoryPartialStorage => write!(f, "TrieMemoryPartialStorage"),
15390 Self::TrieStorage => write!(f, "TrieStorage"),
15391 }
15392 }
15393}
15394impl ::std::str::FromStr for MissingTrieValueContext {
15395 type Err = self::error::ConversionError;
15396 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15397 match value {
15398 "TrieIterator" => Ok(Self::TrieIterator),
15399 "TriePrefetchingStorage" => Ok(Self::TriePrefetchingStorage),
15400 "TrieMemoryPartialStorage" => Ok(Self::TrieMemoryPartialStorage),
15401 "TrieStorage" => Ok(Self::TrieStorage),
15402 _ => Err("invalid value".into()),
15403 }
15404 }
15405}
15406impl ::std::convert::TryFrom<&str> for MissingTrieValueContext {
15407 type Error = self::error::ConversionError;
15408 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15409 value.parse()
15410 }
15411}
15412impl ::std::convert::TryFrom<&::std::string::String> for MissingTrieValueContext {
15413 type Error = self::error::ConversionError;
15414 fn try_from(
15415 value: &::std::string::String,
15416 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15417 value.parse()
15418 }
15419}
15420impl ::std::convert::TryFrom<::std::string::String> for MissingTrieValueContext {
15421 type Error = self::error::ConversionError;
15422 fn try_from(
15423 value: ::std::string::String,
15424 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15425 value.parse()
15426 }
15427}
15428#[doc = "`MutableConfigValue`"]
15429#[doc = r""]
15430#[doc = r" <details><summary>JSON schema</summary>"]
15431#[doc = r""]
15432#[doc = r" ```json"]
15433#[doc = "{"]
15434#[doc = " \"type\": \"string\""]
15435#[doc = "}"]
15436#[doc = r" ```"]
15437#[doc = r" </details>"]
15438#[derive(
15439 :: serde :: Deserialize,
15440 :: serde :: Serialize,
15441 Clone,
15442 Debug,
15443 Eq,
15444 Hash,
15445 Ord,
15446 PartialEq,
15447 PartialOrd,
15448)]
15449#[serde(transparent)]
15450pub struct MutableConfigValue(pub ::std::string::String);
15451impl ::std::ops::Deref for MutableConfigValue {
15452 type Target = ::std::string::String;
15453 fn deref(&self) -> &::std::string::String {
15454 &self.0
15455 }
15456}
15457impl ::std::convert::From<MutableConfigValue> for ::std::string::String {
15458 fn from(value: MutableConfigValue) -> Self {
15459 value.0
15460 }
15461}
15462impl ::std::convert::From<&MutableConfigValue> for MutableConfigValue {
15463 fn from(value: &MutableConfigValue) -> Self {
15464 value.clone()
15465 }
15466}
15467impl ::std::convert::From<::std::string::String> for MutableConfigValue {
15468 fn from(value: ::std::string::String) -> Self {
15469 Self(value)
15470 }
15471}
15472impl ::std::str::FromStr for MutableConfigValue {
15473 type Err = ::std::convert::Infallible;
15474 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
15475 Ok(Self(value.to_string()))
15476 }
15477}
15478impl ::std::fmt::Display for MutableConfigValue {
15479 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15480 self.0.fmt(f)
15481 }
15482}
15483#[doc = "`NetworkInfoView`"]
15484#[doc = r""]
15485#[doc = r" <details><summary>JSON schema</summary>"]
15486#[doc = r""]
15487#[doc = r" ```json"]
15488#[doc = "{"]
15489#[doc = " \"type\": \"object\","]
15490#[doc = " \"required\": ["]
15491#[doc = " \"connected_peers\","]
15492#[doc = " \"known_producers\","]
15493#[doc = " \"num_connected_peers\","]
15494#[doc = " \"peer_max_count\","]
15495#[doc = " \"tier1_accounts_data\","]
15496#[doc = " \"tier1_accounts_keys\","]
15497#[doc = " \"tier1_connections\""]
15498#[doc = " ],"]
15499#[doc = " \"properties\": {"]
15500#[doc = " \"connected_peers\": {"]
15501#[doc = " \"type\": \"array\","]
15502#[doc = " \"items\": {"]
15503#[doc = " \"$ref\": \"#/components/schemas/PeerInfoView\""]
15504#[doc = " }"]
15505#[doc = " },"]
15506#[doc = " \"known_producers\": {"]
15507#[doc = " \"type\": \"array\","]
15508#[doc = " \"items\": {"]
15509#[doc = " \"$ref\": \"#/components/schemas/KnownProducerView\""]
15510#[doc = " }"]
15511#[doc = " },"]
15512#[doc = " \"num_connected_peers\": {"]
15513#[doc = " \"type\": \"integer\","]
15514#[doc = " \"format\": \"uint\","]
15515#[doc = " \"minimum\": 0.0"]
15516#[doc = " },"]
15517#[doc = " \"peer_max_count\": {"]
15518#[doc = " \"type\": \"integer\","]
15519#[doc = " \"format\": \"uint32\","]
15520#[doc = " \"minimum\": 0.0"]
15521#[doc = " },"]
15522#[doc = " \"tier1_accounts_data\": {"]
15523#[doc = " \"type\": \"array\","]
15524#[doc = " \"items\": {"]
15525#[doc = " \"$ref\": \"#/components/schemas/AccountDataView\""]
15526#[doc = " }"]
15527#[doc = " },"]
15528#[doc = " \"tier1_accounts_keys\": {"]
15529#[doc = " \"type\": \"array\","]
15530#[doc = " \"items\": {"]
15531#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
15532#[doc = " }"]
15533#[doc = " },"]
15534#[doc = " \"tier1_connections\": {"]
15535#[doc = " \"type\": \"array\","]
15536#[doc = " \"items\": {"]
15537#[doc = " \"$ref\": \"#/components/schemas/PeerInfoView\""]
15538#[doc = " }"]
15539#[doc = " }"]
15540#[doc = " }"]
15541#[doc = "}"]
15542#[doc = r" ```"]
15543#[doc = r" </details>"]
15544#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15545pub struct NetworkInfoView {
15546 pub connected_peers: ::std::vec::Vec<PeerInfoView>,
15547 pub known_producers: ::std::vec::Vec<KnownProducerView>,
15548 pub num_connected_peers: u32,
15549 pub peer_max_count: u32,
15550 pub tier1_accounts_data: ::std::vec::Vec<AccountDataView>,
15551 pub tier1_accounts_keys: ::std::vec::Vec<PublicKey>,
15552 pub tier1_connections: ::std::vec::Vec<PeerInfoView>,
15553}
15554impl ::std::convert::From<&NetworkInfoView> for NetworkInfoView {
15555 fn from(value: &NetworkInfoView) -> Self {
15556 value.clone()
15557 }
15558}
15559#[doc = "`NextEpochValidatorInfo`"]
15560#[doc = r""]
15561#[doc = r" <details><summary>JSON schema</summary>"]
15562#[doc = r""]
15563#[doc = r" ```json"]
15564#[doc = "{"]
15565#[doc = " \"type\": \"object\","]
15566#[doc = " \"required\": ["]
15567#[doc = " \"account_id\","]
15568#[doc = " \"public_key\","]
15569#[doc = " \"shards\","]
15570#[doc = " \"stake\""]
15571#[doc = " ],"]
15572#[doc = " \"properties\": {"]
15573#[doc = " \"account_id\": {"]
15574#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
15575#[doc = " },"]
15576#[doc = " \"public_key\": {"]
15577#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
15578#[doc = " },"]
15579#[doc = " \"shards\": {"]
15580#[doc = " \"type\": \"array\","]
15581#[doc = " \"items\": {"]
15582#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
15583#[doc = " }"]
15584#[doc = " },"]
15585#[doc = " \"stake\": {"]
15586#[doc = " \"type\": \"string\""]
15587#[doc = " }"]
15588#[doc = " }"]
15589#[doc = "}"]
15590#[doc = r" ```"]
15591#[doc = r" </details>"]
15592#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15593pub struct NextEpochValidatorInfo {
15594 pub account_id: AccountId,
15595 pub public_key: PublicKey,
15596 pub shards: ::std::vec::Vec<ShardId>,
15597 pub stake: ::std::string::String,
15598}
15599impl ::std::convert::From<&NextEpochValidatorInfo> for NextEpochValidatorInfo {
15600 fn from(value: &NextEpochValidatorInfo) -> Self {
15601 value.clone()
15602 }
15603}
15604#[doc = "This is Action which mustn't contain DelegateAction.\n\nThis struct is needed to avoid the recursion when Action/DelegateAction is deserialized.\n\nImportant: Don't make the inner Action public, this must only be constructed\nthrough the correct interface that ensures the inner Action is actually not\na delegate action. That would break an assumption of this type, which we use\nin several places. For example, borsh de-/serialization relies on it. If the\ninvariant is broken, we may end up with a `Transaction` or `Receipt` that we\ncan serialize but deserializing it back causes a parsing error."]
15605#[doc = r""]
15606#[doc = r" <details><summary>JSON schema</summary>"]
15607#[doc = r""]
15608#[doc = r" ```json"]
15609#[doc = "{"]
15610#[doc = " \"description\": \"This is Action which mustn't contain DelegateAction.\\n\\nThis struct is needed to avoid the recursion when Action/DelegateAction is deserialized.\\n\\nImportant: Don't make the inner Action public, this must only be constructed\\nthrough the correct interface that ensures the inner Action is actually not\\na delegate action. That would break an assumption of this type, which we use\\nin several places. For example, borsh de-/serialization relies on it. If the\\ninvariant is broken, we may end up with a `Transaction` or `Receipt` that we\\ncan serialize but deserializing it back causes a parsing error.\","]
15611#[doc = " \"allOf\": ["]
15612#[doc = " {"]
15613#[doc = " \"$ref\": \"#/components/schemas/Action\""]
15614#[doc = " }"]
15615#[doc = " ]"]
15616#[doc = "}"]
15617#[doc = r" ```"]
15618#[doc = r" </details>"]
15619#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15620#[serde(transparent)]
15621pub struct NonDelegateAction(pub Action);
15622impl ::std::ops::Deref for NonDelegateAction {
15623 type Target = Action;
15624 fn deref(&self) -> &Action {
15625 &self.0
15626 }
15627}
15628impl ::std::convert::From<NonDelegateAction> for Action {
15629 fn from(value: NonDelegateAction) -> Self {
15630 value.0
15631 }
15632}
15633impl ::std::convert::From<&NonDelegateAction> for NonDelegateAction {
15634 fn from(value: &NonDelegateAction) -> Self {
15635 value.clone()
15636 }
15637}
15638impl ::std::convert::From<Action> for NonDelegateAction {
15639 fn from(value: Action) -> Self {
15640 Self(value)
15641 }
15642}
15643#[doc = "Peer id is the public key."]
15644#[doc = r""]
15645#[doc = r" <details><summary>JSON schema</summary>"]
15646#[doc = r""]
15647#[doc = r" ```json"]
15648#[doc = "{"]
15649#[doc = " \"description\": \"Peer id is the public key.\","]
15650#[doc = " \"allOf\": ["]
15651#[doc = " {"]
15652#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
15653#[doc = " }"]
15654#[doc = " ]"]
15655#[doc = "}"]
15656#[doc = r" ```"]
15657#[doc = r" </details>"]
15658#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15659#[serde(transparent)]
15660pub struct PeerId(pub PublicKey);
15661impl ::std::ops::Deref for PeerId {
15662 type Target = PublicKey;
15663 fn deref(&self) -> &PublicKey {
15664 &self.0
15665 }
15666}
15667impl ::std::convert::From<PeerId> for PublicKey {
15668 fn from(value: PeerId) -> Self {
15669 value.0
15670 }
15671}
15672impl ::std::convert::From<&PeerId> for PeerId {
15673 fn from(value: &PeerId) -> Self {
15674 value.clone()
15675 }
15676}
15677impl ::std::convert::From<PublicKey> for PeerId {
15678 fn from(value: PublicKey) -> Self {
15679 Self(value)
15680 }
15681}
15682impl ::std::str::FromStr for PeerId {
15683 type Err = <PublicKey as ::std::str::FromStr>::Err;
15684 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
15685 Ok(Self(value.parse()?))
15686 }
15687}
15688impl ::std::convert::TryFrom<&str> for PeerId {
15689 type Error = <PublicKey as ::std::str::FromStr>::Err;
15690 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
15691 value.parse()
15692 }
15693}
15694impl ::std::convert::TryFrom<&String> for PeerId {
15695 type Error = <PublicKey as ::std::str::FromStr>::Err;
15696 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
15697 value.parse()
15698 }
15699}
15700impl ::std::convert::TryFrom<String> for PeerId {
15701 type Error = <PublicKey as ::std::str::FromStr>::Err;
15702 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
15703 value.parse()
15704 }
15705}
15706impl ::std::fmt::Display for PeerId {
15707 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15708 self.0.fmt(f)
15709 }
15710}
15711#[doc = "`PeerInfoView`"]
15712#[doc = r""]
15713#[doc = r" <details><summary>JSON schema</summary>"]
15714#[doc = r""]
15715#[doc = r" ```json"]
15716#[doc = "{"]
15717#[doc = " \"type\": \"object\","]
15718#[doc = " \"required\": ["]
15719#[doc = " \"addr\","]
15720#[doc = " \"archival\","]
15721#[doc = " \"connection_established_time_millis\","]
15722#[doc = " \"is_highest_block_invalid\","]
15723#[doc = " \"is_outbound_peer\","]
15724#[doc = " \"last_time_peer_requested_millis\","]
15725#[doc = " \"last_time_received_message_millis\","]
15726#[doc = " \"nonce\","]
15727#[doc = " \"peer_id\","]
15728#[doc = " \"received_bytes_per_sec\","]
15729#[doc = " \"sent_bytes_per_sec\","]
15730#[doc = " \"tracked_shards\""]
15731#[doc = " ],"]
15732#[doc = " \"properties\": {"]
15733#[doc = " \"account_id\": {"]
15734#[doc = " \"anyOf\": ["]
15735#[doc = " {"]
15736#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
15737#[doc = " },"]
15738#[doc = " {"]
15739#[doc = " \"type\": \"null\""]
15740#[doc = " }"]
15741#[doc = " ]"]
15742#[doc = " },"]
15743#[doc = " \"addr\": {"]
15744#[doc = " \"type\": \"string\""]
15745#[doc = " },"]
15746#[doc = " \"archival\": {"]
15747#[doc = " \"type\": \"boolean\""]
15748#[doc = " },"]
15749#[doc = " \"block_hash\": {"]
15750#[doc = " \"anyOf\": ["]
15751#[doc = " {"]
15752#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
15753#[doc = " },"]
15754#[doc = " {"]
15755#[doc = " \"type\": \"null\""]
15756#[doc = " }"]
15757#[doc = " ]"]
15758#[doc = " },"]
15759#[doc = " \"connection_established_time_millis\": {"]
15760#[doc = " \"type\": \"integer\","]
15761#[doc = " \"format\": \"uint64\","]
15762#[doc = " \"minimum\": 0.0"]
15763#[doc = " },"]
15764#[doc = " \"height\": {"]
15765#[doc = " \"type\": ["]
15766#[doc = " \"integer\","]
15767#[doc = " \"null\""]
15768#[doc = " ],"]
15769#[doc = " \"format\": \"uint64\","]
15770#[doc = " \"minimum\": 0.0"]
15771#[doc = " },"]
15772#[doc = " \"is_highest_block_invalid\": {"]
15773#[doc = " \"type\": \"boolean\""]
15774#[doc = " },"]
15775#[doc = " \"is_outbound_peer\": {"]
15776#[doc = " \"type\": \"boolean\""]
15777#[doc = " },"]
15778#[doc = " \"last_time_peer_requested_millis\": {"]
15779#[doc = " \"type\": \"integer\","]
15780#[doc = " \"format\": \"uint64\","]
15781#[doc = " \"minimum\": 0.0"]
15782#[doc = " },"]
15783#[doc = " \"last_time_received_message_millis\": {"]
15784#[doc = " \"type\": \"integer\","]
15785#[doc = " \"format\": \"uint64\","]
15786#[doc = " \"minimum\": 0.0"]
15787#[doc = " },"]
15788#[doc = " \"nonce\": {"]
15789#[doc = " \"description\": \"Connection nonce.\","]
15790#[doc = " \"type\": \"integer\","]
15791#[doc = " \"format\": \"uint64\","]
15792#[doc = " \"minimum\": 0.0"]
15793#[doc = " },"]
15794#[doc = " \"peer_id\": {"]
15795#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
15796#[doc = " },"]
15797#[doc = " \"received_bytes_per_sec\": {"]
15798#[doc = " \"type\": \"integer\","]
15799#[doc = " \"format\": \"uint64\","]
15800#[doc = " \"minimum\": 0.0"]
15801#[doc = " },"]
15802#[doc = " \"sent_bytes_per_sec\": {"]
15803#[doc = " \"type\": \"integer\","]
15804#[doc = " \"format\": \"uint64\","]
15805#[doc = " \"minimum\": 0.0"]
15806#[doc = " },"]
15807#[doc = " \"tracked_shards\": {"]
15808#[doc = " \"type\": \"array\","]
15809#[doc = " \"items\": {"]
15810#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
15811#[doc = " }"]
15812#[doc = " }"]
15813#[doc = " }"]
15814#[doc = "}"]
15815#[doc = r" ```"]
15816#[doc = r" </details>"]
15817#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15818pub struct PeerInfoView {
15819 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15820 pub account_id: ::std::option::Option<AccountId>,
15821 pub addr: ::std::string::String,
15822 pub archival: bool,
15823 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15824 pub block_hash: ::std::option::Option<CryptoHash>,
15825 pub connection_established_time_millis: u64,
15826 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15827 pub height: ::std::option::Option<u64>,
15828 pub is_highest_block_invalid: bool,
15829 pub is_outbound_peer: bool,
15830 pub last_time_peer_requested_millis: u64,
15831 pub last_time_received_message_millis: u64,
15832 #[doc = "Connection nonce."]
15833 pub nonce: u64,
15834 pub peer_id: PublicKey,
15835 pub received_bytes_per_sec: u64,
15836 pub sent_bytes_per_sec: u64,
15837 pub tracked_shards: ::std::vec::Vec<ShardId>,
15838}
15839impl ::std::convert::From<&PeerInfoView> for PeerInfoView {
15840 fn from(value: &PeerInfoView) -> Self {
15841 value.clone()
15842 }
15843}
15844#[doc = "Error that can occur while preparing or executing Wasm smart-contract."]
15845#[doc = r""]
15846#[doc = r" <details><summary>JSON schema</summary>"]
15847#[doc = r""]
15848#[doc = r" ```json"]
15849#[doc = "{"]
15850#[doc = " \"description\": \"Error that can occur while preparing or executing Wasm smart-contract.\","]
15851#[doc = " \"oneOf\": ["]
15852#[doc = " {"]
15853#[doc = " \"description\": \"Error happened while serializing the module.\","]
15854#[doc = " \"type\": \"string\","]
15855#[doc = " \"enum\": ["]
15856#[doc = " \"Serialization\""]
15857#[doc = " ]"]
15858#[doc = " },"]
15859#[doc = " {"]
15860#[doc = " \"description\": \"Error happened while deserializing the module.\","]
15861#[doc = " \"type\": \"string\","]
15862#[doc = " \"enum\": ["]
15863#[doc = " \"Deserialization\""]
15864#[doc = " ]"]
15865#[doc = " },"]
15866#[doc = " {"]
15867#[doc = " \"description\": \"Internal memory declaration has been found in the module.\","]
15868#[doc = " \"type\": \"string\","]
15869#[doc = " \"enum\": ["]
15870#[doc = " \"InternalMemoryDeclared\""]
15871#[doc = " ]"]
15872#[doc = " },"]
15873#[doc = " {"]
15874#[doc = " \"description\": \"Gas instrumentation failed.\\n\\nThis most likely indicates the module isn't valid.\","]
15875#[doc = " \"type\": \"string\","]
15876#[doc = " \"enum\": ["]
15877#[doc = " \"GasInstrumentation\""]
15878#[doc = " ]"]
15879#[doc = " },"]
15880#[doc = " {"]
15881#[doc = " \"description\": \"Stack instrumentation failed.\\n\\nThis most likely indicates the module isn't valid.\","]
15882#[doc = " \"type\": \"string\","]
15883#[doc = " \"enum\": ["]
15884#[doc = " \"StackHeightInstrumentation\""]
15885#[doc = " ]"]
15886#[doc = " },"]
15887#[doc = " {"]
15888#[doc = " \"description\": \"Error happened during instantiation.\\n\\nThis might indicate that `start` function trapped, or module isn't\\ninstantiable and/or un-linkable.\","]
15889#[doc = " \"type\": \"string\","]
15890#[doc = " \"enum\": ["]
15891#[doc = " \"Instantiate\""]
15892#[doc = " ]"]
15893#[doc = " },"]
15894#[doc = " {"]
15895#[doc = " \"description\": \"Error creating memory.\","]
15896#[doc = " \"type\": \"string\","]
15897#[doc = " \"enum\": ["]
15898#[doc = " \"Memory\""]
15899#[doc = " ]"]
15900#[doc = " },"]
15901#[doc = " {"]
15902#[doc = " \"description\": \"Contract contains too many functions.\","]
15903#[doc = " \"type\": \"string\","]
15904#[doc = " \"enum\": ["]
15905#[doc = " \"TooManyFunctions\""]
15906#[doc = " ]"]
15907#[doc = " },"]
15908#[doc = " {"]
15909#[doc = " \"description\": \"Contract contains too many locals.\","]
15910#[doc = " \"type\": \"string\","]
15911#[doc = " \"enum\": ["]
15912#[doc = " \"TooManyLocals\""]
15913#[doc = " ]"]
15914#[doc = " }"]
15915#[doc = " ]"]
15916#[doc = "}"]
15917#[doc = r" ```"]
15918#[doc = r" </details>"]
15919#[derive(
15920 :: serde :: Deserialize,
15921 :: serde :: Serialize,
15922 Clone,
15923 Copy,
15924 Debug,
15925 Eq,
15926 Hash,
15927 Ord,
15928 PartialEq,
15929 PartialOrd,
15930)]
15931pub enum PrepareError {
15932 #[doc = "Error happened while serializing the module."]
15933 Serialization,
15934 #[doc = "Error happened while deserializing the module."]
15935 Deserialization,
15936 #[doc = "Internal memory declaration has been found in the module."]
15937 InternalMemoryDeclared,
15938 #[doc = "Gas instrumentation failed.\n\nThis most likely indicates the module isn't valid."]
15939 GasInstrumentation,
15940 #[doc = "Stack instrumentation failed.\n\nThis most likely indicates the module isn't valid."]
15941 StackHeightInstrumentation,
15942 #[doc = "Error happened during instantiation.\n\nThis might indicate that `start` function trapped, or module isn't\ninstantiable and/or un-linkable."]
15943 Instantiate,
15944 #[doc = "Error creating memory."]
15945 Memory,
15946 #[doc = "Contract contains too many functions."]
15947 TooManyFunctions,
15948 #[doc = "Contract contains too many locals."]
15949 TooManyLocals,
15950}
15951impl ::std::convert::From<&Self> for PrepareError {
15952 fn from(value: &PrepareError) -> Self {
15953 value.clone()
15954 }
15955}
15956impl ::std::fmt::Display for PrepareError {
15957 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15958 match *self {
15959 Self::Serialization => write!(f, "Serialization"),
15960 Self::Deserialization => write!(f, "Deserialization"),
15961 Self::InternalMemoryDeclared => write!(f, "InternalMemoryDeclared"),
15962 Self::GasInstrumentation => write!(f, "GasInstrumentation"),
15963 Self::StackHeightInstrumentation => write!(f, "StackHeightInstrumentation"),
15964 Self::Instantiate => write!(f, "Instantiate"),
15965 Self::Memory => write!(f, "Memory"),
15966 Self::TooManyFunctions => write!(f, "TooManyFunctions"),
15967 Self::TooManyLocals => write!(f, "TooManyLocals"),
15968 }
15969 }
15970}
15971impl ::std::str::FromStr for PrepareError {
15972 type Err = self::error::ConversionError;
15973 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15974 match value {
15975 "Serialization" => Ok(Self::Serialization),
15976 "Deserialization" => Ok(Self::Deserialization),
15977 "InternalMemoryDeclared" => Ok(Self::InternalMemoryDeclared),
15978 "GasInstrumentation" => Ok(Self::GasInstrumentation),
15979 "StackHeightInstrumentation" => Ok(Self::StackHeightInstrumentation),
15980 "Instantiate" => Ok(Self::Instantiate),
15981 "Memory" => Ok(Self::Memory),
15982 "TooManyFunctions" => Ok(Self::TooManyFunctions),
15983 "TooManyLocals" => Ok(Self::TooManyLocals),
15984 _ => Err("invalid value".into()),
15985 }
15986 }
15987}
15988impl ::std::convert::TryFrom<&str> for PrepareError {
15989 type Error = self::error::ConversionError;
15990 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15991 value.parse()
15992 }
15993}
15994impl ::std::convert::TryFrom<&::std::string::String> for PrepareError {
15995 type Error = self::error::ConversionError;
15996 fn try_from(
15997 value: &::std::string::String,
15998 ) -> ::std::result::Result<Self, self::error::ConversionError> {
15999 value.parse()
16000 }
16001}
16002impl ::std::convert::TryFrom<::std::string::String> for PrepareError {
16003 type Error = self::error::ConversionError;
16004 fn try_from(
16005 value: ::std::string::String,
16006 ) -> ::std::result::Result<Self, self::error::ConversionError> {
16007 value.parse()
16008 }
16009}
16010#[doc = "`PublicKey`"]
16011#[doc = r""]
16012#[doc = r" <details><summary>JSON schema</summary>"]
16013#[doc = r""]
16014#[doc = r" ```json"]
16015#[doc = "{"]
16016#[doc = " \"type\": \"string\""]
16017#[doc = "}"]
16018#[doc = r" ```"]
16019#[doc = r" </details>"]
16020#[derive(
16021 :: serde :: Deserialize,
16022 :: serde :: Serialize,
16023 Clone,
16024 Debug,
16025 Eq,
16026 Hash,
16027 Ord,
16028 PartialEq,
16029 PartialOrd,
16030)]
16031#[serde(transparent)]
16032pub struct PublicKey(pub ::std::string::String);
16033impl ::std::ops::Deref for PublicKey {
16034 type Target = ::std::string::String;
16035 fn deref(&self) -> &::std::string::String {
16036 &self.0
16037 }
16038}
16039impl ::std::convert::From<PublicKey> for ::std::string::String {
16040 fn from(value: PublicKey) -> Self {
16041 value.0
16042 }
16043}
16044impl ::std::convert::From<&PublicKey> for PublicKey {
16045 fn from(value: &PublicKey) -> Self {
16046 value.clone()
16047 }
16048}
16049impl ::std::convert::From<::std::string::String> for PublicKey {
16050 fn from(value: ::std::string::String) -> Self {
16051 Self(value)
16052 }
16053}
16054impl ::std::str::FromStr for PublicKey {
16055 type Err = ::std::convert::Infallible;
16056 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
16057 Ok(Self(value.to_string()))
16058 }
16059}
16060impl ::std::fmt::Display for PublicKey {
16061 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16062 self.0.fmt(f)
16063 }
16064}
16065#[doc = "`RangeOfUint64`"]
16066#[doc = r""]
16067#[doc = r" <details><summary>JSON schema</summary>"]
16068#[doc = r""]
16069#[doc = r" ```json"]
16070#[doc = "{"]
16071#[doc = " \"type\": \"object\","]
16072#[doc = " \"required\": ["]
16073#[doc = " \"end\","]
16074#[doc = " \"start\""]
16075#[doc = " ],"]
16076#[doc = " \"properties\": {"]
16077#[doc = " \"end\": {"]
16078#[doc = " \"type\": \"integer\","]
16079#[doc = " \"format\": \"uint64\","]
16080#[doc = " \"minimum\": 0.0"]
16081#[doc = " },"]
16082#[doc = " \"start\": {"]
16083#[doc = " \"type\": \"integer\","]
16084#[doc = " \"format\": \"uint64\","]
16085#[doc = " \"minimum\": 0.0"]
16086#[doc = " }"]
16087#[doc = " }"]
16088#[doc = "}"]
16089#[doc = r" ```"]
16090#[doc = r" </details>"]
16091#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16092pub struct RangeOfUint64 {
16093 pub end: u64,
16094 pub start: u64,
16095}
16096impl ::std::convert::From<&RangeOfUint64> for RangeOfUint64 {
16097 fn from(value: &RangeOfUint64) -> Self {
16098 value.clone()
16099 }
16100}
16101#[doc = "`ReceiptEnumView`"]
16102#[doc = r""]
16103#[doc = r" <details><summary>JSON schema</summary>"]
16104#[doc = r""]
16105#[doc = r" ```json"]
16106#[doc = "{"]
16107#[doc = " \"oneOf\": ["]
16108#[doc = " {"]
16109#[doc = " \"type\": \"object\","]
16110#[doc = " \"required\": ["]
16111#[doc = " \"Action\""]
16112#[doc = " ],"]
16113#[doc = " \"properties\": {"]
16114#[doc = " \"Action\": {"]
16115#[doc = " \"type\": \"object\","]
16116#[doc = " \"required\": ["]
16117#[doc = " \"actions\","]
16118#[doc = " \"gas_price\","]
16119#[doc = " \"input_data_ids\","]
16120#[doc = " \"output_data_receivers\","]
16121#[doc = " \"signer_id\","]
16122#[doc = " \"signer_public_key\""]
16123#[doc = " ],"]
16124#[doc = " \"properties\": {"]
16125#[doc = " \"actions\": {"]
16126#[doc = " \"type\": \"array\","]
16127#[doc = " \"items\": {"]
16128#[doc = " \"$ref\": \"#/components/schemas/ActionView\""]
16129#[doc = " }"]
16130#[doc = " },"]
16131#[doc = " \"gas_price\": {"]
16132#[doc = " \"type\": \"string\""]
16133#[doc = " },"]
16134#[doc = " \"input_data_ids\": {"]
16135#[doc = " \"type\": \"array\","]
16136#[doc = " \"items\": {"]
16137#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
16138#[doc = " }"]
16139#[doc = " },"]
16140#[doc = " \"is_promise_yield\": {"]
16141#[doc = " \"default\": false,"]
16142#[doc = " \"type\": \"boolean\""]
16143#[doc = " },"]
16144#[doc = " \"output_data_receivers\": {"]
16145#[doc = " \"type\": \"array\","]
16146#[doc = " \"items\": {"]
16147#[doc = " \"$ref\": \"#/components/schemas/DataReceiverView\""]
16148#[doc = " }"]
16149#[doc = " },"]
16150#[doc = " \"signer_id\": {"]
16151#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
16152#[doc = " },"]
16153#[doc = " \"signer_public_key\": {"]
16154#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
16155#[doc = " }"]
16156#[doc = " }"]
16157#[doc = " }"]
16158#[doc = " },"]
16159#[doc = " \"additionalProperties\": false"]
16160#[doc = " },"]
16161#[doc = " {"]
16162#[doc = " \"type\": \"object\","]
16163#[doc = " \"required\": ["]
16164#[doc = " \"Data\""]
16165#[doc = " ],"]
16166#[doc = " \"properties\": {"]
16167#[doc = " \"Data\": {"]
16168#[doc = " \"type\": \"object\","]
16169#[doc = " \"required\": ["]
16170#[doc = " \"data_id\""]
16171#[doc = " ],"]
16172#[doc = " \"properties\": {"]
16173#[doc = " \"data\": {"]
16174#[doc = " \"type\": ["]
16175#[doc = " \"string\","]
16176#[doc = " \"null\""]
16177#[doc = " ]"]
16178#[doc = " },"]
16179#[doc = " \"data_id\": {"]
16180#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
16181#[doc = " },"]
16182#[doc = " \"is_promise_resume\": {"]
16183#[doc = " \"default\": false,"]
16184#[doc = " \"type\": \"boolean\""]
16185#[doc = " }"]
16186#[doc = " }"]
16187#[doc = " }"]
16188#[doc = " },"]
16189#[doc = " \"additionalProperties\": false"]
16190#[doc = " },"]
16191#[doc = " {"]
16192#[doc = " \"type\": \"object\","]
16193#[doc = " \"required\": ["]
16194#[doc = " \"GlobalContractDistribution\""]
16195#[doc = " ],"]
16196#[doc = " \"properties\": {"]
16197#[doc = " \"GlobalContractDistribution\": {"]
16198#[doc = " \"type\": \"object\","]
16199#[doc = " \"required\": ["]
16200#[doc = " \"already_delivered_shards\","]
16201#[doc = " \"code\","]
16202#[doc = " \"id\","]
16203#[doc = " \"target_shard\""]
16204#[doc = " ],"]
16205#[doc = " \"properties\": {"]
16206#[doc = " \"already_delivered_shards\": {"]
16207#[doc = " \"type\": \"array\","]
16208#[doc = " \"items\": {"]
16209#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
16210#[doc = " }"]
16211#[doc = " },"]
16212#[doc = " \"code\": {"]
16213#[doc = " \"type\": \"string\""]
16214#[doc = " },"]
16215#[doc = " \"id\": {"]
16216#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
16217#[doc = " },"]
16218#[doc = " \"target_shard\": {"]
16219#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
16220#[doc = " }"]
16221#[doc = " }"]
16222#[doc = " }"]
16223#[doc = " },"]
16224#[doc = " \"additionalProperties\": false"]
16225#[doc = " }"]
16226#[doc = " ]"]
16227#[doc = "}"]
16228#[doc = r" ```"]
16229#[doc = r" </details>"]
16230#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16231pub enum ReceiptEnumView {
16232 Action {
16233 actions: ::std::vec::Vec<ActionView>,
16234 gas_price: ::std::string::String,
16235 input_data_ids: ::std::vec::Vec<CryptoHash>,
16236 #[serde(default)]
16237 is_promise_yield: bool,
16238 output_data_receivers: ::std::vec::Vec<DataReceiverView>,
16239 signer_id: AccountId,
16240 signer_public_key: PublicKey,
16241 },
16242 Data {
16243 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16244 data: ::std::option::Option<::std::string::String>,
16245 data_id: CryptoHash,
16246 #[serde(default)]
16247 is_promise_resume: bool,
16248 },
16249 GlobalContractDistribution {
16250 already_delivered_shards: ::std::vec::Vec<ShardId>,
16251 code: ::std::string::String,
16252 id: GlobalContractIdentifier,
16253 target_shard: ShardId,
16254 },
16255}
16256impl ::std::convert::From<&Self> for ReceiptEnumView {
16257 fn from(value: &ReceiptEnumView) -> Self {
16258 value.clone()
16259 }
16260}
16261#[doc = "Describes the error for validating a receipt."]
16262#[doc = r""]
16263#[doc = r" <details><summary>JSON schema</summary>"]
16264#[doc = r""]
16265#[doc = r" ```json"]
16266#[doc = "{"]
16267#[doc = " \"description\": \"Describes the error for validating a receipt.\","]
16268#[doc = " \"oneOf\": ["]
16269#[doc = " {"]
16270#[doc = " \"description\": \"The `predecessor_id` of a Receipt is not valid.\","]
16271#[doc = " \"type\": \"object\","]
16272#[doc = " \"required\": ["]
16273#[doc = " \"InvalidPredecessorId\""]
16274#[doc = " ],"]
16275#[doc = " \"properties\": {"]
16276#[doc = " \"InvalidPredecessorId\": {"]
16277#[doc = " \"type\": \"object\","]
16278#[doc = " \"required\": ["]
16279#[doc = " \"account_id\""]
16280#[doc = " ],"]
16281#[doc = " \"properties\": {"]
16282#[doc = " \"account_id\": {"]
16283#[doc = " \"type\": \"string\""]
16284#[doc = " }"]
16285#[doc = " }"]
16286#[doc = " }"]
16287#[doc = " },"]
16288#[doc = " \"additionalProperties\": false"]
16289#[doc = " },"]
16290#[doc = " {"]
16291#[doc = " \"description\": \"The `receiver_id` of a Receipt is not valid.\","]
16292#[doc = " \"type\": \"object\","]
16293#[doc = " \"required\": ["]
16294#[doc = " \"InvalidReceiverId\""]
16295#[doc = " ],"]
16296#[doc = " \"properties\": {"]
16297#[doc = " \"InvalidReceiverId\": {"]
16298#[doc = " \"type\": \"object\","]
16299#[doc = " \"required\": ["]
16300#[doc = " \"account_id\""]
16301#[doc = " ],"]
16302#[doc = " \"properties\": {"]
16303#[doc = " \"account_id\": {"]
16304#[doc = " \"type\": \"string\""]
16305#[doc = " }"]
16306#[doc = " }"]
16307#[doc = " }"]
16308#[doc = " },"]
16309#[doc = " \"additionalProperties\": false"]
16310#[doc = " },"]
16311#[doc = " {"]
16312#[doc = " \"description\": \"The `signer_id` of an ActionReceipt is not valid.\","]
16313#[doc = " \"type\": \"object\","]
16314#[doc = " \"required\": ["]
16315#[doc = " \"InvalidSignerId\""]
16316#[doc = " ],"]
16317#[doc = " \"properties\": {"]
16318#[doc = " \"InvalidSignerId\": {"]
16319#[doc = " \"type\": \"object\","]
16320#[doc = " \"required\": ["]
16321#[doc = " \"account_id\""]
16322#[doc = " ],"]
16323#[doc = " \"properties\": {"]
16324#[doc = " \"account_id\": {"]
16325#[doc = " \"type\": \"string\""]
16326#[doc = " }"]
16327#[doc = " }"]
16328#[doc = " }"]
16329#[doc = " },"]
16330#[doc = " \"additionalProperties\": false"]
16331#[doc = " },"]
16332#[doc = " {"]
16333#[doc = " \"description\": \"The `receiver_id` of a DataReceiver within an ActionReceipt is not valid.\","]
16334#[doc = " \"type\": \"object\","]
16335#[doc = " \"required\": ["]
16336#[doc = " \"InvalidDataReceiverId\""]
16337#[doc = " ],"]
16338#[doc = " \"properties\": {"]
16339#[doc = " \"InvalidDataReceiverId\": {"]
16340#[doc = " \"type\": \"object\","]
16341#[doc = " \"required\": ["]
16342#[doc = " \"account_id\""]
16343#[doc = " ],"]
16344#[doc = " \"properties\": {"]
16345#[doc = " \"account_id\": {"]
16346#[doc = " \"type\": \"string\""]
16347#[doc = " }"]
16348#[doc = " }"]
16349#[doc = " }"]
16350#[doc = " },"]
16351#[doc = " \"additionalProperties\": false"]
16352#[doc = " },"]
16353#[doc = " {"]
16354#[doc = " \"description\": \"The length of the returned data exceeded the limit in a DataReceipt.\","]
16355#[doc = " \"type\": \"object\","]
16356#[doc = " \"required\": ["]
16357#[doc = " \"ReturnedValueLengthExceeded\""]
16358#[doc = " ],"]
16359#[doc = " \"properties\": {"]
16360#[doc = " \"ReturnedValueLengthExceeded\": {"]
16361#[doc = " \"type\": \"object\","]
16362#[doc = " \"required\": ["]
16363#[doc = " \"length\","]
16364#[doc = " \"limit\""]
16365#[doc = " ],"]
16366#[doc = " \"properties\": {"]
16367#[doc = " \"length\": {"]
16368#[doc = " \"type\": \"integer\","]
16369#[doc = " \"format\": \"uint64\","]
16370#[doc = " \"minimum\": 0.0"]
16371#[doc = " },"]
16372#[doc = " \"limit\": {"]
16373#[doc = " \"type\": \"integer\","]
16374#[doc = " \"format\": \"uint64\","]
16375#[doc = " \"minimum\": 0.0"]
16376#[doc = " }"]
16377#[doc = " }"]
16378#[doc = " }"]
16379#[doc = " },"]
16380#[doc = " \"additionalProperties\": false"]
16381#[doc = " },"]
16382#[doc = " {"]
16383#[doc = " \"description\": \"The number of input data dependencies exceeds the limit in an ActionReceipt.\","]
16384#[doc = " \"type\": \"object\","]
16385#[doc = " \"required\": ["]
16386#[doc = " \"NumberInputDataDependenciesExceeded\""]
16387#[doc = " ],"]
16388#[doc = " \"properties\": {"]
16389#[doc = " \"NumberInputDataDependenciesExceeded\": {"]
16390#[doc = " \"type\": \"object\","]
16391#[doc = " \"required\": ["]
16392#[doc = " \"limit\","]
16393#[doc = " \"number_of_input_data_dependencies\""]
16394#[doc = " ],"]
16395#[doc = " \"properties\": {"]
16396#[doc = " \"limit\": {"]
16397#[doc = " \"type\": \"integer\","]
16398#[doc = " \"format\": \"uint64\","]
16399#[doc = " \"minimum\": 0.0"]
16400#[doc = " },"]
16401#[doc = " \"number_of_input_data_dependencies\": {"]
16402#[doc = " \"type\": \"integer\","]
16403#[doc = " \"format\": \"uint64\","]
16404#[doc = " \"minimum\": 0.0"]
16405#[doc = " }"]
16406#[doc = " }"]
16407#[doc = " }"]
16408#[doc = " },"]
16409#[doc = " \"additionalProperties\": false"]
16410#[doc = " },"]
16411#[doc = " {"]
16412#[doc = " \"description\": \"An error occurred while validating actions of an ActionReceipt.\","]
16413#[doc = " \"type\": \"object\","]
16414#[doc = " \"required\": ["]
16415#[doc = " \"ActionsValidation\""]
16416#[doc = " ],"]
16417#[doc = " \"properties\": {"]
16418#[doc = " \"ActionsValidation\": {"]
16419#[doc = " \"$ref\": \"#/components/schemas/ActionsValidationError\""]
16420#[doc = " }"]
16421#[doc = " },"]
16422#[doc = " \"additionalProperties\": false"]
16423#[doc = " },"]
16424#[doc = " {"]
16425#[doc = " \"description\": \"Receipt is bigger than the limit.\","]
16426#[doc = " \"type\": \"object\","]
16427#[doc = " \"required\": ["]
16428#[doc = " \"ReceiptSizeExceeded\""]
16429#[doc = " ],"]
16430#[doc = " \"properties\": {"]
16431#[doc = " \"ReceiptSizeExceeded\": {"]
16432#[doc = " \"type\": \"object\","]
16433#[doc = " \"required\": ["]
16434#[doc = " \"limit\","]
16435#[doc = " \"size\""]
16436#[doc = " ],"]
16437#[doc = " \"properties\": {"]
16438#[doc = " \"limit\": {"]
16439#[doc = " \"type\": \"integer\","]
16440#[doc = " \"format\": \"uint64\","]
16441#[doc = " \"minimum\": 0.0"]
16442#[doc = " },"]
16443#[doc = " \"size\": {"]
16444#[doc = " \"type\": \"integer\","]
16445#[doc = " \"format\": \"uint64\","]
16446#[doc = " \"minimum\": 0.0"]
16447#[doc = " }"]
16448#[doc = " }"]
16449#[doc = " }"]
16450#[doc = " },"]
16451#[doc = " \"additionalProperties\": false"]
16452#[doc = " }"]
16453#[doc = " ]"]
16454#[doc = "}"]
16455#[doc = r" ```"]
16456#[doc = r" </details>"]
16457#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16458pub enum ReceiptValidationError {
16459 #[doc = "The `predecessor_id` of a Receipt is not valid."]
16460 InvalidPredecessorId { account_id: ::std::string::String },
16461 #[doc = "The `receiver_id` of a Receipt is not valid."]
16462 InvalidReceiverId { account_id: ::std::string::String },
16463 #[doc = "The `signer_id` of an ActionReceipt is not valid."]
16464 InvalidSignerId { account_id: ::std::string::String },
16465 #[doc = "The `receiver_id` of a DataReceiver within an ActionReceipt is not valid."]
16466 InvalidDataReceiverId { account_id: ::std::string::String },
16467 #[doc = "The length of the returned data exceeded the limit in a DataReceipt."]
16468 ReturnedValueLengthExceeded { length: u64, limit: u64 },
16469 #[doc = "The number of input data dependencies exceeds the limit in an ActionReceipt."]
16470 NumberInputDataDependenciesExceeded {
16471 limit: u64,
16472 number_of_input_data_dependencies: u64,
16473 },
16474 #[doc = "An error occurred while validating actions of an ActionReceipt."]
16475 ActionsValidation(ActionsValidationError),
16476 #[doc = "Receipt is bigger than the limit."]
16477 ReceiptSizeExceeded { limit: u64, size: u64 },
16478}
16479impl ::std::convert::From<&Self> for ReceiptValidationError {
16480 fn from(value: &ReceiptValidationError) -> Self {
16481 value.clone()
16482 }
16483}
16484impl ::std::convert::From<ActionsValidationError> for ReceiptValidationError {
16485 fn from(value: ActionsValidationError) -> Self {
16486 Self::ActionsValidation(value)
16487 }
16488}
16489#[doc = "`ReceiptView`"]
16490#[doc = r""]
16491#[doc = r" <details><summary>JSON schema</summary>"]
16492#[doc = r""]
16493#[doc = r" ```json"]
16494#[doc = "{"]
16495#[doc = " \"type\": \"object\","]
16496#[doc = " \"required\": ["]
16497#[doc = " \"predecessor_id\","]
16498#[doc = " \"receipt\","]
16499#[doc = " \"receipt_id\","]
16500#[doc = " \"receiver_id\""]
16501#[doc = " ],"]
16502#[doc = " \"properties\": {"]
16503#[doc = " \"predecessor_id\": {"]
16504#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
16505#[doc = " },"]
16506#[doc = " \"priority\": {"]
16507#[doc = " \"default\": 0,"]
16508#[doc = " \"type\": \"integer\","]
16509#[doc = " \"format\": \"uint64\","]
16510#[doc = " \"minimum\": 0.0"]
16511#[doc = " },"]
16512#[doc = " \"receipt\": {"]
16513#[doc = " \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
16514#[doc = " },"]
16515#[doc = " \"receipt_id\": {"]
16516#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
16517#[doc = " },"]
16518#[doc = " \"receiver_id\": {"]
16519#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
16520#[doc = " }"]
16521#[doc = " }"]
16522#[doc = "}"]
16523#[doc = r" ```"]
16524#[doc = r" </details>"]
16525#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16526pub struct ReceiptView {
16527 pub predecessor_id: AccountId,
16528 #[serde(default)]
16529 pub priority: u64,
16530 pub receipt: ReceiptEnumView,
16531 pub receipt_id: CryptoHash,
16532 pub receiver_id: AccountId,
16533}
16534impl ::std::convert::From<&ReceiptView> for ReceiptView {
16535 fn from(value: &ReceiptView) -> Self {
16536 value.clone()
16537 }
16538}
16539#[doc = "`RpcBlockRequest`"]
16540#[doc = r""]
16541#[doc = r" <details><summary>JSON schema</summary>"]
16542#[doc = r""]
16543#[doc = r" ```json"]
16544#[doc = "{"]
16545#[doc = " \"title\": \"RpcBlockRequest\","]
16546#[doc = " \"type\": \"object\","]
16547#[doc = " \"oneOf\": ["]
16548#[doc = " {"]
16549#[doc = " \"type\": \"object\","]
16550#[doc = " \"required\": ["]
16551#[doc = " \"block_id\""]
16552#[doc = " ],"]
16553#[doc = " \"properties\": {"]
16554#[doc = " \"block_id\": {"]
16555#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
16556#[doc = " }"]
16557#[doc = " }"]
16558#[doc = " },"]
16559#[doc = " {"]
16560#[doc = " \"type\": \"object\","]
16561#[doc = " \"required\": ["]
16562#[doc = " \"finality\""]
16563#[doc = " ],"]
16564#[doc = " \"properties\": {"]
16565#[doc = " \"finality\": {"]
16566#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
16567#[doc = " }"]
16568#[doc = " }"]
16569#[doc = " },"]
16570#[doc = " {"]
16571#[doc = " \"type\": \"object\","]
16572#[doc = " \"required\": ["]
16573#[doc = " \"sync_checkpoint\""]
16574#[doc = " ],"]
16575#[doc = " \"properties\": {"]
16576#[doc = " \"sync_checkpoint\": {"]
16577#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
16578#[doc = " }"]
16579#[doc = " }"]
16580#[doc = " }"]
16581#[doc = " ]"]
16582#[doc = "}"]
16583#[doc = r" ```"]
16584#[doc = r" </details>"]
16585#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16586pub enum RpcBlockRequest {
16587 #[serde(rename = "block_id")]
16588 BlockId(BlockId),
16589 #[serde(rename = "finality")]
16590 Finality(Finality),
16591 #[serde(rename = "sync_checkpoint")]
16592 SyncCheckpoint(SyncCheckpoint),
16593}
16594impl ::std::convert::From<&Self> for RpcBlockRequest {
16595 fn from(value: &RpcBlockRequest) -> Self {
16596 value.clone()
16597 }
16598}
16599impl ::std::convert::From<BlockId> for RpcBlockRequest {
16600 fn from(value: BlockId) -> Self {
16601 Self::BlockId(value)
16602 }
16603}
16604impl ::std::convert::From<Finality> for RpcBlockRequest {
16605 fn from(value: Finality) -> Self {
16606 Self::Finality(value)
16607 }
16608}
16609impl ::std::convert::From<SyncCheckpoint> for RpcBlockRequest {
16610 fn from(value: SyncCheckpoint) -> Self {
16611 Self::SyncCheckpoint(value)
16612 }
16613}
16614#[doc = "`RpcBlockResponse`"]
16615#[doc = r""]
16616#[doc = r" <details><summary>JSON schema</summary>"]
16617#[doc = r""]
16618#[doc = r" ```json"]
16619#[doc = "{"]
16620#[doc = " \"type\": \"object\","]
16621#[doc = " \"required\": ["]
16622#[doc = " \"author\","]
16623#[doc = " \"chunks\","]
16624#[doc = " \"header\""]
16625#[doc = " ],"]
16626#[doc = " \"properties\": {"]
16627#[doc = " \"author\": {"]
16628#[doc = " \"description\": \"The AccountId of the author of the Block\","]
16629#[doc = " \"allOf\": ["]
16630#[doc = " {"]
16631#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
16632#[doc = " }"]
16633#[doc = " ]"]
16634#[doc = " },"]
16635#[doc = " \"chunks\": {"]
16636#[doc = " \"type\": \"array\","]
16637#[doc = " \"items\": {"]
16638#[doc = " \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
16639#[doc = " }"]
16640#[doc = " },"]
16641#[doc = " \"header\": {"]
16642#[doc = " \"$ref\": \"#/components/schemas/BlockHeaderView\""]
16643#[doc = " }"]
16644#[doc = " }"]
16645#[doc = "}"]
16646#[doc = r" ```"]
16647#[doc = r" </details>"]
16648#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16649pub struct RpcBlockResponse {
16650 #[doc = "The AccountId of the author of the Block"]
16651 pub author: AccountId,
16652 pub chunks: ::std::vec::Vec<ChunkHeaderView>,
16653 pub header: BlockHeaderView,
16654}
16655impl ::std::convert::From<&RpcBlockResponse> for RpcBlockResponse {
16656 fn from(value: &RpcBlockResponse) -> Self {
16657 value.clone()
16658 }
16659}
16660#[doc = "`RpcChunkRequest`"]
16661#[doc = r""]
16662#[doc = r" <details><summary>JSON schema</summary>"]
16663#[doc = r""]
16664#[doc = r" ```json"]
16665#[doc = "{"]
16666#[doc = " \"title\": \"RpcChunkRequest\","]
16667#[doc = " \"type\": \"object\","]
16668#[doc = " \"anyOf\": ["]
16669#[doc = " {"]
16670#[doc = " \"title\": \"block_shard_id\","]
16671#[doc = " \"type\": \"object\","]
16672#[doc = " \"required\": ["]
16673#[doc = " \"block_id\","]
16674#[doc = " \"shard_id\""]
16675#[doc = " ],"]
16676#[doc = " \"properties\": {"]
16677#[doc = " \"block_id\": {"]
16678#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
16679#[doc = " },"]
16680#[doc = " \"shard_id\": {"]
16681#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
16682#[doc = " }"]
16683#[doc = " }"]
16684#[doc = " },"]
16685#[doc = " {"]
16686#[doc = " \"title\": \"chunk_hash\","]
16687#[doc = " \"type\": \"object\","]
16688#[doc = " \"required\": ["]
16689#[doc = " \"chunk_id\""]
16690#[doc = " ],"]
16691#[doc = " \"properties\": {"]
16692#[doc = " \"chunk_id\": {"]
16693#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
16694#[doc = " }"]
16695#[doc = " }"]
16696#[doc = " }"]
16697#[doc = " ]"]
16698#[doc = "}"]
16699#[doc = r" ```"]
16700#[doc = r" </details>"]
16701#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16702#[serde(untagged)]
16703pub enum RpcChunkRequest {
16704 BlockShardId {
16705 block_id: BlockId,
16706 shard_id: ShardId,
16707 },
16708 ChunkHash {
16709 chunk_id: CryptoHash,
16710 },
16711}
16712impl ::std::convert::From<&Self> for RpcChunkRequest {
16713 fn from(value: &RpcChunkRequest) -> Self {
16714 value.clone()
16715 }
16716}
16717#[doc = "`RpcChunkResponse`"]
16718#[doc = r""]
16719#[doc = r" <details><summary>JSON schema</summary>"]
16720#[doc = r""]
16721#[doc = r" ```json"]
16722#[doc = "{"]
16723#[doc = " \"type\": \"object\","]
16724#[doc = " \"required\": ["]
16725#[doc = " \"author\","]
16726#[doc = " \"header\","]
16727#[doc = " \"receipts\","]
16728#[doc = " \"transactions\""]
16729#[doc = " ],"]
16730#[doc = " \"properties\": {"]
16731#[doc = " \"author\": {"]
16732#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
16733#[doc = " },"]
16734#[doc = " \"header\": {"]
16735#[doc = " \"$ref\": \"#/components/schemas/ChunkHeaderView\""]
16736#[doc = " },"]
16737#[doc = " \"receipts\": {"]
16738#[doc = " \"type\": \"array\","]
16739#[doc = " \"items\": {"]
16740#[doc = " \"$ref\": \"#/components/schemas/ReceiptView\""]
16741#[doc = " }"]
16742#[doc = " },"]
16743#[doc = " \"transactions\": {"]
16744#[doc = " \"type\": \"array\","]
16745#[doc = " \"items\": {"]
16746#[doc = " \"$ref\": \"#/components/schemas/SignedTransactionView\""]
16747#[doc = " }"]
16748#[doc = " }"]
16749#[doc = " }"]
16750#[doc = "}"]
16751#[doc = r" ```"]
16752#[doc = r" </details>"]
16753#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16754pub struct RpcChunkResponse {
16755 pub author: AccountId,
16756 pub header: ChunkHeaderView,
16757 pub receipts: ::std::vec::Vec<ReceiptView>,
16758 pub transactions: ::std::vec::Vec<SignedTransactionView>,
16759}
16760impl ::std::convert::From<&RpcChunkResponse> for RpcChunkResponse {
16761 fn from(value: &RpcChunkResponse) -> Self {
16762 value.clone()
16763 }
16764}
16765#[doc = "`RpcClientConfigRequest`"]
16766#[doc = r""]
16767#[doc = r" <details><summary>JSON schema</summary>"]
16768#[doc = r""]
16769#[doc = r" ```json"]
16770#[doc = "{"]
16771#[doc = " \"title\": \"RpcClientConfigRequest\","]
16772#[doc = " \"type\": \"null\""]
16773#[doc = "}"]
16774#[doc = r" ```"]
16775#[doc = r" </details>"]
16776#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16777#[serde(transparent)]
16778pub struct RpcClientConfigRequest(pub ());
16779impl ::std::ops::Deref for RpcClientConfigRequest {
16780 type Target = ();
16781 fn deref(&self) -> &() {
16782 &self.0
16783 }
16784}
16785impl ::std::convert::From<RpcClientConfigRequest> for () {
16786 fn from(value: RpcClientConfigRequest) -> Self {
16787 value.0
16788 }
16789}
16790impl ::std::convert::From<&RpcClientConfigRequest> for RpcClientConfigRequest {
16791 fn from(value: &RpcClientConfigRequest) -> Self {
16792 value.clone()
16793 }
16794}
16795impl ::std::convert::From<()> for RpcClientConfigRequest {
16796 fn from(value: ()) -> Self {
16797 Self(value)
16798 }
16799}
16800#[doc = "ClientConfig where some fields can be updated at runtime."]
16801#[doc = r""]
16802#[doc = r" <details><summary>JSON schema</summary>"]
16803#[doc = r""]
16804#[doc = r" ```json"]
16805#[doc = "{"]
16806#[doc = " \"description\": \"ClientConfig where some fields can be updated at runtime.\","]
16807#[doc = " \"type\": \"object\","]
16808#[doc = " \"required\": ["]
16809#[doc = " \"archive\","]
16810#[doc = " \"block_fetch_horizon\","]
16811#[doc = " \"block_header_fetch_horizon\","]
16812#[doc = " \"block_production_tracking_delay\","]
16813#[doc = " \"catchup_step_period\","]
16814#[doc = " \"chain_id\","]
16815#[doc = " \"chunk_request_retry_period\","]
16816#[doc = " \"chunk_wait_mult\","]
16817#[doc = " \"client_background_migration_threads\","]
16818#[doc = " \"doomslug_step_period\","]
16819#[doc = " \"enable_multiline_logging\","]
16820#[doc = " \"enable_statistics_export\","]
16821#[doc = " \"epoch_length\","]
16822#[doc = " \"epoch_sync\","]
16823#[doc = " \"expected_shutdown\","]
16824#[doc = " \"gc\","]
16825#[doc = " \"header_sync_expected_height_per_second\","]
16826#[doc = " \"header_sync_initial_timeout\","]
16827#[doc = " \"header_sync_progress_timeout\","]
16828#[doc = " \"header_sync_stall_ban_timeout\","]
16829#[doc = " \"log_summary_period\","]
16830#[doc = " \"log_summary_style\","]
16831#[doc = " \"max_block_production_delay\","]
16832#[doc = " \"max_block_wait_delay\","]
16833#[doc = " \"min_block_production_delay\","]
16834#[doc = " \"min_num_peers\","]
16835#[doc = " \"num_block_producer_seats\","]
16836#[doc = " \"orphan_state_witness_max_size\","]
16837#[doc = " \"orphan_state_witness_pool_size\","]
16838#[doc = " \"produce_chunk_add_transactions_time_limit\","]
16839#[doc = " \"produce_empty_blocks\","]
16840#[doc = " \"resharding_config\","]
16841#[doc = " \"save_invalid_witnesses\","]
16842#[doc = " \"save_latest_witnesses\","]
16843#[doc = " \"save_trie_changes\","]
16844#[doc = " \"save_tx_outcomes\","]
16845#[doc = " \"skip_sync_wait\","]
16846#[doc = " \"state_sync\","]
16847#[doc = " \"state_sync_enabled\","]
16848#[doc = " \"state_sync_external_backoff\","]
16849#[doc = " \"state_sync_external_timeout\","]
16850#[doc = " \"state_sync_p2p_timeout\","]
16851#[doc = " \"state_sync_retry_backoff\","]
16852#[doc = " \"sync_check_period\","]
16853#[doc = " \"sync_height_threshold\","]
16854#[doc = " \"sync_max_block_requests\","]
16855#[doc = " \"sync_step_period\","]
16856#[doc = " \"tracked_shards_config\","]
16857#[doc = " \"transaction_request_handler_threads\","]
16858#[doc = " \"ttl_account_id_router\","]
16859#[doc = " \"tx_routing_height_horizon\","]
16860#[doc = " \"version\","]
16861#[doc = " \"view_client_threads\","]
16862#[doc = " \"view_client_throttle_period\""]
16863#[doc = " ],"]
16864#[doc = " \"properties\": {"]
16865#[doc = " \"archive\": {"]
16866#[doc = " \"description\": \"Not clear old data, set `true` for archive nodes.\","]
16867#[doc = " \"type\": \"boolean\""]
16868#[doc = " },"]
16869#[doc = " \"block_fetch_horizon\": {"]
16870#[doc = " \"description\": \"Horizon at which instead of fetching block, fetch full state.\","]
16871#[doc = " \"type\": \"integer\","]
16872#[doc = " \"format\": \"uint64\","]
16873#[doc = " \"minimum\": 0.0"]
16874#[doc = " },"]
16875#[doc = " \"block_header_fetch_horizon\": {"]
16876#[doc = " \"description\": \"Behind this horizon header fetch kicks in.\","]
16877#[doc = " \"type\": \"integer\","]
16878#[doc = " \"format\": \"uint64\","]
16879#[doc = " \"minimum\": 0.0"]
16880#[doc = " },"]
16881#[doc = " \"block_production_tracking_delay\": {"]
16882#[doc = " \"description\": \"Duration to check for producing / skipping block.\","]
16883#[doc = " \"type\": \"array\","]
16884#[doc = " \"items\": {"]
16885#[doc = " \"type\": \"integer\","]
16886#[doc = " \"format\": \"uint64\","]
16887#[doc = " \"minimum\": 0.0"]
16888#[doc = " },"]
16889#[doc = " \"maxItems\": 2,"]
16890#[doc = " \"minItems\": 2"]
16891#[doc = " },"]
16892#[doc = " \"catchup_step_period\": {"]
16893#[doc = " \"description\": \"Time between check to perform catchup.\","]
16894#[doc = " \"type\": \"array\","]
16895#[doc = " \"items\": {"]
16896#[doc = " \"type\": \"integer\","]
16897#[doc = " \"format\": \"uint64\","]
16898#[doc = " \"minimum\": 0.0"]
16899#[doc = " },"]
16900#[doc = " \"maxItems\": 2,"]
16901#[doc = " \"minItems\": 2"]
16902#[doc = " },"]
16903#[doc = " \"chain_id\": {"]
16904#[doc = " \"description\": \"Chain id for status.\","]
16905#[doc = " \"type\": \"string\""]
16906#[doc = " },"]
16907#[doc = " \"chunk_distribution_network\": {"]
16908#[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.\","]
16909#[doc = " \"anyOf\": ["]
16910#[doc = " {"]
16911#[doc = " \"$ref\": \"#/components/schemas/ChunkDistributionNetworkConfig\""]
16912#[doc = " },"]
16913#[doc = " {"]
16914#[doc = " \"type\": \"null\""]
16915#[doc = " }"]
16916#[doc = " ]"]
16917#[doc = " },"]
16918#[doc = " \"chunk_request_retry_period\": {"]
16919#[doc = " \"description\": \"Time between checking to re-request chunks.\","]
16920#[doc = " \"type\": \"array\","]
16921#[doc = " \"items\": {"]
16922#[doc = " \"type\": \"integer\","]
16923#[doc = " \"format\": \"uint64\","]
16924#[doc = " \"minimum\": 0.0"]
16925#[doc = " },"]
16926#[doc = " \"maxItems\": 2,"]
16927#[doc = " \"minItems\": 2"]
16928#[doc = " },"]
16929#[doc = " \"chunk_wait_mult\": {"]
16930#[doc = " \"description\": \"Multiplier for the wait time for all chunks to be received.\","]
16931#[doc = " \"type\": \"array\","]
16932#[doc = " \"items\": {"]
16933#[doc = " \"type\": \"integer\","]
16934#[doc = " \"format\": \"int32\""]
16935#[doc = " },"]
16936#[doc = " \"maxItems\": 2,"]
16937#[doc = " \"minItems\": 2"]
16938#[doc = " },"]
16939#[doc = " \"client_background_migration_threads\": {"]
16940#[doc = " \"description\": \"Number of threads to execute background migration work in client.\","]
16941#[doc = " \"type\": \"integer\","]
16942#[doc = " \"format\": \"uint\","]
16943#[doc = " \"minimum\": 0.0"]
16944#[doc = " },"]
16945#[doc = " \"doomslug_step_period\": {"]
16946#[doc = " \"description\": \"Time between running doomslug timer.\","]
16947#[doc = " \"type\": \"array\","]
16948#[doc = " \"items\": {"]
16949#[doc = " \"type\": \"integer\","]
16950#[doc = " \"format\": \"uint64\","]
16951#[doc = " \"minimum\": 0.0"]
16952#[doc = " },"]
16953#[doc = " \"maxItems\": 2,"]
16954#[doc = " \"minItems\": 2"]
16955#[doc = " },"]
16956#[doc = " \"enable_multiline_logging\": {"]
16957#[doc = " \"type\": \"boolean\""]
16958#[doc = " },"]
16959#[doc = " \"enable_statistics_export\": {"]
16960#[doc = " \"description\": \"Re-export storage layer statistics as prometheus metrics.\","]
16961#[doc = " \"type\": \"boolean\""]
16962#[doc = " },"]
16963#[doc = " \"epoch_length\": {"]
16964#[doc = " \"description\": \"Epoch length.\","]
16965#[doc = " \"type\": \"integer\","]
16966#[doc = " \"format\": \"uint64\","]
16967#[doc = " \"minimum\": 0.0"]
16968#[doc = " },"]
16969#[doc = " \"epoch_sync\": {"]
16970#[doc = " \"description\": \"Options for epoch sync.\","]
16971#[doc = " \"allOf\": ["]
16972#[doc = " {"]
16973#[doc = " \"$ref\": \"#/components/schemas/EpochSyncConfig\""]
16974#[doc = " }"]
16975#[doc = " ]"]
16976#[doc = " },"]
16977#[doc = " \"expected_shutdown\": {"]
16978#[doc = " \"description\": \"Graceful shutdown at expected block height.\","]
16979#[doc = " \"allOf\": ["]
16980#[doc = " {"]
16981#[doc = " \"$ref\": \"#/components/schemas/MutableConfigValue\""]
16982#[doc = " }"]
16983#[doc = " ]"]
16984#[doc = " },"]
16985#[doc = " \"gc\": {"]
16986#[doc = " \"description\": \"Garbage collection configuration.\","]
16987#[doc = " \"allOf\": ["]
16988#[doc = " {"]
16989#[doc = " \"$ref\": \"#/components/schemas/GCConfig\""]
16990#[doc = " }"]
16991#[doc = " ]"]
16992#[doc = " },"]
16993#[doc = " \"header_sync_expected_height_per_second\": {"]
16994#[doc = " \"description\": \"Expected increase of header head height per second during header sync\","]
16995#[doc = " \"type\": \"integer\","]
16996#[doc = " \"format\": \"uint64\","]
16997#[doc = " \"minimum\": 0.0"]
16998#[doc = " },"]
16999#[doc = " \"header_sync_initial_timeout\": {"]
17000#[doc = " \"description\": \"How much time to wait after initial header sync\","]
17001#[doc = " \"type\": \"array\","]
17002#[doc = " \"items\": {"]
17003#[doc = " \"type\": \"integer\","]
17004#[doc = " \"format\": \"uint64\","]
17005#[doc = " \"minimum\": 0.0"]
17006#[doc = " },"]
17007#[doc = " \"maxItems\": 2,"]
17008#[doc = " \"minItems\": 2"]
17009#[doc = " },"]
17010#[doc = " \"header_sync_progress_timeout\": {"]
17011#[doc = " \"description\": \"How much time to wait after some progress is made in header sync\","]
17012#[doc = " \"type\": \"array\","]
17013#[doc = " \"items\": {"]
17014#[doc = " \"type\": \"integer\","]
17015#[doc = " \"format\": \"uint64\","]
17016#[doc = " \"minimum\": 0.0"]
17017#[doc = " },"]
17018#[doc = " \"maxItems\": 2,"]
17019#[doc = " \"minItems\": 2"]
17020#[doc = " },"]
17021#[doc = " \"header_sync_stall_ban_timeout\": {"]
17022#[doc = " \"description\": \"How much time to wait before banning a peer in header sync if sync is too slow\","]
17023#[doc = " \"type\": \"array\","]
17024#[doc = " \"items\": {"]
17025#[doc = " \"type\": \"integer\","]
17026#[doc = " \"format\": \"uint64\","]
17027#[doc = " \"minimum\": 0.0"]
17028#[doc = " },"]
17029#[doc = " \"maxItems\": 2,"]
17030#[doc = " \"minItems\": 2"]
17031#[doc = " },"]
17032#[doc = " \"log_summary_period\": {"]
17033#[doc = " \"description\": \"Period between logging summary information.\","]
17034#[doc = " \"type\": \"array\","]
17035#[doc = " \"items\": {"]
17036#[doc = " \"type\": \"integer\","]
17037#[doc = " \"format\": \"uint64\","]
17038#[doc = " \"minimum\": 0.0"]
17039#[doc = " },"]
17040#[doc = " \"maxItems\": 2,"]
17041#[doc = " \"minItems\": 2"]
17042#[doc = " },"]
17043#[doc = " \"log_summary_style\": {"]
17044#[doc = " \"description\": \"Enable coloring of the logs\","]
17045#[doc = " \"allOf\": ["]
17046#[doc = " {"]
17047#[doc = " \"$ref\": \"#/components/schemas/LogSummaryStyle\""]
17048#[doc = " }"]
17049#[doc = " ]"]
17050#[doc = " },"]
17051#[doc = " \"max_block_production_delay\": {"]
17052#[doc = " \"description\": \"Maximum wait for approvals before producing block.\","]
17053#[doc = " \"type\": \"array\","]
17054#[doc = " \"items\": {"]
17055#[doc = " \"type\": \"integer\","]
17056#[doc = " \"format\": \"uint64\","]
17057#[doc = " \"minimum\": 0.0"]
17058#[doc = " },"]
17059#[doc = " \"maxItems\": 2,"]
17060#[doc = " \"minItems\": 2"]
17061#[doc = " },"]
17062#[doc = " \"max_block_wait_delay\": {"]
17063#[doc = " \"description\": \"Maximum duration before skipping given height.\","]
17064#[doc = " \"type\": \"array\","]
17065#[doc = " \"items\": {"]
17066#[doc = " \"type\": \"integer\","]
17067#[doc = " \"format\": \"uint64\","]
17068#[doc = " \"minimum\": 0.0"]
17069#[doc = " },"]
17070#[doc = " \"maxItems\": 2,"]
17071#[doc = " \"minItems\": 2"]
17072#[doc = " },"]
17073#[doc = " \"max_gas_burnt_view\": {"]
17074#[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.\","]
17075#[doc = " \"type\": ["]
17076#[doc = " \"integer\","]
17077#[doc = " \"null\""]
17078#[doc = " ],"]
17079#[doc = " \"format\": \"uint64\","]
17080#[doc = " \"minimum\": 0.0"]
17081#[doc = " },"]
17082#[doc = " \"min_block_production_delay\": {"]
17083#[doc = " \"description\": \"Minimum duration before producing block.\","]
17084#[doc = " \"type\": \"array\","]
17085#[doc = " \"items\": {"]
17086#[doc = " \"type\": \"integer\","]
17087#[doc = " \"format\": \"uint64\","]
17088#[doc = " \"minimum\": 0.0"]
17089#[doc = " },"]
17090#[doc = " \"maxItems\": 2,"]
17091#[doc = " \"minItems\": 2"]
17092#[doc = " },"]
17093#[doc = " \"min_num_peers\": {"]
17094#[doc = " \"description\": \"Minimum number of peers to start syncing.\","]
17095#[doc = " \"type\": \"integer\","]
17096#[doc = " \"format\": \"uint\","]
17097#[doc = " \"minimum\": 0.0"]
17098#[doc = " },"]
17099#[doc = " \"num_block_producer_seats\": {"]
17100#[doc = " \"description\": \"Number of block producer seats\","]
17101#[doc = " \"type\": \"integer\","]
17102#[doc = " \"format\": \"uint64\","]
17103#[doc = " \"minimum\": 0.0"]
17104#[doc = " },"]
17105#[doc = " \"orphan_state_witness_max_size\": {"]
17106#[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.\","]
17107#[doc = " \"type\": \"integer\","]
17108#[doc = " \"format\": \"uint64\","]
17109#[doc = " \"minimum\": 0.0"]
17110#[doc = " },"]
17111#[doc = " \"orphan_state_witness_pool_size\": {"]
17112#[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.\","]
17113#[doc = " \"type\": \"integer\","]
17114#[doc = " \"format\": \"uint\","]
17115#[doc = " \"minimum\": 0.0"]
17116#[doc = " },"]
17117#[doc = " \"produce_chunk_add_transactions_time_limit\": {"]
17118#[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.\","]
17119#[doc = " \"type\": \"string\""]
17120#[doc = " },"]
17121#[doc = " \"produce_empty_blocks\": {"]
17122#[doc = " \"description\": \"Produce empty blocks, use `false` for testing.\","]
17123#[doc = " \"type\": \"boolean\""]
17124#[doc = " },"]
17125#[doc = " \"resharding_config\": {"]
17126#[doc = " \"$ref\": \"#/components/schemas/MutableConfigValue\""]
17127#[doc = " },"]
17128#[doc = " \"rpc_addr\": {"]
17129#[doc = " \"description\": \"Listening rpc port for status.\","]
17130#[doc = " \"type\": ["]
17131#[doc = " \"string\","]
17132#[doc = " \"null\""]
17133#[doc = " ]"]
17134#[doc = " },"]
17135#[doc = " \"save_invalid_witnesses\": {"]
17136#[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.\","]
17137#[doc = " \"type\": \"boolean\""]
17138#[doc = " },"]
17139#[doc = " \"save_latest_witnesses\": {"]
17140#[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.\","]
17141#[doc = " \"type\": \"boolean\""]
17142#[doc = " },"]
17143#[doc = " \"save_trie_changes\": {"]
17144#[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.\","]
17145#[doc = " \"type\": \"boolean\""]
17146#[doc = " },"]
17147#[doc = " \"save_tx_outcomes\": {"]
17148#[doc = " \"description\": \"Whether to persist transaction outcomes to disk or not.\","]
17149#[doc = " \"type\": \"boolean\""]
17150#[doc = " },"]
17151#[doc = " \"skip_sync_wait\": {"]
17152#[doc = " \"description\": \"Skip waiting for sync (for testing or single node testnet).\","]
17153#[doc = " \"type\": \"boolean\""]
17154#[doc = " },"]
17155#[doc = " \"state_sync\": {"]
17156#[doc = " \"description\": \"Options for syncing state.\","]
17157#[doc = " \"allOf\": ["]
17158#[doc = " {"]
17159#[doc = " \"$ref\": \"#/components/schemas/StateSyncConfig\""]
17160#[doc = " }"]
17161#[doc = " ]"]
17162#[doc = " },"]
17163#[doc = " \"state_sync_enabled\": {"]
17164#[doc = " \"description\": \"Whether to use the State Sync mechanism.\\nIf disabled, the node will do Block Sync instead of State Sync.\","]
17165#[doc = " \"type\": \"boolean\""]
17166#[doc = " },"]
17167#[doc = " \"state_sync_external_backoff\": {"]
17168#[doc = " \"description\": \"Additional waiting period after a failed request to external storage\","]
17169#[doc = " \"type\": \"array\","]
17170#[doc = " \"items\": {"]
17171#[doc = " \"type\": \"integer\","]
17172#[doc = " \"format\": \"uint64\","]
17173#[doc = " \"minimum\": 0.0"]
17174#[doc = " },"]
17175#[doc = " \"maxItems\": 2,"]
17176#[doc = " \"minItems\": 2"]
17177#[doc = " },"]
17178#[doc = " \"state_sync_external_timeout\": {"]
17179#[doc = " \"description\": \"How long to wait for a response from centralized state sync\","]
17180#[doc = " \"type\": \"array\","]
17181#[doc = " \"items\": {"]
17182#[doc = " \"type\": \"integer\","]
17183#[doc = " \"format\": \"uint64\","]
17184#[doc = " \"minimum\": 0.0"]
17185#[doc = " },"]
17186#[doc = " \"maxItems\": 2,"]
17187#[doc = " \"minItems\": 2"]
17188#[doc = " },"]
17189#[doc = " \"state_sync_p2p_timeout\": {"]
17190#[doc = " \"description\": \"How long to wait for a response from p2p state sync\","]
17191#[doc = " \"type\": \"array\","]
17192#[doc = " \"items\": {"]
17193#[doc = " \"type\": \"integer\","]
17194#[doc = " \"format\": \"uint64\","]
17195#[doc = " \"minimum\": 0.0"]
17196#[doc = " },"]
17197#[doc = " \"maxItems\": 2,"]
17198#[doc = " \"minItems\": 2"]
17199#[doc = " },"]
17200#[doc = " \"state_sync_retry_backoff\": {"]
17201#[doc = " \"description\": \"How long to wait after a failed state sync request\","]
17202#[doc = " \"type\": \"array\","]
17203#[doc = " \"items\": {"]
17204#[doc = " \"type\": \"integer\","]
17205#[doc = " \"format\": \"uint64\","]
17206#[doc = " \"minimum\": 0.0"]
17207#[doc = " },"]
17208#[doc = " \"maxItems\": 2,"]
17209#[doc = " \"minItems\": 2"]
17210#[doc = " },"]
17211#[doc = " \"sync_check_period\": {"]
17212#[doc = " \"description\": \"How often to check that we are not out of sync.\","]
17213#[doc = " \"type\": \"array\","]
17214#[doc = " \"items\": {"]
17215#[doc = " \"type\": \"integer\","]
17216#[doc = " \"format\": \"uint64\","]
17217#[doc = " \"minimum\": 0.0"]
17218#[doc = " },"]
17219#[doc = " \"maxItems\": 2,"]
17220#[doc = " \"minItems\": 2"]
17221#[doc = " },"]
17222#[doc = " \"sync_height_threshold\": {"]
17223#[doc = " \"description\": \"Sync height threshold: below this difference in height don't start syncing.\","]
17224#[doc = " \"type\": \"integer\","]
17225#[doc = " \"format\": \"uint64\","]
17226#[doc = " \"minimum\": 0.0"]
17227#[doc = " },"]
17228#[doc = " \"sync_max_block_requests\": {"]
17229#[doc = " \"description\": \"Maximum number of block requests to send to peers to sync\","]
17230#[doc = " \"type\": \"integer\","]
17231#[doc = " \"format\": \"uint\","]
17232#[doc = " \"minimum\": 0.0"]
17233#[doc = " },"]
17234#[doc = " \"sync_step_period\": {"]
17235#[doc = " \"description\": \"While syncing, how long to check for each step.\","]
17236#[doc = " \"type\": \"array\","]
17237#[doc = " \"items\": {"]
17238#[doc = " \"type\": \"integer\","]
17239#[doc = " \"format\": \"uint64\","]
17240#[doc = " \"minimum\": 0.0"]
17241#[doc = " },"]
17242#[doc = " \"maxItems\": 2,"]
17243#[doc = " \"minItems\": 2"]
17244#[doc = " },"]
17245#[doc = " \"tracked_shards_config\": {"]
17246#[doc = " \"$ref\": \"#/components/schemas/TrackedShardsConfig\""]
17247#[doc = " },"]
17248#[doc = " \"transaction_pool_size_limit\": {"]
17249#[doc = " \"description\": \"Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\\nwill be unbounded.\","]
17250#[doc = " \"type\": ["]
17251#[doc = " \"integer\","]
17252#[doc = " \"null\""]
17253#[doc = " ],"]
17254#[doc = " \"format\": \"uint64\","]
17255#[doc = " \"minimum\": 0.0"]
17256#[doc = " },"]
17257#[doc = " \"transaction_request_handler_threads\": {"]
17258#[doc = " \"type\": \"integer\","]
17259#[doc = " \"format\": \"uint\","]
17260#[doc = " \"minimum\": 0.0"]
17261#[doc = " },"]
17262#[doc = " \"trie_viewer_state_size_limit\": {"]
17263#[doc = " \"description\": \"Upper bound of the byte size of contract state that is still viewable. None is no limit\","]
17264#[doc = " \"type\": ["]
17265#[doc = " \"integer\","]
17266#[doc = " \"null\""]
17267#[doc = " ],"]
17268#[doc = " \"format\": \"uint64\","]
17269#[doc = " \"minimum\": 0.0"]
17270#[doc = " },"]
17271#[doc = " \"ttl_account_id_router\": {"]
17272#[doc = " \"description\": \"Time to persist Accounts Id in the router without removing them.\","]
17273#[doc = " \"type\": \"array\","]
17274#[doc = " \"items\": {"]
17275#[doc = " \"type\": \"integer\","]
17276#[doc = " \"format\": \"uint64\","]
17277#[doc = " \"minimum\": 0.0"]
17278#[doc = " },"]
17279#[doc = " \"maxItems\": 2,"]
17280#[doc = " \"minItems\": 2"]
17281#[doc = " },"]
17282#[doc = " \"tx_routing_height_horizon\": {"]
17283#[doc = " \"description\": \"If the node is not a chunk producer within that many blocks, then route\\nto upcoming chunk producers.\","]
17284#[doc = " \"type\": \"integer\","]
17285#[doc = " \"format\": \"uint64\","]
17286#[doc = " \"minimum\": 0.0"]
17287#[doc = " },"]
17288#[doc = " \"version\": {"]
17289#[doc = " \"description\": \"Version of the binary.\","]
17290#[doc = " \"allOf\": ["]
17291#[doc = " {"]
17292#[doc = " \"$ref\": \"#/components/schemas/Version\""]
17293#[doc = " }"]
17294#[doc = " ]"]
17295#[doc = " },"]
17296#[doc = " \"view_client_threads\": {"]
17297#[doc = " \"description\": \"Number of threads for ViewClientActor pool.\","]
17298#[doc = " \"type\": \"integer\","]
17299#[doc = " \"format\": \"uint\","]
17300#[doc = " \"minimum\": 0.0"]
17301#[doc = " },"]
17302#[doc = " \"view_client_throttle_period\": {"]
17303#[doc = " \"description\": \"Number of seconds between state requests for view client.\","]
17304#[doc = " \"type\": \"array\","]
17305#[doc = " \"items\": {"]
17306#[doc = " \"type\": \"integer\","]
17307#[doc = " \"format\": \"uint64\","]
17308#[doc = " \"minimum\": 0.0"]
17309#[doc = " },"]
17310#[doc = " \"maxItems\": 2,"]
17311#[doc = " \"minItems\": 2"]
17312#[doc = " }"]
17313#[doc = " }"]
17314#[doc = "}"]
17315#[doc = r" ```"]
17316#[doc = r" </details>"]
17317#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17318pub struct RpcClientConfigResponse {
17319 #[doc = "Not clear old data, set `true` for archive nodes."]
17320 pub archive: bool,
17321 #[doc = "Horizon at which instead of fetching block, fetch full state."]
17322 pub block_fetch_horizon: u64,
17323 #[doc = "Behind this horizon header fetch kicks in."]
17324 pub block_header_fetch_horizon: u64,
17325 #[doc = "Duration to check for producing / skipping block."]
17326 pub block_production_tracking_delay: [u64; 2usize],
17327 #[doc = "Time between check to perform catchup."]
17328 pub catchup_step_period: [u64; 2usize],
17329 #[doc = "Chain id for status."]
17330 pub chain_id: ::std::string::String,
17331 #[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."]
17332 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17333 pub chunk_distribution_network: ::std::option::Option<ChunkDistributionNetworkConfig>,
17334 #[doc = "Time between checking to re-request chunks."]
17335 pub chunk_request_retry_period: [u64; 2usize],
17336 #[doc = "Multiplier for the wait time for all chunks to be received."]
17337 pub chunk_wait_mult: [i32; 2usize],
17338 #[doc = "Number of threads to execute background migration work in client."]
17339 pub client_background_migration_threads: u32,
17340 #[doc = "Time between running doomslug timer."]
17341 pub doomslug_step_period: [u64; 2usize],
17342 pub enable_multiline_logging: bool,
17343 #[doc = "Re-export storage layer statistics as prometheus metrics."]
17344 pub enable_statistics_export: bool,
17345 #[doc = "Epoch length."]
17346 pub epoch_length: u64,
17347 #[doc = "Options for epoch sync."]
17348 pub epoch_sync: EpochSyncConfig,
17349 #[doc = "Graceful shutdown at expected block height."]
17350 pub expected_shutdown: MutableConfigValue,
17351 #[doc = "Garbage collection configuration."]
17352 pub gc: GcConfig,
17353 #[doc = "Expected increase of header head height per second during header sync"]
17354 pub header_sync_expected_height_per_second: u64,
17355 #[doc = "How much time to wait after initial header sync"]
17356 pub header_sync_initial_timeout: [u64; 2usize],
17357 #[doc = "How much time to wait after some progress is made in header sync"]
17358 pub header_sync_progress_timeout: [u64; 2usize],
17359 #[doc = "How much time to wait before banning a peer in header sync if sync is too slow"]
17360 pub header_sync_stall_ban_timeout: [u64; 2usize],
17361 #[doc = "Period between logging summary information."]
17362 pub log_summary_period: [u64; 2usize],
17363 #[doc = "Enable coloring of the logs"]
17364 pub log_summary_style: LogSummaryStyle,
17365 #[doc = "Maximum wait for approvals before producing block."]
17366 pub max_block_production_delay: [u64; 2usize],
17367 #[doc = "Maximum duration before skipping given height."]
17368 pub max_block_wait_delay: [u64; 2usize],
17369 #[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."]
17370 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17371 pub max_gas_burnt_view: ::std::option::Option<u64>,
17372 #[doc = "Minimum duration before producing block."]
17373 pub min_block_production_delay: [u64; 2usize],
17374 #[doc = "Minimum number of peers to start syncing."]
17375 pub min_num_peers: u32,
17376 #[doc = "Number of block producer seats"]
17377 pub num_block_producer_seats: u64,
17378 #[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."]
17379 pub orphan_state_witness_max_size: u64,
17380 #[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."]
17381 pub orphan_state_witness_pool_size: u32,
17382 #[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."]
17383 pub produce_chunk_add_transactions_time_limit: ::std::string::String,
17384 #[doc = "Produce empty blocks, use `false` for testing."]
17385 pub produce_empty_blocks: bool,
17386 pub resharding_config: MutableConfigValue,
17387 #[doc = "Listening rpc port for status."]
17388 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17389 pub rpc_addr: ::std::option::Option<::std::string::String>,
17390 #[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."]
17391 pub save_invalid_witnesses: bool,
17392 #[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."]
17393 pub save_latest_witnesses: bool,
17394 #[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."]
17395 pub save_trie_changes: bool,
17396 #[doc = "Whether to persist transaction outcomes to disk or not."]
17397 pub save_tx_outcomes: bool,
17398 #[doc = "Skip waiting for sync (for testing or single node testnet)."]
17399 pub skip_sync_wait: bool,
17400 #[doc = "Options for syncing state."]
17401 pub state_sync: StateSyncConfig,
17402 #[doc = "Whether to use the State Sync mechanism.\nIf disabled, the node will do Block Sync instead of State Sync."]
17403 pub state_sync_enabled: bool,
17404 #[doc = "Additional waiting period after a failed request to external storage"]
17405 pub state_sync_external_backoff: [u64; 2usize],
17406 #[doc = "How long to wait for a response from centralized state sync"]
17407 pub state_sync_external_timeout: [u64; 2usize],
17408 #[doc = "How long to wait for a response from p2p state sync"]
17409 pub state_sync_p2p_timeout: [u64; 2usize],
17410 #[doc = "How long to wait after a failed state sync request"]
17411 pub state_sync_retry_backoff: [u64; 2usize],
17412 #[doc = "How often to check that we are not out of sync."]
17413 pub sync_check_period: [u64; 2usize],
17414 #[doc = "Sync height threshold: below this difference in height don't start syncing."]
17415 pub sync_height_threshold: u64,
17416 #[doc = "Maximum number of block requests to send to peers to sync"]
17417 pub sync_max_block_requests: u32,
17418 #[doc = "While syncing, how long to check for each step."]
17419 pub sync_step_period: [u64; 2usize],
17420 pub tracked_shards_config: TrackedShardsConfig,
17421 #[doc = "Limit of the size of per-shard transaction pool measured in bytes. If not set, the size\nwill be unbounded."]
17422 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17423 pub transaction_pool_size_limit: ::std::option::Option<u64>,
17424 pub transaction_request_handler_threads: u32,
17425 #[doc = "Upper bound of the byte size of contract state that is still viewable. None is no limit"]
17426 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17427 pub trie_viewer_state_size_limit: ::std::option::Option<u64>,
17428 #[doc = "Time to persist Accounts Id in the router without removing them."]
17429 pub ttl_account_id_router: [u64; 2usize],
17430 #[doc = "If the node is not a chunk producer within that many blocks, then route\nto upcoming chunk producers."]
17431 pub tx_routing_height_horizon: u64,
17432 #[doc = "Version of the binary."]
17433 pub version: Version,
17434 #[doc = "Number of threads for ViewClientActor pool."]
17435 pub view_client_threads: u32,
17436 #[doc = "Number of seconds between state requests for view client."]
17437 pub view_client_throttle_period: [u64; 2usize],
17438}
17439impl ::std::convert::From<&RpcClientConfigResponse> for RpcClientConfigResponse {
17440 fn from(value: &RpcClientConfigResponse) -> Self {
17441 value.clone()
17442 }
17443}
17444#[doc = "`RpcCongestionLevelRequest`"]
17445#[doc = r""]
17446#[doc = r" <details><summary>JSON schema</summary>"]
17447#[doc = r""]
17448#[doc = r" ```json"]
17449#[doc = "{"]
17450#[doc = " \"title\": \"RpcCongestionLevelRequest\","]
17451#[doc = " \"type\": \"object\","]
17452#[doc = " \"anyOf\": ["]
17453#[doc = " {"]
17454#[doc = " \"title\": \"block_shard_id\","]
17455#[doc = " \"type\": \"object\","]
17456#[doc = " \"required\": ["]
17457#[doc = " \"block_id\","]
17458#[doc = " \"shard_id\""]
17459#[doc = " ],"]
17460#[doc = " \"properties\": {"]
17461#[doc = " \"block_id\": {"]
17462#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
17463#[doc = " },"]
17464#[doc = " \"shard_id\": {"]
17465#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
17466#[doc = " }"]
17467#[doc = " }"]
17468#[doc = " },"]
17469#[doc = " {"]
17470#[doc = " \"title\": \"chunk_hash\","]
17471#[doc = " \"type\": \"object\","]
17472#[doc = " \"required\": ["]
17473#[doc = " \"chunk_id\""]
17474#[doc = " ],"]
17475#[doc = " \"properties\": {"]
17476#[doc = " \"chunk_id\": {"]
17477#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
17478#[doc = " }"]
17479#[doc = " }"]
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 RpcCongestionLevelRequest {
17488 BlockShardId {
17489 block_id: BlockId,
17490 shard_id: ShardId,
17491 },
17492 ChunkHash {
17493 chunk_id: CryptoHash,
17494 },
17495}
17496impl ::std::convert::From<&Self> for RpcCongestionLevelRequest {
17497 fn from(value: &RpcCongestionLevelRequest) -> Self {
17498 value.clone()
17499 }
17500}
17501#[doc = "`RpcCongestionLevelResponse`"]
17502#[doc = r""]
17503#[doc = r" <details><summary>JSON schema</summary>"]
17504#[doc = r""]
17505#[doc = r" ```json"]
17506#[doc = "{"]
17507#[doc = " \"type\": \"object\","]
17508#[doc = " \"required\": ["]
17509#[doc = " \"congestion_level\""]
17510#[doc = " ],"]
17511#[doc = " \"properties\": {"]
17512#[doc = " \"congestion_level\": {"]
17513#[doc = " \"type\": \"number\","]
17514#[doc = " \"format\": \"double\""]
17515#[doc = " }"]
17516#[doc = " }"]
17517#[doc = "}"]
17518#[doc = r" ```"]
17519#[doc = r" </details>"]
17520#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17521pub struct RpcCongestionLevelResponse {
17522 pub congestion_level: f64,
17523}
17524impl ::std::convert::From<&RpcCongestionLevelResponse> for RpcCongestionLevelResponse {
17525 fn from(value: &RpcCongestionLevelResponse) -> Self {
17526 value.clone()
17527 }
17528}
17529#[doc = "This struct may be returned from JSON RPC server in case of error\nIt is expected that this struct has impl From<_> all other RPC errors\nlike [RpcBlockError](crate::types::blocks::RpcBlockError)"]
17530#[doc = r""]
17531#[doc = r" <details><summary>JSON schema</summary>"]
17532#[doc = r""]
17533#[doc = r" ```json"]
17534#[doc = "{"]
17535#[doc = " \"description\": \"This struct may be returned from JSON RPC server in case of error\\nIt is expected that this struct has impl From<_> all other RPC errors\\nlike [RpcBlockError](crate::types::blocks::RpcBlockError)\","]
17536#[doc = " \"type\": \"object\","]
17537#[doc = " \"oneOf\": ["]
17538#[doc = " {"]
17539#[doc = " \"type\": \"object\","]
17540#[doc = " \"required\": ["]
17541#[doc = " \"cause\","]
17542#[doc = " \"name\""]
17543#[doc = " ],"]
17544#[doc = " \"properties\": {"]
17545#[doc = " \"cause\": {"]
17546#[doc = " \"$ref\": \"#/components/schemas/RpcRequestValidationErrorKind\""]
17547#[doc = " },"]
17548#[doc = " \"name\": {"]
17549#[doc = " \"type\": \"string\","]
17550#[doc = " \"enum\": ["]
17551#[doc = " \"REQUEST_VALIDATION_ERROR\""]
17552#[doc = " ]"]
17553#[doc = " }"]
17554#[doc = " }"]
17555#[doc = " },"]
17556#[doc = " {"]
17557#[doc = " \"type\": \"object\","]
17558#[doc = " \"required\": ["]
17559#[doc = " \"cause\","]
17560#[doc = " \"name\""]
17561#[doc = " ],"]
17562#[doc = " \"properties\": {"]
17563#[doc = " \"cause\": {},"]
17564#[doc = " \"name\": {"]
17565#[doc = " \"type\": \"string\","]
17566#[doc = " \"enum\": ["]
17567#[doc = " \"HANDLER_ERROR\""]
17568#[doc = " ]"]
17569#[doc = " }"]
17570#[doc = " }"]
17571#[doc = " },"]
17572#[doc = " {"]
17573#[doc = " \"type\": \"object\","]
17574#[doc = " \"required\": ["]
17575#[doc = " \"cause\","]
17576#[doc = " \"name\""]
17577#[doc = " ],"]
17578#[doc = " \"properties\": {"]
17579#[doc = " \"cause\": {},"]
17580#[doc = " \"name\": {"]
17581#[doc = " \"type\": \"string\","]
17582#[doc = " \"enum\": ["]
17583#[doc = " \"INTERNAL_ERROR\""]
17584#[doc = " ]"]
17585#[doc = " }"]
17586#[doc = " }"]
17587#[doc = " }"]
17588#[doc = " ],"]
17589#[doc = " \"required\": ["]
17590#[doc = " \"code\","]
17591#[doc = " \"message\""]
17592#[doc = " ],"]
17593#[doc = " \"properties\": {"]
17594#[doc = " \"cause\": {},"]
17595#[doc = " \"code\": {"]
17596#[doc = " \"description\": \"Deprecated please use the `error_struct` instead\","]
17597#[doc = " \"type\": \"integer\","]
17598#[doc = " \"format\": \"int64\""]
17599#[doc = " },"]
17600#[doc = " \"data\": {"]
17601#[doc = " \"description\": \"Deprecated please use the `error_struct` instead\""]
17602#[doc = " },"]
17603#[doc = " \"message\": {"]
17604#[doc = " \"description\": \"Deprecated please use the `error_struct` instead\","]
17605#[doc = " \"type\": \"string\""]
17606#[doc = " },"]
17607#[doc = " \"name\": {}"]
17608#[doc = " },"]
17609#[doc = " \"additionalProperties\": false"]
17610#[doc = "}"]
17611#[doc = r" ```"]
17612#[doc = r" </details>"]
17613#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17614#[serde(untagged, deny_unknown_fields)]
17615pub enum RpcError {
17616 Variant0 {
17617 cause: RpcRequestValidationErrorKind,
17618 #[doc = "Deprecated please use the `error_struct` instead"]
17619 code: i64,
17620 #[doc = "Deprecated please use the `error_struct` instead"]
17621 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17622 data: ::std::option::Option<::serde_json::Value>,
17623 #[doc = "Deprecated please use the `error_struct` instead"]
17624 message: ::std::string::String,
17625 name: RpcErrorVariant0Name,
17626 },
17627 Variant1 {
17628 cause: ::serde_json::Value,
17629 #[doc = "Deprecated please use the `error_struct` instead"]
17630 code: i64,
17631 #[doc = "Deprecated please use the `error_struct` instead"]
17632 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17633 data: ::std::option::Option<::serde_json::Value>,
17634 #[doc = "Deprecated please use the `error_struct` instead"]
17635 message: ::std::string::String,
17636 name: RpcErrorVariant1Name,
17637 },
17638 Variant2 {
17639 cause: ::serde_json::Value,
17640 #[doc = "Deprecated please use the `error_struct` instead"]
17641 code: i64,
17642 #[doc = "Deprecated please use the `error_struct` instead"]
17643 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17644 data: ::std::option::Option<::serde_json::Value>,
17645 #[doc = "Deprecated please use the `error_struct` instead"]
17646 message: ::std::string::String,
17647 name: RpcErrorVariant2Name,
17648 },
17649}
17650impl ::std::convert::From<&Self> for RpcError {
17651 fn from(value: &RpcError) -> Self {
17652 value.clone()
17653 }
17654}
17655#[doc = "`RpcErrorVariant0Name`"]
17656#[doc = r""]
17657#[doc = r" <details><summary>JSON schema</summary>"]
17658#[doc = r""]
17659#[doc = r" ```json"]
17660#[doc = "{"]
17661#[doc = " \"type\": \"string\","]
17662#[doc = " \"enum\": ["]
17663#[doc = " \"REQUEST_VALIDATION_ERROR\""]
17664#[doc = " ]"]
17665#[doc = "}"]
17666#[doc = r" ```"]
17667#[doc = r" </details>"]
17668#[derive(
17669 :: serde :: Deserialize,
17670 :: serde :: Serialize,
17671 Clone,
17672 Copy,
17673 Debug,
17674 Eq,
17675 Hash,
17676 Ord,
17677 PartialEq,
17678 PartialOrd,
17679)]
17680pub enum RpcErrorVariant0Name {
17681 #[serde(rename = "REQUEST_VALIDATION_ERROR")]
17682 RequestValidationError,
17683}
17684impl ::std::convert::From<&Self> for RpcErrorVariant0Name {
17685 fn from(value: &RpcErrorVariant0Name) -> Self {
17686 value.clone()
17687 }
17688}
17689impl ::std::fmt::Display for RpcErrorVariant0Name {
17690 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17691 match *self {
17692 Self::RequestValidationError => write!(f, "REQUEST_VALIDATION_ERROR"),
17693 }
17694 }
17695}
17696impl ::std::str::FromStr for RpcErrorVariant0Name {
17697 type Err = self::error::ConversionError;
17698 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17699 match value {
17700 "REQUEST_VALIDATION_ERROR" => Ok(Self::RequestValidationError),
17701 _ => Err("invalid value".into()),
17702 }
17703 }
17704}
17705impl ::std::convert::TryFrom<&str> for RpcErrorVariant0Name {
17706 type Error = self::error::ConversionError;
17707 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17708 value.parse()
17709 }
17710}
17711impl ::std::convert::TryFrom<&::std::string::String> for RpcErrorVariant0Name {
17712 type Error = self::error::ConversionError;
17713 fn try_from(
17714 value: &::std::string::String,
17715 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17716 value.parse()
17717 }
17718}
17719impl ::std::convert::TryFrom<::std::string::String> for RpcErrorVariant0Name {
17720 type Error = self::error::ConversionError;
17721 fn try_from(
17722 value: ::std::string::String,
17723 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17724 value.parse()
17725 }
17726}
17727#[doc = "`RpcErrorVariant1Name`"]
17728#[doc = r""]
17729#[doc = r" <details><summary>JSON schema</summary>"]
17730#[doc = r""]
17731#[doc = r" ```json"]
17732#[doc = "{"]
17733#[doc = " \"type\": \"string\","]
17734#[doc = " \"enum\": ["]
17735#[doc = " \"HANDLER_ERROR\""]
17736#[doc = " ]"]
17737#[doc = "}"]
17738#[doc = r" ```"]
17739#[doc = r" </details>"]
17740#[derive(
17741 :: serde :: Deserialize,
17742 :: serde :: Serialize,
17743 Clone,
17744 Copy,
17745 Debug,
17746 Eq,
17747 Hash,
17748 Ord,
17749 PartialEq,
17750 PartialOrd,
17751)]
17752pub enum RpcErrorVariant1Name {
17753 #[serde(rename = "HANDLER_ERROR")]
17754 HandlerError,
17755}
17756impl ::std::convert::From<&Self> for RpcErrorVariant1Name {
17757 fn from(value: &RpcErrorVariant1Name) -> Self {
17758 value.clone()
17759 }
17760}
17761impl ::std::fmt::Display for RpcErrorVariant1Name {
17762 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17763 match *self {
17764 Self::HandlerError => write!(f, "HANDLER_ERROR"),
17765 }
17766 }
17767}
17768impl ::std::str::FromStr for RpcErrorVariant1Name {
17769 type Err = self::error::ConversionError;
17770 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17771 match value {
17772 "HANDLER_ERROR" => Ok(Self::HandlerError),
17773 _ => Err("invalid value".into()),
17774 }
17775 }
17776}
17777impl ::std::convert::TryFrom<&str> for RpcErrorVariant1Name {
17778 type Error = self::error::ConversionError;
17779 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17780 value.parse()
17781 }
17782}
17783impl ::std::convert::TryFrom<&::std::string::String> for RpcErrorVariant1Name {
17784 type Error = self::error::ConversionError;
17785 fn try_from(
17786 value: &::std::string::String,
17787 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17788 value.parse()
17789 }
17790}
17791impl ::std::convert::TryFrom<::std::string::String> for RpcErrorVariant1Name {
17792 type Error = self::error::ConversionError;
17793 fn try_from(
17794 value: ::std::string::String,
17795 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17796 value.parse()
17797 }
17798}
17799#[doc = "`RpcErrorVariant2Name`"]
17800#[doc = r""]
17801#[doc = r" <details><summary>JSON schema</summary>"]
17802#[doc = r""]
17803#[doc = r" ```json"]
17804#[doc = "{"]
17805#[doc = " \"type\": \"string\","]
17806#[doc = " \"enum\": ["]
17807#[doc = " \"INTERNAL_ERROR\""]
17808#[doc = " ]"]
17809#[doc = "}"]
17810#[doc = r" ```"]
17811#[doc = r" </details>"]
17812#[derive(
17813 :: serde :: Deserialize,
17814 :: serde :: Serialize,
17815 Clone,
17816 Copy,
17817 Debug,
17818 Eq,
17819 Hash,
17820 Ord,
17821 PartialEq,
17822 PartialOrd,
17823)]
17824pub enum RpcErrorVariant2Name {
17825 #[serde(rename = "INTERNAL_ERROR")]
17826 InternalError,
17827}
17828impl ::std::convert::From<&Self> for RpcErrorVariant2Name {
17829 fn from(value: &RpcErrorVariant2Name) -> Self {
17830 value.clone()
17831 }
17832}
17833impl ::std::fmt::Display for RpcErrorVariant2Name {
17834 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
17835 match *self {
17836 Self::InternalError => write!(f, "INTERNAL_ERROR"),
17837 }
17838 }
17839}
17840impl ::std::str::FromStr for RpcErrorVariant2Name {
17841 type Err = self::error::ConversionError;
17842 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17843 match value {
17844 "INTERNAL_ERROR" => Ok(Self::InternalError),
17845 _ => Err("invalid value".into()),
17846 }
17847 }
17848}
17849impl ::std::convert::TryFrom<&str> for RpcErrorVariant2Name {
17850 type Error = self::error::ConversionError;
17851 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17852 value.parse()
17853 }
17854}
17855impl ::std::convert::TryFrom<&::std::string::String> for RpcErrorVariant2Name {
17856 type Error = self::error::ConversionError;
17857 fn try_from(
17858 value: &::std::string::String,
17859 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17860 value.parse()
17861 }
17862}
17863impl ::std::convert::TryFrom<::std::string::String> for RpcErrorVariant2Name {
17864 type Error = self::error::ConversionError;
17865 fn try_from(
17866 value: ::std::string::String,
17867 ) -> ::std::result::Result<Self, self::error::ConversionError> {
17868 value.parse()
17869 }
17870}
17871#[doc = "`RpcGasPriceRequest`"]
17872#[doc = r""]
17873#[doc = r" <details><summary>JSON schema</summary>"]
17874#[doc = r""]
17875#[doc = r" ```json"]
17876#[doc = "{"]
17877#[doc = " \"title\": \"RpcGasPriceRequest\","]
17878#[doc = " \"type\": \"object\","]
17879#[doc = " \"properties\": {"]
17880#[doc = " \"block_id\": {"]
17881#[doc = " \"anyOf\": ["]
17882#[doc = " {"]
17883#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
17884#[doc = " },"]
17885#[doc = " {"]
17886#[doc = " \"type\": \"null\""]
17887#[doc = " }"]
17888#[doc = " ]"]
17889#[doc = " }"]
17890#[doc = " }"]
17891#[doc = "}"]
17892#[doc = r" ```"]
17893#[doc = r" </details>"]
17894#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17895pub struct RpcGasPriceRequest {
17896 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17897 pub block_id: ::std::option::Option<BlockId>,
17898}
17899impl ::std::convert::From<&RpcGasPriceRequest> for RpcGasPriceRequest {
17900 fn from(value: &RpcGasPriceRequest) -> Self {
17901 value.clone()
17902 }
17903}
17904impl ::std::default::Default for RpcGasPriceRequest {
17905 fn default() -> Self {
17906 Self {
17907 block_id: Default::default(),
17908 }
17909 }
17910}
17911#[doc = "`RpcGasPriceResponse`"]
17912#[doc = r""]
17913#[doc = r" <details><summary>JSON schema</summary>"]
17914#[doc = r""]
17915#[doc = r" ```json"]
17916#[doc = "{"]
17917#[doc = " \"type\": \"object\","]
17918#[doc = " \"required\": ["]
17919#[doc = " \"gas_price\""]
17920#[doc = " ],"]
17921#[doc = " \"properties\": {"]
17922#[doc = " \"gas_price\": {"]
17923#[doc = " \"type\": \"string\""]
17924#[doc = " }"]
17925#[doc = " }"]
17926#[doc = "}"]
17927#[doc = r" ```"]
17928#[doc = r" </details>"]
17929#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17930pub struct RpcGasPriceResponse {
17931 pub gas_price: ::std::string::String,
17932}
17933impl ::std::convert::From<&RpcGasPriceResponse> for RpcGasPriceResponse {
17934 fn from(value: &RpcGasPriceResponse) -> Self {
17935 value.clone()
17936 }
17937}
17938#[doc = "`RpcHealthRequest`"]
17939#[doc = r""]
17940#[doc = r" <details><summary>JSON schema</summary>"]
17941#[doc = r""]
17942#[doc = r" ```json"]
17943#[doc = "{"]
17944#[doc = " \"title\": \"RpcHealthRequest\","]
17945#[doc = " \"type\": \"null\""]
17946#[doc = "}"]
17947#[doc = r" ```"]
17948#[doc = r" </details>"]
17949#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17950#[serde(transparent)]
17951pub struct RpcHealthRequest(pub ());
17952impl ::std::ops::Deref for RpcHealthRequest {
17953 type Target = ();
17954 fn deref(&self) -> &() {
17955 &self.0
17956 }
17957}
17958impl ::std::convert::From<RpcHealthRequest> for () {
17959 fn from(value: RpcHealthRequest) -> Self {
17960 value.0
17961 }
17962}
17963impl ::std::convert::From<&RpcHealthRequest> for RpcHealthRequest {
17964 fn from(value: &RpcHealthRequest) -> Self {
17965 value.clone()
17966 }
17967}
17968impl ::std::convert::From<()> for RpcHealthRequest {
17969 fn from(value: ()) -> Self {
17970 Self(value)
17971 }
17972}
17973#[doc = "`RpcHealthResponse`"]
17974#[doc = r""]
17975#[doc = r" <details><summary>JSON schema</summary>"]
17976#[doc = r""]
17977#[doc = r" ```json"]
17978#[doc = "{"]
17979#[doc = " \"type\": \"null\""]
17980#[doc = "}"]
17981#[doc = r" ```"]
17982#[doc = r" </details>"]
17983#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
17984#[serde(transparent)]
17985pub struct RpcHealthResponse(pub ());
17986impl ::std::ops::Deref for RpcHealthResponse {
17987 type Target = ();
17988 fn deref(&self) -> &() {
17989 &self.0
17990 }
17991}
17992impl ::std::convert::From<RpcHealthResponse> for () {
17993 fn from(value: RpcHealthResponse) -> Self {
17994 value.0
17995 }
17996}
17997impl ::std::convert::From<&RpcHealthResponse> for RpcHealthResponse {
17998 fn from(value: &RpcHealthResponse) -> Self {
17999 value.clone()
18000 }
18001}
18002impl ::std::convert::From<()> for RpcHealthResponse {
18003 fn from(value: ()) -> Self {
18004 Self(value)
18005 }
18006}
18007#[doc = "`RpcKnownProducer`"]
18008#[doc = r""]
18009#[doc = r" <details><summary>JSON schema</summary>"]
18010#[doc = r""]
18011#[doc = r" ```json"]
18012#[doc = "{"]
18013#[doc = " \"type\": \"object\","]
18014#[doc = " \"required\": ["]
18015#[doc = " \"account_id\","]
18016#[doc = " \"peer_id\""]
18017#[doc = " ],"]
18018#[doc = " \"properties\": {"]
18019#[doc = " \"account_id\": {"]
18020#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
18021#[doc = " },"]
18022#[doc = " \"addr\": {"]
18023#[doc = " \"type\": ["]
18024#[doc = " \"string\","]
18025#[doc = " \"null\""]
18026#[doc = " ]"]
18027#[doc = " },"]
18028#[doc = " \"peer_id\": {"]
18029#[doc = " \"$ref\": \"#/components/schemas/PeerId\""]
18030#[doc = " }"]
18031#[doc = " }"]
18032#[doc = "}"]
18033#[doc = r" ```"]
18034#[doc = r" </details>"]
18035#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18036pub struct RpcKnownProducer {
18037 pub account_id: AccountId,
18038 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18039 pub addr: ::std::option::Option<::std::string::String>,
18040 pub peer_id: PeerId,
18041}
18042impl ::std::convert::From<&RpcKnownProducer> for RpcKnownProducer {
18043 fn from(value: &RpcKnownProducer) -> Self {
18044 value.clone()
18045 }
18046}
18047#[doc = "`RpcLightClientBlockProofRequest`"]
18048#[doc = r""]
18049#[doc = r" <details><summary>JSON schema</summary>"]
18050#[doc = r""]
18051#[doc = r" ```json"]
18052#[doc = "{"]
18053#[doc = " \"title\": \"RpcLightClientBlockProofRequest\","]
18054#[doc = " \"type\": \"object\","]
18055#[doc = " \"required\": ["]
18056#[doc = " \"block_hash\","]
18057#[doc = " \"light_client_head\""]
18058#[doc = " ],"]
18059#[doc = " \"properties\": {"]
18060#[doc = " \"block_hash\": {"]
18061#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18062#[doc = " },"]
18063#[doc = " \"light_client_head\": {"]
18064#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18065#[doc = " }"]
18066#[doc = " }"]
18067#[doc = "}"]
18068#[doc = r" ```"]
18069#[doc = r" </details>"]
18070#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18071pub struct RpcLightClientBlockProofRequest {
18072 pub block_hash: CryptoHash,
18073 pub light_client_head: CryptoHash,
18074}
18075impl ::std::convert::From<&RpcLightClientBlockProofRequest> for RpcLightClientBlockProofRequest {
18076 fn from(value: &RpcLightClientBlockProofRequest) -> Self {
18077 value.clone()
18078 }
18079}
18080#[doc = "`RpcLightClientBlockProofResponse`"]
18081#[doc = r""]
18082#[doc = r" <details><summary>JSON schema</summary>"]
18083#[doc = r""]
18084#[doc = r" ```json"]
18085#[doc = "{"]
18086#[doc = " \"type\": \"object\","]
18087#[doc = " \"required\": ["]
18088#[doc = " \"block_header_lite\","]
18089#[doc = " \"block_proof\""]
18090#[doc = " ],"]
18091#[doc = " \"properties\": {"]
18092#[doc = " \"block_header_lite\": {"]
18093#[doc = " \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
18094#[doc = " },"]
18095#[doc = " \"block_proof\": {"]
18096#[doc = " \"type\": \"array\","]
18097#[doc = " \"items\": {"]
18098#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
18099#[doc = " }"]
18100#[doc = " }"]
18101#[doc = " }"]
18102#[doc = "}"]
18103#[doc = r" ```"]
18104#[doc = r" </details>"]
18105#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18106pub struct RpcLightClientBlockProofResponse {
18107 pub block_header_lite: LightClientBlockLiteView,
18108 pub block_proof: ::std::vec::Vec<MerklePathItem>,
18109}
18110impl ::std::convert::From<&RpcLightClientBlockProofResponse> for RpcLightClientBlockProofResponse {
18111 fn from(value: &RpcLightClientBlockProofResponse) -> Self {
18112 value.clone()
18113 }
18114}
18115#[doc = "`RpcLightClientExecutionProofRequest`"]
18116#[doc = r""]
18117#[doc = r" <details><summary>JSON schema</summary>"]
18118#[doc = r""]
18119#[doc = r" ```json"]
18120#[doc = "{"]
18121#[doc = " \"title\": \"RpcLightClientExecutionProofRequest\","]
18122#[doc = " \"type\": \"object\","]
18123#[doc = " \"oneOf\": ["]
18124#[doc = " {"]
18125#[doc = " \"title\": \"transaction\","]
18126#[doc = " \"type\": \"object\","]
18127#[doc = " \"required\": ["]
18128#[doc = " \"sender_id\","]
18129#[doc = " \"transaction_hash\","]
18130#[doc = " \"type\""]
18131#[doc = " ],"]
18132#[doc = " \"properties\": {"]
18133#[doc = " \"sender_id\": {"]
18134#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
18135#[doc = " },"]
18136#[doc = " \"transaction_hash\": {"]
18137#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18138#[doc = " },"]
18139#[doc = " \"type\": {"]
18140#[doc = " \"type\": \"string\","]
18141#[doc = " \"enum\": ["]
18142#[doc = " \"transaction\""]
18143#[doc = " ]"]
18144#[doc = " }"]
18145#[doc = " }"]
18146#[doc = " },"]
18147#[doc = " {"]
18148#[doc = " \"title\": \"receipt\","]
18149#[doc = " \"type\": \"object\","]
18150#[doc = " \"required\": ["]
18151#[doc = " \"receipt_id\","]
18152#[doc = " \"receiver_id\","]
18153#[doc = " \"type\""]
18154#[doc = " ],"]
18155#[doc = " \"properties\": {"]
18156#[doc = " \"receipt_id\": {"]
18157#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18158#[doc = " },"]
18159#[doc = " \"receiver_id\": {"]
18160#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
18161#[doc = " },"]
18162#[doc = " \"type\": {"]
18163#[doc = " \"type\": \"string\","]
18164#[doc = " \"enum\": ["]
18165#[doc = " \"receipt\""]
18166#[doc = " ]"]
18167#[doc = " }"]
18168#[doc = " }"]
18169#[doc = " }"]
18170#[doc = " ],"]
18171#[doc = " \"required\": ["]
18172#[doc = " \"light_client_head\""]
18173#[doc = " ],"]
18174#[doc = " \"properties\": {"]
18175#[doc = " \"light_client_head\": {"]
18176#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18177#[doc = " }"]
18178#[doc = " }"]
18179#[doc = "}"]
18180#[doc = r" ```"]
18181#[doc = r" </details>"]
18182#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18183#[serde(untagged)]
18184pub enum RpcLightClientExecutionProofRequest {
18185 Variant0 {
18186 light_client_head: CryptoHash,
18187 sender_id: AccountId,
18188 transaction_hash: CryptoHash,
18189 #[serde(rename = "type")]
18190 type_: RpcLightClientExecutionProofRequestVariant0Type,
18191 },
18192 Variant1 {
18193 light_client_head: CryptoHash,
18194 receipt_id: CryptoHash,
18195 receiver_id: AccountId,
18196 #[serde(rename = "type")]
18197 type_: RpcLightClientExecutionProofRequestVariant1Type,
18198 },
18199}
18200impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequest {
18201 fn from(value: &RpcLightClientExecutionProofRequest) -> Self {
18202 value.clone()
18203 }
18204}
18205#[doc = "`RpcLightClientExecutionProofRequestVariant0Type`"]
18206#[doc = r""]
18207#[doc = r" <details><summary>JSON schema</summary>"]
18208#[doc = r""]
18209#[doc = r" ```json"]
18210#[doc = "{"]
18211#[doc = " \"type\": \"string\","]
18212#[doc = " \"enum\": ["]
18213#[doc = " \"transaction\""]
18214#[doc = " ]"]
18215#[doc = "}"]
18216#[doc = r" ```"]
18217#[doc = r" </details>"]
18218#[derive(
18219 :: serde :: Deserialize,
18220 :: serde :: Serialize,
18221 Clone,
18222 Copy,
18223 Debug,
18224 Eq,
18225 Hash,
18226 Ord,
18227 PartialEq,
18228 PartialOrd,
18229)]
18230pub enum RpcLightClientExecutionProofRequestVariant0Type {
18231 #[serde(rename = "transaction")]
18232 Transaction,
18233}
18234impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant0Type {
18235 fn from(value: &RpcLightClientExecutionProofRequestVariant0Type) -> Self {
18236 value.clone()
18237 }
18238}
18239impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant0Type {
18240 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18241 match *self {
18242 Self::Transaction => write!(f, "transaction"),
18243 }
18244 }
18245}
18246impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant0Type {
18247 type Err = self::error::ConversionError;
18248 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18249 match value {
18250 "transaction" => Ok(Self::Transaction),
18251 _ => Err("invalid value".into()),
18252 }
18253 }
18254}
18255impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant0Type {
18256 type Error = self::error::ConversionError;
18257 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18258 value.parse()
18259 }
18260}
18261impl ::std::convert::TryFrom<&::std::string::String>
18262 for RpcLightClientExecutionProofRequestVariant0Type
18263{
18264 type Error = self::error::ConversionError;
18265 fn try_from(
18266 value: &::std::string::String,
18267 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18268 value.parse()
18269 }
18270}
18271impl ::std::convert::TryFrom<::std::string::String>
18272 for RpcLightClientExecutionProofRequestVariant0Type
18273{
18274 type Error = self::error::ConversionError;
18275 fn try_from(
18276 value: ::std::string::String,
18277 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18278 value.parse()
18279 }
18280}
18281#[doc = "`RpcLightClientExecutionProofRequestVariant1Type`"]
18282#[doc = r""]
18283#[doc = r" <details><summary>JSON schema</summary>"]
18284#[doc = r""]
18285#[doc = r" ```json"]
18286#[doc = "{"]
18287#[doc = " \"type\": \"string\","]
18288#[doc = " \"enum\": ["]
18289#[doc = " \"receipt\""]
18290#[doc = " ]"]
18291#[doc = "}"]
18292#[doc = r" ```"]
18293#[doc = r" </details>"]
18294#[derive(
18295 :: serde :: Deserialize,
18296 :: serde :: Serialize,
18297 Clone,
18298 Copy,
18299 Debug,
18300 Eq,
18301 Hash,
18302 Ord,
18303 PartialEq,
18304 PartialOrd,
18305)]
18306pub enum RpcLightClientExecutionProofRequestVariant1Type {
18307 #[serde(rename = "receipt")]
18308 Receipt,
18309}
18310impl ::std::convert::From<&Self> for RpcLightClientExecutionProofRequestVariant1Type {
18311 fn from(value: &RpcLightClientExecutionProofRequestVariant1Type) -> Self {
18312 value.clone()
18313 }
18314}
18315impl ::std::fmt::Display for RpcLightClientExecutionProofRequestVariant1Type {
18316 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18317 match *self {
18318 Self::Receipt => write!(f, "receipt"),
18319 }
18320 }
18321}
18322impl ::std::str::FromStr for RpcLightClientExecutionProofRequestVariant1Type {
18323 type Err = self::error::ConversionError;
18324 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18325 match value {
18326 "receipt" => Ok(Self::Receipt),
18327 _ => Err("invalid value".into()),
18328 }
18329 }
18330}
18331impl ::std::convert::TryFrom<&str> for RpcLightClientExecutionProofRequestVariant1Type {
18332 type Error = self::error::ConversionError;
18333 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18334 value.parse()
18335 }
18336}
18337impl ::std::convert::TryFrom<&::std::string::String>
18338 for RpcLightClientExecutionProofRequestVariant1Type
18339{
18340 type Error = self::error::ConversionError;
18341 fn try_from(
18342 value: &::std::string::String,
18343 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18344 value.parse()
18345 }
18346}
18347impl ::std::convert::TryFrom<::std::string::String>
18348 for RpcLightClientExecutionProofRequestVariant1Type
18349{
18350 type Error = self::error::ConversionError;
18351 fn try_from(
18352 value: ::std::string::String,
18353 ) -> ::std::result::Result<Self, self::error::ConversionError> {
18354 value.parse()
18355 }
18356}
18357#[doc = "`RpcLightClientExecutionProofResponse`"]
18358#[doc = r""]
18359#[doc = r" <details><summary>JSON schema</summary>"]
18360#[doc = r""]
18361#[doc = r" ```json"]
18362#[doc = "{"]
18363#[doc = " \"type\": \"object\","]
18364#[doc = " \"required\": ["]
18365#[doc = " \"block_header_lite\","]
18366#[doc = " \"block_proof\","]
18367#[doc = " \"outcome_proof\","]
18368#[doc = " \"outcome_root_proof\""]
18369#[doc = " ],"]
18370#[doc = " \"properties\": {"]
18371#[doc = " \"block_header_lite\": {"]
18372#[doc = " \"$ref\": \"#/components/schemas/LightClientBlockLiteView\""]
18373#[doc = " },"]
18374#[doc = " \"block_proof\": {"]
18375#[doc = " \"type\": \"array\","]
18376#[doc = " \"items\": {"]
18377#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
18378#[doc = " }"]
18379#[doc = " },"]
18380#[doc = " \"outcome_proof\": {"]
18381#[doc = " \"$ref\": \"#/components/schemas/ExecutionOutcomeWithIdView\""]
18382#[doc = " },"]
18383#[doc = " \"outcome_root_proof\": {"]
18384#[doc = " \"type\": \"array\","]
18385#[doc = " \"items\": {"]
18386#[doc = " \"$ref\": \"#/components/schemas/MerklePathItem\""]
18387#[doc = " }"]
18388#[doc = " }"]
18389#[doc = " }"]
18390#[doc = "}"]
18391#[doc = r" ```"]
18392#[doc = r" </details>"]
18393#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18394pub struct RpcLightClientExecutionProofResponse {
18395 pub block_header_lite: LightClientBlockLiteView,
18396 pub block_proof: ::std::vec::Vec<MerklePathItem>,
18397 pub outcome_proof: ExecutionOutcomeWithIdView,
18398 pub outcome_root_proof: ::std::vec::Vec<MerklePathItem>,
18399}
18400impl ::std::convert::From<&RpcLightClientExecutionProofResponse>
18401 for RpcLightClientExecutionProofResponse
18402{
18403 fn from(value: &RpcLightClientExecutionProofResponse) -> Self {
18404 value.clone()
18405 }
18406}
18407#[doc = "`RpcLightClientNextBlockRequest`"]
18408#[doc = r""]
18409#[doc = r" <details><summary>JSON schema</summary>"]
18410#[doc = r""]
18411#[doc = r" ```json"]
18412#[doc = "{"]
18413#[doc = " \"title\": \"RpcLightClientNextBlockRequest\","]
18414#[doc = " \"type\": \"object\","]
18415#[doc = " \"required\": ["]
18416#[doc = " \"last_block_hash\""]
18417#[doc = " ],"]
18418#[doc = " \"properties\": {"]
18419#[doc = " \"last_block_hash\": {"]
18420#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18421#[doc = " }"]
18422#[doc = " }"]
18423#[doc = "}"]
18424#[doc = r" ```"]
18425#[doc = r" </details>"]
18426#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18427pub struct RpcLightClientNextBlockRequest {
18428 pub last_block_hash: CryptoHash,
18429}
18430impl ::std::convert::From<&RpcLightClientNextBlockRequest> for RpcLightClientNextBlockRequest {
18431 fn from(value: &RpcLightClientNextBlockRequest) -> Self {
18432 value.clone()
18433 }
18434}
18435#[doc = "A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient)."]
18436#[doc = r""]
18437#[doc = r" <details><summary>JSON schema</summary>"]
18438#[doc = r""]
18439#[doc = r" ```json"]
18440#[doc = "{"]
18441#[doc = " \"description\": \"A state for the current head of a light client. More info [here](https://nomicon.io/ChainSpec/LightClient).\","]
18442#[doc = " \"type\": \"object\","]
18443#[doc = " \"properties\": {"]
18444#[doc = " \"approvals_after_next\": {"]
18445#[doc = " \"type\": \"array\","]
18446#[doc = " \"items\": {"]
18447#[doc = " \"anyOf\": ["]
18448#[doc = " {"]
18449#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
18450#[doc = " },"]
18451#[doc = " {"]
18452#[doc = " \"type\": \"null\""]
18453#[doc = " }"]
18454#[doc = " ]"]
18455#[doc = " }"]
18456#[doc = " },"]
18457#[doc = " \"inner_lite\": {"]
18458#[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\","]
18459#[doc = " \"allOf\": ["]
18460#[doc = " {"]
18461#[doc = " \"$ref\": \"#/components/schemas/BlockHeaderInnerLiteView\""]
18462#[doc = " }"]
18463#[doc = " ]"]
18464#[doc = " },"]
18465#[doc = " \"inner_rest_hash\": {"]
18466#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18467#[doc = " },"]
18468#[doc = " \"next_block_inner_hash\": {"]
18469#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18470#[doc = " },"]
18471#[doc = " \"next_bps\": {"]
18472#[doc = " \"type\": ["]
18473#[doc = " \"array\","]
18474#[doc = " \"null\""]
18475#[doc = " ],"]
18476#[doc = " \"items\": {"]
18477#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
18478#[doc = " }"]
18479#[doc = " },"]
18480#[doc = " \"prev_block_hash\": {"]
18481#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
18482#[doc = " }"]
18483#[doc = " }"]
18484#[doc = "}"]
18485#[doc = r" ```"]
18486#[doc = r" </details>"]
18487#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18488pub struct RpcLightClientNextBlockResponse {
18489 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
18490 pub approvals_after_next: ::std::vec::Vec<::std::option::Option<Signature>>,
18491 #[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"]
18492 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18493 pub inner_lite: ::std::option::Option<BlockHeaderInnerLiteView>,
18494 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18495 pub inner_rest_hash: ::std::option::Option<CryptoHash>,
18496 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18497 pub next_block_inner_hash: ::std::option::Option<CryptoHash>,
18498 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18499 pub next_bps: ::std::option::Option<::std::vec::Vec<ValidatorStakeView>>,
18500 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18501 pub prev_block_hash: ::std::option::Option<CryptoHash>,
18502}
18503impl ::std::convert::From<&RpcLightClientNextBlockResponse> for RpcLightClientNextBlockResponse {
18504 fn from(value: &RpcLightClientNextBlockResponse) -> Self {
18505 value.clone()
18506 }
18507}
18508impl ::std::default::Default for RpcLightClientNextBlockResponse {
18509 fn default() -> Self {
18510 Self {
18511 approvals_after_next: Default::default(),
18512 inner_lite: Default::default(),
18513 inner_rest_hash: Default::default(),
18514 next_block_inner_hash: Default::default(),
18515 next_bps: Default::default(),
18516 prev_block_hash: Default::default(),
18517 }
18518 }
18519}
18520#[doc = "`RpcMaintenanceWindowsRequest`"]
18521#[doc = r""]
18522#[doc = r" <details><summary>JSON schema</summary>"]
18523#[doc = r""]
18524#[doc = r" ```json"]
18525#[doc = "{"]
18526#[doc = " \"title\": \"RpcMaintenanceWindowsRequest\","]
18527#[doc = " \"type\": \"object\","]
18528#[doc = " \"required\": ["]
18529#[doc = " \"account_id\""]
18530#[doc = " ],"]
18531#[doc = " \"properties\": {"]
18532#[doc = " \"account_id\": {"]
18533#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
18534#[doc = " }"]
18535#[doc = " }"]
18536#[doc = "}"]
18537#[doc = r" ```"]
18538#[doc = r" </details>"]
18539#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18540pub struct RpcMaintenanceWindowsRequest {
18541 pub account_id: AccountId,
18542}
18543impl ::std::convert::From<&RpcMaintenanceWindowsRequest> for RpcMaintenanceWindowsRequest {
18544 fn from(value: &RpcMaintenanceWindowsRequest) -> Self {
18545 value.clone()
18546 }
18547}
18548#[doc = "`RpcNetworkInfoRequest`"]
18549#[doc = r""]
18550#[doc = r" <details><summary>JSON schema</summary>"]
18551#[doc = r""]
18552#[doc = r" ```json"]
18553#[doc = "{"]
18554#[doc = " \"title\": \"RpcNetworkInfoRequest\","]
18555#[doc = " \"type\": \"null\""]
18556#[doc = "}"]
18557#[doc = r" ```"]
18558#[doc = r" </details>"]
18559#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18560#[serde(transparent)]
18561pub struct RpcNetworkInfoRequest(pub ());
18562impl ::std::ops::Deref for RpcNetworkInfoRequest {
18563 type Target = ();
18564 fn deref(&self) -> &() {
18565 &self.0
18566 }
18567}
18568impl ::std::convert::From<RpcNetworkInfoRequest> for () {
18569 fn from(value: RpcNetworkInfoRequest) -> Self {
18570 value.0
18571 }
18572}
18573impl ::std::convert::From<&RpcNetworkInfoRequest> for RpcNetworkInfoRequest {
18574 fn from(value: &RpcNetworkInfoRequest) -> Self {
18575 value.clone()
18576 }
18577}
18578impl ::std::convert::From<()> for RpcNetworkInfoRequest {
18579 fn from(value: ()) -> Self {
18580 Self(value)
18581 }
18582}
18583#[doc = "`RpcNetworkInfoResponse`"]
18584#[doc = r""]
18585#[doc = r" <details><summary>JSON schema</summary>"]
18586#[doc = r""]
18587#[doc = r" ```json"]
18588#[doc = "{"]
18589#[doc = " \"type\": \"object\","]
18590#[doc = " \"required\": ["]
18591#[doc = " \"active_peers\","]
18592#[doc = " \"known_producers\","]
18593#[doc = " \"num_active_peers\","]
18594#[doc = " \"peer_max_count\","]
18595#[doc = " \"received_bytes_per_sec\","]
18596#[doc = " \"sent_bytes_per_sec\""]
18597#[doc = " ],"]
18598#[doc = " \"properties\": {"]
18599#[doc = " \"active_peers\": {"]
18600#[doc = " \"type\": \"array\","]
18601#[doc = " \"items\": {"]
18602#[doc = " \"$ref\": \"#/components/schemas/RpcPeerInfo\""]
18603#[doc = " }"]
18604#[doc = " },"]
18605#[doc = " \"known_producers\": {"]
18606#[doc = " \"description\": \"Accounts of known block and chunk producers from routing table.\","]
18607#[doc = " \"type\": \"array\","]
18608#[doc = " \"items\": {"]
18609#[doc = " \"$ref\": \"#/components/schemas/RpcKnownProducer\""]
18610#[doc = " }"]
18611#[doc = " },"]
18612#[doc = " \"num_active_peers\": {"]
18613#[doc = " \"type\": \"integer\","]
18614#[doc = " \"format\": \"uint\","]
18615#[doc = " \"minimum\": 0.0"]
18616#[doc = " },"]
18617#[doc = " \"peer_max_count\": {"]
18618#[doc = " \"type\": \"integer\","]
18619#[doc = " \"format\": \"uint32\","]
18620#[doc = " \"minimum\": 0.0"]
18621#[doc = " },"]
18622#[doc = " \"received_bytes_per_sec\": {"]
18623#[doc = " \"type\": \"integer\","]
18624#[doc = " \"format\": \"uint64\","]
18625#[doc = " \"minimum\": 0.0"]
18626#[doc = " },"]
18627#[doc = " \"sent_bytes_per_sec\": {"]
18628#[doc = " \"type\": \"integer\","]
18629#[doc = " \"format\": \"uint64\","]
18630#[doc = " \"minimum\": 0.0"]
18631#[doc = " }"]
18632#[doc = " }"]
18633#[doc = "}"]
18634#[doc = r" ```"]
18635#[doc = r" </details>"]
18636#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18637pub struct RpcNetworkInfoResponse {
18638 pub active_peers: ::std::vec::Vec<RpcPeerInfo>,
18639 #[doc = "Accounts of known block and chunk producers from routing table."]
18640 pub known_producers: ::std::vec::Vec<RpcKnownProducer>,
18641 pub num_active_peers: u32,
18642 pub peer_max_count: u32,
18643 pub received_bytes_per_sec: u64,
18644 pub sent_bytes_per_sec: u64,
18645}
18646impl ::std::convert::From<&RpcNetworkInfoResponse> for RpcNetworkInfoResponse {
18647 fn from(value: &RpcNetworkInfoResponse) -> Self {
18648 value.clone()
18649 }
18650}
18651#[doc = "`RpcPeerInfo`"]
18652#[doc = r""]
18653#[doc = r" <details><summary>JSON schema</summary>"]
18654#[doc = r""]
18655#[doc = r" ```json"]
18656#[doc = "{"]
18657#[doc = " \"type\": \"object\","]
18658#[doc = " \"required\": ["]
18659#[doc = " \"id\""]
18660#[doc = " ],"]
18661#[doc = " \"properties\": {"]
18662#[doc = " \"account_id\": {"]
18663#[doc = " \"anyOf\": ["]
18664#[doc = " {"]
18665#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
18666#[doc = " },"]
18667#[doc = " {"]
18668#[doc = " \"type\": \"null\""]
18669#[doc = " }"]
18670#[doc = " ]"]
18671#[doc = " },"]
18672#[doc = " \"addr\": {"]
18673#[doc = " \"type\": ["]
18674#[doc = " \"string\","]
18675#[doc = " \"null\""]
18676#[doc = " ]"]
18677#[doc = " },"]
18678#[doc = " \"id\": {"]
18679#[doc = " \"$ref\": \"#/components/schemas/PeerId\""]
18680#[doc = " }"]
18681#[doc = " }"]
18682#[doc = "}"]
18683#[doc = r" ```"]
18684#[doc = r" </details>"]
18685#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18686pub struct RpcPeerInfo {
18687 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18688 pub account_id: ::std::option::Option<AccountId>,
18689 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18690 pub addr: ::std::option::Option<::std::string::String>,
18691 pub id: PeerId,
18692}
18693impl ::std::convert::From<&RpcPeerInfo> for RpcPeerInfo {
18694 fn from(value: &RpcPeerInfo) -> Self {
18695 value.clone()
18696 }
18697}
18698#[doc = "`RpcProtocolConfigRequest`"]
18699#[doc = r""]
18700#[doc = r" <details><summary>JSON schema</summary>"]
18701#[doc = r""]
18702#[doc = r" ```json"]
18703#[doc = "{"]
18704#[doc = " \"title\": \"RpcProtocolConfigRequest\","]
18705#[doc = " \"type\": \"object\","]
18706#[doc = " \"oneOf\": ["]
18707#[doc = " {"]
18708#[doc = " \"type\": \"object\","]
18709#[doc = " \"required\": ["]
18710#[doc = " \"block_id\""]
18711#[doc = " ],"]
18712#[doc = " \"properties\": {"]
18713#[doc = " \"block_id\": {"]
18714#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
18715#[doc = " }"]
18716#[doc = " }"]
18717#[doc = " },"]
18718#[doc = " {"]
18719#[doc = " \"type\": \"object\","]
18720#[doc = " \"required\": ["]
18721#[doc = " \"finality\""]
18722#[doc = " ],"]
18723#[doc = " \"properties\": {"]
18724#[doc = " \"finality\": {"]
18725#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
18726#[doc = " }"]
18727#[doc = " }"]
18728#[doc = " },"]
18729#[doc = " {"]
18730#[doc = " \"type\": \"object\","]
18731#[doc = " \"required\": ["]
18732#[doc = " \"sync_checkpoint\""]
18733#[doc = " ],"]
18734#[doc = " \"properties\": {"]
18735#[doc = " \"sync_checkpoint\": {"]
18736#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
18737#[doc = " }"]
18738#[doc = " }"]
18739#[doc = " }"]
18740#[doc = " ]"]
18741#[doc = "}"]
18742#[doc = r" ```"]
18743#[doc = r" </details>"]
18744#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
18745pub enum RpcProtocolConfigRequest {
18746 #[serde(rename = "block_id")]
18747 BlockId(BlockId),
18748 #[serde(rename = "finality")]
18749 Finality(Finality),
18750 #[serde(rename = "sync_checkpoint")]
18751 SyncCheckpoint(SyncCheckpoint),
18752}
18753impl ::std::convert::From<&Self> for RpcProtocolConfigRequest {
18754 fn from(value: &RpcProtocolConfigRequest) -> Self {
18755 value.clone()
18756 }
18757}
18758impl ::std::convert::From<BlockId> for RpcProtocolConfigRequest {
18759 fn from(value: BlockId) -> Self {
18760 Self::BlockId(value)
18761 }
18762}
18763impl ::std::convert::From<Finality> for RpcProtocolConfigRequest {
18764 fn from(value: Finality) -> Self {
18765 Self::Finality(value)
18766 }
18767}
18768impl ::std::convert::From<SyncCheckpoint> for RpcProtocolConfigRequest {
18769 fn from(value: SyncCheckpoint) -> Self {
18770 Self::SyncCheckpoint(value)
18771 }
18772}
18773#[doc = "`RpcProtocolConfigResponse`"]
18774#[doc = r""]
18775#[doc = r" <details><summary>JSON schema</summary>"]
18776#[doc = r""]
18777#[doc = r" ```json"]
18778#[doc = "{"]
18779#[doc = " \"type\": \"object\","]
18780#[doc = " \"required\": ["]
18781#[doc = " \"avg_hidden_validator_seats_per_shard\","]
18782#[doc = " \"block_producer_kickout_threshold\","]
18783#[doc = " \"chain_id\","]
18784#[doc = " \"chunk_producer_kickout_threshold\","]
18785#[doc = " \"chunk_validator_only_kickout_threshold\","]
18786#[doc = " \"dynamic_resharding\","]
18787#[doc = " \"epoch_length\","]
18788#[doc = " \"fishermen_threshold\","]
18789#[doc = " \"gas_limit\","]
18790#[doc = " \"gas_price_adjustment_rate\","]
18791#[doc = " \"genesis_height\","]
18792#[doc = " \"genesis_time\","]
18793#[doc = " \"max_gas_price\","]
18794#[doc = " \"max_inflation_rate\","]
18795#[doc = " \"max_kickout_stake_perc\","]
18796#[doc = " \"min_gas_price\","]
18797#[doc = " \"minimum_stake_divisor\","]
18798#[doc = " \"minimum_stake_ratio\","]
18799#[doc = " \"minimum_validators_per_shard\","]
18800#[doc = " \"num_block_producer_seats\","]
18801#[doc = " \"num_block_producer_seats_per_shard\","]
18802#[doc = " \"num_blocks_per_year\","]
18803#[doc = " \"online_max_threshold\","]
18804#[doc = " \"online_min_threshold\","]
18805#[doc = " \"protocol_reward_rate\","]
18806#[doc = " \"protocol_treasury_account\","]
18807#[doc = " \"protocol_upgrade_stake_threshold\","]
18808#[doc = " \"protocol_version\","]
18809#[doc = " \"runtime_config\","]
18810#[doc = " \"shard_layout\","]
18811#[doc = " \"shuffle_shard_assignment_for_chunk_producers\","]
18812#[doc = " \"target_validator_mandates_per_shard\","]
18813#[doc = " \"transaction_validity_period\""]
18814#[doc = " ],"]
18815#[doc = " \"properties\": {"]
18816#[doc = " \"avg_hidden_validator_seats_per_shard\": {"]
18817#[doc = " \"description\": \"Expected number of hidden validators per shard.\","]
18818#[doc = " \"type\": \"array\","]
18819#[doc = " \"items\": {"]
18820#[doc = " \"type\": \"integer\","]
18821#[doc = " \"format\": \"uint64\","]
18822#[doc = " \"minimum\": 0.0"]
18823#[doc = " }"]
18824#[doc = " },"]
18825#[doc = " \"block_producer_kickout_threshold\": {"]
18826#[doc = " \"description\": \"Threshold for kicking out block producers, between 0 and 100.\","]
18827#[doc = " \"type\": \"integer\","]
18828#[doc = " \"format\": \"uint8\","]
18829#[doc = " \"maximum\": 255.0,"]
18830#[doc = " \"minimum\": 0.0"]
18831#[doc = " },"]
18832#[doc = " \"chain_id\": {"]
18833#[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.\","]
18834#[doc = " \"type\": \"string\""]
18835#[doc = " },"]
18836#[doc = " \"chunk_producer_kickout_threshold\": {"]
18837#[doc = " \"description\": \"Threshold for kicking out chunk producers, between 0 and 100.\","]
18838#[doc = " \"type\": \"integer\","]
18839#[doc = " \"format\": \"uint8\","]
18840#[doc = " \"maximum\": 255.0,"]
18841#[doc = " \"minimum\": 0.0"]
18842#[doc = " },"]
18843#[doc = " \"chunk_validator_only_kickout_threshold\": {"]
18844#[doc = " \"description\": \"Threshold for kicking out nodes which are only chunk validators, between 0 and 100.\","]
18845#[doc = " \"type\": \"integer\","]
18846#[doc = " \"format\": \"uint8\","]
18847#[doc = " \"maximum\": 255.0,"]
18848#[doc = " \"minimum\": 0.0"]
18849#[doc = " },"]
18850#[doc = " \"dynamic_resharding\": {"]
18851#[doc = " \"description\": \"Enable dynamic re-sharding.\","]
18852#[doc = " \"type\": \"boolean\""]
18853#[doc = " },"]
18854#[doc = " \"epoch_length\": {"]
18855#[doc = " \"description\": \"Epoch length counted in block heights.\","]
18856#[doc = " \"type\": \"integer\","]
18857#[doc = " \"format\": \"uint64\","]
18858#[doc = " \"minimum\": 0.0"]
18859#[doc = " },"]
18860#[doc = " \"fishermen_threshold\": {"]
18861#[doc = " \"description\": \"Fishermen stake threshold.\","]
18862#[doc = " \"type\": \"string\""]
18863#[doc = " },"]
18864#[doc = " \"gas_limit\": {"]
18865#[doc = " \"description\": \"Initial gas limit.\","]
18866#[doc = " \"type\": \"integer\","]
18867#[doc = " \"format\": \"uint64\","]
18868#[doc = " \"minimum\": 0.0"]
18869#[doc = " },"]
18870#[doc = " \"gas_price_adjustment_rate\": {"]
18871#[doc = " \"description\": \"Gas price adjustment rate\","]
18872#[doc = " \"type\": \"array\","]
18873#[doc = " \"items\": {"]
18874#[doc = " \"type\": \"integer\","]
18875#[doc = " \"format\": \"int32\""]
18876#[doc = " },"]
18877#[doc = " \"maxItems\": 2,"]
18878#[doc = " \"minItems\": 2"]
18879#[doc = " },"]
18880#[doc = " \"genesis_height\": {"]
18881#[doc = " \"description\": \"Height of genesis block.\","]
18882#[doc = " \"type\": \"integer\","]
18883#[doc = " \"format\": \"uint64\","]
18884#[doc = " \"minimum\": 0.0"]
18885#[doc = " },"]
18886#[doc = " \"genesis_time\": {"]
18887#[doc = " \"description\": \"Official time of blockchain start.\","]
18888#[doc = " \"type\": \"string\","]
18889#[doc = " \"format\": \"date-time\""]
18890#[doc = " },"]
18891#[doc = " \"max_gas_price\": {"]
18892#[doc = " \"description\": \"Maximum gas price.\","]
18893#[doc = " \"type\": \"string\""]
18894#[doc = " },"]
18895#[doc = " \"max_inflation_rate\": {"]
18896#[doc = " \"description\": \"Maximum inflation on the total supply every epoch.\","]
18897#[doc = " \"type\": \"array\","]
18898#[doc = " \"items\": {"]
18899#[doc = " \"type\": \"integer\","]
18900#[doc = " \"format\": \"int32\""]
18901#[doc = " },"]
18902#[doc = " \"maxItems\": 2,"]
18903#[doc = " \"minItems\": 2"]
18904#[doc = " },"]
18905#[doc = " \"max_kickout_stake_perc\": {"]
18906#[doc = " \"description\": \"Max stake percentage of the validators we will kick out.\","]
18907#[doc = " \"type\": \"integer\","]
18908#[doc = " \"format\": \"uint8\","]
18909#[doc = " \"maximum\": 255.0,"]
18910#[doc = " \"minimum\": 0.0"]
18911#[doc = " },"]
18912#[doc = " \"min_gas_price\": {"]
18913#[doc = " \"description\": \"Minimum gas price. It is also the initial gas price.\","]
18914#[doc = " \"type\": \"string\""]
18915#[doc = " },"]
18916#[doc = " \"minimum_stake_divisor\": {"]
18917#[doc = " \"description\": \"The minimum stake required for staking is last seat price divided by this number.\","]
18918#[doc = " \"type\": \"integer\","]
18919#[doc = " \"format\": \"uint64\","]
18920#[doc = " \"minimum\": 0.0"]
18921#[doc = " },"]
18922#[doc = " \"minimum_stake_ratio\": {"]
18923#[doc = " \"description\": \"The lowest ratio s/s_total any block producer can have.\\nSee <https://github.com/near/NEPs/pull/167> for details\","]
18924#[doc = " \"type\": \"array\","]
18925#[doc = " \"items\": {"]
18926#[doc = " \"type\": \"integer\","]
18927#[doc = " \"format\": \"int32\""]
18928#[doc = " },"]
18929#[doc = " \"maxItems\": 2,"]
18930#[doc = " \"minItems\": 2"]
18931#[doc = " },"]
18932#[doc = " \"minimum_validators_per_shard\": {"]
18933#[doc = " \"description\": \"The minimum number of validators each shard must have\","]
18934#[doc = " \"type\": \"integer\","]
18935#[doc = " \"format\": \"uint64\","]
18936#[doc = " \"minimum\": 0.0"]
18937#[doc = " },"]
18938#[doc = " \"num_block_producer_seats\": {"]
18939#[doc = " \"description\": \"Number of block producer seats at genesis.\","]
18940#[doc = " \"type\": \"integer\","]
18941#[doc = " \"format\": \"uint64\","]
18942#[doc = " \"minimum\": 0.0"]
18943#[doc = " },"]
18944#[doc = " \"num_block_producer_seats_per_shard\": {"]
18945#[doc = " \"description\": \"Defines number of shards and number of block producer seats per each shard at genesis.\","]
18946#[doc = " \"type\": \"array\","]
18947#[doc = " \"items\": {"]
18948#[doc = " \"type\": \"integer\","]
18949#[doc = " \"format\": \"uint64\","]
18950#[doc = " \"minimum\": 0.0"]
18951#[doc = " }"]
18952#[doc = " },"]
18953#[doc = " \"num_blocks_per_year\": {"]
18954#[doc = " \"description\": \"Expected number of blocks per year\","]
18955#[doc = " \"type\": \"integer\","]
18956#[doc = " \"format\": \"uint64\","]
18957#[doc = " \"minimum\": 0.0"]
18958#[doc = " },"]
18959#[doc = " \"online_max_threshold\": {"]
18960#[doc = " \"description\": \"Online maximum threshold above which validator gets full reward.\","]
18961#[doc = " \"type\": \"array\","]
18962#[doc = " \"items\": {"]
18963#[doc = " \"type\": \"integer\","]
18964#[doc = " \"format\": \"int32\""]
18965#[doc = " },"]
18966#[doc = " \"maxItems\": 2,"]
18967#[doc = " \"minItems\": 2"]
18968#[doc = " },"]
18969#[doc = " \"online_min_threshold\": {"]
18970#[doc = " \"description\": \"Online minimum threshold below which validator doesn't receive reward.\","]
18971#[doc = " \"type\": \"array\","]
18972#[doc = " \"items\": {"]
18973#[doc = " \"type\": \"integer\","]
18974#[doc = " \"format\": \"int32\""]
18975#[doc = " },"]
18976#[doc = " \"maxItems\": 2,"]
18977#[doc = " \"minItems\": 2"]
18978#[doc = " },"]
18979#[doc = " \"protocol_reward_rate\": {"]
18980#[doc = " \"description\": \"Protocol treasury rate\","]
18981#[doc = " \"type\": \"array\","]
18982#[doc = " \"items\": {"]
18983#[doc = " \"type\": \"integer\","]
18984#[doc = " \"format\": \"int32\""]
18985#[doc = " },"]
18986#[doc = " \"maxItems\": 2,"]
18987#[doc = " \"minItems\": 2"]
18988#[doc = " },"]
18989#[doc = " \"protocol_treasury_account\": {"]
18990#[doc = " \"description\": \"Protocol treasury account\","]
18991#[doc = " \"allOf\": ["]
18992#[doc = " {"]
18993#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
18994#[doc = " }"]
18995#[doc = " ]"]
18996#[doc = " },"]
18997#[doc = " \"protocol_upgrade_stake_threshold\": {"]
18998#[doc = " \"description\": \"Threshold of stake that needs to indicate that they ready for upgrade.\","]
18999#[doc = " \"type\": \"array\","]
19000#[doc = " \"items\": {"]
19001#[doc = " \"type\": \"integer\","]
19002#[doc = " \"format\": \"int32\""]
19003#[doc = " },"]
19004#[doc = " \"maxItems\": 2,"]
19005#[doc = " \"minItems\": 2"]
19006#[doc = " },"]
19007#[doc = " \"protocol_version\": {"]
19008#[doc = " \"description\": \"Current Protocol Version\","]
19009#[doc = " \"type\": \"integer\","]
19010#[doc = " \"format\": \"uint32\","]
19011#[doc = " \"minimum\": 0.0"]
19012#[doc = " },"]
19013#[doc = " \"runtime_config\": {"]
19014#[doc = " \"description\": \"Runtime configuration (mostly economics constants).\","]
19015#[doc = " \"allOf\": ["]
19016#[doc = " {"]
19017#[doc = " \"$ref\": \"#/components/schemas/RuntimeConfigView\""]
19018#[doc = " }"]
19019#[doc = " ]"]
19020#[doc = " },"]
19021#[doc = " \"shard_layout\": {"]
19022#[doc = " \"description\": \"Layout information regarding how to split accounts to shards\","]
19023#[doc = " \"allOf\": ["]
19024#[doc = " {"]
19025#[doc = " \"$ref\": \"#/components/schemas/ShardLayout\""]
19026#[doc = " }"]
19027#[doc = " ]"]
19028#[doc = " },"]
19029#[doc = " \"shuffle_shard_assignment_for_chunk_producers\": {"]
19030#[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]`.\","]
19031#[doc = " \"type\": \"boolean\""]
19032#[doc = " },"]
19033#[doc = " \"target_validator_mandates_per_shard\": {"]
19034#[doc = " \"description\": \"Number of target chunk validator mandates for each shard.\","]
19035#[doc = " \"type\": \"integer\","]
19036#[doc = " \"format\": \"uint64\","]
19037#[doc = " \"minimum\": 0.0"]
19038#[doc = " },"]
19039#[doc = " \"transaction_validity_period\": {"]
19040#[doc = " \"description\": \"Number of blocks for which a given transaction is valid\","]
19041#[doc = " \"type\": \"integer\","]
19042#[doc = " \"format\": \"uint64\","]
19043#[doc = " \"minimum\": 0.0"]
19044#[doc = " }"]
19045#[doc = " }"]
19046#[doc = "}"]
19047#[doc = r" ```"]
19048#[doc = r" </details>"]
19049#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
19050pub struct RpcProtocolConfigResponse {
19051 #[doc = "Expected number of hidden validators per shard."]
19052 pub avg_hidden_validator_seats_per_shard: ::std::vec::Vec<u64>,
19053 #[doc = "Threshold for kicking out block producers, between 0 and 100."]
19054 pub block_producer_kickout_threshold: u8,
19055 #[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."]
19056 pub chain_id: ::std::string::String,
19057 #[doc = "Threshold for kicking out chunk producers, between 0 and 100."]
19058 pub chunk_producer_kickout_threshold: u8,
19059 #[doc = "Threshold for kicking out nodes which are only chunk validators, between 0 and 100."]
19060 pub chunk_validator_only_kickout_threshold: u8,
19061 #[doc = "Enable dynamic re-sharding."]
19062 pub dynamic_resharding: bool,
19063 #[doc = "Epoch length counted in block heights."]
19064 pub epoch_length: u64,
19065 #[doc = "Fishermen stake threshold."]
19066 pub fishermen_threshold: ::std::string::String,
19067 #[doc = "Initial gas limit."]
19068 pub gas_limit: u64,
19069 #[doc = "Gas price adjustment rate"]
19070 pub gas_price_adjustment_rate: [i32; 2usize],
19071 #[doc = "Height of genesis block."]
19072 pub genesis_height: u64,
19073 #[doc = "Official time of blockchain start."]
19074 pub genesis_time: ::chrono::DateTime<::chrono::offset::Utc>,
19075 #[doc = "Maximum gas price."]
19076 pub max_gas_price: ::std::string::String,
19077 #[doc = "Maximum inflation on the total supply every epoch."]
19078 pub max_inflation_rate: [i32; 2usize],
19079 #[doc = "Max stake percentage of the validators we will kick out."]
19080 pub max_kickout_stake_perc: u8,
19081 #[doc = "Minimum gas price. It is also the initial gas price."]
19082 pub min_gas_price: ::std::string::String,
19083 #[doc = "The minimum stake required for staking is last seat price divided by this number."]
19084 pub minimum_stake_divisor: u64,
19085 #[doc = "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details"]
19086 pub minimum_stake_ratio: [i32; 2usize],
19087 #[doc = "The minimum number of validators each shard must have"]
19088 pub minimum_validators_per_shard: u64,
19089 #[doc = "Number of block producer seats at genesis."]
19090 pub num_block_producer_seats: u64,
19091 #[doc = "Defines number of shards and number of block producer seats per each shard at genesis."]
19092 pub num_block_producer_seats_per_shard: ::std::vec::Vec<u64>,
19093 #[doc = "Expected number of blocks per year"]
19094 pub num_blocks_per_year: u64,
19095 #[doc = "Online maximum threshold above which validator gets full reward."]
19096 pub online_max_threshold: [i32; 2usize],
19097 #[doc = "Online minimum threshold below which validator doesn't receive reward."]
19098 pub online_min_threshold: [i32; 2usize],
19099 #[doc = "Protocol treasury rate"]
19100 pub protocol_reward_rate: [i32; 2usize],
19101 #[doc = "Protocol treasury account"]
19102 pub protocol_treasury_account: AccountId,
19103 #[doc = "Threshold of stake that needs to indicate that they ready for upgrade."]
19104 pub protocol_upgrade_stake_threshold: [i32; 2usize],
19105 #[doc = "Current Protocol Version"]
19106 pub protocol_version: u32,
19107 #[doc = "Runtime configuration (mostly economics constants)."]
19108 pub runtime_config: RuntimeConfigView,
19109 #[doc = "Layout information regarding how to split accounts to shards"]
19110 pub shard_layout: ShardLayout,
19111 #[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]`."]
19112 pub shuffle_shard_assignment_for_chunk_producers: bool,
19113 #[doc = "Number of target chunk validator mandates for each shard."]
19114 pub target_validator_mandates_per_shard: u64,
19115 #[doc = "Number of blocks for which a given transaction is valid"]
19116 pub transaction_validity_period: u64,
19117}
19118impl ::std::convert::From<&RpcProtocolConfigResponse> for RpcProtocolConfigResponse {
19119 fn from(value: &RpcProtocolConfigResponse) -> Self {
19120 value.clone()
19121 }
19122}
19123#[doc = "`RpcQueryRequest`"]
19124#[doc = r""]
19125#[doc = r" <details><summary>JSON schema</summary>"]
19126#[doc = r""]
19127#[doc = r" ```json"]
19128#[doc = "{"]
19129#[doc = " \"title\": \"RpcQueryRequest\","]
19130#[doc = " \"type\": \"object\","]
19131#[doc = " \"oneOf\": ["]
19132#[doc = " {"]
19133#[doc = " \"title\": \"view_account_by_block_id\","]
19134#[doc = " \"allOf\": ["]
19135#[doc = " {"]
19136#[doc = " \"type\": \"object\","]
19137#[doc = " \"required\": ["]
19138#[doc = " \"block_id\""]
19139#[doc = " ],"]
19140#[doc = " \"properties\": {"]
19141#[doc = " \"block_id\": {"]
19142#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19143#[doc = " }"]
19144#[doc = " }"]
19145#[doc = " },"]
19146#[doc = " {"]
19147#[doc = " \"type\": \"object\","]
19148#[doc = " \"required\": ["]
19149#[doc = " \"account_id\","]
19150#[doc = " \"request_type\""]
19151#[doc = " ],"]
19152#[doc = " \"properties\": {"]
19153#[doc = " \"account_id\": {"]
19154#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19155#[doc = " },"]
19156#[doc = " \"request_type\": {"]
19157#[doc = " \"type\": \"string\","]
19158#[doc = " \"enum\": ["]
19159#[doc = " \"view_account\""]
19160#[doc = " ]"]
19161#[doc = " }"]
19162#[doc = " }"]
19163#[doc = " }"]
19164#[doc = " ]"]
19165#[doc = " },"]
19166#[doc = " {"]
19167#[doc = " \"title\": \"view_code_by_block_id\","]
19168#[doc = " \"allOf\": ["]
19169#[doc = " {"]
19170#[doc = " \"type\": \"object\","]
19171#[doc = " \"required\": ["]
19172#[doc = " \"block_id\""]
19173#[doc = " ],"]
19174#[doc = " \"properties\": {"]
19175#[doc = " \"block_id\": {"]
19176#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19177#[doc = " }"]
19178#[doc = " }"]
19179#[doc = " },"]
19180#[doc = " {"]
19181#[doc = " \"type\": \"object\","]
19182#[doc = " \"required\": ["]
19183#[doc = " \"account_id\","]
19184#[doc = " \"request_type\""]
19185#[doc = " ],"]
19186#[doc = " \"properties\": {"]
19187#[doc = " \"account_id\": {"]
19188#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19189#[doc = " },"]
19190#[doc = " \"request_type\": {"]
19191#[doc = " \"type\": \"string\","]
19192#[doc = " \"enum\": ["]
19193#[doc = " \"view_code\""]
19194#[doc = " ]"]
19195#[doc = " }"]
19196#[doc = " }"]
19197#[doc = " }"]
19198#[doc = " ]"]
19199#[doc = " },"]
19200#[doc = " {"]
19201#[doc = " \"title\": \"view_state_by_block_id\","]
19202#[doc = " \"allOf\": ["]
19203#[doc = " {"]
19204#[doc = " \"type\": \"object\","]
19205#[doc = " \"required\": ["]
19206#[doc = " \"block_id\""]
19207#[doc = " ],"]
19208#[doc = " \"properties\": {"]
19209#[doc = " \"block_id\": {"]
19210#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19211#[doc = " }"]
19212#[doc = " }"]
19213#[doc = " },"]
19214#[doc = " {"]
19215#[doc = " \"type\": \"object\","]
19216#[doc = " \"required\": ["]
19217#[doc = " \"account_id\","]
19218#[doc = " \"prefix_base64\","]
19219#[doc = " \"request_type\""]
19220#[doc = " ],"]
19221#[doc = " \"properties\": {"]
19222#[doc = " \"account_id\": {"]
19223#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19224#[doc = " },"]
19225#[doc = " \"include_proof\": {"]
19226#[doc = " \"type\": \"boolean\""]
19227#[doc = " },"]
19228#[doc = " \"prefix_base64\": {"]
19229#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
19230#[doc = " },"]
19231#[doc = " \"request_type\": {"]
19232#[doc = " \"type\": \"string\","]
19233#[doc = " \"enum\": ["]
19234#[doc = " \"view_state\""]
19235#[doc = " ]"]
19236#[doc = " }"]
19237#[doc = " }"]
19238#[doc = " }"]
19239#[doc = " ]"]
19240#[doc = " },"]
19241#[doc = " {"]
19242#[doc = " \"title\": \"view_access_key_by_block_id\","]
19243#[doc = " \"allOf\": ["]
19244#[doc = " {"]
19245#[doc = " \"type\": \"object\","]
19246#[doc = " \"required\": ["]
19247#[doc = " \"block_id\""]
19248#[doc = " ],"]
19249#[doc = " \"properties\": {"]
19250#[doc = " \"block_id\": {"]
19251#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19252#[doc = " }"]
19253#[doc = " }"]
19254#[doc = " },"]
19255#[doc = " {"]
19256#[doc = " \"type\": \"object\","]
19257#[doc = " \"required\": ["]
19258#[doc = " \"account_id\","]
19259#[doc = " \"public_key\","]
19260#[doc = " \"request_type\""]
19261#[doc = " ],"]
19262#[doc = " \"properties\": {"]
19263#[doc = " \"account_id\": {"]
19264#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19265#[doc = " },"]
19266#[doc = " \"public_key\": {"]
19267#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
19268#[doc = " },"]
19269#[doc = " \"request_type\": {"]
19270#[doc = " \"type\": \"string\","]
19271#[doc = " \"enum\": ["]
19272#[doc = " \"view_access_key\""]
19273#[doc = " ]"]
19274#[doc = " }"]
19275#[doc = " }"]
19276#[doc = " }"]
19277#[doc = " ]"]
19278#[doc = " },"]
19279#[doc = " {"]
19280#[doc = " \"title\": \"view_access_key_list_by_block_id\","]
19281#[doc = " \"allOf\": ["]
19282#[doc = " {"]
19283#[doc = " \"type\": \"object\","]
19284#[doc = " \"required\": ["]
19285#[doc = " \"block_id\""]
19286#[doc = " ],"]
19287#[doc = " \"properties\": {"]
19288#[doc = " \"block_id\": {"]
19289#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19290#[doc = " }"]
19291#[doc = " }"]
19292#[doc = " },"]
19293#[doc = " {"]
19294#[doc = " \"type\": \"object\","]
19295#[doc = " \"required\": ["]
19296#[doc = " \"account_id\","]
19297#[doc = " \"request_type\""]
19298#[doc = " ],"]
19299#[doc = " \"properties\": {"]
19300#[doc = " \"account_id\": {"]
19301#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19302#[doc = " },"]
19303#[doc = " \"request_type\": {"]
19304#[doc = " \"type\": \"string\","]
19305#[doc = " \"enum\": ["]
19306#[doc = " \"view_access_key_list\""]
19307#[doc = " ]"]
19308#[doc = " }"]
19309#[doc = " }"]
19310#[doc = " }"]
19311#[doc = " ]"]
19312#[doc = " },"]
19313#[doc = " {"]
19314#[doc = " \"title\": \"call_function_by_block_id\","]
19315#[doc = " \"allOf\": ["]
19316#[doc = " {"]
19317#[doc = " \"type\": \"object\","]
19318#[doc = " \"required\": ["]
19319#[doc = " \"block_id\""]
19320#[doc = " ],"]
19321#[doc = " \"properties\": {"]
19322#[doc = " \"block_id\": {"]
19323#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19324#[doc = " }"]
19325#[doc = " }"]
19326#[doc = " },"]
19327#[doc = " {"]
19328#[doc = " \"type\": \"object\","]
19329#[doc = " \"required\": ["]
19330#[doc = " \"account_id\","]
19331#[doc = " \"args_base64\","]
19332#[doc = " \"method_name\","]
19333#[doc = " \"request_type\""]
19334#[doc = " ],"]
19335#[doc = " \"properties\": {"]
19336#[doc = " \"account_id\": {"]
19337#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19338#[doc = " },"]
19339#[doc = " \"args_base64\": {"]
19340#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
19341#[doc = " },"]
19342#[doc = " \"method_name\": {"]
19343#[doc = " \"type\": \"string\""]
19344#[doc = " },"]
19345#[doc = " \"request_type\": {"]
19346#[doc = " \"type\": \"string\","]
19347#[doc = " \"enum\": ["]
19348#[doc = " \"call_function\""]
19349#[doc = " ]"]
19350#[doc = " }"]
19351#[doc = " }"]
19352#[doc = " }"]
19353#[doc = " ]"]
19354#[doc = " },"]
19355#[doc = " {"]
19356#[doc = " \"title\": \"view_global_contract_code_by_block_id\","]
19357#[doc = " \"allOf\": ["]
19358#[doc = " {"]
19359#[doc = " \"type\": \"object\","]
19360#[doc = " \"required\": ["]
19361#[doc = " \"block_id\""]
19362#[doc = " ],"]
19363#[doc = " \"properties\": {"]
19364#[doc = " \"block_id\": {"]
19365#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19366#[doc = " }"]
19367#[doc = " }"]
19368#[doc = " },"]
19369#[doc = " {"]
19370#[doc = " \"type\": \"object\","]
19371#[doc = " \"required\": ["]
19372#[doc = " \"code_hash\","]
19373#[doc = " \"request_type\""]
19374#[doc = " ],"]
19375#[doc = " \"properties\": {"]
19376#[doc = " \"code_hash\": {"]
19377#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
19378#[doc = " },"]
19379#[doc = " \"request_type\": {"]
19380#[doc = " \"type\": \"string\","]
19381#[doc = " \"enum\": ["]
19382#[doc = " \"view_global_contract_code\""]
19383#[doc = " ]"]
19384#[doc = " }"]
19385#[doc = " }"]
19386#[doc = " }"]
19387#[doc = " ]"]
19388#[doc = " },"]
19389#[doc = " {"]
19390#[doc = " \"title\": \"view_global_contract_code_by_account_id_by_block_id\","]
19391#[doc = " \"allOf\": ["]
19392#[doc = " {"]
19393#[doc = " \"type\": \"object\","]
19394#[doc = " \"required\": ["]
19395#[doc = " \"block_id\""]
19396#[doc = " ],"]
19397#[doc = " \"properties\": {"]
19398#[doc = " \"block_id\": {"]
19399#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
19400#[doc = " }"]
19401#[doc = " }"]
19402#[doc = " },"]
19403#[doc = " {"]
19404#[doc = " \"type\": \"object\","]
19405#[doc = " \"required\": ["]
19406#[doc = " \"account_id\","]
19407#[doc = " \"request_type\""]
19408#[doc = " ],"]
19409#[doc = " \"properties\": {"]
19410#[doc = " \"account_id\": {"]
19411#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19412#[doc = " },"]
19413#[doc = " \"request_type\": {"]
19414#[doc = " \"type\": \"string\","]
19415#[doc = " \"enum\": ["]
19416#[doc = " \"view_global_contract_code_by_account_id\""]
19417#[doc = " ]"]
19418#[doc = " }"]
19419#[doc = " }"]
19420#[doc = " }"]
19421#[doc = " ]"]
19422#[doc = " },"]
19423#[doc = " {"]
19424#[doc = " \"title\": \"view_account_by_finality\","]
19425#[doc = " \"allOf\": ["]
19426#[doc = " {"]
19427#[doc = " \"type\": \"object\","]
19428#[doc = " \"required\": ["]
19429#[doc = " \"finality\""]
19430#[doc = " ],"]
19431#[doc = " \"properties\": {"]
19432#[doc = " \"finality\": {"]
19433#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19434#[doc = " }"]
19435#[doc = " }"]
19436#[doc = " },"]
19437#[doc = " {"]
19438#[doc = " \"type\": \"object\","]
19439#[doc = " \"required\": ["]
19440#[doc = " \"account_id\","]
19441#[doc = " \"request_type\""]
19442#[doc = " ],"]
19443#[doc = " \"properties\": {"]
19444#[doc = " \"account_id\": {"]
19445#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19446#[doc = " },"]
19447#[doc = " \"request_type\": {"]
19448#[doc = " \"type\": \"string\","]
19449#[doc = " \"enum\": ["]
19450#[doc = " \"view_account\""]
19451#[doc = " ]"]
19452#[doc = " }"]
19453#[doc = " }"]
19454#[doc = " }"]
19455#[doc = " ]"]
19456#[doc = " },"]
19457#[doc = " {"]
19458#[doc = " \"title\": \"view_code_by_finality\","]
19459#[doc = " \"allOf\": ["]
19460#[doc = " {"]
19461#[doc = " \"type\": \"object\","]
19462#[doc = " \"required\": ["]
19463#[doc = " \"finality\""]
19464#[doc = " ],"]
19465#[doc = " \"properties\": {"]
19466#[doc = " \"finality\": {"]
19467#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19468#[doc = " }"]
19469#[doc = " }"]
19470#[doc = " },"]
19471#[doc = " {"]
19472#[doc = " \"type\": \"object\","]
19473#[doc = " \"required\": ["]
19474#[doc = " \"account_id\","]
19475#[doc = " \"request_type\""]
19476#[doc = " ],"]
19477#[doc = " \"properties\": {"]
19478#[doc = " \"account_id\": {"]
19479#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19480#[doc = " },"]
19481#[doc = " \"request_type\": {"]
19482#[doc = " \"type\": \"string\","]
19483#[doc = " \"enum\": ["]
19484#[doc = " \"view_code\""]
19485#[doc = " ]"]
19486#[doc = " }"]
19487#[doc = " }"]
19488#[doc = " }"]
19489#[doc = " ]"]
19490#[doc = " },"]
19491#[doc = " {"]
19492#[doc = " \"title\": \"view_state_by_finality\","]
19493#[doc = " \"allOf\": ["]
19494#[doc = " {"]
19495#[doc = " \"type\": \"object\","]
19496#[doc = " \"required\": ["]
19497#[doc = " \"finality\""]
19498#[doc = " ],"]
19499#[doc = " \"properties\": {"]
19500#[doc = " \"finality\": {"]
19501#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19502#[doc = " }"]
19503#[doc = " }"]
19504#[doc = " },"]
19505#[doc = " {"]
19506#[doc = " \"type\": \"object\","]
19507#[doc = " \"required\": ["]
19508#[doc = " \"account_id\","]
19509#[doc = " \"prefix_base64\","]
19510#[doc = " \"request_type\""]
19511#[doc = " ],"]
19512#[doc = " \"properties\": {"]
19513#[doc = " \"account_id\": {"]
19514#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19515#[doc = " },"]
19516#[doc = " \"include_proof\": {"]
19517#[doc = " \"type\": \"boolean\""]
19518#[doc = " },"]
19519#[doc = " \"prefix_base64\": {"]
19520#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
19521#[doc = " },"]
19522#[doc = " \"request_type\": {"]
19523#[doc = " \"type\": \"string\","]
19524#[doc = " \"enum\": ["]
19525#[doc = " \"view_state\""]
19526#[doc = " ]"]
19527#[doc = " }"]
19528#[doc = " }"]
19529#[doc = " }"]
19530#[doc = " ]"]
19531#[doc = " },"]
19532#[doc = " {"]
19533#[doc = " \"title\": \"view_access_key_by_finality\","]
19534#[doc = " \"allOf\": ["]
19535#[doc = " {"]
19536#[doc = " \"type\": \"object\","]
19537#[doc = " \"required\": ["]
19538#[doc = " \"finality\""]
19539#[doc = " ],"]
19540#[doc = " \"properties\": {"]
19541#[doc = " \"finality\": {"]
19542#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19543#[doc = " }"]
19544#[doc = " }"]
19545#[doc = " },"]
19546#[doc = " {"]
19547#[doc = " \"type\": \"object\","]
19548#[doc = " \"required\": ["]
19549#[doc = " \"account_id\","]
19550#[doc = " \"public_key\","]
19551#[doc = " \"request_type\""]
19552#[doc = " ],"]
19553#[doc = " \"properties\": {"]
19554#[doc = " \"account_id\": {"]
19555#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19556#[doc = " },"]
19557#[doc = " \"public_key\": {"]
19558#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
19559#[doc = " },"]
19560#[doc = " \"request_type\": {"]
19561#[doc = " \"type\": \"string\","]
19562#[doc = " \"enum\": ["]
19563#[doc = " \"view_access_key\""]
19564#[doc = " ]"]
19565#[doc = " }"]
19566#[doc = " }"]
19567#[doc = " }"]
19568#[doc = " ]"]
19569#[doc = " },"]
19570#[doc = " {"]
19571#[doc = " \"title\": \"view_access_key_list_by_finality\","]
19572#[doc = " \"allOf\": ["]
19573#[doc = " {"]
19574#[doc = " \"type\": \"object\","]
19575#[doc = " \"required\": ["]
19576#[doc = " \"finality\""]
19577#[doc = " ],"]
19578#[doc = " \"properties\": {"]
19579#[doc = " \"finality\": {"]
19580#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19581#[doc = " }"]
19582#[doc = " }"]
19583#[doc = " },"]
19584#[doc = " {"]
19585#[doc = " \"type\": \"object\","]
19586#[doc = " \"required\": ["]
19587#[doc = " \"account_id\","]
19588#[doc = " \"request_type\""]
19589#[doc = " ],"]
19590#[doc = " \"properties\": {"]
19591#[doc = " \"account_id\": {"]
19592#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19593#[doc = " },"]
19594#[doc = " \"request_type\": {"]
19595#[doc = " \"type\": \"string\","]
19596#[doc = " \"enum\": ["]
19597#[doc = " \"view_access_key_list\""]
19598#[doc = " ]"]
19599#[doc = " }"]
19600#[doc = " }"]
19601#[doc = " }"]
19602#[doc = " ]"]
19603#[doc = " },"]
19604#[doc = " {"]
19605#[doc = " \"title\": \"call_function_by_finality\","]
19606#[doc = " \"allOf\": ["]
19607#[doc = " {"]
19608#[doc = " \"type\": \"object\","]
19609#[doc = " \"required\": ["]
19610#[doc = " \"finality\""]
19611#[doc = " ],"]
19612#[doc = " \"properties\": {"]
19613#[doc = " \"finality\": {"]
19614#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19615#[doc = " }"]
19616#[doc = " }"]
19617#[doc = " },"]
19618#[doc = " {"]
19619#[doc = " \"type\": \"object\","]
19620#[doc = " \"required\": ["]
19621#[doc = " \"account_id\","]
19622#[doc = " \"args_base64\","]
19623#[doc = " \"method_name\","]
19624#[doc = " \"request_type\""]
19625#[doc = " ],"]
19626#[doc = " \"properties\": {"]
19627#[doc = " \"account_id\": {"]
19628#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19629#[doc = " },"]
19630#[doc = " \"args_base64\": {"]
19631#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
19632#[doc = " },"]
19633#[doc = " \"method_name\": {"]
19634#[doc = " \"type\": \"string\""]
19635#[doc = " },"]
19636#[doc = " \"request_type\": {"]
19637#[doc = " \"type\": \"string\","]
19638#[doc = " \"enum\": ["]
19639#[doc = " \"call_function\""]
19640#[doc = " ]"]
19641#[doc = " }"]
19642#[doc = " }"]
19643#[doc = " }"]
19644#[doc = " ]"]
19645#[doc = " },"]
19646#[doc = " {"]
19647#[doc = " \"title\": \"view_global_contract_code_by_finality\","]
19648#[doc = " \"allOf\": ["]
19649#[doc = " {"]
19650#[doc = " \"type\": \"object\","]
19651#[doc = " \"required\": ["]
19652#[doc = " \"finality\""]
19653#[doc = " ],"]
19654#[doc = " \"properties\": {"]
19655#[doc = " \"finality\": {"]
19656#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19657#[doc = " }"]
19658#[doc = " }"]
19659#[doc = " },"]
19660#[doc = " {"]
19661#[doc = " \"type\": \"object\","]
19662#[doc = " \"required\": ["]
19663#[doc = " \"code_hash\","]
19664#[doc = " \"request_type\""]
19665#[doc = " ],"]
19666#[doc = " \"properties\": {"]
19667#[doc = " \"code_hash\": {"]
19668#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
19669#[doc = " },"]
19670#[doc = " \"request_type\": {"]
19671#[doc = " \"type\": \"string\","]
19672#[doc = " \"enum\": ["]
19673#[doc = " \"view_global_contract_code\""]
19674#[doc = " ]"]
19675#[doc = " }"]
19676#[doc = " }"]
19677#[doc = " }"]
19678#[doc = " ]"]
19679#[doc = " },"]
19680#[doc = " {"]
19681#[doc = " \"title\": \"view_global_contract_code_by_account_id_by_finality\","]
19682#[doc = " \"allOf\": ["]
19683#[doc = " {"]
19684#[doc = " \"type\": \"object\","]
19685#[doc = " \"required\": ["]
19686#[doc = " \"finality\""]
19687#[doc = " ],"]
19688#[doc = " \"properties\": {"]
19689#[doc = " \"finality\": {"]
19690#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
19691#[doc = " }"]
19692#[doc = " }"]
19693#[doc = " },"]
19694#[doc = " {"]
19695#[doc = " \"type\": \"object\","]
19696#[doc = " \"required\": ["]
19697#[doc = " \"account_id\","]
19698#[doc = " \"request_type\""]
19699#[doc = " ],"]
19700#[doc = " \"properties\": {"]
19701#[doc = " \"account_id\": {"]
19702#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19703#[doc = " },"]
19704#[doc = " \"request_type\": {"]
19705#[doc = " \"type\": \"string\","]
19706#[doc = " \"enum\": ["]
19707#[doc = " \"view_global_contract_code_by_account_id\""]
19708#[doc = " ]"]
19709#[doc = " }"]
19710#[doc = " }"]
19711#[doc = " }"]
19712#[doc = " ]"]
19713#[doc = " },"]
19714#[doc = " {"]
19715#[doc = " \"title\": \"view_account_by_sync_checkpoint\","]
19716#[doc = " \"allOf\": ["]
19717#[doc = " {"]
19718#[doc = " \"type\": \"object\","]
19719#[doc = " \"required\": ["]
19720#[doc = " \"sync_checkpoint\""]
19721#[doc = " ],"]
19722#[doc = " \"properties\": {"]
19723#[doc = " \"sync_checkpoint\": {"]
19724#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19725#[doc = " }"]
19726#[doc = " }"]
19727#[doc = " },"]
19728#[doc = " {"]
19729#[doc = " \"type\": \"object\","]
19730#[doc = " \"required\": ["]
19731#[doc = " \"account_id\","]
19732#[doc = " \"request_type\""]
19733#[doc = " ],"]
19734#[doc = " \"properties\": {"]
19735#[doc = " \"account_id\": {"]
19736#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19737#[doc = " },"]
19738#[doc = " \"request_type\": {"]
19739#[doc = " \"type\": \"string\","]
19740#[doc = " \"enum\": ["]
19741#[doc = " \"view_account\""]
19742#[doc = " ]"]
19743#[doc = " }"]
19744#[doc = " }"]
19745#[doc = " }"]
19746#[doc = " ]"]
19747#[doc = " },"]
19748#[doc = " {"]
19749#[doc = " \"title\": \"view_code_by_sync_checkpoint\","]
19750#[doc = " \"allOf\": ["]
19751#[doc = " {"]
19752#[doc = " \"type\": \"object\","]
19753#[doc = " \"required\": ["]
19754#[doc = " \"sync_checkpoint\""]
19755#[doc = " ],"]
19756#[doc = " \"properties\": {"]
19757#[doc = " \"sync_checkpoint\": {"]
19758#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19759#[doc = " }"]
19760#[doc = " }"]
19761#[doc = " },"]
19762#[doc = " {"]
19763#[doc = " \"type\": \"object\","]
19764#[doc = " \"required\": ["]
19765#[doc = " \"account_id\","]
19766#[doc = " \"request_type\""]
19767#[doc = " ],"]
19768#[doc = " \"properties\": {"]
19769#[doc = " \"account_id\": {"]
19770#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19771#[doc = " },"]
19772#[doc = " \"request_type\": {"]
19773#[doc = " \"type\": \"string\","]
19774#[doc = " \"enum\": ["]
19775#[doc = " \"view_code\""]
19776#[doc = " ]"]
19777#[doc = " }"]
19778#[doc = " }"]
19779#[doc = " }"]
19780#[doc = " ]"]
19781#[doc = " },"]
19782#[doc = " {"]
19783#[doc = " \"title\": \"view_state_by_sync_checkpoint\","]
19784#[doc = " \"allOf\": ["]
19785#[doc = " {"]
19786#[doc = " \"type\": \"object\","]
19787#[doc = " \"required\": ["]
19788#[doc = " \"sync_checkpoint\""]
19789#[doc = " ],"]
19790#[doc = " \"properties\": {"]
19791#[doc = " \"sync_checkpoint\": {"]
19792#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19793#[doc = " }"]
19794#[doc = " }"]
19795#[doc = " },"]
19796#[doc = " {"]
19797#[doc = " \"type\": \"object\","]
19798#[doc = " \"required\": ["]
19799#[doc = " \"account_id\","]
19800#[doc = " \"prefix_base64\","]
19801#[doc = " \"request_type\""]
19802#[doc = " ],"]
19803#[doc = " \"properties\": {"]
19804#[doc = " \"account_id\": {"]
19805#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19806#[doc = " },"]
19807#[doc = " \"include_proof\": {"]
19808#[doc = " \"type\": \"boolean\""]
19809#[doc = " },"]
19810#[doc = " \"prefix_base64\": {"]
19811#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
19812#[doc = " },"]
19813#[doc = " \"request_type\": {"]
19814#[doc = " \"type\": \"string\","]
19815#[doc = " \"enum\": ["]
19816#[doc = " \"view_state\""]
19817#[doc = " ]"]
19818#[doc = " }"]
19819#[doc = " }"]
19820#[doc = " }"]
19821#[doc = " ]"]
19822#[doc = " },"]
19823#[doc = " {"]
19824#[doc = " \"title\": \"view_access_key_by_sync_checkpoint\","]
19825#[doc = " \"allOf\": ["]
19826#[doc = " {"]
19827#[doc = " \"type\": \"object\","]
19828#[doc = " \"required\": ["]
19829#[doc = " \"sync_checkpoint\""]
19830#[doc = " ],"]
19831#[doc = " \"properties\": {"]
19832#[doc = " \"sync_checkpoint\": {"]
19833#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19834#[doc = " }"]
19835#[doc = " }"]
19836#[doc = " },"]
19837#[doc = " {"]
19838#[doc = " \"type\": \"object\","]
19839#[doc = " \"required\": ["]
19840#[doc = " \"account_id\","]
19841#[doc = " \"public_key\","]
19842#[doc = " \"request_type\""]
19843#[doc = " ],"]
19844#[doc = " \"properties\": {"]
19845#[doc = " \"account_id\": {"]
19846#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19847#[doc = " },"]
19848#[doc = " \"public_key\": {"]
19849#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
19850#[doc = " },"]
19851#[doc = " \"request_type\": {"]
19852#[doc = " \"type\": \"string\","]
19853#[doc = " \"enum\": ["]
19854#[doc = " \"view_access_key\""]
19855#[doc = " ]"]
19856#[doc = " }"]
19857#[doc = " }"]
19858#[doc = " }"]
19859#[doc = " ]"]
19860#[doc = " },"]
19861#[doc = " {"]
19862#[doc = " \"title\": \"view_access_key_list_by_sync_checkpoint\","]
19863#[doc = " \"allOf\": ["]
19864#[doc = " {"]
19865#[doc = " \"type\": \"object\","]
19866#[doc = " \"required\": ["]
19867#[doc = " \"sync_checkpoint\""]
19868#[doc = " ],"]
19869#[doc = " \"properties\": {"]
19870#[doc = " \"sync_checkpoint\": {"]
19871#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19872#[doc = " }"]
19873#[doc = " }"]
19874#[doc = " },"]
19875#[doc = " {"]
19876#[doc = " \"type\": \"object\","]
19877#[doc = " \"required\": ["]
19878#[doc = " \"account_id\","]
19879#[doc = " \"request_type\""]
19880#[doc = " ],"]
19881#[doc = " \"properties\": {"]
19882#[doc = " \"account_id\": {"]
19883#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19884#[doc = " },"]
19885#[doc = " \"request_type\": {"]
19886#[doc = " \"type\": \"string\","]
19887#[doc = " \"enum\": ["]
19888#[doc = " \"view_access_key_list\""]
19889#[doc = " ]"]
19890#[doc = " }"]
19891#[doc = " }"]
19892#[doc = " }"]
19893#[doc = " ]"]
19894#[doc = " },"]
19895#[doc = " {"]
19896#[doc = " \"title\": \"call_function_by_sync_checkpoint\","]
19897#[doc = " \"allOf\": ["]
19898#[doc = " {"]
19899#[doc = " \"type\": \"object\","]
19900#[doc = " \"required\": ["]
19901#[doc = " \"sync_checkpoint\""]
19902#[doc = " ],"]
19903#[doc = " \"properties\": {"]
19904#[doc = " \"sync_checkpoint\": {"]
19905#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19906#[doc = " }"]
19907#[doc = " }"]
19908#[doc = " },"]
19909#[doc = " {"]
19910#[doc = " \"type\": \"object\","]
19911#[doc = " \"required\": ["]
19912#[doc = " \"account_id\","]
19913#[doc = " \"args_base64\","]
19914#[doc = " \"method_name\","]
19915#[doc = " \"request_type\""]
19916#[doc = " ],"]
19917#[doc = " \"properties\": {"]
19918#[doc = " \"account_id\": {"]
19919#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19920#[doc = " },"]
19921#[doc = " \"args_base64\": {"]
19922#[doc = " \"$ref\": \"#/components/schemas/FunctionArgs\""]
19923#[doc = " },"]
19924#[doc = " \"method_name\": {"]
19925#[doc = " \"type\": \"string\""]
19926#[doc = " },"]
19927#[doc = " \"request_type\": {"]
19928#[doc = " \"type\": \"string\","]
19929#[doc = " \"enum\": ["]
19930#[doc = " \"call_function\""]
19931#[doc = " ]"]
19932#[doc = " }"]
19933#[doc = " }"]
19934#[doc = " }"]
19935#[doc = " ]"]
19936#[doc = " },"]
19937#[doc = " {"]
19938#[doc = " \"title\": \"view_global_contract_code_by_sync_checkpoint\","]
19939#[doc = " \"allOf\": ["]
19940#[doc = " {"]
19941#[doc = " \"type\": \"object\","]
19942#[doc = " \"required\": ["]
19943#[doc = " \"sync_checkpoint\""]
19944#[doc = " ],"]
19945#[doc = " \"properties\": {"]
19946#[doc = " \"sync_checkpoint\": {"]
19947#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19948#[doc = " }"]
19949#[doc = " }"]
19950#[doc = " },"]
19951#[doc = " {"]
19952#[doc = " \"type\": \"object\","]
19953#[doc = " \"required\": ["]
19954#[doc = " \"code_hash\","]
19955#[doc = " \"request_type\""]
19956#[doc = " ],"]
19957#[doc = " \"properties\": {"]
19958#[doc = " \"code_hash\": {"]
19959#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
19960#[doc = " },"]
19961#[doc = " \"request_type\": {"]
19962#[doc = " \"type\": \"string\","]
19963#[doc = " \"enum\": ["]
19964#[doc = " \"view_global_contract_code\""]
19965#[doc = " ]"]
19966#[doc = " }"]
19967#[doc = " }"]
19968#[doc = " }"]
19969#[doc = " ]"]
19970#[doc = " },"]
19971#[doc = " {"]
19972#[doc = " \"title\": \"view_global_contract_code_by_account_id_by_sync_checkpoint\","]
19973#[doc = " \"allOf\": ["]
19974#[doc = " {"]
19975#[doc = " \"type\": \"object\","]
19976#[doc = " \"required\": ["]
19977#[doc = " \"sync_checkpoint\""]
19978#[doc = " ],"]
19979#[doc = " \"properties\": {"]
19980#[doc = " \"sync_checkpoint\": {"]
19981#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
19982#[doc = " }"]
19983#[doc = " }"]
19984#[doc = " },"]
19985#[doc = " {"]
19986#[doc = " \"type\": \"object\","]
19987#[doc = " \"required\": ["]
19988#[doc = " \"account_id\","]
19989#[doc = " \"request_type\""]
19990#[doc = " ],"]
19991#[doc = " \"properties\": {"]
19992#[doc = " \"account_id\": {"]
19993#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
19994#[doc = " },"]
19995#[doc = " \"request_type\": {"]
19996#[doc = " \"type\": \"string\","]
19997#[doc = " \"enum\": ["]
19998#[doc = " \"view_global_contract_code_by_account_id\""]
19999#[doc = " ]"]
20000#[doc = " }"]
20001#[doc = " }"]
20002#[doc = " }"]
20003#[doc = " ]"]
20004#[doc = " }"]
20005#[doc = " ]"]
20006#[doc = "}"]
20007#[doc = r" ```"]
20008#[doc = r" </details>"]
20009#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20010#[serde(untagged)]
20011pub enum RpcQueryRequest {
20012 ViewAccountByBlockId {
20013 account_id: AccountId,
20014 block_id: BlockId,
20015 request_type: ViewAccountByBlockIdRequestType,
20016 },
20017 ViewCodeByBlockId {
20018 account_id: AccountId,
20019 block_id: BlockId,
20020 request_type: ViewCodeByBlockIdRequestType,
20021 },
20022 ViewStateByBlockId {
20023 account_id: AccountId,
20024 block_id: BlockId,
20025 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20026 include_proof: ::std::option::Option<bool>,
20027 prefix_base64: StoreKey,
20028 request_type: ViewStateByBlockIdRequestType,
20029 },
20030 ViewAccessKeyByBlockId {
20031 account_id: AccountId,
20032 block_id: BlockId,
20033 public_key: PublicKey,
20034 request_type: ViewAccessKeyByBlockIdRequestType,
20035 },
20036 ViewAccessKeyListByBlockId {
20037 account_id: AccountId,
20038 block_id: BlockId,
20039 request_type: ViewAccessKeyListByBlockIdRequestType,
20040 },
20041 CallFunctionByBlockId {
20042 account_id: AccountId,
20043 args_base64: FunctionArgs,
20044 block_id: BlockId,
20045 method_name: ::std::string::String,
20046 request_type: CallFunctionByBlockIdRequestType,
20047 },
20048 ViewGlobalContractCodeByBlockId {
20049 block_id: BlockId,
20050 code_hash: CryptoHash,
20051 request_type: ViewGlobalContractCodeByBlockIdRequestType,
20052 },
20053 ViewGlobalContractCodeByAccountIdByBlockId {
20054 account_id: AccountId,
20055 block_id: BlockId,
20056 request_type: ViewGlobalContractCodeByAccountIdByBlockIdRequestType,
20057 },
20058 ViewAccountByFinality {
20059 account_id: AccountId,
20060 finality: Finality,
20061 request_type: ViewAccountByFinalityRequestType,
20062 },
20063 ViewCodeByFinality {
20064 account_id: AccountId,
20065 finality: Finality,
20066 request_type: ViewCodeByFinalityRequestType,
20067 },
20068 ViewStateByFinality {
20069 account_id: AccountId,
20070 finality: Finality,
20071 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20072 include_proof: ::std::option::Option<bool>,
20073 prefix_base64: StoreKey,
20074 request_type: ViewStateByFinalityRequestType,
20075 },
20076 ViewAccessKeyByFinality {
20077 account_id: AccountId,
20078 finality: Finality,
20079 public_key: PublicKey,
20080 request_type: ViewAccessKeyByFinalityRequestType,
20081 },
20082 ViewAccessKeyListByFinality {
20083 account_id: AccountId,
20084 finality: Finality,
20085 request_type: ViewAccessKeyListByFinalityRequestType,
20086 },
20087 CallFunctionByFinality {
20088 account_id: AccountId,
20089 args_base64: FunctionArgs,
20090 finality: Finality,
20091 method_name: ::std::string::String,
20092 request_type: CallFunctionByFinalityRequestType,
20093 },
20094 ViewGlobalContractCodeByFinality {
20095 code_hash: CryptoHash,
20096 finality: Finality,
20097 request_type: ViewGlobalContractCodeByFinalityRequestType,
20098 },
20099 ViewGlobalContractCodeByAccountIdByFinality {
20100 account_id: AccountId,
20101 finality: Finality,
20102 request_type: ViewGlobalContractCodeByAccountIdByFinalityRequestType,
20103 },
20104 ViewAccountBySyncCheckpoint {
20105 account_id: AccountId,
20106 request_type: ViewAccountBySyncCheckpointRequestType,
20107 sync_checkpoint: SyncCheckpoint,
20108 },
20109 ViewCodeBySyncCheckpoint {
20110 account_id: AccountId,
20111 request_type: ViewCodeBySyncCheckpointRequestType,
20112 sync_checkpoint: SyncCheckpoint,
20113 },
20114 ViewStateBySyncCheckpoint {
20115 account_id: AccountId,
20116 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20117 include_proof: ::std::option::Option<bool>,
20118 prefix_base64: StoreKey,
20119 request_type: ViewStateBySyncCheckpointRequestType,
20120 sync_checkpoint: SyncCheckpoint,
20121 },
20122 ViewAccessKeyBySyncCheckpoint {
20123 account_id: AccountId,
20124 public_key: PublicKey,
20125 request_type: ViewAccessKeyBySyncCheckpointRequestType,
20126 sync_checkpoint: SyncCheckpoint,
20127 },
20128 ViewAccessKeyListBySyncCheckpoint {
20129 account_id: AccountId,
20130 request_type: ViewAccessKeyListBySyncCheckpointRequestType,
20131 sync_checkpoint: SyncCheckpoint,
20132 },
20133 CallFunctionBySyncCheckpoint {
20134 account_id: AccountId,
20135 args_base64: FunctionArgs,
20136 method_name: ::std::string::String,
20137 request_type: CallFunctionBySyncCheckpointRequestType,
20138 sync_checkpoint: SyncCheckpoint,
20139 },
20140 ViewGlobalContractCodeBySyncCheckpoint {
20141 code_hash: CryptoHash,
20142 request_type: ViewGlobalContractCodeBySyncCheckpointRequestType,
20143 sync_checkpoint: SyncCheckpoint,
20144 },
20145 ViewGlobalContractCodeByAccountIdBySyncCheckpoint {
20146 account_id: AccountId,
20147 request_type: ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType,
20148 sync_checkpoint: SyncCheckpoint,
20149 },
20150}
20151impl ::std::convert::From<&Self> for RpcQueryRequest {
20152 fn from(value: &RpcQueryRequest) -> Self {
20153 value.clone()
20154 }
20155}
20156#[doc = "`RpcQueryResponse`"]
20157#[doc = r""]
20158#[doc = r" <details><summary>JSON schema</summary>"]
20159#[doc = r""]
20160#[doc = r" ```json"]
20161#[doc = "{"]
20162#[doc = " \"type\": \"object\","]
20163#[doc = " \"anyOf\": ["]
20164#[doc = " {"]
20165#[doc = " \"$ref\": \"#/components/schemas/AccountView\""]
20166#[doc = " },"]
20167#[doc = " {"]
20168#[doc = " \"$ref\": \"#/components/schemas/ContractCodeView\""]
20169#[doc = " },"]
20170#[doc = " {"]
20171#[doc = " \"$ref\": \"#/components/schemas/ViewStateResult\""]
20172#[doc = " },"]
20173#[doc = " {"]
20174#[doc = " \"$ref\": \"#/components/schemas/CallResult\""]
20175#[doc = " },"]
20176#[doc = " {"]
20177#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
20178#[doc = " },"]
20179#[doc = " {"]
20180#[doc = " \"$ref\": \"#/components/schemas/AccessKeyList\""]
20181#[doc = " }"]
20182#[doc = " ],"]
20183#[doc = " \"required\": ["]
20184#[doc = " \"block_hash\","]
20185#[doc = " \"block_height\""]
20186#[doc = " ],"]
20187#[doc = " \"properties\": {"]
20188#[doc = " \"block_hash\": {"]
20189#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
20190#[doc = " },"]
20191#[doc = " \"block_height\": {"]
20192#[doc = " \"type\": \"integer\","]
20193#[doc = " \"format\": \"uint64\","]
20194#[doc = " \"minimum\": 0.0"]
20195#[doc = " }"]
20196#[doc = " }"]
20197#[doc = "}"]
20198#[doc = r" ```"]
20199#[doc = r" </details>"]
20200#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20201#[serde(untagged)]
20202pub enum RpcQueryResponse {
20203 Variant0 {
20204 amount: ::std::string::String,
20205 block_hash: CryptoHash,
20206 block_height: u64,
20207 code_hash: CryptoHash,
20208 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20209 global_contract_account_id: ::std::option::Option<AccountId>,
20210 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20211 global_contract_hash: ::std::option::Option<CryptoHash>,
20212 locked: ::std::string::String,
20213 #[doc = "TODO(2271): deprecated."]
20214 #[serde(default)]
20215 storage_paid_at: u64,
20216 storage_usage: u64,
20217 },
20218 Variant1 {
20219 block_hash: CryptoHash,
20220 block_height: u64,
20221 code_base64: ::std::string::String,
20222 hash: CryptoHash,
20223 },
20224 Variant2 {
20225 block_hash: CryptoHash,
20226 block_height: u64,
20227 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
20228 proof: ::std::vec::Vec<::std::string::String>,
20229 values: ::std::vec::Vec<StateItem>,
20230 },
20231 Variant3 {
20232 block_hash: CryptoHash,
20233 block_height: u64,
20234 logs: ::std::vec::Vec<::std::string::String>,
20235 result: ::std::vec::Vec<u8>,
20236 },
20237 Variant4 {
20238 block_hash: CryptoHash,
20239 block_height: u64,
20240 nonce: u64,
20241 permission: AccessKeyPermissionView,
20242 },
20243 Variant5 {
20244 block_hash: CryptoHash,
20245 block_height: u64,
20246 keys: ::std::vec::Vec<AccessKeyInfoView>,
20247 },
20248}
20249impl ::std::convert::From<&Self> for RpcQueryResponse {
20250 fn from(value: &RpcQueryResponse) -> Self {
20251 value.clone()
20252 }
20253}
20254#[doc = "`RpcReceiptRequest`"]
20255#[doc = r""]
20256#[doc = r" <details><summary>JSON schema</summary>"]
20257#[doc = r""]
20258#[doc = r" ```json"]
20259#[doc = "{"]
20260#[doc = " \"title\": \"RpcReceiptRequest\","]
20261#[doc = " \"type\": \"object\","]
20262#[doc = " \"required\": ["]
20263#[doc = " \"receipt_id\""]
20264#[doc = " ],"]
20265#[doc = " \"properties\": {"]
20266#[doc = " \"receipt_id\": {"]
20267#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
20268#[doc = " }"]
20269#[doc = " }"]
20270#[doc = "}"]
20271#[doc = r" ```"]
20272#[doc = r" </details>"]
20273#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20274pub struct RpcReceiptRequest {
20275 pub receipt_id: CryptoHash,
20276}
20277impl ::std::convert::From<&RpcReceiptRequest> for RpcReceiptRequest {
20278 fn from(value: &RpcReceiptRequest) -> Self {
20279 value.clone()
20280 }
20281}
20282#[doc = "`RpcReceiptResponse`"]
20283#[doc = r""]
20284#[doc = r" <details><summary>JSON schema</summary>"]
20285#[doc = r""]
20286#[doc = r" ```json"]
20287#[doc = "{"]
20288#[doc = " \"type\": \"object\","]
20289#[doc = " \"required\": ["]
20290#[doc = " \"predecessor_id\","]
20291#[doc = " \"receipt\","]
20292#[doc = " \"receipt_id\","]
20293#[doc = " \"receiver_id\""]
20294#[doc = " ],"]
20295#[doc = " \"properties\": {"]
20296#[doc = " \"predecessor_id\": {"]
20297#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20298#[doc = " },"]
20299#[doc = " \"priority\": {"]
20300#[doc = " \"default\": 0,"]
20301#[doc = " \"type\": \"integer\","]
20302#[doc = " \"format\": \"uint64\","]
20303#[doc = " \"minimum\": 0.0"]
20304#[doc = " },"]
20305#[doc = " \"receipt\": {"]
20306#[doc = " \"$ref\": \"#/components/schemas/ReceiptEnumView\""]
20307#[doc = " },"]
20308#[doc = " \"receipt_id\": {"]
20309#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
20310#[doc = " },"]
20311#[doc = " \"receiver_id\": {"]
20312#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20313#[doc = " }"]
20314#[doc = " }"]
20315#[doc = "}"]
20316#[doc = r" ```"]
20317#[doc = r" </details>"]
20318#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20319pub struct RpcReceiptResponse {
20320 pub predecessor_id: AccountId,
20321 #[serde(default)]
20322 pub priority: u64,
20323 pub receipt: ReceiptEnumView,
20324 pub receipt_id: CryptoHash,
20325 pub receiver_id: AccountId,
20326}
20327impl ::std::convert::From<&RpcReceiptResponse> for RpcReceiptResponse {
20328 fn from(value: &RpcReceiptResponse) -> Self {
20329 value.clone()
20330 }
20331}
20332#[doc = "`RpcRequestValidationErrorKind`"]
20333#[doc = r""]
20334#[doc = r" <details><summary>JSON schema</summary>"]
20335#[doc = r""]
20336#[doc = r" ```json"]
20337#[doc = "{"]
20338#[doc = " \"oneOf\": ["]
20339#[doc = " {"]
20340#[doc = " \"type\": \"object\","]
20341#[doc = " \"required\": ["]
20342#[doc = " \"info\","]
20343#[doc = " \"name\""]
20344#[doc = " ],"]
20345#[doc = " \"properties\": {"]
20346#[doc = " \"info\": {"]
20347#[doc = " \"type\": \"object\","]
20348#[doc = " \"required\": ["]
20349#[doc = " \"method_name\""]
20350#[doc = " ],"]
20351#[doc = " \"properties\": {"]
20352#[doc = " \"method_name\": {"]
20353#[doc = " \"type\": \"string\""]
20354#[doc = " }"]
20355#[doc = " }"]
20356#[doc = " },"]
20357#[doc = " \"name\": {"]
20358#[doc = " \"type\": \"string\","]
20359#[doc = " \"enum\": ["]
20360#[doc = " \"METHOD_NOT_FOUND\""]
20361#[doc = " ]"]
20362#[doc = " }"]
20363#[doc = " }"]
20364#[doc = " },"]
20365#[doc = " {"]
20366#[doc = " \"type\": \"object\","]
20367#[doc = " \"required\": ["]
20368#[doc = " \"info\","]
20369#[doc = " \"name\""]
20370#[doc = " ],"]
20371#[doc = " \"properties\": {"]
20372#[doc = " \"info\": {"]
20373#[doc = " \"type\": \"object\","]
20374#[doc = " \"required\": ["]
20375#[doc = " \"error_message\""]
20376#[doc = " ],"]
20377#[doc = " \"properties\": {"]
20378#[doc = " \"error_message\": {"]
20379#[doc = " \"type\": \"string\""]
20380#[doc = " }"]
20381#[doc = " }"]
20382#[doc = " },"]
20383#[doc = " \"name\": {"]
20384#[doc = " \"type\": \"string\","]
20385#[doc = " \"enum\": ["]
20386#[doc = " \"PARSE_ERROR\""]
20387#[doc = " ]"]
20388#[doc = " }"]
20389#[doc = " }"]
20390#[doc = " }"]
20391#[doc = " ]"]
20392#[doc = "}"]
20393#[doc = r" ```"]
20394#[doc = r" </details>"]
20395#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20396#[serde(tag = "name", content = "info")]
20397pub enum RpcRequestValidationErrorKind {
20398 #[serde(rename = "METHOD_NOT_FOUND")]
20399 MethodNotFound { method_name: ::std::string::String },
20400 #[serde(rename = "PARSE_ERROR")]
20401 ParseError {
20402 error_message: ::std::string::String,
20403 },
20404}
20405impl ::std::convert::From<&Self> for RpcRequestValidationErrorKind {
20406 fn from(value: &RpcRequestValidationErrorKind) -> Self {
20407 value.clone()
20408 }
20409}
20410#[doc = "`RpcSendTransactionRequest`"]
20411#[doc = r""]
20412#[doc = r" <details><summary>JSON schema</summary>"]
20413#[doc = r""]
20414#[doc = r" ```json"]
20415#[doc = "{"]
20416#[doc = " \"title\": \"RpcSendTransactionRequest\","]
20417#[doc = " \"type\": \"object\","]
20418#[doc = " \"required\": ["]
20419#[doc = " \"signed_tx_base64\""]
20420#[doc = " ],"]
20421#[doc = " \"properties\": {"]
20422#[doc = " \"signed_tx_base64\": {"]
20423#[doc = " \"$ref\": \"#/components/schemas/SignedTransaction\""]
20424#[doc = " },"]
20425#[doc = " \"wait_until\": {"]
20426#[doc = " \"default\": \"EXECUTED_OPTIMISTIC\","]
20427#[doc = " \"allOf\": ["]
20428#[doc = " {"]
20429#[doc = " \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
20430#[doc = " }"]
20431#[doc = " ]"]
20432#[doc = " }"]
20433#[doc = " }"]
20434#[doc = "}"]
20435#[doc = r" ```"]
20436#[doc = r" </details>"]
20437#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20438pub struct RpcSendTransactionRequest {
20439 pub signed_tx_base64: SignedTransaction,
20440 #[serde(default = "defaults::rpc_send_transaction_request_wait_until")]
20441 pub wait_until: TxExecutionStatus,
20442}
20443impl ::std::convert::From<&RpcSendTransactionRequest> for RpcSendTransactionRequest {
20444 fn from(value: &RpcSendTransactionRequest) -> Self {
20445 value.clone()
20446 }
20447}
20448#[doc = "`RpcSplitStorageInfoRequest`"]
20449#[doc = r""]
20450#[doc = r" <details><summary>JSON schema</summary>"]
20451#[doc = r""]
20452#[doc = r" ```json"]
20453#[doc = "{"]
20454#[doc = " \"title\": \"RpcSplitStorageInfoRequest\","]
20455#[doc = " \"type\": \"object\""]
20456#[doc = "}"]
20457#[doc = r" ```"]
20458#[doc = r" </details>"]
20459#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20460#[serde(transparent)]
20461pub struct RpcSplitStorageInfoRequest(
20462 pub ::serde_json::Map<::std::string::String, ::serde_json::Value>,
20463);
20464impl ::std::ops::Deref for RpcSplitStorageInfoRequest {
20465 type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
20466 fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
20467 &self.0
20468 }
20469}
20470impl ::std::convert::From<RpcSplitStorageInfoRequest>
20471 for ::serde_json::Map<::std::string::String, ::serde_json::Value>
20472{
20473 fn from(value: RpcSplitStorageInfoRequest) -> Self {
20474 value.0
20475 }
20476}
20477impl ::std::convert::From<&RpcSplitStorageInfoRequest> for RpcSplitStorageInfoRequest {
20478 fn from(value: &RpcSplitStorageInfoRequest) -> Self {
20479 value.clone()
20480 }
20481}
20482impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
20483 for RpcSplitStorageInfoRequest
20484{
20485 fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
20486 Self(value)
20487 }
20488}
20489#[doc = "Contains the split storage information."]
20490#[doc = r""]
20491#[doc = r" <details><summary>JSON schema</summary>"]
20492#[doc = r""]
20493#[doc = r" ```json"]
20494#[doc = "{"]
20495#[doc = " \"description\": \"Contains the split storage information.\","]
20496#[doc = " \"type\": \"object\","]
20497#[doc = " \"properties\": {"]
20498#[doc = " \"cold_head_height\": {"]
20499#[doc = " \"type\": ["]
20500#[doc = " \"integer\","]
20501#[doc = " \"null\""]
20502#[doc = " ],"]
20503#[doc = " \"format\": \"uint64\","]
20504#[doc = " \"minimum\": 0.0"]
20505#[doc = " },"]
20506#[doc = " \"final_head_height\": {"]
20507#[doc = " \"type\": ["]
20508#[doc = " \"integer\","]
20509#[doc = " \"null\""]
20510#[doc = " ],"]
20511#[doc = " \"format\": \"uint64\","]
20512#[doc = " \"minimum\": 0.0"]
20513#[doc = " },"]
20514#[doc = " \"head_height\": {"]
20515#[doc = " \"type\": ["]
20516#[doc = " \"integer\","]
20517#[doc = " \"null\""]
20518#[doc = " ],"]
20519#[doc = " \"format\": \"uint64\","]
20520#[doc = " \"minimum\": 0.0"]
20521#[doc = " },"]
20522#[doc = " \"hot_db_kind\": {"]
20523#[doc = " \"type\": ["]
20524#[doc = " \"string\","]
20525#[doc = " \"null\""]
20526#[doc = " ]"]
20527#[doc = " }"]
20528#[doc = " }"]
20529#[doc = "}"]
20530#[doc = r" ```"]
20531#[doc = r" </details>"]
20532#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
20533pub struct RpcSplitStorageInfoResponse {
20534 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20535 pub cold_head_height: ::std::option::Option<u64>,
20536 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20537 pub final_head_height: ::std::option::Option<u64>,
20538 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20539 pub head_height: ::std::option::Option<u64>,
20540 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20541 pub hot_db_kind: ::std::option::Option<::std::string::String>,
20542}
20543impl ::std::convert::From<&RpcSplitStorageInfoResponse> for RpcSplitStorageInfoResponse {
20544 fn from(value: &RpcSplitStorageInfoResponse) -> Self {
20545 value.clone()
20546 }
20547}
20548impl ::std::default::Default for RpcSplitStorageInfoResponse {
20549 fn default() -> Self {
20550 Self {
20551 cold_head_height: Default::default(),
20552 final_head_height: Default::default(),
20553 head_height: Default::default(),
20554 hot_db_kind: Default::default(),
20555 }
20556 }
20557}
20558#[doc = "It is a [serializable view] of [`StateChangesRequest`].\n\n[serializable view]: ./index.html\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html"]
20559#[doc = r""]
20560#[doc = r" <details><summary>JSON schema</summary>"]
20561#[doc = r""]
20562#[doc = r" ```json"]
20563#[doc = "{"]
20564#[doc = " \"title\": \"RpcStateChangesInBlockByTypeRequest\","]
20565#[doc = " \"description\": \"It is a [serializable view] of [`StateChangesRequest`].\\n\\n[serializable view]: ./index.html\\n[`StateChangesRequest`]: ../types/struct.StateChangesRequest.html\","]
20566#[doc = " \"type\": \"object\","]
20567#[doc = " \"oneOf\": ["]
20568#[doc = " {"]
20569#[doc = " \"title\": \"account_changes_by_block_id\","]
20570#[doc = " \"allOf\": ["]
20571#[doc = " {"]
20572#[doc = " \"type\": \"object\","]
20573#[doc = " \"required\": ["]
20574#[doc = " \"block_id\""]
20575#[doc = " ],"]
20576#[doc = " \"properties\": {"]
20577#[doc = " \"block_id\": {"]
20578#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20579#[doc = " }"]
20580#[doc = " }"]
20581#[doc = " },"]
20582#[doc = " {"]
20583#[doc = " \"type\": \"object\","]
20584#[doc = " \"required\": ["]
20585#[doc = " \"account_ids\","]
20586#[doc = " \"changes_type\""]
20587#[doc = " ],"]
20588#[doc = " \"properties\": {"]
20589#[doc = " \"account_ids\": {"]
20590#[doc = " \"type\": \"array\","]
20591#[doc = " \"items\": {"]
20592#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20593#[doc = " }"]
20594#[doc = " },"]
20595#[doc = " \"changes_type\": {"]
20596#[doc = " \"type\": \"string\","]
20597#[doc = " \"enum\": ["]
20598#[doc = " \"account_changes\""]
20599#[doc = " ]"]
20600#[doc = " }"]
20601#[doc = " }"]
20602#[doc = " }"]
20603#[doc = " ]"]
20604#[doc = " },"]
20605#[doc = " {"]
20606#[doc = " \"title\": \"single_access_key_changes_by_block_id\","]
20607#[doc = " \"allOf\": ["]
20608#[doc = " {"]
20609#[doc = " \"type\": \"object\","]
20610#[doc = " \"required\": ["]
20611#[doc = " \"block_id\""]
20612#[doc = " ],"]
20613#[doc = " \"properties\": {"]
20614#[doc = " \"block_id\": {"]
20615#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20616#[doc = " }"]
20617#[doc = " }"]
20618#[doc = " },"]
20619#[doc = " {"]
20620#[doc = " \"type\": \"object\","]
20621#[doc = " \"required\": ["]
20622#[doc = " \"changes_type\","]
20623#[doc = " \"keys\""]
20624#[doc = " ],"]
20625#[doc = " \"properties\": {"]
20626#[doc = " \"changes_type\": {"]
20627#[doc = " \"type\": \"string\","]
20628#[doc = " \"enum\": ["]
20629#[doc = " \"single_access_key_changes\""]
20630#[doc = " ]"]
20631#[doc = " },"]
20632#[doc = " \"keys\": {"]
20633#[doc = " \"type\": \"array\","]
20634#[doc = " \"items\": {"]
20635#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
20636#[doc = " }"]
20637#[doc = " }"]
20638#[doc = " }"]
20639#[doc = " }"]
20640#[doc = " ]"]
20641#[doc = " },"]
20642#[doc = " {"]
20643#[doc = " \"title\": \"single_gas_key_changes_by_block_id\","]
20644#[doc = " \"allOf\": ["]
20645#[doc = " {"]
20646#[doc = " \"type\": \"object\","]
20647#[doc = " \"required\": ["]
20648#[doc = " \"block_id\""]
20649#[doc = " ],"]
20650#[doc = " \"properties\": {"]
20651#[doc = " \"block_id\": {"]
20652#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20653#[doc = " }"]
20654#[doc = " }"]
20655#[doc = " },"]
20656#[doc = " {"]
20657#[doc = " \"type\": \"object\","]
20658#[doc = " \"required\": ["]
20659#[doc = " \"changes_type\","]
20660#[doc = " \"keys\""]
20661#[doc = " ],"]
20662#[doc = " \"properties\": {"]
20663#[doc = " \"changes_type\": {"]
20664#[doc = " \"type\": \"string\","]
20665#[doc = " \"enum\": ["]
20666#[doc = " \"single_gas_key_changes\""]
20667#[doc = " ]"]
20668#[doc = " },"]
20669#[doc = " \"keys\": {"]
20670#[doc = " \"type\": \"array\","]
20671#[doc = " \"items\": {"]
20672#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
20673#[doc = " }"]
20674#[doc = " }"]
20675#[doc = " }"]
20676#[doc = " }"]
20677#[doc = " ]"]
20678#[doc = " },"]
20679#[doc = " {"]
20680#[doc = " \"title\": \"all_access_key_changes_by_block_id\","]
20681#[doc = " \"allOf\": ["]
20682#[doc = " {"]
20683#[doc = " \"type\": \"object\","]
20684#[doc = " \"required\": ["]
20685#[doc = " \"block_id\""]
20686#[doc = " ],"]
20687#[doc = " \"properties\": {"]
20688#[doc = " \"block_id\": {"]
20689#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20690#[doc = " }"]
20691#[doc = " }"]
20692#[doc = " },"]
20693#[doc = " {"]
20694#[doc = " \"type\": \"object\","]
20695#[doc = " \"required\": ["]
20696#[doc = " \"account_ids\","]
20697#[doc = " \"changes_type\""]
20698#[doc = " ],"]
20699#[doc = " \"properties\": {"]
20700#[doc = " \"account_ids\": {"]
20701#[doc = " \"type\": \"array\","]
20702#[doc = " \"items\": {"]
20703#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20704#[doc = " }"]
20705#[doc = " },"]
20706#[doc = " \"changes_type\": {"]
20707#[doc = " \"type\": \"string\","]
20708#[doc = " \"enum\": ["]
20709#[doc = " \"all_access_key_changes\""]
20710#[doc = " ]"]
20711#[doc = " }"]
20712#[doc = " }"]
20713#[doc = " }"]
20714#[doc = " ]"]
20715#[doc = " },"]
20716#[doc = " {"]
20717#[doc = " \"title\": \"all_gas_key_changes_by_block_id\","]
20718#[doc = " \"allOf\": ["]
20719#[doc = " {"]
20720#[doc = " \"type\": \"object\","]
20721#[doc = " \"required\": ["]
20722#[doc = " \"block_id\""]
20723#[doc = " ],"]
20724#[doc = " \"properties\": {"]
20725#[doc = " \"block_id\": {"]
20726#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20727#[doc = " }"]
20728#[doc = " }"]
20729#[doc = " },"]
20730#[doc = " {"]
20731#[doc = " \"type\": \"object\","]
20732#[doc = " \"required\": ["]
20733#[doc = " \"account_ids\","]
20734#[doc = " \"changes_type\""]
20735#[doc = " ],"]
20736#[doc = " \"properties\": {"]
20737#[doc = " \"account_ids\": {"]
20738#[doc = " \"type\": \"array\","]
20739#[doc = " \"items\": {"]
20740#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20741#[doc = " }"]
20742#[doc = " },"]
20743#[doc = " \"changes_type\": {"]
20744#[doc = " \"type\": \"string\","]
20745#[doc = " \"enum\": ["]
20746#[doc = " \"all_gas_key_changes\""]
20747#[doc = " ]"]
20748#[doc = " }"]
20749#[doc = " }"]
20750#[doc = " }"]
20751#[doc = " ]"]
20752#[doc = " },"]
20753#[doc = " {"]
20754#[doc = " \"title\": \"contract_code_changes_by_block_id\","]
20755#[doc = " \"allOf\": ["]
20756#[doc = " {"]
20757#[doc = " \"type\": \"object\","]
20758#[doc = " \"required\": ["]
20759#[doc = " \"block_id\""]
20760#[doc = " ],"]
20761#[doc = " \"properties\": {"]
20762#[doc = " \"block_id\": {"]
20763#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20764#[doc = " }"]
20765#[doc = " }"]
20766#[doc = " },"]
20767#[doc = " {"]
20768#[doc = " \"type\": \"object\","]
20769#[doc = " \"required\": ["]
20770#[doc = " \"account_ids\","]
20771#[doc = " \"changes_type\""]
20772#[doc = " ],"]
20773#[doc = " \"properties\": {"]
20774#[doc = " \"account_ids\": {"]
20775#[doc = " \"type\": \"array\","]
20776#[doc = " \"items\": {"]
20777#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20778#[doc = " }"]
20779#[doc = " },"]
20780#[doc = " \"changes_type\": {"]
20781#[doc = " \"type\": \"string\","]
20782#[doc = " \"enum\": ["]
20783#[doc = " \"contract_code_changes\""]
20784#[doc = " ]"]
20785#[doc = " }"]
20786#[doc = " }"]
20787#[doc = " }"]
20788#[doc = " ]"]
20789#[doc = " },"]
20790#[doc = " {"]
20791#[doc = " \"title\": \"data_changes_by_block_id\","]
20792#[doc = " \"allOf\": ["]
20793#[doc = " {"]
20794#[doc = " \"type\": \"object\","]
20795#[doc = " \"required\": ["]
20796#[doc = " \"block_id\""]
20797#[doc = " ],"]
20798#[doc = " \"properties\": {"]
20799#[doc = " \"block_id\": {"]
20800#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
20801#[doc = " }"]
20802#[doc = " }"]
20803#[doc = " },"]
20804#[doc = " {"]
20805#[doc = " \"type\": \"object\","]
20806#[doc = " \"required\": ["]
20807#[doc = " \"account_ids\","]
20808#[doc = " \"changes_type\","]
20809#[doc = " \"key_prefix_base64\""]
20810#[doc = " ],"]
20811#[doc = " \"properties\": {"]
20812#[doc = " \"account_ids\": {"]
20813#[doc = " \"type\": \"array\","]
20814#[doc = " \"items\": {"]
20815#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20816#[doc = " }"]
20817#[doc = " },"]
20818#[doc = " \"changes_type\": {"]
20819#[doc = " \"type\": \"string\","]
20820#[doc = " \"enum\": ["]
20821#[doc = " \"data_changes\""]
20822#[doc = " ]"]
20823#[doc = " },"]
20824#[doc = " \"key_prefix_base64\": {"]
20825#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
20826#[doc = " }"]
20827#[doc = " }"]
20828#[doc = " }"]
20829#[doc = " ]"]
20830#[doc = " },"]
20831#[doc = " {"]
20832#[doc = " \"title\": \"account_changes_by_finality\","]
20833#[doc = " \"allOf\": ["]
20834#[doc = " {"]
20835#[doc = " \"type\": \"object\","]
20836#[doc = " \"required\": ["]
20837#[doc = " \"finality\""]
20838#[doc = " ],"]
20839#[doc = " \"properties\": {"]
20840#[doc = " \"finality\": {"]
20841#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
20842#[doc = " }"]
20843#[doc = " }"]
20844#[doc = " },"]
20845#[doc = " {"]
20846#[doc = " \"type\": \"object\","]
20847#[doc = " \"required\": ["]
20848#[doc = " \"account_ids\","]
20849#[doc = " \"changes_type\""]
20850#[doc = " ],"]
20851#[doc = " \"properties\": {"]
20852#[doc = " \"account_ids\": {"]
20853#[doc = " \"type\": \"array\","]
20854#[doc = " \"items\": {"]
20855#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20856#[doc = " }"]
20857#[doc = " },"]
20858#[doc = " \"changes_type\": {"]
20859#[doc = " \"type\": \"string\","]
20860#[doc = " \"enum\": ["]
20861#[doc = " \"account_changes\""]
20862#[doc = " ]"]
20863#[doc = " }"]
20864#[doc = " }"]
20865#[doc = " }"]
20866#[doc = " ]"]
20867#[doc = " },"]
20868#[doc = " {"]
20869#[doc = " \"title\": \"single_access_key_changes_by_finality\","]
20870#[doc = " \"allOf\": ["]
20871#[doc = " {"]
20872#[doc = " \"type\": \"object\","]
20873#[doc = " \"required\": ["]
20874#[doc = " \"finality\""]
20875#[doc = " ],"]
20876#[doc = " \"properties\": {"]
20877#[doc = " \"finality\": {"]
20878#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
20879#[doc = " }"]
20880#[doc = " }"]
20881#[doc = " },"]
20882#[doc = " {"]
20883#[doc = " \"type\": \"object\","]
20884#[doc = " \"required\": ["]
20885#[doc = " \"changes_type\","]
20886#[doc = " \"keys\""]
20887#[doc = " ],"]
20888#[doc = " \"properties\": {"]
20889#[doc = " \"changes_type\": {"]
20890#[doc = " \"type\": \"string\","]
20891#[doc = " \"enum\": ["]
20892#[doc = " \"single_access_key_changes\""]
20893#[doc = " ]"]
20894#[doc = " },"]
20895#[doc = " \"keys\": {"]
20896#[doc = " \"type\": \"array\","]
20897#[doc = " \"items\": {"]
20898#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
20899#[doc = " }"]
20900#[doc = " }"]
20901#[doc = " }"]
20902#[doc = " }"]
20903#[doc = " ]"]
20904#[doc = " },"]
20905#[doc = " {"]
20906#[doc = " \"title\": \"single_gas_key_changes_by_finality\","]
20907#[doc = " \"allOf\": ["]
20908#[doc = " {"]
20909#[doc = " \"type\": \"object\","]
20910#[doc = " \"required\": ["]
20911#[doc = " \"finality\""]
20912#[doc = " ],"]
20913#[doc = " \"properties\": {"]
20914#[doc = " \"finality\": {"]
20915#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
20916#[doc = " }"]
20917#[doc = " }"]
20918#[doc = " },"]
20919#[doc = " {"]
20920#[doc = " \"type\": \"object\","]
20921#[doc = " \"required\": ["]
20922#[doc = " \"changes_type\","]
20923#[doc = " \"keys\""]
20924#[doc = " ],"]
20925#[doc = " \"properties\": {"]
20926#[doc = " \"changes_type\": {"]
20927#[doc = " \"type\": \"string\","]
20928#[doc = " \"enum\": ["]
20929#[doc = " \"single_gas_key_changes\""]
20930#[doc = " ]"]
20931#[doc = " },"]
20932#[doc = " \"keys\": {"]
20933#[doc = " \"type\": \"array\","]
20934#[doc = " \"items\": {"]
20935#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
20936#[doc = " }"]
20937#[doc = " }"]
20938#[doc = " }"]
20939#[doc = " }"]
20940#[doc = " ]"]
20941#[doc = " },"]
20942#[doc = " {"]
20943#[doc = " \"title\": \"all_access_key_changes_by_finality\","]
20944#[doc = " \"allOf\": ["]
20945#[doc = " {"]
20946#[doc = " \"type\": \"object\","]
20947#[doc = " \"required\": ["]
20948#[doc = " \"finality\""]
20949#[doc = " ],"]
20950#[doc = " \"properties\": {"]
20951#[doc = " \"finality\": {"]
20952#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
20953#[doc = " }"]
20954#[doc = " }"]
20955#[doc = " },"]
20956#[doc = " {"]
20957#[doc = " \"type\": \"object\","]
20958#[doc = " \"required\": ["]
20959#[doc = " \"account_ids\","]
20960#[doc = " \"changes_type\""]
20961#[doc = " ],"]
20962#[doc = " \"properties\": {"]
20963#[doc = " \"account_ids\": {"]
20964#[doc = " \"type\": \"array\","]
20965#[doc = " \"items\": {"]
20966#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
20967#[doc = " }"]
20968#[doc = " },"]
20969#[doc = " \"changes_type\": {"]
20970#[doc = " \"type\": \"string\","]
20971#[doc = " \"enum\": ["]
20972#[doc = " \"all_access_key_changes\""]
20973#[doc = " ]"]
20974#[doc = " }"]
20975#[doc = " }"]
20976#[doc = " }"]
20977#[doc = " ]"]
20978#[doc = " },"]
20979#[doc = " {"]
20980#[doc = " \"title\": \"all_gas_key_changes_by_finality\","]
20981#[doc = " \"allOf\": ["]
20982#[doc = " {"]
20983#[doc = " \"type\": \"object\","]
20984#[doc = " \"required\": ["]
20985#[doc = " \"finality\""]
20986#[doc = " ],"]
20987#[doc = " \"properties\": {"]
20988#[doc = " \"finality\": {"]
20989#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
20990#[doc = " }"]
20991#[doc = " }"]
20992#[doc = " },"]
20993#[doc = " {"]
20994#[doc = " \"type\": \"object\","]
20995#[doc = " \"required\": ["]
20996#[doc = " \"account_ids\","]
20997#[doc = " \"changes_type\""]
20998#[doc = " ],"]
20999#[doc = " \"properties\": {"]
21000#[doc = " \"account_ids\": {"]
21001#[doc = " \"type\": \"array\","]
21002#[doc = " \"items\": {"]
21003#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21004#[doc = " }"]
21005#[doc = " },"]
21006#[doc = " \"changes_type\": {"]
21007#[doc = " \"type\": \"string\","]
21008#[doc = " \"enum\": ["]
21009#[doc = " \"all_gas_key_changes\""]
21010#[doc = " ]"]
21011#[doc = " }"]
21012#[doc = " }"]
21013#[doc = " }"]
21014#[doc = " ]"]
21015#[doc = " },"]
21016#[doc = " {"]
21017#[doc = " \"title\": \"contract_code_changes_by_finality\","]
21018#[doc = " \"allOf\": ["]
21019#[doc = " {"]
21020#[doc = " \"type\": \"object\","]
21021#[doc = " \"required\": ["]
21022#[doc = " \"finality\""]
21023#[doc = " ],"]
21024#[doc = " \"properties\": {"]
21025#[doc = " \"finality\": {"]
21026#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
21027#[doc = " }"]
21028#[doc = " }"]
21029#[doc = " },"]
21030#[doc = " {"]
21031#[doc = " \"type\": \"object\","]
21032#[doc = " \"required\": ["]
21033#[doc = " \"account_ids\","]
21034#[doc = " \"changes_type\""]
21035#[doc = " ],"]
21036#[doc = " \"properties\": {"]
21037#[doc = " \"account_ids\": {"]
21038#[doc = " \"type\": \"array\","]
21039#[doc = " \"items\": {"]
21040#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21041#[doc = " }"]
21042#[doc = " },"]
21043#[doc = " \"changes_type\": {"]
21044#[doc = " \"type\": \"string\","]
21045#[doc = " \"enum\": ["]
21046#[doc = " \"contract_code_changes\""]
21047#[doc = " ]"]
21048#[doc = " }"]
21049#[doc = " }"]
21050#[doc = " }"]
21051#[doc = " ]"]
21052#[doc = " },"]
21053#[doc = " {"]
21054#[doc = " \"title\": \"data_changes_by_finality\","]
21055#[doc = " \"allOf\": ["]
21056#[doc = " {"]
21057#[doc = " \"type\": \"object\","]
21058#[doc = " \"required\": ["]
21059#[doc = " \"finality\""]
21060#[doc = " ],"]
21061#[doc = " \"properties\": {"]
21062#[doc = " \"finality\": {"]
21063#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
21064#[doc = " }"]
21065#[doc = " }"]
21066#[doc = " },"]
21067#[doc = " {"]
21068#[doc = " \"type\": \"object\","]
21069#[doc = " \"required\": ["]
21070#[doc = " \"account_ids\","]
21071#[doc = " \"changes_type\","]
21072#[doc = " \"key_prefix_base64\""]
21073#[doc = " ],"]
21074#[doc = " \"properties\": {"]
21075#[doc = " \"account_ids\": {"]
21076#[doc = " \"type\": \"array\","]
21077#[doc = " \"items\": {"]
21078#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21079#[doc = " }"]
21080#[doc = " },"]
21081#[doc = " \"changes_type\": {"]
21082#[doc = " \"type\": \"string\","]
21083#[doc = " \"enum\": ["]
21084#[doc = " \"data_changes\""]
21085#[doc = " ]"]
21086#[doc = " },"]
21087#[doc = " \"key_prefix_base64\": {"]
21088#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
21089#[doc = " }"]
21090#[doc = " }"]
21091#[doc = " }"]
21092#[doc = " ]"]
21093#[doc = " },"]
21094#[doc = " {"]
21095#[doc = " \"title\": \"account_changes_by_sync_checkpoint\","]
21096#[doc = " \"allOf\": ["]
21097#[doc = " {"]
21098#[doc = " \"type\": \"object\","]
21099#[doc = " \"required\": ["]
21100#[doc = " \"sync_checkpoint\""]
21101#[doc = " ],"]
21102#[doc = " \"properties\": {"]
21103#[doc = " \"sync_checkpoint\": {"]
21104#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21105#[doc = " }"]
21106#[doc = " }"]
21107#[doc = " },"]
21108#[doc = " {"]
21109#[doc = " \"type\": \"object\","]
21110#[doc = " \"required\": ["]
21111#[doc = " \"account_ids\","]
21112#[doc = " \"changes_type\""]
21113#[doc = " ],"]
21114#[doc = " \"properties\": {"]
21115#[doc = " \"account_ids\": {"]
21116#[doc = " \"type\": \"array\","]
21117#[doc = " \"items\": {"]
21118#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21119#[doc = " }"]
21120#[doc = " },"]
21121#[doc = " \"changes_type\": {"]
21122#[doc = " \"type\": \"string\","]
21123#[doc = " \"enum\": ["]
21124#[doc = " \"account_changes\""]
21125#[doc = " ]"]
21126#[doc = " }"]
21127#[doc = " }"]
21128#[doc = " }"]
21129#[doc = " ]"]
21130#[doc = " },"]
21131#[doc = " {"]
21132#[doc = " \"title\": \"single_access_key_changes_by_sync_checkpoint\","]
21133#[doc = " \"allOf\": ["]
21134#[doc = " {"]
21135#[doc = " \"type\": \"object\","]
21136#[doc = " \"required\": ["]
21137#[doc = " \"sync_checkpoint\""]
21138#[doc = " ],"]
21139#[doc = " \"properties\": {"]
21140#[doc = " \"sync_checkpoint\": {"]
21141#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21142#[doc = " }"]
21143#[doc = " }"]
21144#[doc = " },"]
21145#[doc = " {"]
21146#[doc = " \"type\": \"object\","]
21147#[doc = " \"required\": ["]
21148#[doc = " \"changes_type\","]
21149#[doc = " \"keys\""]
21150#[doc = " ],"]
21151#[doc = " \"properties\": {"]
21152#[doc = " \"changes_type\": {"]
21153#[doc = " \"type\": \"string\","]
21154#[doc = " \"enum\": ["]
21155#[doc = " \"single_access_key_changes\""]
21156#[doc = " ]"]
21157#[doc = " },"]
21158#[doc = " \"keys\": {"]
21159#[doc = " \"type\": \"array\","]
21160#[doc = " \"items\": {"]
21161#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
21162#[doc = " }"]
21163#[doc = " }"]
21164#[doc = " }"]
21165#[doc = " }"]
21166#[doc = " ]"]
21167#[doc = " },"]
21168#[doc = " {"]
21169#[doc = " \"title\": \"single_gas_key_changes_by_sync_checkpoint\","]
21170#[doc = " \"allOf\": ["]
21171#[doc = " {"]
21172#[doc = " \"type\": \"object\","]
21173#[doc = " \"required\": ["]
21174#[doc = " \"sync_checkpoint\""]
21175#[doc = " ],"]
21176#[doc = " \"properties\": {"]
21177#[doc = " \"sync_checkpoint\": {"]
21178#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21179#[doc = " }"]
21180#[doc = " }"]
21181#[doc = " },"]
21182#[doc = " {"]
21183#[doc = " \"type\": \"object\","]
21184#[doc = " \"required\": ["]
21185#[doc = " \"changes_type\","]
21186#[doc = " \"keys\""]
21187#[doc = " ],"]
21188#[doc = " \"properties\": {"]
21189#[doc = " \"changes_type\": {"]
21190#[doc = " \"type\": \"string\","]
21191#[doc = " \"enum\": ["]
21192#[doc = " \"single_gas_key_changes\""]
21193#[doc = " ]"]
21194#[doc = " },"]
21195#[doc = " \"keys\": {"]
21196#[doc = " \"type\": \"array\","]
21197#[doc = " \"items\": {"]
21198#[doc = " \"$ref\": \"#/components/schemas/AccountWithPublicKey\""]
21199#[doc = " }"]
21200#[doc = " }"]
21201#[doc = " }"]
21202#[doc = " }"]
21203#[doc = " ]"]
21204#[doc = " },"]
21205#[doc = " {"]
21206#[doc = " \"title\": \"all_access_key_changes_by_sync_checkpoint\","]
21207#[doc = " \"allOf\": ["]
21208#[doc = " {"]
21209#[doc = " \"type\": \"object\","]
21210#[doc = " \"required\": ["]
21211#[doc = " \"sync_checkpoint\""]
21212#[doc = " ],"]
21213#[doc = " \"properties\": {"]
21214#[doc = " \"sync_checkpoint\": {"]
21215#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21216#[doc = " }"]
21217#[doc = " }"]
21218#[doc = " },"]
21219#[doc = " {"]
21220#[doc = " \"type\": \"object\","]
21221#[doc = " \"required\": ["]
21222#[doc = " \"account_ids\","]
21223#[doc = " \"changes_type\""]
21224#[doc = " ],"]
21225#[doc = " \"properties\": {"]
21226#[doc = " \"account_ids\": {"]
21227#[doc = " \"type\": \"array\","]
21228#[doc = " \"items\": {"]
21229#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21230#[doc = " }"]
21231#[doc = " },"]
21232#[doc = " \"changes_type\": {"]
21233#[doc = " \"type\": \"string\","]
21234#[doc = " \"enum\": ["]
21235#[doc = " \"all_access_key_changes\""]
21236#[doc = " ]"]
21237#[doc = " }"]
21238#[doc = " }"]
21239#[doc = " }"]
21240#[doc = " ]"]
21241#[doc = " },"]
21242#[doc = " {"]
21243#[doc = " \"title\": \"all_gas_key_changes_by_sync_checkpoint\","]
21244#[doc = " \"allOf\": ["]
21245#[doc = " {"]
21246#[doc = " \"type\": \"object\","]
21247#[doc = " \"required\": ["]
21248#[doc = " \"sync_checkpoint\""]
21249#[doc = " ],"]
21250#[doc = " \"properties\": {"]
21251#[doc = " \"sync_checkpoint\": {"]
21252#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21253#[doc = " }"]
21254#[doc = " }"]
21255#[doc = " },"]
21256#[doc = " {"]
21257#[doc = " \"type\": \"object\","]
21258#[doc = " \"required\": ["]
21259#[doc = " \"account_ids\","]
21260#[doc = " \"changes_type\""]
21261#[doc = " ],"]
21262#[doc = " \"properties\": {"]
21263#[doc = " \"account_ids\": {"]
21264#[doc = " \"type\": \"array\","]
21265#[doc = " \"items\": {"]
21266#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21267#[doc = " }"]
21268#[doc = " },"]
21269#[doc = " \"changes_type\": {"]
21270#[doc = " \"type\": \"string\","]
21271#[doc = " \"enum\": ["]
21272#[doc = " \"all_gas_key_changes\""]
21273#[doc = " ]"]
21274#[doc = " }"]
21275#[doc = " }"]
21276#[doc = " }"]
21277#[doc = " ]"]
21278#[doc = " },"]
21279#[doc = " {"]
21280#[doc = " \"title\": \"contract_code_changes_by_sync_checkpoint\","]
21281#[doc = " \"allOf\": ["]
21282#[doc = " {"]
21283#[doc = " \"type\": \"object\","]
21284#[doc = " \"required\": ["]
21285#[doc = " \"sync_checkpoint\""]
21286#[doc = " ],"]
21287#[doc = " \"properties\": {"]
21288#[doc = " \"sync_checkpoint\": {"]
21289#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21290#[doc = " }"]
21291#[doc = " }"]
21292#[doc = " },"]
21293#[doc = " {"]
21294#[doc = " \"type\": \"object\","]
21295#[doc = " \"required\": ["]
21296#[doc = " \"account_ids\","]
21297#[doc = " \"changes_type\""]
21298#[doc = " ],"]
21299#[doc = " \"properties\": {"]
21300#[doc = " \"account_ids\": {"]
21301#[doc = " \"type\": \"array\","]
21302#[doc = " \"items\": {"]
21303#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21304#[doc = " }"]
21305#[doc = " },"]
21306#[doc = " \"changes_type\": {"]
21307#[doc = " \"type\": \"string\","]
21308#[doc = " \"enum\": ["]
21309#[doc = " \"contract_code_changes\""]
21310#[doc = " ]"]
21311#[doc = " }"]
21312#[doc = " }"]
21313#[doc = " }"]
21314#[doc = " ]"]
21315#[doc = " },"]
21316#[doc = " {"]
21317#[doc = " \"title\": \"data_changes_by_sync_checkpoint\","]
21318#[doc = " \"allOf\": ["]
21319#[doc = " {"]
21320#[doc = " \"type\": \"object\","]
21321#[doc = " \"required\": ["]
21322#[doc = " \"sync_checkpoint\""]
21323#[doc = " ],"]
21324#[doc = " \"properties\": {"]
21325#[doc = " \"sync_checkpoint\": {"]
21326#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21327#[doc = " }"]
21328#[doc = " }"]
21329#[doc = " },"]
21330#[doc = " {"]
21331#[doc = " \"type\": \"object\","]
21332#[doc = " \"required\": ["]
21333#[doc = " \"account_ids\","]
21334#[doc = " \"changes_type\","]
21335#[doc = " \"key_prefix_base64\""]
21336#[doc = " ],"]
21337#[doc = " \"properties\": {"]
21338#[doc = " \"account_ids\": {"]
21339#[doc = " \"type\": \"array\","]
21340#[doc = " \"items\": {"]
21341#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21342#[doc = " }"]
21343#[doc = " },"]
21344#[doc = " \"changes_type\": {"]
21345#[doc = " \"type\": \"string\","]
21346#[doc = " \"enum\": ["]
21347#[doc = " \"data_changes\""]
21348#[doc = " ]"]
21349#[doc = " },"]
21350#[doc = " \"key_prefix_base64\": {"]
21351#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
21352#[doc = " }"]
21353#[doc = " }"]
21354#[doc = " }"]
21355#[doc = " ]"]
21356#[doc = " }"]
21357#[doc = " ]"]
21358#[doc = "}"]
21359#[doc = r" ```"]
21360#[doc = r" </details>"]
21361#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21362#[serde(untagged)]
21363pub enum RpcStateChangesInBlockByTypeRequest {
21364 AccountChangesByBlockId {
21365 account_ids: ::std::vec::Vec<AccountId>,
21366 block_id: BlockId,
21367 changes_type: AccountChangesByBlockIdChangesType,
21368 },
21369 SingleAccessKeyChangesByBlockId {
21370 block_id: BlockId,
21371 changes_type: SingleAccessKeyChangesByBlockIdChangesType,
21372 keys: ::std::vec::Vec<AccountWithPublicKey>,
21373 },
21374 SingleGasKeyChangesByBlockId {
21375 block_id: BlockId,
21376 changes_type: SingleGasKeyChangesByBlockIdChangesType,
21377 keys: ::std::vec::Vec<AccountWithPublicKey>,
21378 },
21379 AllAccessKeyChangesByBlockId {
21380 account_ids: ::std::vec::Vec<AccountId>,
21381 block_id: BlockId,
21382 changes_type: AllAccessKeyChangesByBlockIdChangesType,
21383 },
21384 AllGasKeyChangesByBlockId {
21385 account_ids: ::std::vec::Vec<AccountId>,
21386 block_id: BlockId,
21387 changes_type: AllGasKeyChangesByBlockIdChangesType,
21388 },
21389 ContractCodeChangesByBlockId {
21390 account_ids: ::std::vec::Vec<AccountId>,
21391 block_id: BlockId,
21392 changes_type: ContractCodeChangesByBlockIdChangesType,
21393 },
21394 DataChangesByBlockId {
21395 account_ids: ::std::vec::Vec<AccountId>,
21396 block_id: BlockId,
21397 changes_type: DataChangesByBlockIdChangesType,
21398 key_prefix_base64: StoreKey,
21399 },
21400 AccountChangesByFinality {
21401 account_ids: ::std::vec::Vec<AccountId>,
21402 changes_type: AccountChangesByFinalityChangesType,
21403 finality: Finality,
21404 },
21405 SingleAccessKeyChangesByFinality {
21406 changes_type: SingleAccessKeyChangesByFinalityChangesType,
21407 finality: Finality,
21408 keys: ::std::vec::Vec<AccountWithPublicKey>,
21409 },
21410 SingleGasKeyChangesByFinality {
21411 changes_type: SingleGasKeyChangesByFinalityChangesType,
21412 finality: Finality,
21413 keys: ::std::vec::Vec<AccountWithPublicKey>,
21414 },
21415 AllAccessKeyChangesByFinality {
21416 account_ids: ::std::vec::Vec<AccountId>,
21417 changes_type: AllAccessKeyChangesByFinalityChangesType,
21418 finality: Finality,
21419 },
21420 AllGasKeyChangesByFinality {
21421 account_ids: ::std::vec::Vec<AccountId>,
21422 changes_type: AllGasKeyChangesByFinalityChangesType,
21423 finality: Finality,
21424 },
21425 ContractCodeChangesByFinality {
21426 account_ids: ::std::vec::Vec<AccountId>,
21427 changes_type: ContractCodeChangesByFinalityChangesType,
21428 finality: Finality,
21429 },
21430 DataChangesByFinality {
21431 account_ids: ::std::vec::Vec<AccountId>,
21432 changes_type: DataChangesByFinalityChangesType,
21433 finality: Finality,
21434 key_prefix_base64: StoreKey,
21435 },
21436 AccountChangesBySyncCheckpoint {
21437 account_ids: ::std::vec::Vec<AccountId>,
21438 changes_type: AccountChangesBySyncCheckpointChangesType,
21439 sync_checkpoint: SyncCheckpoint,
21440 },
21441 SingleAccessKeyChangesBySyncCheckpoint {
21442 changes_type: SingleAccessKeyChangesBySyncCheckpointChangesType,
21443 keys: ::std::vec::Vec<AccountWithPublicKey>,
21444 sync_checkpoint: SyncCheckpoint,
21445 },
21446 SingleGasKeyChangesBySyncCheckpoint {
21447 changes_type: SingleGasKeyChangesBySyncCheckpointChangesType,
21448 keys: ::std::vec::Vec<AccountWithPublicKey>,
21449 sync_checkpoint: SyncCheckpoint,
21450 },
21451 AllAccessKeyChangesBySyncCheckpoint {
21452 account_ids: ::std::vec::Vec<AccountId>,
21453 changes_type: AllAccessKeyChangesBySyncCheckpointChangesType,
21454 sync_checkpoint: SyncCheckpoint,
21455 },
21456 AllGasKeyChangesBySyncCheckpoint {
21457 account_ids: ::std::vec::Vec<AccountId>,
21458 changes_type: AllGasKeyChangesBySyncCheckpointChangesType,
21459 sync_checkpoint: SyncCheckpoint,
21460 },
21461 ContractCodeChangesBySyncCheckpoint {
21462 account_ids: ::std::vec::Vec<AccountId>,
21463 changes_type: ContractCodeChangesBySyncCheckpointChangesType,
21464 sync_checkpoint: SyncCheckpoint,
21465 },
21466 DataChangesBySyncCheckpoint {
21467 account_ids: ::std::vec::Vec<AccountId>,
21468 changes_type: DataChangesBySyncCheckpointChangesType,
21469 key_prefix_base64: StoreKey,
21470 sync_checkpoint: SyncCheckpoint,
21471 },
21472}
21473impl ::std::convert::From<&Self> for RpcStateChangesInBlockByTypeRequest {
21474 fn from(value: &RpcStateChangesInBlockByTypeRequest) -> Self {
21475 value.clone()
21476 }
21477}
21478#[doc = "`RpcStateChangesInBlockByTypeResponse`"]
21479#[doc = r""]
21480#[doc = r" <details><summary>JSON schema</summary>"]
21481#[doc = r""]
21482#[doc = r" ```json"]
21483#[doc = "{"]
21484#[doc = " \"type\": \"object\","]
21485#[doc = " \"required\": ["]
21486#[doc = " \"block_hash\","]
21487#[doc = " \"changes\""]
21488#[doc = " ],"]
21489#[doc = " \"properties\": {"]
21490#[doc = " \"block_hash\": {"]
21491#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21492#[doc = " },"]
21493#[doc = " \"changes\": {"]
21494#[doc = " \"type\": \"array\","]
21495#[doc = " \"items\": {"]
21496#[doc = " \"$ref\": \"#/components/schemas/StateChangeKindView\""]
21497#[doc = " }"]
21498#[doc = " }"]
21499#[doc = " }"]
21500#[doc = "}"]
21501#[doc = r" ```"]
21502#[doc = r" </details>"]
21503#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21504pub struct RpcStateChangesInBlockByTypeResponse {
21505 pub block_hash: CryptoHash,
21506 pub changes: ::std::vec::Vec<StateChangeKindView>,
21507}
21508impl ::std::convert::From<&RpcStateChangesInBlockByTypeResponse>
21509 for RpcStateChangesInBlockByTypeResponse
21510{
21511 fn from(value: &RpcStateChangesInBlockByTypeResponse) -> Self {
21512 value.clone()
21513 }
21514}
21515#[doc = "`RpcStateChangesInBlockRequest`"]
21516#[doc = r""]
21517#[doc = r" <details><summary>JSON schema</summary>"]
21518#[doc = r""]
21519#[doc = r" ```json"]
21520#[doc = "{"]
21521#[doc = " \"title\": \"RpcStateChangesInBlockRequest\","]
21522#[doc = " \"type\": \"object\","]
21523#[doc = " \"oneOf\": ["]
21524#[doc = " {"]
21525#[doc = " \"type\": \"object\","]
21526#[doc = " \"required\": ["]
21527#[doc = " \"block_id\""]
21528#[doc = " ],"]
21529#[doc = " \"properties\": {"]
21530#[doc = " \"block_id\": {"]
21531#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
21532#[doc = " }"]
21533#[doc = " }"]
21534#[doc = " },"]
21535#[doc = " {"]
21536#[doc = " \"type\": \"object\","]
21537#[doc = " \"required\": ["]
21538#[doc = " \"finality\""]
21539#[doc = " ],"]
21540#[doc = " \"properties\": {"]
21541#[doc = " \"finality\": {"]
21542#[doc = " \"$ref\": \"#/components/schemas/Finality\""]
21543#[doc = " }"]
21544#[doc = " }"]
21545#[doc = " },"]
21546#[doc = " {"]
21547#[doc = " \"type\": \"object\","]
21548#[doc = " \"required\": ["]
21549#[doc = " \"sync_checkpoint\""]
21550#[doc = " ],"]
21551#[doc = " \"properties\": {"]
21552#[doc = " \"sync_checkpoint\": {"]
21553#[doc = " \"$ref\": \"#/components/schemas/SyncCheckpoint\""]
21554#[doc = " }"]
21555#[doc = " }"]
21556#[doc = " }"]
21557#[doc = " ]"]
21558#[doc = "}"]
21559#[doc = r" ```"]
21560#[doc = r" </details>"]
21561#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21562pub enum RpcStateChangesInBlockRequest {
21563 #[serde(rename = "block_id")]
21564 BlockId(BlockId),
21565 #[serde(rename = "finality")]
21566 Finality(Finality),
21567 #[serde(rename = "sync_checkpoint")]
21568 SyncCheckpoint(SyncCheckpoint),
21569}
21570impl ::std::convert::From<&Self> for RpcStateChangesInBlockRequest {
21571 fn from(value: &RpcStateChangesInBlockRequest) -> Self {
21572 value.clone()
21573 }
21574}
21575impl ::std::convert::From<BlockId> for RpcStateChangesInBlockRequest {
21576 fn from(value: BlockId) -> Self {
21577 Self::BlockId(value)
21578 }
21579}
21580impl ::std::convert::From<Finality> for RpcStateChangesInBlockRequest {
21581 fn from(value: Finality) -> Self {
21582 Self::Finality(value)
21583 }
21584}
21585impl ::std::convert::From<SyncCheckpoint> for RpcStateChangesInBlockRequest {
21586 fn from(value: SyncCheckpoint) -> Self {
21587 Self::SyncCheckpoint(value)
21588 }
21589}
21590#[doc = "`RpcStateChangesInBlockResponse`"]
21591#[doc = r""]
21592#[doc = r" <details><summary>JSON schema</summary>"]
21593#[doc = r""]
21594#[doc = r" ```json"]
21595#[doc = "{"]
21596#[doc = " \"type\": \"object\","]
21597#[doc = " \"required\": ["]
21598#[doc = " \"block_hash\","]
21599#[doc = " \"changes\""]
21600#[doc = " ],"]
21601#[doc = " \"properties\": {"]
21602#[doc = " \"block_hash\": {"]
21603#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21604#[doc = " },"]
21605#[doc = " \"changes\": {"]
21606#[doc = " \"type\": \"array\","]
21607#[doc = " \"items\": {"]
21608#[doc = " \"$ref\": \"#/components/schemas/StateChangeWithCauseView\""]
21609#[doc = " }"]
21610#[doc = " }"]
21611#[doc = " }"]
21612#[doc = "}"]
21613#[doc = r" ```"]
21614#[doc = r" </details>"]
21615#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21616pub struct RpcStateChangesInBlockResponse {
21617 pub block_hash: CryptoHash,
21618 pub changes: ::std::vec::Vec<StateChangeWithCauseView>,
21619}
21620impl ::std::convert::From<&RpcStateChangesInBlockResponse> for RpcStateChangesInBlockResponse {
21621 fn from(value: &RpcStateChangesInBlockResponse) -> Self {
21622 value.clone()
21623 }
21624}
21625#[doc = "`RpcStatusRequest`"]
21626#[doc = r""]
21627#[doc = r" <details><summary>JSON schema</summary>"]
21628#[doc = r""]
21629#[doc = r" ```json"]
21630#[doc = "{"]
21631#[doc = " \"title\": \"RpcStatusRequest\","]
21632#[doc = " \"type\": \"null\""]
21633#[doc = "}"]
21634#[doc = r" ```"]
21635#[doc = r" </details>"]
21636#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21637#[serde(transparent)]
21638pub struct RpcStatusRequest(pub ());
21639impl ::std::ops::Deref for RpcStatusRequest {
21640 type Target = ();
21641 fn deref(&self) -> &() {
21642 &self.0
21643 }
21644}
21645impl ::std::convert::From<RpcStatusRequest> for () {
21646 fn from(value: RpcStatusRequest) -> Self {
21647 value.0
21648 }
21649}
21650impl ::std::convert::From<&RpcStatusRequest> for RpcStatusRequest {
21651 fn from(value: &RpcStatusRequest) -> Self {
21652 value.clone()
21653 }
21654}
21655impl ::std::convert::From<()> for RpcStatusRequest {
21656 fn from(value: ()) -> Self {
21657 Self(value)
21658 }
21659}
21660#[doc = "`RpcStatusResponse`"]
21661#[doc = r""]
21662#[doc = r" <details><summary>JSON schema</summary>"]
21663#[doc = r""]
21664#[doc = r" ```json"]
21665#[doc = "{"]
21666#[doc = " \"type\": \"object\","]
21667#[doc = " \"required\": ["]
21668#[doc = " \"chain_id\","]
21669#[doc = " \"genesis_hash\","]
21670#[doc = " \"latest_protocol_version\","]
21671#[doc = " \"node_public_key\","]
21672#[doc = " \"protocol_version\","]
21673#[doc = " \"sync_info\","]
21674#[doc = " \"uptime_sec\","]
21675#[doc = " \"validators\","]
21676#[doc = " \"version\""]
21677#[doc = " ],"]
21678#[doc = " \"properties\": {"]
21679#[doc = " \"chain_id\": {"]
21680#[doc = " \"description\": \"Unique chain id.\","]
21681#[doc = " \"type\": \"string\""]
21682#[doc = " },"]
21683#[doc = " \"detailed_debug_status\": {"]
21684#[doc = " \"description\": \"Information about last blocks, network, epoch and chain & chunk info.\","]
21685#[doc = " \"anyOf\": ["]
21686#[doc = " {"]
21687#[doc = " \"$ref\": \"#/components/schemas/DetailedDebugStatus\""]
21688#[doc = " },"]
21689#[doc = " {"]
21690#[doc = " \"type\": \"null\""]
21691#[doc = " }"]
21692#[doc = " ]"]
21693#[doc = " },"]
21694#[doc = " \"genesis_hash\": {"]
21695#[doc = " \"description\": \"Genesis hash of the chain.\","]
21696#[doc = " \"allOf\": ["]
21697#[doc = " {"]
21698#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21699#[doc = " }"]
21700#[doc = " ]"]
21701#[doc = " },"]
21702#[doc = " \"latest_protocol_version\": {"]
21703#[doc = " \"description\": \"Latest protocol version that this client supports.\","]
21704#[doc = " \"type\": \"integer\","]
21705#[doc = " \"format\": \"uint32\","]
21706#[doc = " \"minimum\": 0.0"]
21707#[doc = " },"]
21708#[doc = " \"node_key\": {"]
21709#[doc = " \"description\": \"Deprecated; same as `validator_public_key` which you should use instead.\","]
21710#[doc = " \"anyOf\": ["]
21711#[doc = " {"]
21712#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
21713#[doc = " },"]
21714#[doc = " {"]
21715#[doc = " \"type\": \"null\""]
21716#[doc = " }"]
21717#[doc = " ]"]
21718#[doc = " },"]
21719#[doc = " \"node_public_key\": {"]
21720#[doc = " \"description\": \"Public key of the node.\","]
21721#[doc = " \"allOf\": ["]
21722#[doc = " {"]
21723#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
21724#[doc = " }"]
21725#[doc = " ]"]
21726#[doc = " },"]
21727#[doc = " \"protocol_version\": {"]
21728#[doc = " \"description\": \"Currently active protocol version.\","]
21729#[doc = " \"type\": \"integer\","]
21730#[doc = " \"format\": \"uint32\","]
21731#[doc = " \"minimum\": 0.0"]
21732#[doc = " },"]
21733#[doc = " \"rpc_addr\": {"]
21734#[doc = " \"description\": \"Address for RPC server. None if node doesn't have RPC endpoint enabled.\","]
21735#[doc = " \"type\": ["]
21736#[doc = " \"string\","]
21737#[doc = " \"null\""]
21738#[doc = " ]"]
21739#[doc = " },"]
21740#[doc = " \"sync_info\": {"]
21741#[doc = " \"description\": \"Sync status of the node.\","]
21742#[doc = " \"allOf\": ["]
21743#[doc = " {"]
21744#[doc = " \"$ref\": \"#/components/schemas/StatusSyncInfo\""]
21745#[doc = " }"]
21746#[doc = " ]"]
21747#[doc = " },"]
21748#[doc = " \"uptime_sec\": {"]
21749#[doc = " \"description\": \"Uptime of the node.\","]
21750#[doc = " \"type\": \"integer\","]
21751#[doc = " \"format\": \"int64\""]
21752#[doc = " },"]
21753#[doc = " \"validator_account_id\": {"]
21754#[doc = " \"description\": \"Validator id of the node\","]
21755#[doc = " \"anyOf\": ["]
21756#[doc = " {"]
21757#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21758#[doc = " },"]
21759#[doc = " {"]
21760#[doc = " \"type\": \"null\""]
21761#[doc = " }"]
21762#[doc = " ]"]
21763#[doc = " },"]
21764#[doc = " \"validator_public_key\": {"]
21765#[doc = " \"description\": \"Public key of the validator.\","]
21766#[doc = " \"anyOf\": ["]
21767#[doc = " {"]
21768#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
21769#[doc = " },"]
21770#[doc = " {"]
21771#[doc = " \"type\": \"null\""]
21772#[doc = " }"]
21773#[doc = " ]"]
21774#[doc = " },"]
21775#[doc = " \"validators\": {"]
21776#[doc = " \"description\": \"Current epoch validators.\","]
21777#[doc = " \"type\": \"array\","]
21778#[doc = " \"items\": {"]
21779#[doc = " \"$ref\": \"#/components/schemas/ValidatorInfo\""]
21780#[doc = " }"]
21781#[doc = " },"]
21782#[doc = " \"version\": {"]
21783#[doc = " \"description\": \"Binary version.\","]
21784#[doc = " \"allOf\": ["]
21785#[doc = " {"]
21786#[doc = " \"$ref\": \"#/components/schemas/Version\""]
21787#[doc = " }"]
21788#[doc = " ]"]
21789#[doc = " }"]
21790#[doc = " }"]
21791#[doc = "}"]
21792#[doc = r" ```"]
21793#[doc = r" </details>"]
21794#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21795pub struct RpcStatusResponse {
21796 #[doc = "Unique chain id."]
21797 pub chain_id: ::std::string::String,
21798 #[doc = "Information about last blocks, network, epoch and chain & chunk info."]
21799 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21800 pub detailed_debug_status: ::std::option::Option<DetailedDebugStatus>,
21801 #[doc = "Genesis hash of the chain."]
21802 pub genesis_hash: CryptoHash,
21803 #[doc = "Latest protocol version that this client supports."]
21804 pub latest_protocol_version: u32,
21805 #[doc = "Deprecated; same as `validator_public_key` which you should use instead."]
21806 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21807 pub node_key: ::std::option::Option<PublicKey>,
21808 #[doc = "Public key of the node."]
21809 pub node_public_key: PublicKey,
21810 #[doc = "Currently active protocol version."]
21811 pub protocol_version: u32,
21812 #[doc = "Address for RPC server. None if node doesn't have RPC endpoint enabled."]
21813 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21814 pub rpc_addr: ::std::option::Option<::std::string::String>,
21815 #[doc = "Sync status of the node."]
21816 pub sync_info: StatusSyncInfo,
21817 #[doc = "Uptime of the node."]
21818 pub uptime_sec: i64,
21819 #[doc = "Validator id of the node"]
21820 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21821 pub validator_account_id: ::std::option::Option<AccountId>,
21822 #[doc = "Public key of the validator."]
21823 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21824 pub validator_public_key: ::std::option::Option<PublicKey>,
21825 #[doc = "Current epoch validators."]
21826 pub validators: ::std::vec::Vec<ValidatorInfo>,
21827 #[doc = "Binary version."]
21828 pub version: Version,
21829}
21830impl ::std::convert::From<&RpcStatusResponse> for RpcStatusResponse {
21831 fn from(value: &RpcStatusResponse) -> Self {
21832 value.clone()
21833 }
21834}
21835#[doc = "`RpcTransactionResponse`"]
21836#[doc = r""]
21837#[doc = r" <details><summary>JSON schema</summary>"]
21838#[doc = r""]
21839#[doc = r" ```json"]
21840#[doc = "{"]
21841#[doc = " \"type\": \"object\","]
21842#[doc = " \"anyOf\": ["]
21843#[doc = " {"]
21844#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionOutcomeWithReceiptView\""]
21845#[doc = " },"]
21846#[doc = " {"]
21847#[doc = " \"$ref\": \"#/components/schemas/FinalExecutionOutcomeView\""]
21848#[doc = " }"]
21849#[doc = " ],"]
21850#[doc = " \"required\": ["]
21851#[doc = " \"final_execution_status\""]
21852#[doc = " ],"]
21853#[doc = " \"properties\": {"]
21854#[doc = " \"final_execution_status\": {"]
21855#[doc = " \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
21856#[doc = " }"]
21857#[doc = " }"]
21858#[doc = "}"]
21859#[doc = r" ```"]
21860#[doc = r" </details>"]
21861#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21862#[serde(untagged)]
21863pub enum RpcTransactionResponse {
21864 Variant0 {
21865 final_execution_status: TxExecutionStatus,
21866 #[doc = "Receipts generated from the transaction"]
21867 receipts: ::std::vec::Vec<ReceiptView>,
21868 #[doc = "The execution outcome of receipts."]
21869 receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
21870 #[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"]
21871 status: FinalExecutionStatus,
21872 #[doc = "Signed Transaction"]
21873 transaction: SignedTransactionView,
21874 #[doc = "The execution outcome of the signed transaction."]
21875 transaction_outcome: ExecutionOutcomeWithIdView,
21876 },
21877 Variant1 {
21878 final_execution_status: TxExecutionStatus,
21879 #[doc = "The execution outcome of receipts."]
21880 receipts_outcome: ::std::vec::Vec<ExecutionOutcomeWithIdView>,
21881 #[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"]
21882 status: FinalExecutionStatus,
21883 #[doc = "Signed Transaction"]
21884 transaction: SignedTransactionView,
21885 #[doc = "The execution outcome of the signed transaction."]
21886 transaction_outcome: ExecutionOutcomeWithIdView,
21887 },
21888}
21889impl ::std::convert::From<&Self> for RpcTransactionResponse {
21890 fn from(value: &RpcTransactionResponse) -> Self {
21891 value.clone()
21892 }
21893}
21894#[doc = "`RpcTransactionStatusRequest`"]
21895#[doc = r""]
21896#[doc = r" <details><summary>JSON schema</summary>"]
21897#[doc = r""]
21898#[doc = r" ```json"]
21899#[doc = "{"]
21900#[doc = " \"title\": \"RpcTransactionStatusRequest\","]
21901#[doc = " \"type\": \"object\","]
21902#[doc = " \"anyOf\": ["]
21903#[doc = " {"]
21904#[doc = " \"type\": \"object\","]
21905#[doc = " \"required\": ["]
21906#[doc = " \"signed_tx_base64\""]
21907#[doc = " ],"]
21908#[doc = " \"properties\": {"]
21909#[doc = " \"signed_tx_base64\": {"]
21910#[doc = " \"$ref\": \"#/components/schemas/SignedTransaction\""]
21911#[doc = " }"]
21912#[doc = " }"]
21913#[doc = " },"]
21914#[doc = " {"]
21915#[doc = " \"type\": \"object\","]
21916#[doc = " \"required\": ["]
21917#[doc = " \"sender_account_id\","]
21918#[doc = " \"tx_hash\""]
21919#[doc = " ],"]
21920#[doc = " \"properties\": {"]
21921#[doc = " \"sender_account_id\": {"]
21922#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
21923#[doc = " },"]
21924#[doc = " \"tx_hash\": {"]
21925#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
21926#[doc = " }"]
21927#[doc = " }"]
21928#[doc = " }"]
21929#[doc = " ],"]
21930#[doc = " \"properties\": {"]
21931#[doc = " \"wait_until\": {"]
21932#[doc = " \"default\": \"EXECUTED_OPTIMISTIC\","]
21933#[doc = " \"allOf\": ["]
21934#[doc = " {"]
21935#[doc = " \"$ref\": \"#/components/schemas/TxExecutionStatus\""]
21936#[doc = " }"]
21937#[doc = " ]"]
21938#[doc = " }"]
21939#[doc = " }"]
21940#[doc = "}"]
21941#[doc = r" ```"]
21942#[doc = r" </details>"]
21943#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
21944#[serde(untagged)]
21945pub enum RpcTransactionStatusRequest {
21946 Variant0 {
21947 signed_tx_base64: SignedTransaction,
21948 #[serde(default = "defaults::rpc_transaction_status_request_variant0_wait_until")]
21949 wait_until: TxExecutionStatus,
21950 },
21951 Variant1 {
21952 sender_account_id: AccountId,
21953 tx_hash: CryptoHash,
21954 #[serde(default = "defaults::rpc_transaction_status_request_variant1_wait_until")]
21955 wait_until: TxExecutionStatus,
21956 },
21957}
21958impl ::std::convert::From<&Self> for RpcTransactionStatusRequest {
21959 fn from(value: &RpcTransactionStatusRequest) -> Self {
21960 value.clone()
21961 }
21962}
21963#[doc = "`RpcValidatorRequest`"]
21964#[doc = r""]
21965#[doc = r" <details><summary>JSON schema</summary>"]
21966#[doc = r""]
21967#[doc = r" ```json"]
21968#[doc = "{"]
21969#[doc = " \"title\": \"RpcValidatorRequest\","]
21970#[doc = " \"type\": \"object\","]
21971#[doc = " \"oneOf\": ["]
21972#[doc = " {"]
21973#[doc = " \"type\": \"string\","]
21974#[doc = " \"enum\": ["]
21975#[doc = " \"latest\""]
21976#[doc = " ]"]
21977#[doc = " },"]
21978#[doc = " {"]
21979#[doc = " \"type\": \"object\","]
21980#[doc = " \"required\": ["]
21981#[doc = " \"epoch_id\""]
21982#[doc = " ],"]
21983#[doc = " \"properties\": {"]
21984#[doc = " \"epoch_id\": {"]
21985#[doc = " \"$ref\": \"#/components/schemas/EpochId\""]
21986#[doc = " }"]
21987#[doc = " }"]
21988#[doc = " },"]
21989#[doc = " {"]
21990#[doc = " \"type\": \"object\","]
21991#[doc = " \"required\": ["]
21992#[doc = " \"block_id\""]
21993#[doc = " ],"]
21994#[doc = " \"properties\": {"]
21995#[doc = " \"block_id\": {"]
21996#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
21997#[doc = " }"]
21998#[doc = " }"]
21999#[doc = " }"]
22000#[doc = " ]"]
22001#[doc = "}"]
22002#[doc = r" ```"]
22003#[doc = r" </details>"]
22004#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22005pub enum RpcValidatorRequest {
22006 #[serde(rename = "latest")]
22007 Latest,
22008 #[serde(rename = "epoch_id")]
22009 EpochId(EpochId),
22010 #[serde(rename = "block_id")]
22011 BlockId(BlockId),
22012}
22013impl ::std::convert::From<&Self> for RpcValidatorRequest {
22014 fn from(value: &RpcValidatorRequest) -> Self {
22015 value.clone()
22016 }
22017}
22018impl ::std::convert::From<EpochId> for RpcValidatorRequest {
22019 fn from(value: EpochId) -> Self {
22020 Self::EpochId(value)
22021 }
22022}
22023impl ::std::convert::From<BlockId> for RpcValidatorRequest {
22024 fn from(value: BlockId) -> Self {
22025 Self::BlockId(value)
22026 }
22027}
22028#[doc = "Information about this epoch validators and next epoch validators"]
22029#[doc = r""]
22030#[doc = r" <details><summary>JSON schema</summary>"]
22031#[doc = r""]
22032#[doc = r" ```json"]
22033#[doc = "{"]
22034#[doc = " \"description\": \"Information about this epoch validators and next epoch validators\","]
22035#[doc = " \"type\": \"object\","]
22036#[doc = " \"required\": ["]
22037#[doc = " \"current_fishermen\","]
22038#[doc = " \"current_proposals\","]
22039#[doc = " \"current_validators\","]
22040#[doc = " \"epoch_height\","]
22041#[doc = " \"epoch_start_height\","]
22042#[doc = " \"next_fishermen\","]
22043#[doc = " \"next_validators\","]
22044#[doc = " \"prev_epoch_kickout\""]
22045#[doc = " ],"]
22046#[doc = " \"properties\": {"]
22047#[doc = " \"current_fishermen\": {"]
22048#[doc = " \"description\": \"Fishermen for the current epoch\","]
22049#[doc = " \"type\": \"array\","]
22050#[doc = " \"items\": {"]
22051#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
22052#[doc = " }"]
22053#[doc = " },"]
22054#[doc = " \"current_proposals\": {"]
22055#[doc = " \"description\": \"Proposals in the current epoch\","]
22056#[doc = " \"type\": \"array\","]
22057#[doc = " \"items\": {"]
22058#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
22059#[doc = " }"]
22060#[doc = " },"]
22061#[doc = " \"current_validators\": {"]
22062#[doc = " \"description\": \"Validators for the current epoch\","]
22063#[doc = " \"type\": \"array\","]
22064#[doc = " \"items\": {"]
22065#[doc = " \"$ref\": \"#/components/schemas/CurrentEpochValidatorInfo\""]
22066#[doc = " }"]
22067#[doc = " },"]
22068#[doc = " \"epoch_height\": {"]
22069#[doc = " \"description\": \"Epoch height\","]
22070#[doc = " \"type\": \"integer\","]
22071#[doc = " \"format\": \"uint64\","]
22072#[doc = " \"minimum\": 0.0"]
22073#[doc = " },"]
22074#[doc = " \"epoch_start_height\": {"]
22075#[doc = " \"description\": \"Epoch start block height\","]
22076#[doc = " \"type\": \"integer\","]
22077#[doc = " \"format\": \"uint64\","]
22078#[doc = " \"minimum\": 0.0"]
22079#[doc = " },"]
22080#[doc = " \"next_fishermen\": {"]
22081#[doc = " \"description\": \"Fishermen for the next epoch\","]
22082#[doc = " \"type\": \"array\","]
22083#[doc = " \"items\": {"]
22084#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeView\""]
22085#[doc = " }"]
22086#[doc = " },"]
22087#[doc = " \"next_validators\": {"]
22088#[doc = " \"description\": \"Validators for the next epoch\","]
22089#[doc = " \"type\": \"array\","]
22090#[doc = " \"items\": {"]
22091#[doc = " \"$ref\": \"#/components/schemas/NextEpochValidatorInfo\""]
22092#[doc = " }"]
22093#[doc = " },"]
22094#[doc = " \"prev_epoch_kickout\": {"]
22095#[doc = " \"description\": \"Kickout in the previous epoch\","]
22096#[doc = " \"type\": \"array\","]
22097#[doc = " \"items\": {"]
22098#[doc = " \"$ref\": \"#/components/schemas/ValidatorKickoutView\""]
22099#[doc = " }"]
22100#[doc = " }"]
22101#[doc = " }"]
22102#[doc = "}"]
22103#[doc = r" ```"]
22104#[doc = r" </details>"]
22105#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22106pub struct RpcValidatorResponse {
22107 #[doc = "Fishermen for the current epoch"]
22108 pub current_fishermen: ::std::vec::Vec<ValidatorStakeView>,
22109 #[doc = "Proposals in the current epoch"]
22110 pub current_proposals: ::std::vec::Vec<ValidatorStakeView>,
22111 #[doc = "Validators for the current epoch"]
22112 pub current_validators: ::std::vec::Vec<CurrentEpochValidatorInfo>,
22113 #[doc = "Epoch height"]
22114 pub epoch_height: u64,
22115 #[doc = "Epoch start block height"]
22116 pub epoch_start_height: u64,
22117 #[doc = "Fishermen for the next epoch"]
22118 pub next_fishermen: ::std::vec::Vec<ValidatorStakeView>,
22119 #[doc = "Validators for the next epoch"]
22120 pub next_validators: ::std::vec::Vec<NextEpochValidatorInfo>,
22121 #[doc = "Kickout in the previous epoch"]
22122 pub prev_epoch_kickout: ::std::vec::Vec<ValidatorKickoutView>,
22123}
22124impl ::std::convert::From<&RpcValidatorResponse> for RpcValidatorResponse {
22125 fn from(value: &RpcValidatorResponse) -> Self {
22126 value.clone()
22127 }
22128}
22129#[doc = "`RpcValidatorsOrderedRequest`"]
22130#[doc = r""]
22131#[doc = r" <details><summary>JSON schema</summary>"]
22132#[doc = r""]
22133#[doc = r" ```json"]
22134#[doc = "{"]
22135#[doc = " \"title\": \"RpcValidatorsOrderedRequest\","]
22136#[doc = " \"type\": \"object\","]
22137#[doc = " \"properties\": {"]
22138#[doc = " \"block_id\": {"]
22139#[doc = " \"anyOf\": ["]
22140#[doc = " {"]
22141#[doc = " \"$ref\": \"#/components/schemas/BlockId\""]
22142#[doc = " },"]
22143#[doc = " {"]
22144#[doc = " \"type\": \"null\""]
22145#[doc = " }"]
22146#[doc = " ]"]
22147#[doc = " }"]
22148#[doc = " }"]
22149#[doc = "}"]
22150#[doc = r" ```"]
22151#[doc = r" </details>"]
22152#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22153pub struct RpcValidatorsOrderedRequest {
22154 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22155 pub block_id: ::std::option::Option<BlockId>,
22156}
22157impl ::std::convert::From<&RpcValidatorsOrderedRequest> for RpcValidatorsOrderedRequest {
22158 fn from(value: &RpcValidatorsOrderedRequest) -> Self {
22159 value.clone()
22160 }
22161}
22162impl ::std::default::Default for RpcValidatorsOrderedRequest {
22163 fn default() -> Self {
22164 Self {
22165 block_id: Default::default(),
22166 }
22167 }
22168}
22169#[doc = "View that preserves JSON format of the runtime config."]
22170#[doc = r""]
22171#[doc = r" <details><summary>JSON schema</summary>"]
22172#[doc = r""]
22173#[doc = r" ```json"]
22174#[doc = "{"]
22175#[doc = " \"description\": \"View that preserves JSON format of the runtime config.\","]
22176#[doc = " \"type\": \"object\","]
22177#[doc = " \"required\": ["]
22178#[doc = " \"account_creation_config\","]
22179#[doc = " \"congestion_control_config\","]
22180#[doc = " \"storage_amount_per_byte\","]
22181#[doc = " \"transaction_costs\","]
22182#[doc = " \"wasm_config\","]
22183#[doc = " \"witness_config\""]
22184#[doc = " ],"]
22185#[doc = " \"properties\": {"]
22186#[doc = " \"account_creation_config\": {"]
22187#[doc = " \"description\": \"Config that defines rules for account creation.\","]
22188#[doc = " \"allOf\": ["]
22189#[doc = " {"]
22190#[doc = " \"$ref\": \"#/components/schemas/AccountCreationConfigView\""]
22191#[doc = " }"]
22192#[doc = " ]"]
22193#[doc = " },"]
22194#[doc = " \"congestion_control_config\": {"]
22195#[doc = " \"description\": \"The configuration for congestion control.\","]
22196#[doc = " \"allOf\": ["]
22197#[doc = " {"]
22198#[doc = " \"$ref\": \"#/components/schemas/CongestionControlConfigView\""]
22199#[doc = " }"]
22200#[doc = " ]"]
22201#[doc = " },"]
22202#[doc = " \"storage_amount_per_byte\": {"]
22203#[doc = " \"description\": \"Amount of yN per byte required to have on the account. See\\n<https://nomicon.io/Economics/Economic#state-stake> for details.\","]
22204#[doc = " \"type\": \"string\""]
22205#[doc = " },"]
22206#[doc = " \"transaction_costs\": {"]
22207#[doc = " \"description\": \"Costs of different actions that need to be performed when sending and\\nprocessing transaction and receipts.\","]
22208#[doc = " \"allOf\": ["]
22209#[doc = " {"]
22210#[doc = " \"$ref\": \"#/components/schemas/RuntimeFeesConfigView\""]
22211#[doc = " }"]
22212#[doc = " ]"]
22213#[doc = " },"]
22214#[doc = " \"wasm_config\": {"]
22215#[doc = " \"description\": \"Config of wasm operations.\","]
22216#[doc = " \"allOf\": ["]
22217#[doc = " {"]
22218#[doc = " \"$ref\": \"#/components/schemas/VMConfigView\""]
22219#[doc = " }"]
22220#[doc = " ]"]
22221#[doc = " },"]
22222#[doc = " \"witness_config\": {"]
22223#[doc = " \"description\": \"Configuration specific to ChunkStateWitness.\","]
22224#[doc = " \"allOf\": ["]
22225#[doc = " {"]
22226#[doc = " \"$ref\": \"#/components/schemas/WitnessConfigView\""]
22227#[doc = " }"]
22228#[doc = " ]"]
22229#[doc = " }"]
22230#[doc = " }"]
22231#[doc = "}"]
22232#[doc = r" ```"]
22233#[doc = r" </details>"]
22234#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22235pub struct RuntimeConfigView {
22236 #[doc = "Config that defines rules for account creation."]
22237 pub account_creation_config: AccountCreationConfigView,
22238 #[doc = "The configuration for congestion control."]
22239 pub congestion_control_config: CongestionControlConfigView,
22240 #[doc = "Amount of yN per byte required to have on the account. See\n<https://nomicon.io/Economics/Economic#state-stake> for details."]
22241 pub storage_amount_per_byte: ::std::string::String,
22242 #[doc = "Costs of different actions that need to be performed when sending and\nprocessing transaction and receipts."]
22243 pub transaction_costs: RuntimeFeesConfigView,
22244 #[doc = "Config of wasm operations."]
22245 pub wasm_config: VmConfigView,
22246 #[doc = "Configuration specific to ChunkStateWitness."]
22247 pub witness_config: WitnessConfigView,
22248}
22249impl ::std::convert::From<&RuntimeConfigView> for RuntimeConfigView {
22250 fn from(value: &RuntimeConfigView) -> Self {
22251 value.clone()
22252 }
22253}
22254#[doc = "Describes different costs for the runtime"]
22255#[doc = r""]
22256#[doc = r" <details><summary>JSON schema</summary>"]
22257#[doc = r""]
22258#[doc = r" ```json"]
22259#[doc = "{"]
22260#[doc = " \"description\": \"Describes different costs for the runtime\","]
22261#[doc = " \"type\": \"object\","]
22262#[doc = " \"required\": ["]
22263#[doc = " \"action_creation_config\","]
22264#[doc = " \"action_receipt_creation_config\","]
22265#[doc = " \"burnt_gas_reward\","]
22266#[doc = " \"data_receipt_creation_config\","]
22267#[doc = " \"pessimistic_gas_price_inflation_ratio\","]
22268#[doc = " \"storage_usage_config\""]
22269#[doc = " ],"]
22270#[doc = " \"properties\": {"]
22271#[doc = " \"action_creation_config\": {"]
22272#[doc = " \"description\": \"Describes the cost of creating a certain action, `Action`. Includes all variants.\","]
22273#[doc = " \"allOf\": ["]
22274#[doc = " {"]
22275#[doc = " \"$ref\": \"#/components/schemas/ActionCreationConfigView\""]
22276#[doc = " }"]
22277#[doc = " ]"]
22278#[doc = " },"]
22279#[doc = " \"action_receipt_creation_config\": {"]
22280#[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.\","]
22281#[doc = " \"allOf\": ["]
22282#[doc = " {"]
22283#[doc = " \"$ref\": \"#/components/schemas/Fee\""]
22284#[doc = " }"]
22285#[doc = " ]"]
22286#[doc = " },"]
22287#[doc = " \"burnt_gas_reward\": {"]
22288#[doc = " \"description\": \"Fraction of the burnt gas to reward to the contract account for execution.\","]
22289#[doc = " \"type\": \"array\","]
22290#[doc = " \"items\": {"]
22291#[doc = " \"type\": \"integer\","]
22292#[doc = " \"format\": \"int32\""]
22293#[doc = " },"]
22294#[doc = " \"maxItems\": 2,"]
22295#[doc = " \"minItems\": 2"]
22296#[doc = " },"]
22297#[doc = " \"data_receipt_creation_config\": {"]
22298#[doc = " \"description\": \"Describes the cost of creating a data receipt, `DataReceipt`.\","]
22299#[doc = " \"allOf\": ["]
22300#[doc = " {"]
22301#[doc = " \"$ref\": \"#/components/schemas/DataReceiptCreationConfigView\""]
22302#[doc = " }"]
22303#[doc = " ]"]
22304#[doc = " },"]
22305#[doc = " \"pessimistic_gas_price_inflation_ratio\": {"]
22306#[doc = " \"description\": \"Pessimistic gas price inflation ratio.\","]
22307#[doc = " \"type\": \"array\","]
22308#[doc = " \"items\": {"]
22309#[doc = " \"type\": \"integer\","]
22310#[doc = " \"format\": \"int32\""]
22311#[doc = " },"]
22312#[doc = " \"maxItems\": 2,"]
22313#[doc = " \"minItems\": 2"]
22314#[doc = " },"]
22315#[doc = " \"storage_usage_config\": {"]
22316#[doc = " \"description\": \"Describes fees for storage.\","]
22317#[doc = " \"allOf\": ["]
22318#[doc = " {"]
22319#[doc = " \"$ref\": \"#/components/schemas/StorageUsageConfigView\""]
22320#[doc = " }"]
22321#[doc = " ]"]
22322#[doc = " }"]
22323#[doc = " }"]
22324#[doc = "}"]
22325#[doc = r" ```"]
22326#[doc = r" </details>"]
22327#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22328pub struct RuntimeFeesConfigView {
22329 #[doc = "Describes the cost of creating a certain action, `Action`. Includes all variants."]
22330 pub action_creation_config: ActionCreationConfigView,
22331 #[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."]
22332 pub action_receipt_creation_config: Fee,
22333 #[doc = "Fraction of the burnt gas to reward to the contract account for execution."]
22334 pub burnt_gas_reward: [i32; 2usize],
22335 #[doc = "Describes the cost of creating a data receipt, `DataReceipt`."]
22336 pub data_receipt_creation_config: DataReceiptCreationConfigView,
22337 #[doc = "Pessimistic gas price inflation ratio."]
22338 pub pessimistic_gas_price_inflation_ratio: [i32; 2usize],
22339 #[doc = "Describes fees for storage."]
22340 pub storage_usage_config: StorageUsageConfigView,
22341}
22342impl ::std::convert::From<&RuntimeFeesConfigView> for RuntimeFeesConfigView {
22343 fn from(value: &RuntimeFeesConfigView) -> Self {
22344 value.clone()
22345 }
22346}
22347#[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."]
22348#[doc = r""]
22349#[doc = r" <details><summary>JSON schema</summary>"]
22350#[doc = r""]
22351#[doc = r" ```json"]
22352#[doc = "{"]
22353#[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.\","]
22354#[doc = " \"type\": \"integer\","]
22355#[doc = " \"format\": \"uint64\","]
22356#[doc = " \"minimum\": 0.0"]
22357#[doc = "}"]
22358#[doc = r" ```"]
22359#[doc = r" </details>"]
22360#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22361#[serde(transparent)]
22362pub struct ShardId(pub u64);
22363impl ::std::ops::Deref for ShardId {
22364 type Target = u64;
22365 fn deref(&self) -> &u64 {
22366 &self.0
22367 }
22368}
22369impl ::std::convert::From<ShardId> for u64 {
22370 fn from(value: ShardId) -> Self {
22371 value.0
22372 }
22373}
22374impl ::std::convert::From<&ShardId> for ShardId {
22375 fn from(value: &ShardId) -> Self {
22376 value.clone()
22377 }
22378}
22379impl ::std::convert::From<u64> for ShardId {
22380 fn from(value: u64) -> Self {
22381 Self(value)
22382 }
22383}
22384impl ::std::str::FromStr for ShardId {
22385 type Err = <u64 as ::std::str::FromStr>::Err;
22386 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
22387 Ok(Self(value.parse()?))
22388 }
22389}
22390impl ::std::convert::TryFrom<&str> for ShardId {
22391 type Error = <u64 as ::std::str::FromStr>::Err;
22392 fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
22393 value.parse()
22394 }
22395}
22396impl ::std::convert::TryFrom<&String> for ShardId {
22397 type Error = <u64 as ::std::str::FromStr>::Err;
22398 fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
22399 value.parse()
22400 }
22401}
22402impl ::std::convert::TryFrom<String> for ShardId {
22403 type Error = <u64 as ::std::str::FromStr>::Err;
22404 fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
22405 value.parse()
22406 }
22407}
22408impl ::std::fmt::Display for ShardId {
22409 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22410 self.0.fmt(f)
22411 }
22412}
22413#[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."]
22414#[doc = r""]
22415#[doc = r" <details><summary>JSON schema</summary>"]
22416#[doc = r""]
22417#[doc = r" ```json"]
22418#[doc = "{"]
22419#[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.\","]
22420#[doc = " \"oneOf\": ["]
22421#[doc = " {"]
22422#[doc = " \"type\": \"object\","]
22423#[doc = " \"required\": ["]
22424#[doc = " \"V0\""]
22425#[doc = " ],"]
22426#[doc = " \"properties\": {"]
22427#[doc = " \"V0\": {"]
22428#[doc = " \"$ref\": \"#/components/schemas/ShardLayoutV0\""]
22429#[doc = " }"]
22430#[doc = " },"]
22431#[doc = " \"additionalProperties\": false"]
22432#[doc = " },"]
22433#[doc = " {"]
22434#[doc = " \"type\": \"object\","]
22435#[doc = " \"required\": ["]
22436#[doc = " \"V1\""]
22437#[doc = " ],"]
22438#[doc = " \"properties\": {"]
22439#[doc = " \"V1\": {"]
22440#[doc = " \"$ref\": \"#/components/schemas/ShardLayoutV1\""]
22441#[doc = " }"]
22442#[doc = " },"]
22443#[doc = " \"additionalProperties\": false"]
22444#[doc = " },"]
22445#[doc = " {"]
22446#[doc = " \"type\": \"object\","]
22447#[doc = " \"required\": ["]
22448#[doc = " \"V2\""]
22449#[doc = " ],"]
22450#[doc = " \"properties\": {"]
22451#[doc = " \"V2\": {"]
22452#[doc = " \"$ref\": \"#/components/schemas/ShardLayoutV2\""]
22453#[doc = " }"]
22454#[doc = " },"]
22455#[doc = " \"additionalProperties\": false"]
22456#[doc = " }"]
22457#[doc = " ]"]
22458#[doc = "}"]
22459#[doc = r" ```"]
22460#[doc = r" </details>"]
22461#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22462pub enum ShardLayout {
22463 V0(ShardLayoutV0),
22464 V1(ShardLayoutV1),
22465 V2(ShardLayoutV2),
22466}
22467impl ::std::convert::From<&Self> for ShardLayout {
22468 fn from(value: &ShardLayout) -> Self {
22469 value.clone()
22470 }
22471}
22472impl ::std::convert::From<ShardLayoutV0> for ShardLayout {
22473 fn from(value: ShardLayoutV0) -> Self {
22474 Self::V0(value)
22475 }
22476}
22477impl ::std::convert::From<ShardLayoutV1> for ShardLayout {
22478 fn from(value: ShardLayoutV1) -> Self {
22479 Self::V1(value)
22480 }
22481}
22482impl ::std::convert::From<ShardLayoutV2> for ShardLayout {
22483 fn from(value: ShardLayoutV2) -> Self {
22484 Self::V2(value)
22485 }
22486}
22487#[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."]
22488#[doc = r""]
22489#[doc = r" <details><summary>JSON schema</summary>"]
22490#[doc = r""]
22491#[doc = r" ```json"]
22492#[doc = "{"]
22493#[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.\","]
22494#[doc = " \"type\": \"object\","]
22495#[doc = " \"required\": ["]
22496#[doc = " \"num_shards\","]
22497#[doc = " \"version\""]
22498#[doc = " ],"]
22499#[doc = " \"properties\": {"]
22500#[doc = " \"num_shards\": {"]
22501#[doc = " \"description\": \"Map accounts evenly across all shards\","]
22502#[doc = " \"type\": \"integer\","]
22503#[doc = " \"format\": \"uint64\","]
22504#[doc = " \"minimum\": 0.0"]
22505#[doc = " },"]
22506#[doc = " \"version\": {"]
22507#[doc = " \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
22508#[doc = " \"type\": \"integer\","]
22509#[doc = " \"format\": \"uint32\","]
22510#[doc = " \"minimum\": 0.0"]
22511#[doc = " }"]
22512#[doc = " }"]
22513#[doc = "}"]
22514#[doc = r" ```"]
22515#[doc = r" </details>"]
22516#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22517pub struct ShardLayoutV0 {
22518 #[doc = "Map accounts evenly across all shards"]
22519 pub num_shards: u64,
22520 #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
22521 pub version: u32,
22522}
22523impl ::std::convert::From<&ShardLayoutV0> for ShardLayoutV0 {
22524 fn from(value: &ShardLayoutV0) -> Self {
22525 value.clone()
22526 }
22527}
22528#[doc = "`ShardLayoutV1`"]
22529#[doc = r""]
22530#[doc = r" <details><summary>JSON schema</summary>"]
22531#[doc = r""]
22532#[doc = r" ```json"]
22533#[doc = "{"]
22534#[doc = " \"type\": \"object\","]
22535#[doc = " \"required\": ["]
22536#[doc = " \"boundary_accounts\","]
22537#[doc = " \"version\""]
22538#[doc = " ],"]
22539#[doc = " \"properties\": {"]
22540#[doc = " \"boundary_accounts\": {"]
22541#[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.\","]
22542#[doc = " \"type\": \"array\","]
22543#[doc = " \"items\": {"]
22544#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
22545#[doc = " }"]
22546#[doc = " },"]
22547#[doc = " \"shards_split_map\": {"]
22548#[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\","]
22549#[doc = " \"type\": ["]
22550#[doc = " \"array\","]
22551#[doc = " \"null\""]
22552#[doc = " ],"]
22553#[doc = " \"items\": {"]
22554#[doc = " \"type\": \"array\","]
22555#[doc = " \"items\": {"]
22556#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22557#[doc = " }"]
22558#[doc = " }"]
22559#[doc = " },"]
22560#[doc = " \"to_parent_shard_map\": {"]
22561#[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\","]
22562#[doc = " \"type\": ["]
22563#[doc = " \"array\","]
22564#[doc = " \"null\""]
22565#[doc = " ],"]
22566#[doc = " \"items\": {"]
22567#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22568#[doc = " }"]
22569#[doc = " },"]
22570#[doc = " \"version\": {"]
22571#[doc = " \"description\": \"Version of the shard layout, this is useful for uniquely identify the shard layout\","]
22572#[doc = " \"type\": \"integer\","]
22573#[doc = " \"format\": \"uint32\","]
22574#[doc = " \"minimum\": 0.0"]
22575#[doc = " }"]
22576#[doc = " }"]
22577#[doc = "}"]
22578#[doc = r" ```"]
22579#[doc = r" </details>"]
22580#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22581pub struct ShardLayoutV1 {
22582 #[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."]
22583 pub boundary_accounts: ::std::vec::Vec<AccountId>,
22584 #[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"]
22585 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22586 pub shards_split_map: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<ShardId>>>,
22587 #[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"]
22588 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22589 pub to_parent_shard_map: ::std::option::Option<::std::vec::Vec<ShardId>>,
22590 #[doc = "Version of the shard layout, this is useful for uniquely identify the shard layout"]
22591 pub version: u32,
22592}
22593impl ::std::convert::From<&ShardLayoutV1> for ShardLayoutV1 {
22594 fn from(value: &ShardLayoutV1) -> Self {
22595 value.clone()
22596 }
22597}
22598#[doc = "Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\nserde serialization."]
22599#[doc = r""]
22600#[doc = r" <details><summary>JSON schema</summary>"]
22601#[doc = r""]
22602#[doc = r" ```json"]
22603#[doc = "{"]
22604#[doc = " \"description\": \"Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\\nserde serialization.\","]
22605#[doc = " \"type\": \"object\","]
22606#[doc = " \"required\": ["]
22607#[doc = " \"boundary_accounts\","]
22608#[doc = " \"id_to_index_map\","]
22609#[doc = " \"index_to_id_map\","]
22610#[doc = " \"shard_ids\","]
22611#[doc = " \"version\""]
22612#[doc = " ],"]
22613#[doc = " \"properties\": {"]
22614#[doc = " \"boundary_accounts\": {"]
22615#[doc = " \"type\": \"array\","]
22616#[doc = " \"items\": {"]
22617#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
22618#[doc = " }"]
22619#[doc = " },"]
22620#[doc = " \"id_to_index_map\": {"]
22621#[doc = " \"type\": \"object\","]
22622#[doc = " \"additionalProperties\": {"]
22623#[doc = " \"type\": \"integer\","]
22624#[doc = " \"format\": \"uint\","]
22625#[doc = " \"minimum\": 0.0"]
22626#[doc = " }"]
22627#[doc = " },"]
22628#[doc = " \"index_to_id_map\": {"]
22629#[doc = " \"type\": \"object\","]
22630#[doc = " \"additionalProperties\": {"]
22631#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22632#[doc = " }"]
22633#[doc = " },"]
22634#[doc = " \"shard_ids\": {"]
22635#[doc = " \"type\": \"array\","]
22636#[doc = " \"items\": {"]
22637#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22638#[doc = " }"]
22639#[doc = " },"]
22640#[doc = " \"shards_parent_map\": {"]
22641#[doc = " \"type\": ["]
22642#[doc = " \"object\","]
22643#[doc = " \"null\""]
22644#[doc = " ],"]
22645#[doc = " \"additionalProperties\": {"]
22646#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22647#[doc = " }"]
22648#[doc = " },"]
22649#[doc = " \"shards_split_map\": {"]
22650#[doc = " \"type\": ["]
22651#[doc = " \"object\","]
22652#[doc = " \"null\""]
22653#[doc = " ],"]
22654#[doc = " \"additionalProperties\": {"]
22655#[doc = " \"type\": \"array\","]
22656#[doc = " \"items\": {"]
22657#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
22658#[doc = " }"]
22659#[doc = " }"]
22660#[doc = " },"]
22661#[doc = " \"version\": {"]
22662#[doc = " \"type\": \"integer\","]
22663#[doc = " \"format\": \"uint32\","]
22664#[doc = " \"minimum\": 0.0"]
22665#[doc = " }"]
22666#[doc = " }"]
22667#[doc = "}"]
22668#[doc = r" ```"]
22669#[doc = r" </details>"]
22670#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22671pub struct ShardLayoutV2 {
22672 pub boundary_accounts: ::std::vec::Vec<AccountId>,
22673 pub id_to_index_map: ::std::collections::HashMap<::std::string::String, u32>,
22674 pub index_to_id_map: ::std::collections::HashMap<::std::string::String, ShardId>,
22675 pub shard_ids: ::std::vec::Vec<ShardId>,
22676 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22677 pub shards_parent_map:
22678 ::std::option::Option<::std::collections::HashMap<::std::string::String, ShardId>>,
22679 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22680 pub shards_split_map: ::std::option::Option<
22681 ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<ShardId>>,
22682 >,
22683 pub version: u32,
22684}
22685impl ::std::convert::From<&ShardLayoutV2> for ShardLayoutV2 {
22686 fn from(value: &ShardLayoutV2) -> Self {
22687 value.clone()
22688 }
22689}
22690#[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`)"]
22691#[doc = r""]
22692#[doc = r" <details><summary>JSON schema</summary>"]
22693#[doc = r""]
22694#[doc = r" ```json"]
22695#[doc = "{"]
22696#[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`)\","]
22697#[doc = " \"type\": \"object\","]
22698#[doc = " \"required\": ["]
22699#[doc = " \"shard_id\","]
22700#[doc = " \"version\""]
22701#[doc = " ],"]
22702#[doc = " \"properties\": {"]
22703#[doc = " \"shard_id\": {"]
22704#[doc = " \"type\": \"integer\","]
22705#[doc = " \"format\": \"uint32\","]
22706#[doc = " \"minimum\": 0.0"]
22707#[doc = " },"]
22708#[doc = " \"version\": {"]
22709#[doc = " \"type\": \"integer\","]
22710#[doc = " \"format\": \"uint32\","]
22711#[doc = " \"minimum\": 0.0"]
22712#[doc = " }"]
22713#[doc = " }"]
22714#[doc = "}"]
22715#[doc = r" ```"]
22716#[doc = r" </details>"]
22717#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22718pub struct ShardUId {
22719 pub shard_id: u32,
22720 pub version: u32,
22721}
22722impl ::std::convert::From<&ShardUId> for ShardUId {
22723 fn from(value: &ShardUId) -> Self {
22724 value.clone()
22725 }
22726}
22727#[doc = "`Signature`"]
22728#[doc = r""]
22729#[doc = r" <details><summary>JSON schema</summary>"]
22730#[doc = r""]
22731#[doc = r" ```json"]
22732#[doc = "{"]
22733#[doc = " \"type\": \"string\""]
22734#[doc = "}"]
22735#[doc = r" ```"]
22736#[doc = r" </details>"]
22737#[derive(
22738 :: serde :: Deserialize,
22739 :: serde :: Serialize,
22740 Clone,
22741 Debug,
22742 Eq,
22743 Hash,
22744 Ord,
22745 PartialEq,
22746 PartialOrd,
22747)]
22748#[serde(transparent)]
22749pub struct Signature(pub ::std::string::String);
22750impl ::std::ops::Deref for Signature {
22751 type Target = ::std::string::String;
22752 fn deref(&self) -> &::std::string::String {
22753 &self.0
22754 }
22755}
22756impl ::std::convert::From<Signature> for ::std::string::String {
22757 fn from(value: Signature) -> Self {
22758 value.0
22759 }
22760}
22761impl ::std::convert::From<&Signature> for Signature {
22762 fn from(value: &Signature) -> Self {
22763 value.clone()
22764 }
22765}
22766impl ::std::convert::From<::std::string::String> for Signature {
22767 fn from(value: ::std::string::String) -> Self {
22768 Self(value)
22769 }
22770}
22771impl ::std::str::FromStr for Signature {
22772 type Err = ::std::convert::Infallible;
22773 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
22774 Ok(Self(value.to_string()))
22775 }
22776}
22777impl ::std::fmt::Display for Signature {
22778 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22779 self.0.fmt(f)
22780 }
22781}
22782#[doc = "`SignedDelegateAction`"]
22783#[doc = r""]
22784#[doc = r" <details><summary>JSON schema</summary>"]
22785#[doc = r""]
22786#[doc = r" ```json"]
22787#[doc = "{"]
22788#[doc = " \"type\": \"object\","]
22789#[doc = " \"required\": ["]
22790#[doc = " \"delegate_action\","]
22791#[doc = " \"signature\""]
22792#[doc = " ],"]
22793#[doc = " \"properties\": {"]
22794#[doc = " \"delegate_action\": {"]
22795#[doc = " \"$ref\": \"#/components/schemas/DelegateAction\""]
22796#[doc = " },"]
22797#[doc = " \"signature\": {"]
22798#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
22799#[doc = " }"]
22800#[doc = " }"]
22801#[doc = "}"]
22802#[doc = r" ```"]
22803#[doc = r" </details>"]
22804#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22805pub struct SignedDelegateAction {
22806 pub delegate_action: DelegateAction,
22807 pub signature: Signature,
22808}
22809impl ::std::convert::From<&SignedDelegateAction> for SignedDelegateAction {
22810 fn from(value: &SignedDelegateAction) -> Self {
22811 value.clone()
22812 }
22813}
22814#[doc = "`SignedTransaction`"]
22815#[doc = r""]
22816#[doc = r" <details><summary>JSON schema</summary>"]
22817#[doc = r""]
22818#[doc = r" ```json"]
22819#[doc = "{"]
22820#[doc = " \"type\": \"string\","]
22821#[doc = " \"format\": \"byte\""]
22822#[doc = "}"]
22823#[doc = r" ```"]
22824#[doc = r" </details>"]
22825#[derive(
22826 :: serde :: Deserialize,
22827 :: serde :: Serialize,
22828 Clone,
22829 Debug,
22830 Eq,
22831 Hash,
22832 Ord,
22833 PartialEq,
22834 PartialOrd,
22835)]
22836#[serde(transparent)]
22837pub struct SignedTransaction(pub ::std::string::String);
22838impl ::std::ops::Deref for SignedTransaction {
22839 type Target = ::std::string::String;
22840 fn deref(&self) -> &::std::string::String {
22841 &self.0
22842 }
22843}
22844impl ::std::convert::From<SignedTransaction> for ::std::string::String {
22845 fn from(value: SignedTransaction) -> Self {
22846 value.0
22847 }
22848}
22849impl ::std::convert::From<&SignedTransaction> for SignedTransaction {
22850 fn from(value: &SignedTransaction) -> Self {
22851 value.clone()
22852 }
22853}
22854impl ::std::convert::From<::std::string::String> for SignedTransaction {
22855 fn from(value: ::std::string::String) -> Self {
22856 Self(value)
22857 }
22858}
22859impl ::std::str::FromStr for SignedTransaction {
22860 type Err = ::std::convert::Infallible;
22861 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
22862 Ok(Self(value.to_string()))
22863 }
22864}
22865impl ::std::fmt::Display for SignedTransaction {
22866 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22867 self.0.fmt(f)
22868 }
22869}
22870#[doc = "`SignedTransactionView`"]
22871#[doc = r""]
22872#[doc = r" <details><summary>JSON schema</summary>"]
22873#[doc = r""]
22874#[doc = r" ```json"]
22875#[doc = "{"]
22876#[doc = " \"type\": \"object\","]
22877#[doc = " \"required\": ["]
22878#[doc = " \"actions\","]
22879#[doc = " \"hash\","]
22880#[doc = " \"nonce\","]
22881#[doc = " \"public_key\","]
22882#[doc = " \"receiver_id\","]
22883#[doc = " \"signature\","]
22884#[doc = " \"signer_id\""]
22885#[doc = " ],"]
22886#[doc = " \"properties\": {"]
22887#[doc = " \"actions\": {"]
22888#[doc = " \"type\": \"array\","]
22889#[doc = " \"items\": {"]
22890#[doc = " \"$ref\": \"#/components/schemas/ActionView\""]
22891#[doc = " }"]
22892#[doc = " },"]
22893#[doc = " \"hash\": {"]
22894#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
22895#[doc = " },"]
22896#[doc = " \"nonce\": {"]
22897#[doc = " \"type\": \"integer\","]
22898#[doc = " \"format\": \"uint64\","]
22899#[doc = " \"minimum\": 0.0"]
22900#[doc = " },"]
22901#[doc = " \"priority_fee\": {"]
22902#[doc = " \"default\": 0,"]
22903#[doc = " \"type\": \"integer\","]
22904#[doc = " \"format\": \"uint64\","]
22905#[doc = " \"minimum\": 0.0"]
22906#[doc = " },"]
22907#[doc = " \"public_key\": {"]
22908#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
22909#[doc = " },"]
22910#[doc = " \"receiver_id\": {"]
22911#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
22912#[doc = " },"]
22913#[doc = " \"signature\": {"]
22914#[doc = " \"$ref\": \"#/components/schemas/Signature\""]
22915#[doc = " },"]
22916#[doc = " \"signer_id\": {"]
22917#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
22918#[doc = " }"]
22919#[doc = " }"]
22920#[doc = "}"]
22921#[doc = r" ```"]
22922#[doc = r" </details>"]
22923#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
22924pub struct SignedTransactionView {
22925 pub actions: ::std::vec::Vec<ActionView>,
22926 pub hash: CryptoHash,
22927 pub nonce: u64,
22928 #[serde(default)]
22929 pub priority_fee: u64,
22930 pub public_key: PublicKey,
22931 pub receiver_id: AccountId,
22932 pub signature: Signature,
22933 pub signer_id: AccountId,
22934}
22935impl ::std::convert::From<&SignedTransactionView> for SignedTransactionView {
22936 fn from(value: &SignedTransactionView) -> Self {
22937 value.clone()
22938 }
22939}
22940#[doc = "`SingleAccessKeyChangesByBlockIdChangesType`"]
22941#[doc = r""]
22942#[doc = r" <details><summary>JSON schema</summary>"]
22943#[doc = r""]
22944#[doc = r" ```json"]
22945#[doc = "{"]
22946#[doc = " \"type\": \"string\","]
22947#[doc = " \"enum\": ["]
22948#[doc = " \"single_access_key_changes\""]
22949#[doc = " ]"]
22950#[doc = "}"]
22951#[doc = r" ```"]
22952#[doc = r" </details>"]
22953#[derive(
22954 :: serde :: Deserialize,
22955 :: serde :: Serialize,
22956 Clone,
22957 Copy,
22958 Debug,
22959 Eq,
22960 Hash,
22961 Ord,
22962 PartialEq,
22963 PartialOrd,
22964)]
22965pub enum SingleAccessKeyChangesByBlockIdChangesType {
22966 #[serde(rename = "single_access_key_changes")]
22967 SingleAccessKeyChanges,
22968}
22969impl ::std::convert::From<&Self> for SingleAccessKeyChangesByBlockIdChangesType {
22970 fn from(value: &SingleAccessKeyChangesByBlockIdChangesType) -> Self {
22971 value.clone()
22972 }
22973}
22974impl ::std::fmt::Display for SingleAccessKeyChangesByBlockIdChangesType {
22975 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22976 match *self {
22977 Self::SingleAccessKeyChanges => write!(f, "single_access_key_changes"),
22978 }
22979 }
22980}
22981impl ::std::str::FromStr for SingleAccessKeyChangesByBlockIdChangesType {
22982 type Err = self::error::ConversionError;
22983 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22984 match value {
22985 "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
22986 _ => Err("invalid value".into()),
22987 }
22988 }
22989}
22990impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByBlockIdChangesType {
22991 type Error = self::error::ConversionError;
22992 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22993 value.parse()
22994 }
22995}
22996impl ::std::convert::TryFrom<&::std::string::String>
22997 for SingleAccessKeyChangesByBlockIdChangesType
22998{
22999 type Error = self::error::ConversionError;
23000 fn try_from(
23001 value: &::std::string::String,
23002 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23003 value.parse()
23004 }
23005}
23006impl ::std::convert::TryFrom<::std::string::String> for SingleAccessKeyChangesByBlockIdChangesType {
23007 type Error = self::error::ConversionError;
23008 fn try_from(
23009 value: ::std::string::String,
23010 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23011 value.parse()
23012 }
23013}
23014#[doc = "`SingleAccessKeyChangesByFinalityChangesType`"]
23015#[doc = r""]
23016#[doc = r" <details><summary>JSON schema</summary>"]
23017#[doc = r""]
23018#[doc = r" ```json"]
23019#[doc = "{"]
23020#[doc = " \"type\": \"string\","]
23021#[doc = " \"enum\": ["]
23022#[doc = " \"single_access_key_changes\""]
23023#[doc = " ]"]
23024#[doc = "}"]
23025#[doc = r" ```"]
23026#[doc = r" </details>"]
23027#[derive(
23028 :: serde :: Deserialize,
23029 :: serde :: Serialize,
23030 Clone,
23031 Copy,
23032 Debug,
23033 Eq,
23034 Hash,
23035 Ord,
23036 PartialEq,
23037 PartialOrd,
23038)]
23039pub enum SingleAccessKeyChangesByFinalityChangesType {
23040 #[serde(rename = "single_access_key_changes")]
23041 SingleAccessKeyChanges,
23042}
23043impl ::std::convert::From<&Self> for SingleAccessKeyChangesByFinalityChangesType {
23044 fn from(value: &SingleAccessKeyChangesByFinalityChangesType) -> Self {
23045 value.clone()
23046 }
23047}
23048impl ::std::fmt::Display for SingleAccessKeyChangesByFinalityChangesType {
23049 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23050 match *self {
23051 Self::SingleAccessKeyChanges => write!(f, "single_access_key_changes"),
23052 }
23053 }
23054}
23055impl ::std::str::FromStr for SingleAccessKeyChangesByFinalityChangesType {
23056 type Err = self::error::ConversionError;
23057 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23058 match value {
23059 "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
23060 _ => Err("invalid value".into()),
23061 }
23062 }
23063}
23064impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesByFinalityChangesType {
23065 type Error = self::error::ConversionError;
23066 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23067 value.parse()
23068 }
23069}
23070impl ::std::convert::TryFrom<&::std::string::String>
23071 for SingleAccessKeyChangesByFinalityChangesType
23072{
23073 type Error = self::error::ConversionError;
23074 fn try_from(
23075 value: &::std::string::String,
23076 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23077 value.parse()
23078 }
23079}
23080impl ::std::convert::TryFrom<::std::string::String>
23081 for SingleAccessKeyChangesByFinalityChangesType
23082{
23083 type Error = self::error::ConversionError;
23084 fn try_from(
23085 value: ::std::string::String,
23086 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23087 value.parse()
23088 }
23089}
23090#[doc = "`SingleAccessKeyChangesBySyncCheckpointChangesType`"]
23091#[doc = r""]
23092#[doc = r" <details><summary>JSON schema</summary>"]
23093#[doc = r""]
23094#[doc = r" ```json"]
23095#[doc = "{"]
23096#[doc = " \"type\": \"string\","]
23097#[doc = " \"enum\": ["]
23098#[doc = " \"single_access_key_changes\""]
23099#[doc = " ]"]
23100#[doc = "}"]
23101#[doc = r" ```"]
23102#[doc = r" </details>"]
23103#[derive(
23104 :: serde :: Deserialize,
23105 :: serde :: Serialize,
23106 Clone,
23107 Copy,
23108 Debug,
23109 Eq,
23110 Hash,
23111 Ord,
23112 PartialEq,
23113 PartialOrd,
23114)]
23115pub enum SingleAccessKeyChangesBySyncCheckpointChangesType {
23116 #[serde(rename = "single_access_key_changes")]
23117 SingleAccessKeyChanges,
23118}
23119impl ::std::convert::From<&Self> for SingleAccessKeyChangesBySyncCheckpointChangesType {
23120 fn from(value: &SingleAccessKeyChangesBySyncCheckpointChangesType) -> Self {
23121 value.clone()
23122 }
23123}
23124impl ::std::fmt::Display for SingleAccessKeyChangesBySyncCheckpointChangesType {
23125 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23126 match *self {
23127 Self::SingleAccessKeyChanges => write!(f, "single_access_key_changes"),
23128 }
23129 }
23130}
23131impl ::std::str::FromStr for SingleAccessKeyChangesBySyncCheckpointChangesType {
23132 type Err = self::error::ConversionError;
23133 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23134 match value {
23135 "single_access_key_changes" => Ok(Self::SingleAccessKeyChanges),
23136 _ => Err("invalid value".into()),
23137 }
23138 }
23139}
23140impl ::std::convert::TryFrom<&str> for SingleAccessKeyChangesBySyncCheckpointChangesType {
23141 type Error = self::error::ConversionError;
23142 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23143 value.parse()
23144 }
23145}
23146impl ::std::convert::TryFrom<&::std::string::String>
23147 for SingleAccessKeyChangesBySyncCheckpointChangesType
23148{
23149 type Error = self::error::ConversionError;
23150 fn try_from(
23151 value: &::std::string::String,
23152 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23153 value.parse()
23154 }
23155}
23156impl ::std::convert::TryFrom<::std::string::String>
23157 for SingleAccessKeyChangesBySyncCheckpointChangesType
23158{
23159 type Error = self::error::ConversionError;
23160 fn try_from(
23161 value: ::std::string::String,
23162 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23163 value.parse()
23164 }
23165}
23166#[doc = "`SingleGasKeyChangesByBlockIdChangesType`"]
23167#[doc = r""]
23168#[doc = r" <details><summary>JSON schema</summary>"]
23169#[doc = r""]
23170#[doc = r" ```json"]
23171#[doc = "{"]
23172#[doc = " \"type\": \"string\","]
23173#[doc = " \"enum\": ["]
23174#[doc = " \"single_gas_key_changes\""]
23175#[doc = " ]"]
23176#[doc = "}"]
23177#[doc = r" ```"]
23178#[doc = r" </details>"]
23179#[derive(
23180 :: serde :: Deserialize,
23181 :: serde :: Serialize,
23182 Clone,
23183 Copy,
23184 Debug,
23185 Eq,
23186 Hash,
23187 Ord,
23188 PartialEq,
23189 PartialOrd,
23190)]
23191pub enum SingleGasKeyChangesByBlockIdChangesType {
23192 #[serde(rename = "single_gas_key_changes")]
23193 SingleGasKeyChanges,
23194}
23195impl ::std::convert::From<&Self> for SingleGasKeyChangesByBlockIdChangesType {
23196 fn from(value: &SingleGasKeyChangesByBlockIdChangesType) -> Self {
23197 value.clone()
23198 }
23199}
23200impl ::std::fmt::Display for SingleGasKeyChangesByBlockIdChangesType {
23201 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23202 match *self {
23203 Self::SingleGasKeyChanges => write!(f, "single_gas_key_changes"),
23204 }
23205 }
23206}
23207impl ::std::str::FromStr for SingleGasKeyChangesByBlockIdChangesType {
23208 type Err = self::error::ConversionError;
23209 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23210 match value {
23211 "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
23212 _ => Err("invalid value".into()),
23213 }
23214 }
23215}
23216impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByBlockIdChangesType {
23217 type Error = self::error::ConversionError;
23218 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23219 value.parse()
23220 }
23221}
23222impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
23223 type Error = self::error::ConversionError;
23224 fn try_from(
23225 value: &::std::string::String,
23226 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23227 value.parse()
23228 }
23229}
23230impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByBlockIdChangesType {
23231 type Error = self::error::ConversionError;
23232 fn try_from(
23233 value: ::std::string::String,
23234 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23235 value.parse()
23236 }
23237}
23238#[doc = "`SingleGasKeyChangesByFinalityChangesType`"]
23239#[doc = r""]
23240#[doc = r" <details><summary>JSON schema</summary>"]
23241#[doc = r""]
23242#[doc = r" ```json"]
23243#[doc = "{"]
23244#[doc = " \"type\": \"string\","]
23245#[doc = " \"enum\": ["]
23246#[doc = " \"single_gas_key_changes\""]
23247#[doc = " ]"]
23248#[doc = "}"]
23249#[doc = r" ```"]
23250#[doc = r" </details>"]
23251#[derive(
23252 :: serde :: Deserialize,
23253 :: serde :: Serialize,
23254 Clone,
23255 Copy,
23256 Debug,
23257 Eq,
23258 Hash,
23259 Ord,
23260 PartialEq,
23261 PartialOrd,
23262)]
23263pub enum SingleGasKeyChangesByFinalityChangesType {
23264 #[serde(rename = "single_gas_key_changes")]
23265 SingleGasKeyChanges,
23266}
23267impl ::std::convert::From<&Self> for SingleGasKeyChangesByFinalityChangesType {
23268 fn from(value: &SingleGasKeyChangesByFinalityChangesType) -> Self {
23269 value.clone()
23270 }
23271}
23272impl ::std::fmt::Display for SingleGasKeyChangesByFinalityChangesType {
23273 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23274 match *self {
23275 Self::SingleGasKeyChanges => write!(f, "single_gas_key_changes"),
23276 }
23277 }
23278}
23279impl ::std::str::FromStr for SingleGasKeyChangesByFinalityChangesType {
23280 type Err = self::error::ConversionError;
23281 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23282 match value {
23283 "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
23284 _ => Err("invalid value".into()),
23285 }
23286 }
23287}
23288impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesByFinalityChangesType {
23289 type Error = self::error::ConversionError;
23290 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23291 value.parse()
23292 }
23293}
23294impl ::std::convert::TryFrom<&::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
23295 type Error = self::error::ConversionError;
23296 fn try_from(
23297 value: &::std::string::String,
23298 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23299 value.parse()
23300 }
23301}
23302impl ::std::convert::TryFrom<::std::string::String> for SingleGasKeyChangesByFinalityChangesType {
23303 type Error = self::error::ConversionError;
23304 fn try_from(
23305 value: ::std::string::String,
23306 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23307 value.parse()
23308 }
23309}
23310#[doc = "`SingleGasKeyChangesBySyncCheckpointChangesType`"]
23311#[doc = r""]
23312#[doc = r" <details><summary>JSON schema</summary>"]
23313#[doc = r""]
23314#[doc = r" ```json"]
23315#[doc = "{"]
23316#[doc = " \"type\": \"string\","]
23317#[doc = " \"enum\": ["]
23318#[doc = " \"single_gas_key_changes\""]
23319#[doc = " ]"]
23320#[doc = "}"]
23321#[doc = r" ```"]
23322#[doc = r" </details>"]
23323#[derive(
23324 :: serde :: Deserialize,
23325 :: serde :: Serialize,
23326 Clone,
23327 Copy,
23328 Debug,
23329 Eq,
23330 Hash,
23331 Ord,
23332 PartialEq,
23333 PartialOrd,
23334)]
23335pub enum SingleGasKeyChangesBySyncCheckpointChangesType {
23336 #[serde(rename = "single_gas_key_changes")]
23337 SingleGasKeyChanges,
23338}
23339impl ::std::convert::From<&Self> for SingleGasKeyChangesBySyncCheckpointChangesType {
23340 fn from(value: &SingleGasKeyChangesBySyncCheckpointChangesType) -> Self {
23341 value.clone()
23342 }
23343}
23344impl ::std::fmt::Display for SingleGasKeyChangesBySyncCheckpointChangesType {
23345 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23346 match *self {
23347 Self::SingleGasKeyChanges => write!(f, "single_gas_key_changes"),
23348 }
23349 }
23350}
23351impl ::std::str::FromStr for SingleGasKeyChangesBySyncCheckpointChangesType {
23352 type Err = self::error::ConversionError;
23353 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23354 match value {
23355 "single_gas_key_changes" => Ok(Self::SingleGasKeyChanges),
23356 _ => Err("invalid value".into()),
23357 }
23358 }
23359}
23360impl ::std::convert::TryFrom<&str> for SingleGasKeyChangesBySyncCheckpointChangesType {
23361 type Error = self::error::ConversionError;
23362 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23363 value.parse()
23364 }
23365}
23366impl ::std::convert::TryFrom<&::std::string::String>
23367 for SingleGasKeyChangesBySyncCheckpointChangesType
23368{
23369 type Error = self::error::ConversionError;
23370 fn try_from(
23371 value: &::std::string::String,
23372 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23373 value.parse()
23374 }
23375}
23376impl ::std::convert::TryFrom<::std::string::String>
23377 for SingleGasKeyChangesBySyncCheckpointChangesType
23378{
23379 type Error = self::error::ConversionError;
23380 fn try_from(
23381 value: ::std::string::String,
23382 ) -> ::std::result::Result<Self, self::error::ConversionError> {
23383 value.parse()
23384 }
23385}
23386#[doc = "`SlashedValidator`"]
23387#[doc = r""]
23388#[doc = r" <details><summary>JSON schema</summary>"]
23389#[doc = r""]
23390#[doc = r" ```json"]
23391#[doc = "{"]
23392#[doc = " \"type\": \"object\","]
23393#[doc = " \"required\": ["]
23394#[doc = " \"account_id\","]
23395#[doc = " \"is_double_sign\""]
23396#[doc = " ],"]
23397#[doc = " \"properties\": {"]
23398#[doc = " \"account_id\": {"]
23399#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23400#[doc = " },"]
23401#[doc = " \"is_double_sign\": {"]
23402#[doc = " \"type\": \"boolean\""]
23403#[doc = " }"]
23404#[doc = " }"]
23405#[doc = "}"]
23406#[doc = r" ```"]
23407#[doc = r" </details>"]
23408#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23409pub struct SlashedValidator {
23410 pub account_id: AccountId,
23411 pub is_double_sign: bool,
23412}
23413impl ::std::convert::From<&SlashedValidator> for SlashedValidator {
23414 fn from(value: &SlashedValidator) -> Self {
23415 value.clone()
23416 }
23417}
23418#[doc = "An action which stakes signer_id tokens and setup's validator public key"]
23419#[doc = r""]
23420#[doc = r" <details><summary>JSON schema</summary>"]
23421#[doc = r""]
23422#[doc = r" ```json"]
23423#[doc = "{"]
23424#[doc = " \"description\": \"An action which stakes signer_id tokens and setup's validator public key\","]
23425#[doc = " \"type\": \"object\","]
23426#[doc = " \"required\": ["]
23427#[doc = " \"public_key\","]
23428#[doc = " \"stake\""]
23429#[doc = " ],"]
23430#[doc = " \"properties\": {"]
23431#[doc = " \"public_key\": {"]
23432#[doc = " \"description\": \"Validator key which will be used to sign transactions on behalf of signer_id\","]
23433#[doc = " \"allOf\": ["]
23434#[doc = " {"]
23435#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23436#[doc = " }"]
23437#[doc = " ]"]
23438#[doc = " },"]
23439#[doc = " \"stake\": {"]
23440#[doc = " \"description\": \"Amount of tokens to stake.\","]
23441#[doc = " \"type\": \"string\""]
23442#[doc = " }"]
23443#[doc = " }"]
23444#[doc = "}"]
23445#[doc = r" ```"]
23446#[doc = r" </details>"]
23447#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23448pub struct StakeAction {
23449 #[doc = "Validator key which will be used to sign transactions on behalf of signer_id"]
23450 pub public_key: PublicKey,
23451 #[doc = "Amount of tokens to stake."]
23452 pub stake: ::std::string::String,
23453}
23454impl ::std::convert::From<&StakeAction> for StakeAction {
23455 fn from(value: &StakeAction) -> Self {
23456 value.clone()
23457 }
23458}
23459#[doc = "See crate::types::StateChangeCause for details."]
23460#[doc = r""]
23461#[doc = r" <details><summary>JSON schema</summary>"]
23462#[doc = r""]
23463#[doc = r" ```json"]
23464#[doc = "{"]
23465#[doc = " \"description\": \"See crate::types::StateChangeCause for details.\","]
23466#[doc = " \"oneOf\": ["]
23467#[doc = " {"]
23468#[doc = " \"type\": \"object\","]
23469#[doc = " \"required\": ["]
23470#[doc = " \"type\""]
23471#[doc = " ],"]
23472#[doc = " \"properties\": {"]
23473#[doc = " \"type\": {"]
23474#[doc = " \"type\": \"string\","]
23475#[doc = " \"enum\": ["]
23476#[doc = " \"not_writable_to_disk\""]
23477#[doc = " ]"]
23478#[doc = " }"]
23479#[doc = " }"]
23480#[doc = " },"]
23481#[doc = " {"]
23482#[doc = " \"type\": \"object\","]
23483#[doc = " \"required\": ["]
23484#[doc = " \"type\""]
23485#[doc = " ],"]
23486#[doc = " \"properties\": {"]
23487#[doc = " \"type\": {"]
23488#[doc = " \"type\": \"string\","]
23489#[doc = " \"enum\": ["]
23490#[doc = " \"initial_state\""]
23491#[doc = " ]"]
23492#[doc = " }"]
23493#[doc = " }"]
23494#[doc = " },"]
23495#[doc = " {"]
23496#[doc = " \"type\": \"object\","]
23497#[doc = " \"required\": ["]
23498#[doc = " \"tx_hash\","]
23499#[doc = " \"type\""]
23500#[doc = " ],"]
23501#[doc = " \"properties\": {"]
23502#[doc = " \"tx_hash\": {"]
23503#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23504#[doc = " },"]
23505#[doc = " \"type\": {"]
23506#[doc = " \"type\": \"string\","]
23507#[doc = " \"enum\": ["]
23508#[doc = " \"transaction_processing\""]
23509#[doc = " ]"]
23510#[doc = " }"]
23511#[doc = " }"]
23512#[doc = " },"]
23513#[doc = " {"]
23514#[doc = " \"type\": \"object\","]
23515#[doc = " \"required\": ["]
23516#[doc = " \"receipt_hash\","]
23517#[doc = " \"type\""]
23518#[doc = " ],"]
23519#[doc = " \"properties\": {"]
23520#[doc = " \"receipt_hash\": {"]
23521#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23522#[doc = " },"]
23523#[doc = " \"type\": {"]
23524#[doc = " \"type\": \"string\","]
23525#[doc = " \"enum\": ["]
23526#[doc = " \"action_receipt_processing_started\""]
23527#[doc = " ]"]
23528#[doc = " }"]
23529#[doc = " }"]
23530#[doc = " },"]
23531#[doc = " {"]
23532#[doc = " \"type\": \"object\","]
23533#[doc = " \"required\": ["]
23534#[doc = " \"receipt_hash\","]
23535#[doc = " \"type\""]
23536#[doc = " ],"]
23537#[doc = " \"properties\": {"]
23538#[doc = " \"receipt_hash\": {"]
23539#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23540#[doc = " },"]
23541#[doc = " \"type\": {"]
23542#[doc = " \"type\": \"string\","]
23543#[doc = " \"enum\": ["]
23544#[doc = " \"action_receipt_gas_reward\""]
23545#[doc = " ]"]
23546#[doc = " }"]
23547#[doc = " }"]
23548#[doc = " },"]
23549#[doc = " {"]
23550#[doc = " \"type\": \"object\","]
23551#[doc = " \"required\": ["]
23552#[doc = " \"receipt_hash\","]
23553#[doc = " \"type\""]
23554#[doc = " ],"]
23555#[doc = " \"properties\": {"]
23556#[doc = " \"receipt_hash\": {"]
23557#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23558#[doc = " },"]
23559#[doc = " \"type\": {"]
23560#[doc = " \"type\": \"string\","]
23561#[doc = " \"enum\": ["]
23562#[doc = " \"receipt_processing\""]
23563#[doc = " ]"]
23564#[doc = " }"]
23565#[doc = " }"]
23566#[doc = " },"]
23567#[doc = " {"]
23568#[doc = " \"type\": \"object\","]
23569#[doc = " \"required\": ["]
23570#[doc = " \"receipt_hash\","]
23571#[doc = " \"type\""]
23572#[doc = " ],"]
23573#[doc = " \"properties\": {"]
23574#[doc = " \"receipt_hash\": {"]
23575#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23576#[doc = " },"]
23577#[doc = " \"type\": {"]
23578#[doc = " \"type\": \"string\","]
23579#[doc = " \"enum\": ["]
23580#[doc = " \"postponed_receipt\""]
23581#[doc = " ]"]
23582#[doc = " }"]
23583#[doc = " }"]
23584#[doc = " },"]
23585#[doc = " {"]
23586#[doc = " \"type\": \"object\","]
23587#[doc = " \"required\": ["]
23588#[doc = " \"type\""]
23589#[doc = " ],"]
23590#[doc = " \"properties\": {"]
23591#[doc = " \"type\": {"]
23592#[doc = " \"type\": \"string\","]
23593#[doc = " \"enum\": ["]
23594#[doc = " \"updated_delayed_receipts\""]
23595#[doc = " ]"]
23596#[doc = " }"]
23597#[doc = " }"]
23598#[doc = " },"]
23599#[doc = " {"]
23600#[doc = " \"type\": \"object\","]
23601#[doc = " \"required\": ["]
23602#[doc = " \"type\""]
23603#[doc = " ],"]
23604#[doc = " \"properties\": {"]
23605#[doc = " \"type\": {"]
23606#[doc = " \"type\": \"string\","]
23607#[doc = " \"enum\": ["]
23608#[doc = " \"validator_accounts_update\""]
23609#[doc = " ]"]
23610#[doc = " }"]
23611#[doc = " }"]
23612#[doc = " },"]
23613#[doc = " {"]
23614#[doc = " \"type\": \"object\","]
23615#[doc = " \"required\": ["]
23616#[doc = " \"type\""]
23617#[doc = " ],"]
23618#[doc = " \"properties\": {"]
23619#[doc = " \"type\": {"]
23620#[doc = " \"type\": \"string\","]
23621#[doc = " \"enum\": ["]
23622#[doc = " \"migration\""]
23623#[doc = " ]"]
23624#[doc = " }"]
23625#[doc = " }"]
23626#[doc = " },"]
23627#[doc = " {"]
23628#[doc = " \"type\": \"object\","]
23629#[doc = " \"required\": ["]
23630#[doc = " \"type\""]
23631#[doc = " ],"]
23632#[doc = " \"properties\": {"]
23633#[doc = " \"type\": {"]
23634#[doc = " \"type\": \"string\","]
23635#[doc = " \"enum\": ["]
23636#[doc = " \"bandwidth_scheduler_state_update\""]
23637#[doc = " ]"]
23638#[doc = " }"]
23639#[doc = " }"]
23640#[doc = " }"]
23641#[doc = " ]"]
23642#[doc = "}"]
23643#[doc = r" ```"]
23644#[doc = r" </details>"]
23645#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23646#[serde(tag = "type")]
23647pub enum StateChangeCauseView {
23648 #[serde(rename = "not_writable_to_disk")]
23649 NotWritableToDisk,
23650 #[serde(rename = "initial_state")]
23651 InitialState,
23652 #[serde(rename = "transaction_processing")]
23653 TransactionProcessing { tx_hash: CryptoHash },
23654 #[serde(rename = "action_receipt_processing_started")]
23655 ActionReceiptProcessingStarted { receipt_hash: CryptoHash },
23656 #[serde(rename = "action_receipt_gas_reward")]
23657 ActionReceiptGasReward { receipt_hash: CryptoHash },
23658 #[serde(rename = "receipt_processing")]
23659 ReceiptProcessing { receipt_hash: CryptoHash },
23660 #[serde(rename = "postponed_receipt")]
23661 PostponedReceipt { receipt_hash: CryptoHash },
23662 #[serde(rename = "updated_delayed_receipts")]
23663 UpdatedDelayedReceipts,
23664 #[serde(rename = "validator_accounts_update")]
23665 ValidatorAccountsUpdate,
23666 #[serde(rename = "migration")]
23667 Migration,
23668 #[serde(rename = "bandwidth_scheduler_state_update")]
23669 BandwidthSchedulerStateUpdate,
23670}
23671impl ::std::convert::From<&Self> for StateChangeCauseView {
23672 fn from(value: &StateChangeCauseView) -> Self {
23673 value.clone()
23674 }
23675}
23676#[doc = "It is a [serializable view] of [`StateChangeKind`].\n\n[serializable view]: ./index.html\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html"]
23677#[doc = r""]
23678#[doc = r" <details><summary>JSON schema</summary>"]
23679#[doc = r""]
23680#[doc = r" ```json"]
23681#[doc = "{"]
23682#[doc = " \"description\": \"It is a [serializable view] of [`StateChangeKind`].\\n\\n[serializable view]: ./index.html\\n[`StateChangeKind`]: ../types/struct.StateChangeKind.html\","]
23683#[doc = " \"oneOf\": ["]
23684#[doc = " {"]
23685#[doc = " \"type\": \"object\","]
23686#[doc = " \"required\": ["]
23687#[doc = " \"account_id\","]
23688#[doc = " \"type\""]
23689#[doc = " ],"]
23690#[doc = " \"properties\": {"]
23691#[doc = " \"account_id\": {"]
23692#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23693#[doc = " },"]
23694#[doc = " \"type\": {"]
23695#[doc = " \"type\": \"string\","]
23696#[doc = " \"enum\": ["]
23697#[doc = " \"account_touched\""]
23698#[doc = " ]"]
23699#[doc = " }"]
23700#[doc = " }"]
23701#[doc = " },"]
23702#[doc = " {"]
23703#[doc = " \"type\": \"object\","]
23704#[doc = " \"required\": ["]
23705#[doc = " \"account_id\","]
23706#[doc = " \"type\""]
23707#[doc = " ],"]
23708#[doc = " \"properties\": {"]
23709#[doc = " \"account_id\": {"]
23710#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23711#[doc = " },"]
23712#[doc = " \"type\": {"]
23713#[doc = " \"type\": \"string\","]
23714#[doc = " \"enum\": ["]
23715#[doc = " \"access_key_touched\""]
23716#[doc = " ]"]
23717#[doc = " }"]
23718#[doc = " }"]
23719#[doc = " },"]
23720#[doc = " {"]
23721#[doc = " \"type\": \"object\","]
23722#[doc = " \"required\": ["]
23723#[doc = " \"account_id\","]
23724#[doc = " \"type\""]
23725#[doc = " ],"]
23726#[doc = " \"properties\": {"]
23727#[doc = " \"account_id\": {"]
23728#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23729#[doc = " },"]
23730#[doc = " \"type\": {"]
23731#[doc = " \"type\": \"string\","]
23732#[doc = " \"enum\": ["]
23733#[doc = " \"data_touched\""]
23734#[doc = " ]"]
23735#[doc = " }"]
23736#[doc = " }"]
23737#[doc = " },"]
23738#[doc = " {"]
23739#[doc = " \"type\": \"object\","]
23740#[doc = " \"required\": ["]
23741#[doc = " \"account_id\","]
23742#[doc = " \"type\""]
23743#[doc = " ],"]
23744#[doc = " \"properties\": {"]
23745#[doc = " \"account_id\": {"]
23746#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23747#[doc = " },"]
23748#[doc = " \"type\": {"]
23749#[doc = " \"type\": \"string\","]
23750#[doc = " \"enum\": ["]
23751#[doc = " \"contract_code_touched\""]
23752#[doc = " ]"]
23753#[doc = " }"]
23754#[doc = " }"]
23755#[doc = " }"]
23756#[doc = " ]"]
23757#[doc = "}"]
23758#[doc = r" ```"]
23759#[doc = r" </details>"]
23760#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
23761#[serde(tag = "type", content = "account_id")]
23762pub enum StateChangeKindView {
23763 #[serde(rename = "account_touched")]
23764 AccountTouched(AccountId),
23765 #[serde(rename = "access_key_touched")]
23766 AccessKeyTouched(AccountId),
23767 #[serde(rename = "data_touched")]
23768 DataTouched(AccountId),
23769 #[serde(rename = "contract_code_touched")]
23770 ContractCodeTouched(AccountId),
23771}
23772impl ::std::convert::From<&Self> for StateChangeKindView {
23773 fn from(value: &StateChangeKindView) -> Self {
23774 value.clone()
23775 }
23776}
23777#[doc = "`StateChangeWithCauseView`"]
23778#[doc = r""]
23779#[doc = r" <details><summary>JSON schema</summary>"]
23780#[doc = r""]
23781#[doc = r" ```json"]
23782#[doc = "{"]
23783#[doc = " \"type\": \"object\","]
23784#[doc = " \"oneOf\": ["]
23785#[doc = " {"]
23786#[doc = " \"type\": \"object\","]
23787#[doc = " \"required\": ["]
23788#[doc = " \"change\","]
23789#[doc = " \"type\""]
23790#[doc = " ],"]
23791#[doc = " \"properties\": {"]
23792#[doc = " \"change\": {"]
23793#[doc = " \"description\": \"A view of the account\","]
23794#[doc = " \"type\": \"object\","]
23795#[doc = " \"required\": ["]
23796#[doc = " \"account_id\","]
23797#[doc = " \"amount\","]
23798#[doc = " \"code_hash\","]
23799#[doc = " \"locked\","]
23800#[doc = " \"storage_usage\""]
23801#[doc = " ],"]
23802#[doc = " \"properties\": {"]
23803#[doc = " \"account_id\": {"]
23804#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23805#[doc = " },"]
23806#[doc = " \"amount\": {"]
23807#[doc = " \"type\": \"string\""]
23808#[doc = " },"]
23809#[doc = " \"code_hash\": {"]
23810#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23811#[doc = " },"]
23812#[doc = " \"global_contract_account_id\": {"]
23813#[doc = " \"anyOf\": ["]
23814#[doc = " {"]
23815#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23816#[doc = " },"]
23817#[doc = " {"]
23818#[doc = " \"type\": \"null\""]
23819#[doc = " }"]
23820#[doc = " ]"]
23821#[doc = " },"]
23822#[doc = " \"global_contract_hash\": {"]
23823#[doc = " \"anyOf\": ["]
23824#[doc = " {"]
23825#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
23826#[doc = " },"]
23827#[doc = " {"]
23828#[doc = " \"type\": \"null\""]
23829#[doc = " }"]
23830#[doc = " ]"]
23831#[doc = " },"]
23832#[doc = " \"locked\": {"]
23833#[doc = " \"type\": \"string\""]
23834#[doc = " },"]
23835#[doc = " \"storage_paid_at\": {"]
23836#[doc = " \"description\": \"TODO(2271): deprecated.\","]
23837#[doc = " \"default\": 0,"]
23838#[doc = " \"type\": \"integer\","]
23839#[doc = " \"format\": \"uint64\","]
23840#[doc = " \"minimum\": 0.0"]
23841#[doc = " },"]
23842#[doc = " \"storage_usage\": {"]
23843#[doc = " \"type\": \"integer\","]
23844#[doc = " \"format\": \"uint64\","]
23845#[doc = " \"minimum\": 0.0"]
23846#[doc = " }"]
23847#[doc = " }"]
23848#[doc = " },"]
23849#[doc = " \"type\": {"]
23850#[doc = " \"type\": \"string\","]
23851#[doc = " \"enum\": ["]
23852#[doc = " \"account_update\""]
23853#[doc = " ]"]
23854#[doc = " }"]
23855#[doc = " }"]
23856#[doc = " },"]
23857#[doc = " {"]
23858#[doc = " \"type\": \"object\","]
23859#[doc = " \"required\": ["]
23860#[doc = " \"change\","]
23861#[doc = " \"type\""]
23862#[doc = " ],"]
23863#[doc = " \"properties\": {"]
23864#[doc = " \"change\": {"]
23865#[doc = " \"type\": \"object\","]
23866#[doc = " \"required\": ["]
23867#[doc = " \"account_id\""]
23868#[doc = " ],"]
23869#[doc = " \"properties\": {"]
23870#[doc = " \"account_id\": {"]
23871#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23872#[doc = " }"]
23873#[doc = " }"]
23874#[doc = " },"]
23875#[doc = " \"type\": {"]
23876#[doc = " \"type\": \"string\","]
23877#[doc = " \"enum\": ["]
23878#[doc = " \"account_deletion\""]
23879#[doc = " ]"]
23880#[doc = " }"]
23881#[doc = " }"]
23882#[doc = " },"]
23883#[doc = " {"]
23884#[doc = " \"type\": \"object\","]
23885#[doc = " \"required\": ["]
23886#[doc = " \"change\","]
23887#[doc = " \"type\""]
23888#[doc = " ],"]
23889#[doc = " \"properties\": {"]
23890#[doc = " \"change\": {"]
23891#[doc = " \"type\": \"object\","]
23892#[doc = " \"required\": ["]
23893#[doc = " \"access_key\","]
23894#[doc = " \"account_id\","]
23895#[doc = " \"public_key\""]
23896#[doc = " ],"]
23897#[doc = " \"properties\": {"]
23898#[doc = " \"access_key\": {"]
23899#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
23900#[doc = " },"]
23901#[doc = " \"account_id\": {"]
23902#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23903#[doc = " },"]
23904#[doc = " \"public_key\": {"]
23905#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23906#[doc = " }"]
23907#[doc = " }"]
23908#[doc = " },"]
23909#[doc = " \"type\": {"]
23910#[doc = " \"type\": \"string\","]
23911#[doc = " \"enum\": ["]
23912#[doc = " \"access_key_update\""]
23913#[doc = " ]"]
23914#[doc = " }"]
23915#[doc = " }"]
23916#[doc = " },"]
23917#[doc = " {"]
23918#[doc = " \"type\": \"object\","]
23919#[doc = " \"required\": ["]
23920#[doc = " \"change\","]
23921#[doc = " \"type\""]
23922#[doc = " ],"]
23923#[doc = " \"properties\": {"]
23924#[doc = " \"change\": {"]
23925#[doc = " \"type\": \"object\","]
23926#[doc = " \"required\": ["]
23927#[doc = " \"account_id\","]
23928#[doc = " \"public_key\""]
23929#[doc = " ],"]
23930#[doc = " \"properties\": {"]
23931#[doc = " \"account_id\": {"]
23932#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23933#[doc = " },"]
23934#[doc = " \"public_key\": {"]
23935#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23936#[doc = " }"]
23937#[doc = " }"]
23938#[doc = " },"]
23939#[doc = " \"type\": {"]
23940#[doc = " \"type\": \"string\","]
23941#[doc = " \"enum\": ["]
23942#[doc = " \"access_key_deletion\""]
23943#[doc = " ]"]
23944#[doc = " }"]
23945#[doc = " }"]
23946#[doc = " },"]
23947#[doc = " {"]
23948#[doc = " \"type\": \"object\","]
23949#[doc = " \"required\": ["]
23950#[doc = " \"change\","]
23951#[doc = " \"type\""]
23952#[doc = " ],"]
23953#[doc = " \"properties\": {"]
23954#[doc = " \"change\": {"]
23955#[doc = " \"type\": \"object\","]
23956#[doc = " \"required\": ["]
23957#[doc = " \"account_id\","]
23958#[doc = " \"gas_key\","]
23959#[doc = " \"public_key\""]
23960#[doc = " ],"]
23961#[doc = " \"properties\": {"]
23962#[doc = " \"account_id\": {"]
23963#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23964#[doc = " },"]
23965#[doc = " \"gas_key\": {"]
23966#[doc = " \"$ref\": \"#/components/schemas/GasKeyView\""]
23967#[doc = " },"]
23968#[doc = " \"public_key\": {"]
23969#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
23970#[doc = " }"]
23971#[doc = " }"]
23972#[doc = " },"]
23973#[doc = " \"type\": {"]
23974#[doc = " \"type\": \"string\","]
23975#[doc = " \"enum\": ["]
23976#[doc = " \"gas_key_update\""]
23977#[doc = " ]"]
23978#[doc = " }"]
23979#[doc = " }"]
23980#[doc = " },"]
23981#[doc = " {"]
23982#[doc = " \"type\": \"object\","]
23983#[doc = " \"required\": ["]
23984#[doc = " \"change\","]
23985#[doc = " \"type\""]
23986#[doc = " ],"]
23987#[doc = " \"properties\": {"]
23988#[doc = " \"change\": {"]
23989#[doc = " \"type\": \"object\","]
23990#[doc = " \"required\": ["]
23991#[doc = " \"account_id\","]
23992#[doc = " \"index\","]
23993#[doc = " \"nonce\","]
23994#[doc = " \"public_key\""]
23995#[doc = " ],"]
23996#[doc = " \"properties\": {"]
23997#[doc = " \"account_id\": {"]
23998#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
23999#[doc = " },"]
24000#[doc = " \"index\": {"]
24001#[doc = " \"type\": \"integer\","]
24002#[doc = " \"format\": \"uint32\","]
24003#[doc = " \"minimum\": 0.0"]
24004#[doc = " },"]
24005#[doc = " \"nonce\": {"]
24006#[doc = " \"type\": \"integer\","]
24007#[doc = " \"format\": \"uint64\","]
24008#[doc = " \"minimum\": 0.0"]
24009#[doc = " },"]
24010#[doc = " \"public_key\": {"]
24011#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24012#[doc = " }"]
24013#[doc = " }"]
24014#[doc = " },"]
24015#[doc = " \"type\": {"]
24016#[doc = " \"type\": \"string\","]
24017#[doc = " \"enum\": ["]
24018#[doc = " \"gas_key_nonce_update\""]
24019#[doc = " ]"]
24020#[doc = " }"]
24021#[doc = " }"]
24022#[doc = " },"]
24023#[doc = " {"]
24024#[doc = " \"type\": \"object\","]
24025#[doc = " \"required\": ["]
24026#[doc = " \"change\","]
24027#[doc = " \"type\""]
24028#[doc = " ],"]
24029#[doc = " \"properties\": {"]
24030#[doc = " \"change\": {"]
24031#[doc = " \"type\": \"object\","]
24032#[doc = " \"required\": ["]
24033#[doc = " \"account_id\","]
24034#[doc = " \"public_key\""]
24035#[doc = " ],"]
24036#[doc = " \"properties\": {"]
24037#[doc = " \"account_id\": {"]
24038#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24039#[doc = " },"]
24040#[doc = " \"public_key\": {"]
24041#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24042#[doc = " }"]
24043#[doc = " }"]
24044#[doc = " },"]
24045#[doc = " \"type\": {"]
24046#[doc = " \"type\": \"string\","]
24047#[doc = " \"enum\": ["]
24048#[doc = " \"gas_key_deletion\""]
24049#[doc = " ]"]
24050#[doc = " }"]
24051#[doc = " }"]
24052#[doc = " },"]
24053#[doc = " {"]
24054#[doc = " \"type\": \"object\","]
24055#[doc = " \"required\": ["]
24056#[doc = " \"change\","]
24057#[doc = " \"type\""]
24058#[doc = " ],"]
24059#[doc = " \"properties\": {"]
24060#[doc = " \"change\": {"]
24061#[doc = " \"type\": \"object\","]
24062#[doc = " \"required\": ["]
24063#[doc = " \"account_id\","]
24064#[doc = " \"key_base64\","]
24065#[doc = " \"value_base64\""]
24066#[doc = " ],"]
24067#[doc = " \"properties\": {"]
24068#[doc = " \"account_id\": {"]
24069#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24070#[doc = " },"]
24071#[doc = " \"key_base64\": {"]
24072#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
24073#[doc = " },"]
24074#[doc = " \"value_base64\": {"]
24075#[doc = " \"$ref\": \"#/components/schemas/StoreValue\""]
24076#[doc = " }"]
24077#[doc = " }"]
24078#[doc = " },"]
24079#[doc = " \"type\": {"]
24080#[doc = " \"type\": \"string\","]
24081#[doc = " \"enum\": ["]
24082#[doc = " \"data_update\""]
24083#[doc = " ]"]
24084#[doc = " }"]
24085#[doc = " }"]
24086#[doc = " },"]
24087#[doc = " {"]
24088#[doc = " \"type\": \"object\","]
24089#[doc = " \"required\": ["]
24090#[doc = " \"change\","]
24091#[doc = " \"type\""]
24092#[doc = " ],"]
24093#[doc = " \"properties\": {"]
24094#[doc = " \"change\": {"]
24095#[doc = " \"type\": \"object\","]
24096#[doc = " \"required\": ["]
24097#[doc = " \"account_id\","]
24098#[doc = " \"key_base64\""]
24099#[doc = " ],"]
24100#[doc = " \"properties\": {"]
24101#[doc = " \"account_id\": {"]
24102#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24103#[doc = " },"]
24104#[doc = " \"key_base64\": {"]
24105#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
24106#[doc = " }"]
24107#[doc = " }"]
24108#[doc = " },"]
24109#[doc = " \"type\": {"]
24110#[doc = " \"type\": \"string\","]
24111#[doc = " \"enum\": ["]
24112#[doc = " \"data_deletion\""]
24113#[doc = " ]"]
24114#[doc = " }"]
24115#[doc = " }"]
24116#[doc = " },"]
24117#[doc = " {"]
24118#[doc = " \"type\": \"object\","]
24119#[doc = " \"required\": ["]
24120#[doc = " \"change\","]
24121#[doc = " \"type\""]
24122#[doc = " ],"]
24123#[doc = " \"properties\": {"]
24124#[doc = " \"change\": {"]
24125#[doc = " \"type\": \"object\","]
24126#[doc = " \"required\": ["]
24127#[doc = " \"account_id\","]
24128#[doc = " \"code_base64\""]
24129#[doc = " ],"]
24130#[doc = " \"properties\": {"]
24131#[doc = " \"account_id\": {"]
24132#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24133#[doc = " },"]
24134#[doc = " \"code_base64\": {"]
24135#[doc = " \"type\": \"string\""]
24136#[doc = " }"]
24137#[doc = " }"]
24138#[doc = " },"]
24139#[doc = " \"type\": {"]
24140#[doc = " \"type\": \"string\","]
24141#[doc = " \"enum\": ["]
24142#[doc = " \"contract_code_update\""]
24143#[doc = " ]"]
24144#[doc = " }"]
24145#[doc = " }"]
24146#[doc = " },"]
24147#[doc = " {"]
24148#[doc = " \"type\": \"object\","]
24149#[doc = " \"required\": ["]
24150#[doc = " \"change\","]
24151#[doc = " \"type\""]
24152#[doc = " ],"]
24153#[doc = " \"properties\": {"]
24154#[doc = " \"change\": {"]
24155#[doc = " \"type\": \"object\","]
24156#[doc = " \"required\": ["]
24157#[doc = " \"account_id\""]
24158#[doc = " ],"]
24159#[doc = " \"properties\": {"]
24160#[doc = " \"account_id\": {"]
24161#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24162#[doc = " }"]
24163#[doc = " }"]
24164#[doc = " },"]
24165#[doc = " \"type\": {"]
24166#[doc = " \"type\": \"string\","]
24167#[doc = " \"enum\": ["]
24168#[doc = " \"contract_code_deletion\""]
24169#[doc = " ]"]
24170#[doc = " }"]
24171#[doc = " }"]
24172#[doc = " }"]
24173#[doc = " ],"]
24174#[doc = " \"required\": ["]
24175#[doc = " \"cause\""]
24176#[doc = " ],"]
24177#[doc = " \"properties\": {"]
24178#[doc = " \"cause\": {"]
24179#[doc = " \"$ref\": \"#/components/schemas/StateChangeCauseView\""]
24180#[doc = " }"]
24181#[doc = " }"]
24182#[doc = "}"]
24183#[doc = r" ```"]
24184#[doc = r" </details>"]
24185#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24186#[serde(untagged)]
24187pub enum StateChangeWithCauseView {
24188 Variant0 {
24189 cause: StateChangeCauseView,
24190 change: StateChangeWithCauseViewVariant0Change,
24191 #[serde(rename = "type")]
24192 type_: StateChangeWithCauseViewVariant0Type,
24193 },
24194 Variant1 {
24195 cause: StateChangeCauseView,
24196 change: StateChangeWithCauseViewVariant1Change,
24197 #[serde(rename = "type")]
24198 type_: StateChangeWithCauseViewVariant1Type,
24199 },
24200 Variant2 {
24201 cause: StateChangeCauseView,
24202 change: StateChangeWithCauseViewVariant2Change,
24203 #[serde(rename = "type")]
24204 type_: StateChangeWithCauseViewVariant2Type,
24205 },
24206 Variant3 {
24207 cause: StateChangeCauseView,
24208 change: StateChangeWithCauseViewVariant3Change,
24209 #[serde(rename = "type")]
24210 type_: StateChangeWithCauseViewVariant3Type,
24211 },
24212 Variant4 {
24213 cause: StateChangeCauseView,
24214 change: StateChangeWithCauseViewVariant4Change,
24215 #[serde(rename = "type")]
24216 type_: StateChangeWithCauseViewVariant4Type,
24217 },
24218 Variant5 {
24219 cause: StateChangeCauseView,
24220 change: StateChangeWithCauseViewVariant5Change,
24221 #[serde(rename = "type")]
24222 type_: StateChangeWithCauseViewVariant5Type,
24223 },
24224 Variant6 {
24225 cause: StateChangeCauseView,
24226 change: StateChangeWithCauseViewVariant6Change,
24227 #[serde(rename = "type")]
24228 type_: StateChangeWithCauseViewVariant6Type,
24229 },
24230 Variant7 {
24231 cause: StateChangeCauseView,
24232 change: StateChangeWithCauseViewVariant7Change,
24233 #[serde(rename = "type")]
24234 type_: StateChangeWithCauseViewVariant7Type,
24235 },
24236 Variant8 {
24237 cause: StateChangeCauseView,
24238 change: StateChangeWithCauseViewVariant8Change,
24239 #[serde(rename = "type")]
24240 type_: StateChangeWithCauseViewVariant8Type,
24241 },
24242 Variant9 {
24243 cause: StateChangeCauseView,
24244 change: StateChangeWithCauseViewVariant9Change,
24245 #[serde(rename = "type")]
24246 type_: StateChangeWithCauseViewVariant9Type,
24247 },
24248 Variant10 {
24249 cause: StateChangeCauseView,
24250 change: StateChangeWithCauseViewVariant10Change,
24251 #[serde(rename = "type")]
24252 type_: StateChangeWithCauseViewVariant10Type,
24253 },
24254}
24255impl ::std::convert::From<&Self> for StateChangeWithCauseView {
24256 fn from(value: &StateChangeWithCauseView) -> Self {
24257 value.clone()
24258 }
24259}
24260#[doc = "A view of the account"]
24261#[doc = r""]
24262#[doc = r" <details><summary>JSON schema</summary>"]
24263#[doc = r""]
24264#[doc = r" ```json"]
24265#[doc = "{"]
24266#[doc = " \"description\": \"A view of the account\","]
24267#[doc = " \"type\": \"object\","]
24268#[doc = " \"required\": ["]
24269#[doc = " \"account_id\","]
24270#[doc = " \"amount\","]
24271#[doc = " \"code_hash\","]
24272#[doc = " \"locked\","]
24273#[doc = " \"storage_usage\""]
24274#[doc = " ],"]
24275#[doc = " \"properties\": {"]
24276#[doc = " \"access_key\": false,"]
24277#[doc = " \"account_id\": {"]
24278#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24279#[doc = " },"]
24280#[doc = " \"amount\": {"]
24281#[doc = " \"type\": \"string\""]
24282#[doc = " },"]
24283#[doc = " \"code_base64\": false,"]
24284#[doc = " \"code_hash\": {"]
24285#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
24286#[doc = " },"]
24287#[doc = " \"gas_key\": false,"]
24288#[doc = " \"global_contract_account_id\": {"]
24289#[doc = " \"anyOf\": ["]
24290#[doc = " {"]
24291#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24292#[doc = " },"]
24293#[doc = " {"]
24294#[doc = " \"type\": \"null\""]
24295#[doc = " }"]
24296#[doc = " ]"]
24297#[doc = " },"]
24298#[doc = " \"global_contract_hash\": {"]
24299#[doc = " \"anyOf\": ["]
24300#[doc = " {"]
24301#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
24302#[doc = " },"]
24303#[doc = " {"]
24304#[doc = " \"type\": \"null\""]
24305#[doc = " }"]
24306#[doc = " ]"]
24307#[doc = " },"]
24308#[doc = " \"index\": false,"]
24309#[doc = " \"key_base64\": false,"]
24310#[doc = " \"locked\": {"]
24311#[doc = " \"type\": \"string\""]
24312#[doc = " },"]
24313#[doc = " \"nonce\": false,"]
24314#[doc = " \"public_key\": false,"]
24315#[doc = " \"storage_paid_at\": {"]
24316#[doc = " \"description\": \"TODO(2271): deprecated.\","]
24317#[doc = " \"default\": 0,"]
24318#[doc = " \"type\": \"integer\","]
24319#[doc = " \"format\": \"uint64\","]
24320#[doc = " \"minimum\": 0.0"]
24321#[doc = " },"]
24322#[doc = " \"storage_usage\": {"]
24323#[doc = " \"type\": \"integer\","]
24324#[doc = " \"format\": \"uint64\","]
24325#[doc = " \"minimum\": 0.0"]
24326#[doc = " },"]
24327#[doc = " \"value_base64\": false"]
24328#[doc = " }"]
24329#[doc = "}"]
24330#[doc = r" ```"]
24331#[doc = r" </details>"]
24332#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24333pub struct StateChangeWithCauseViewVariant0Change {
24334 pub account_id: AccountId,
24335 pub amount: ::std::string::String,
24336 pub code_hash: CryptoHash,
24337 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24338 pub global_contract_account_id: ::std::option::Option<AccountId>,
24339 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24340 pub global_contract_hash: ::std::option::Option<CryptoHash>,
24341 pub locked: ::std::string::String,
24342 #[doc = "TODO(2271): deprecated."]
24343 #[serde(default)]
24344 pub storage_paid_at: u64,
24345 pub storage_usage: u64,
24346}
24347impl ::std::convert::From<&StateChangeWithCauseViewVariant0Change>
24348 for StateChangeWithCauseViewVariant0Change
24349{
24350 fn from(value: &StateChangeWithCauseViewVariant0Change) -> Self {
24351 value.clone()
24352 }
24353}
24354#[doc = "`StateChangeWithCauseViewVariant0Type`"]
24355#[doc = r""]
24356#[doc = r" <details><summary>JSON schema</summary>"]
24357#[doc = r""]
24358#[doc = r" ```json"]
24359#[doc = "{"]
24360#[doc = " \"type\": \"string\","]
24361#[doc = " \"enum\": ["]
24362#[doc = " \"account_update\""]
24363#[doc = " ]"]
24364#[doc = "}"]
24365#[doc = r" ```"]
24366#[doc = r" </details>"]
24367#[derive(
24368 :: serde :: Deserialize,
24369 :: serde :: Serialize,
24370 Clone,
24371 Copy,
24372 Debug,
24373 Eq,
24374 Hash,
24375 Ord,
24376 PartialEq,
24377 PartialOrd,
24378)]
24379pub enum StateChangeWithCauseViewVariant0Type {
24380 #[serde(rename = "account_update")]
24381 AccountUpdate,
24382}
24383impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant0Type {
24384 fn from(value: &StateChangeWithCauseViewVariant0Type) -> Self {
24385 value.clone()
24386 }
24387}
24388impl ::std::fmt::Display for StateChangeWithCauseViewVariant0Type {
24389 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24390 match *self {
24391 Self::AccountUpdate => write!(f, "account_update"),
24392 }
24393 }
24394}
24395impl ::std::str::FromStr for StateChangeWithCauseViewVariant0Type {
24396 type Err = self::error::ConversionError;
24397 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24398 match value {
24399 "account_update" => Ok(Self::AccountUpdate),
24400 _ => Err("invalid value".into()),
24401 }
24402 }
24403}
24404impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant0Type {
24405 type Error = self::error::ConversionError;
24406 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24407 value.parse()
24408 }
24409}
24410impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant0Type {
24411 type Error = self::error::ConversionError;
24412 fn try_from(
24413 value: &::std::string::String,
24414 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24415 value.parse()
24416 }
24417}
24418impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant0Type {
24419 type Error = self::error::ConversionError;
24420 fn try_from(
24421 value: ::std::string::String,
24422 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24423 value.parse()
24424 }
24425}
24426#[doc = "`StateChangeWithCauseViewVariant10Change`"]
24427#[doc = r""]
24428#[doc = r" <details><summary>JSON schema</summary>"]
24429#[doc = r""]
24430#[doc = r" ```json"]
24431#[doc = "{"]
24432#[doc = " \"type\": \"object\","]
24433#[doc = " \"required\": ["]
24434#[doc = " \"account_id\""]
24435#[doc = " ],"]
24436#[doc = " \"properties\": {"]
24437#[doc = " \"access_key\": false,"]
24438#[doc = " \"account_id\": {"]
24439#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24440#[doc = " },"]
24441#[doc = " \"amount\": false,"]
24442#[doc = " \"code_base64\": false,"]
24443#[doc = " \"code_hash\": false,"]
24444#[doc = " \"gas_key\": false,"]
24445#[doc = " \"global_contract_account_id\": false,"]
24446#[doc = " \"global_contract_hash\": false,"]
24447#[doc = " \"index\": false,"]
24448#[doc = " \"key_base64\": false,"]
24449#[doc = " \"locked\": false,"]
24450#[doc = " \"nonce\": false,"]
24451#[doc = " \"public_key\": false,"]
24452#[doc = " \"storage_paid_at\": false,"]
24453#[doc = " \"storage_usage\": false,"]
24454#[doc = " \"value_base64\": false"]
24455#[doc = " }"]
24456#[doc = "}"]
24457#[doc = r" ```"]
24458#[doc = r" </details>"]
24459#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24460pub struct StateChangeWithCauseViewVariant10Change {
24461 pub account_id: AccountId,
24462}
24463impl ::std::convert::From<&StateChangeWithCauseViewVariant10Change>
24464 for StateChangeWithCauseViewVariant10Change
24465{
24466 fn from(value: &StateChangeWithCauseViewVariant10Change) -> Self {
24467 value.clone()
24468 }
24469}
24470#[doc = "`StateChangeWithCauseViewVariant10Type`"]
24471#[doc = r""]
24472#[doc = r" <details><summary>JSON schema</summary>"]
24473#[doc = r""]
24474#[doc = r" ```json"]
24475#[doc = "{"]
24476#[doc = " \"type\": \"string\","]
24477#[doc = " \"enum\": ["]
24478#[doc = " \"contract_code_deletion\""]
24479#[doc = " ]"]
24480#[doc = "}"]
24481#[doc = r" ```"]
24482#[doc = r" </details>"]
24483#[derive(
24484 :: serde :: Deserialize,
24485 :: serde :: Serialize,
24486 Clone,
24487 Copy,
24488 Debug,
24489 Eq,
24490 Hash,
24491 Ord,
24492 PartialEq,
24493 PartialOrd,
24494)]
24495pub enum StateChangeWithCauseViewVariant10Type {
24496 #[serde(rename = "contract_code_deletion")]
24497 ContractCodeDeletion,
24498}
24499impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant10Type {
24500 fn from(value: &StateChangeWithCauseViewVariant10Type) -> Self {
24501 value.clone()
24502 }
24503}
24504impl ::std::fmt::Display for StateChangeWithCauseViewVariant10Type {
24505 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24506 match *self {
24507 Self::ContractCodeDeletion => write!(f, "contract_code_deletion"),
24508 }
24509 }
24510}
24511impl ::std::str::FromStr for StateChangeWithCauseViewVariant10Type {
24512 type Err = self::error::ConversionError;
24513 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24514 match value {
24515 "contract_code_deletion" => Ok(Self::ContractCodeDeletion),
24516 _ => Err("invalid value".into()),
24517 }
24518 }
24519}
24520impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant10Type {
24521 type Error = self::error::ConversionError;
24522 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24523 value.parse()
24524 }
24525}
24526impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant10Type {
24527 type Error = self::error::ConversionError;
24528 fn try_from(
24529 value: &::std::string::String,
24530 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24531 value.parse()
24532 }
24533}
24534impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant10Type {
24535 type Error = self::error::ConversionError;
24536 fn try_from(
24537 value: ::std::string::String,
24538 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24539 value.parse()
24540 }
24541}
24542#[doc = "`StateChangeWithCauseViewVariant1Change`"]
24543#[doc = r""]
24544#[doc = r" <details><summary>JSON schema</summary>"]
24545#[doc = r""]
24546#[doc = r" ```json"]
24547#[doc = "{"]
24548#[doc = " \"type\": \"object\","]
24549#[doc = " \"required\": ["]
24550#[doc = " \"account_id\""]
24551#[doc = " ],"]
24552#[doc = " \"properties\": {"]
24553#[doc = " \"access_key\": false,"]
24554#[doc = " \"account_id\": {"]
24555#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24556#[doc = " },"]
24557#[doc = " \"amount\": false,"]
24558#[doc = " \"code_base64\": false,"]
24559#[doc = " \"code_hash\": false,"]
24560#[doc = " \"gas_key\": false,"]
24561#[doc = " \"global_contract_account_id\": false,"]
24562#[doc = " \"global_contract_hash\": false,"]
24563#[doc = " \"index\": false,"]
24564#[doc = " \"key_base64\": false,"]
24565#[doc = " \"locked\": false,"]
24566#[doc = " \"nonce\": false,"]
24567#[doc = " \"public_key\": false,"]
24568#[doc = " \"storage_paid_at\": false,"]
24569#[doc = " \"storage_usage\": false,"]
24570#[doc = " \"value_base64\": false"]
24571#[doc = " }"]
24572#[doc = "}"]
24573#[doc = r" ```"]
24574#[doc = r" </details>"]
24575#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24576pub struct StateChangeWithCauseViewVariant1Change {
24577 pub account_id: AccountId,
24578}
24579impl ::std::convert::From<&StateChangeWithCauseViewVariant1Change>
24580 for StateChangeWithCauseViewVariant1Change
24581{
24582 fn from(value: &StateChangeWithCauseViewVariant1Change) -> Self {
24583 value.clone()
24584 }
24585}
24586#[doc = "`StateChangeWithCauseViewVariant1Type`"]
24587#[doc = r""]
24588#[doc = r" <details><summary>JSON schema</summary>"]
24589#[doc = r""]
24590#[doc = r" ```json"]
24591#[doc = "{"]
24592#[doc = " \"type\": \"string\","]
24593#[doc = " \"enum\": ["]
24594#[doc = " \"account_deletion\""]
24595#[doc = " ]"]
24596#[doc = "}"]
24597#[doc = r" ```"]
24598#[doc = r" </details>"]
24599#[derive(
24600 :: serde :: Deserialize,
24601 :: serde :: Serialize,
24602 Clone,
24603 Copy,
24604 Debug,
24605 Eq,
24606 Hash,
24607 Ord,
24608 PartialEq,
24609 PartialOrd,
24610)]
24611pub enum StateChangeWithCauseViewVariant1Type {
24612 #[serde(rename = "account_deletion")]
24613 AccountDeletion,
24614}
24615impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant1Type {
24616 fn from(value: &StateChangeWithCauseViewVariant1Type) -> Self {
24617 value.clone()
24618 }
24619}
24620impl ::std::fmt::Display for StateChangeWithCauseViewVariant1Type {
24621 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24622 match *self {
24623 Self::AccountDeletion => write!(f, "account_deletion"),
24624 }
24625 }
24626}
24627impl ::std::str::FromStr for StateChangeWithCauseViewVariant1Type {
24628 type Err = self::error::ConversionError;
24629 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24630 match value {
24631 "account_deletion" => Ok(Self::AccountDeletion),
24632 _ => Err("invalid value".into()),
24633 }
24634 }
24635}
24636impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant1Type {
24637 type Error = self::error::ConversionError;
24638 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24639 value.parse()
24640 }
24641}
24642impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant1Type {
24643 type Error = self::error::ConversionError;
24644 fn try_from(
24645 value: &::std::string::String,
24646 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24647 value.parse()
24648 }
24649}
24650impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant1Type {
24651 type Error = self::error::ConversionError;
24652 fn try_from(
24653 value: ::std::string::String,
24654 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24655 value.parse()
24656 }
24657}
24658#[doc = "`StateChangeWithCauseViewVariant2Change`"]
24659#[doc = r""]
24660#[doc = r" <details><summary>JSON schema</summary>"]
24661#[doc = r""]
24662#[doc = r" ```json"]
24663#[doc = "{"]
24664#[doc = " \"type\": \"object\","]
24665#[doc = " \"required\": ["]
24666#[doc = " \"access_key\","]
24667#[doc = " \"account_id\","]
24668#[doc = " \"public_key\""]
24669#[doc = " ],"]
24670#[doc = " \"properties\": {"]
24671#[doc = " \"access_key\": {"]
24672#[doc = " \"$ref\": \"#/components/schemas/AccessKeyView\""]
24673#[doc = " },"]
24674#[doc = " \"account_id\": {"]
24675#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24676#[doc = " },"]
24677#[doc = " \"amount\": false,"]
24678#[doc = " \"code_base64\": false,"]
24679#[doc = " \"code_hash\": false,"]
24680#[doc = " \"gas_key\": false,"]
24681#[doc = " \"global_contract_account_id\": false,"]
24682#[doc = " \"global_contract_hash\": false,"]
24683#[doc = " \"index\": false,"]
24684#[doc = " \"key_base64\": false,"]
24685#[doc = " \"locked\": false,"]
24686#[doc = " \"nonce\": false,"]
24687#[doc = " \"public_key\": {"]
24688#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24689#[doc = " },"]
24690#[doc = " \"storage_paid_at\": false,"]
24691#[doc = " \"storage_usage\": false,"]
24692#[doc = " \"value_base64\": false"]
24693#[doc = " }"]
24694#[doc = "}"]
24695#[doc = r" ```"]
24696#[doc = r" </details>"]
24697#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24698pub struct StateChangeWithCauseViewVariant2Change {
24699 pub access_key: AccessKeyView,
24700 pub account_id: AccountId,
24701 pub public_key: PublicKey,
24702}
24703impl ::std::convert::From<&StateChangeWithCauseViewVariant2Change>
24704 for StateChangeWithCauseViewVariant2Change
24705{
24706 fn from(value: &StateChangeWithCauseViewVariant2Change) -> Self {
24707 value.clone()
24708 }
24709}
24710#[doc = "`StateChangeWithCauseViewVariant2Type`"]
24711#[doc = r""]
24712#[doc = r" <details><summary>JSON schema</summary>"]
24713#[doc = r""]
24714#[doc = r" ```json"]
24715#[doc = "{"]
24716#[doc = " \"type\": \"string\","]
24717#[doc = " \"enum\": ["]
24718#[doc = " \"access_key_update\""]
24719#[doc = " ]"]
24720#[doc = "}"]
24721#[doc = r" ```"]
24722#[doc = r" </details>"]
24723#[derive(
24724 :: serde :: Deserialize,
24725 :: serde :: Serialize,
24726 Clone,
24727 Copy,
24728 Debug,
24729 Eq,
24730 Hash,
24731 Ord,
24732 PartialEq,
24733 PartialOrd,
24734)]
24735pub enum StateChangeWithCauseViewVariant2Type {
24736 #[serde(rename = "access_key_update")]
24737 AccessKeyUpdate,
24738}
24739impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant2Type {
24740 fn from(value: &StateChangeWithCauseViewVariant2Type) -> Self {
24741 value.clone()
24742 }
24743}
24744impl ::std::fmt::Display for StateChangeWithCauseViewVariant2Type {
24745 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24746 match *self {
24747 Self::AccessKeyUpdate => write!(f, "access_key_update"),
24748 }
24749 }
24750}
24751impl ::std::str::FromStr for StateChangeWithCauseViewVariant2Type {
24752 type Err = self::error::ConversionError;
24753 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24754 match value {
24755 "access_key_update" => Ok(Self::AccessKeyUpdate),
24756 _ => Err("invalid value".into()),
24757 }
24758 }
24759}
24760impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant2Type {
24761 type Error = self::error::ConversionError;
24762 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24763 value.parse()
24764 }
24765}
24766impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant2Type {
24767 type Error = self::error::ConversionError;
24768 fn try_from(
24769 value: &::std::string::String,
24770 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24771 value.parse()
24772 }
24773}
24774impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant2Type {
24775 type Error = self::error::ConversionError;
24776 fn try_from(
24777 value: ::std::string::String,
24778 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24779 value.parse()
24780 }
24781}
24782#[doc = "`StateChangeWithCauseViewVariant3Change`"]
24783#[doc = r""]
24784#[doc = r" <details><summary>JSON schema</summary>"]
24785#[doc = r""]
24786#[doc = r" ```json"]
24787#[doc = "{"]
24788#[doc = " \"type\": \"object\","]
24789#[doc = " \"required\": ["]
24790#[doc = " \"account_id\","]
24791#[doc = " \"public_key\""]
24792#[doc = " ],"]
24793#[doc = " \"properties\": {"]
24794#[doc = " \"access_key\": false,"]
24795#[doc = " \"account_id\": {"]
24796#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24797#[doc = " },"]
24798#[doc = " \"amount\": false,"]
24799#[doc = " \"code_base64\": false,"]
24800#[doc = " \"code_hash\": false,"]
24801#[doc = " \"gas_key\": false,"]
24802#[doc = " \"global_contract_account_id\": false,"]
24803#[doc = " \"global_contract_hash\": false,"]
24804#[doc = " \"index\": false,"]
24805#[doc = " \"key_base64\": false,"]
24806#[doc = " \"locked\": false,"]
24807#[doc = " \"nonce\": false,"]
24808#[doc = " \"public_key\": {"]
24809#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24810#[doc = " },"]
24811#[doc = " \"storage_paid_at\": false,"]
24812#[doc = " \"storage_usage\": false,"]
24813#[doc = " \"value_base64\": false"]
24814#[doc = " }"]
24815#[doc = "}"]
24816#[doc = r" ```"]
24817#[doc = r" </details>"]
24818#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24819pub struct StateChangeWithCauseViewVariant3Change {
24820 pub account_id: AccountId,
24821 pub public_key: PublicKey,
24822}
24823impl ::std::convert::From<&StateChangeWithCauseViewVariant3Change>
24824 for StateChangeWithCauseViewVariant3Change
24825{
24826 fn from(value: &StateChangeWithCauseViewVariant3Change) -> Self {
24827 value.clone()
24828 }
24829}
24830#[doc = "`StateChangeWithCauseViewVariant3Type`"]
24831#[doc = r""]
24832#[doc = r" <details><summary>JSON schema</summary>"]
24833#[doc = r""]
24834#[doc = r" ```json"]
24835#[doc = "{"]
24836#[doc = " \"type\": \"string\","]
24837#[doc = " \"enum\": ["]
24838#[doc = " \"access_key_deletion\""]
24839#[doc = " ]"]
24840#[doc = "}"]
24841#[doc = r" ```"]
24842#[doc = r" </details>"]
24843#[derive(
24844 :: serde :: Deserialize,
24845 :: serde :: Serialize,
24846 Clone,
24847 Copy,
24848 Debug,
24849 Eq,
24850 Hash,
24851 Ord,
24852 PartialEq,
24853 PartialOrd,
24854)]
24855pub enum StateChangeWithCauseViewVariant3Type {
24856 #[serde(rename = "access_key_deletion")]
24857 AccessKeyDeletion,
24858}
24859impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant3Type {
24860 fn from(value: &StateChangeWithCauseViewVariant3Type) -> Self {
24861 value.clone()
24862 }
24863}
24864impl ::std::fmt::Display for StateChangeWithCauseViewVariant3Type {
24865 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24866 match *self {
24867 Self::AccessKeyDeletion => write!(f, "access_key_deletion"),
24868 }
24869 }
24870}
24871impl ::std::str::FromStr for StateChangeWithCauseViewVariant3Type {
24872 type Err = self::error::ConversionError;
24873 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24874 match value {
24875 "access_key_deletion" => Ok(Self::AccessKeyDeletion),
24876 _ => Err("invalid value".into()),
24877 }
24878 }
24879}
24880impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant3Type {
24881 type Error = self::error::ConversionError;
24882 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24883 value.parse()
24884 }
24885}
24886impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant3Type {
24887 type Error = self::error::ConversionError;
24888 fn try_from(
24889 value: &::std::string::String,
24890 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24891 value.parse()
24892 }
24893}
24894impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant3Type {
24895 type Error = self::error::ConversionError;
24896 fn try_from(
24897 value: ::std::string::String,
24898 ) -> ::std::result::Result<Self, self::error::ConversionError> {
24899 value.parse()
24900 }
24901}
24902#[doc = "`StateChangeWithCauseViewVariant4Change`"]
24903#[doc = r""]
24904#[doc = r" <details><summary>JSON schema</summary>"]
24905#[doc = r""]
24906#[doc = r" ```json"]
24907#[doc = "{"]
24908#[doc = " \"type\": \"object\","]
24909#[doc = " \"required\": ["]
24910#[doc = " \"account_id\","]
24911#[doc = " \"gas_key\","]
24912#[doc = " \"public_key\""]
24913#[doc = " ],"]
24914#[doc = " \"properties\": {"]
24915#[doc = " \"access_key\": false,"]
24916#[doc = " \"account_id\": {"]
24917#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
24918#[doc = " },"]
24919#[doc = " \"amount\": false,"]
24920#[doc = " \"code_base64\": false,"]
24921#[doc = " \"code_hash\": false,"]
24922#[doc = " \"gas_key\": {"]
24923#[doc = " \"$ref\": \"#/components/schemas/GasKeyView\""]
24924#[doc = " },"]
24925#[doc = " \"global_contract_account_id\": false,"]
24926#[doc = " \"global_contract_hash\": false,"]
24927#[doc = " \"index\": false,"]
24928#[doc = " \"key_base64\": false,"]
24929#[doc = " \"locked\": false,"]
24930#[doc = " \"nonce\": false,"]
24931#[doc = " \"public_key\": {"]
24932#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
24933#[doc = " },"]
24934#[doc = " \"storage_paid_at\": false,"]
24935#[doc = " \"storage_usage\": false,"]
24936#[doc = " \"value_base64\": false"]
24937#[doc = " }"]
24938#[doc = "}"]
24939#[doc = r" ```"]
24940#[doc = r" </details>"]
24941#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
24942pub struct StateChangeWithCauseViewVariant4Change {
24943 pub account_id: AccountId,
24944 pub gas_key: GasKeyView,
24945 pub public_key: PublicKey,
24946}
24947impl ::std::convert::From<&StateChangeWithCauseViewVariant4Change>
24948 for StateChangeWithCauseViewVariant4Change
24949{
24950 fn from(value: &StateChangeWithCauseViewVariant4Change) -> Self {
24951 value.clone()
24952 }
24953}
24954#[doc = "`StateChangeWithCauseViewVariant4Type`"]
24955#[doc = r""]
24956#[doc = r" <details><summary>JSON schema</summary>"]
24957#[doc = r""]
24958#[doc = r" ```json"]
24959#[doc = "{"]
24960#[doc = " \"type\": \"string\","]
24961#[doc = " \"enum\": ["]
24962#[doc = " \"gas_key_update\""]
24963#[doc = " ]"]
24964#[doc = "}"]
24965#[doc = r" ```"]
24966#[doc = r" </details>"]
24967#[derive(
24968 :: serde :: Deserialize,
24969 :: serde :: Serialize,
24970 Clone,
24971 Copy,
24972 Debug,
24973 Eq,
24974 Hash,
24975 Ord,
24976 PartialEq,
24977 PartialOrd,
24978)]
24979pub enum StateChangeWithCauseViewVariant4Type {
24980 #[serde(rename = "gas_key_update")]
24981 GasKeyUpdate,
24982}
24983impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant4Type {
24984 fn from(value: &StateChangeWithCauseViewVariant4Type) -> Self {
24985 value.clone()
24986 }
24987}
24988impl ::std::fmt::Display for StateChangeWithCauseViewVariant4Type {
24989 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24990 match *self {
24991 Self::GasKeyUpdate => write!(f, "gas_key_update"),
24992 }
24993 }
24994}
24995impl ::std::str::FromStr for StateChangeWithCauseViewVariant4Type {
24996 type Err = self::error::ConversionError;
24997 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24998 match value {
24999 "gas_key_update" => Ok(Self::GasKeyUpdate),
25000 _ => Err("invalid value".into()),
25001 }
25002 }
25003}
25004impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant4Type {
25005 type Error = self::error::ConversionError;
25006 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25007 value.parse()
25008 }
25009}
25010impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant4Type {
25011 type Error = self::error::ConversionError;
25012 fn try_from(
25013 value: &::std::string::String,
25014 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25015 value.parse()
25016 }
25017}
25018impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant4Type {
25019 type Error = self::error::ConversionError;
25020 fn try_from(
25021 value: ::std::string::String,
25022 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25023 value.parse()
25024 }
25025}
25026#[doc = "`StateChangeWithCauseViewVariant5Change`"]
25027#[doc = r""]
25028#[doc = r" <details><summary>JSON schema</summary>"]
25029#[doc = r""]
25030#[doc = r" ```json"]
25031#[doc = "{"]
25032#[doc = " \"type\": \"object\","]
25033#[doc = " \"required\": ["]
25034#[doc = " \"account_id\","]
25035#[doc = " \"index\","]
25036#[doc = " \"nonce\","]
25037#[doc = " \"public_key\""]
25038#[doc = " ],"]
25039#[doc = " \"properties\": {"]
25040#[doc = " \"access_key\": false,"]
25041#[doc = " \"account_id\": {"]
25042#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25043#[doc = " },"]
25044#[doc = " \"amount\": false,"]
25045#[doc = " \"code_base64\": false,"]
25046#[doc = " \"code_hash\": false,"]
25047#[doc = " \"gas_key\": false,"]
25048#[doc = " \"global_contract_account_id\": false,"]
25049#[doc = " \"global_contract_hash\": false,"]
25050#[doc = " \"index\": {"]
25051#[doc = " \"type\": \"integer\","]
25052#[doc = " \"format\": \"uint32\","]
25053#[doc = " \"minimum\": 0.0"]
25054#[doc = " },"]
25055#[doc = " \"key_base64\": false,"]
25056#[doc = " \"locked\": false,"]
25057#[doc = " \"nonce\": {"]
25058#[doc = " \"type\": \"integer\","]
25059#[doc = " \"format\": \"uint64\","]
25060#[doc = " \"minimum\": 0.0"]
25061#[doc = " },"]
25062#[doc = " \"public_key\": {"]
25063#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
25064#[doc = " },"]
25065#[doc = " \"storage_paid_at\": false,"]
25066#[doc = " \"storage_usage\": false,"]
25067#[doc = " \"value_base64\": false"]
25068#[doc = " }"]
25069#[doc = "}"]
25070#[doc = r" ```"]
25071#[doc = r" </details>"]
25072#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25073pub struct StateChangeWithCauseViewVariant5Change {
25074 pub account_id: AccountId,
25075 pub index: u32,
25076 pub nonce: u64,
25077 pub public_key: PublicKey,
25078}
25079impl ::std::convert::From<&StateChangeWithCauseViewVariant5Change>
25080 for StateChangeWithCauseViewVariant5Change
25081{
25082 fn from(value: &StateChangeWithCauseViewVariant5Change) -> Self {
25083 value.clone()
25084 }
25085}
25086#[doc = "`StateChangeWithCauseViewVariant5Type`"]
25087#[doc = r""]
25088#[doc = r" <details><summary>JSON schema</summary>"]
25089#[doc = r""]
25090#[doc = r" ```json"]
25091#[doc = "{"]
25092#[doc = " \"type\": \"string\","]
25093#[doc = " \"enum\": ["]
25094#[doc = " \"gas_key_nonce_update\""]
25095#[doc = " ]"]
25096#[doc = "}"]
25097#[doc = r" ```"]
25098#[doc = r" </details>"]
25099#[derive(
25100 :: serde :: Deserialize,
25101 :: serde :: Serialize,
25102 Clone,
25103 Copy,
25104 Debug,
25105 Eq,
25106 Hash,
25107 Ord,
25108 PartialEq,
25109 PartialOrd,
25110)]
25111pub enum StateChangeWithCauseViewVariant5Type {
25112 #[serde(rename = "gas_key_nonce_update")]
25113 GasKeyNonceUpdate,
25114}
25115impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant5Type {
25116 fn from(value: &StateChangeWithCauseViewVariant5Type) -> Self {
25117 value.clone()
25118 }
25119}
25120impl ::std::fmt::Display for StateChangeWithCauseViewVariant5Type {
25121 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25122 match *self {
25123 Self::GasKeyNonceUpdate => write!(f, "gas_key_nonce_update"),
25124 }
25125 }
25126}
25127impl ::std::str::FromStr for StateChangeWithCauseViewVariant5Type {
25128 type Err = self::error::ConversionError;
25129 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25130 match value {
25131 "gas_key_nonce_update" => Ok(Self::GasKeyNonceUpdate),
25132 _ => Err("invalid value".into()),
25133 }
25134 }
25135}
25136impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant5Type {
25137 type Error = self::error::ConversionError;
25138 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25139 value.parse()
25140 }
25141}
25142impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant5Type {
25143 type Error = self::error::ConversionError;
25144 fn try_from(
25145 value: &::std::string::String,
25146 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25147 value.parse()
25148 }
25149}
25150impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant5Type {
25151 type Error = self::error::ConversionError;
25152 fn try_from(
25153 value: ::std::string::String,
25154 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25155 value.parse()
25156 }
25157}
25158#[doc = "`StateChangeWithCauseViewVariant6Change`"]
25159#[doc = r""]
25160#[doc = r" <details><summary>JSON schema</summary>"]
25161#[doc = r""]
25162#[doc = r" ```json"]
25163#[doc = "{"]
25164#[doc = " \"type\": \"object\","]
25165#[doc = " \"required\": ["]
25166#[doc = " \"account_id\","]
25167#[doc = " \"public_key\""]
25168#[doc = " ],"]
25169#[doc = " \"properties\": {"]
25170#[doc = " \"access_key\": false,"]
25171#[doc = " \"account_id\": {"]
25172#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25173#[doc = " },"]
25174#[doc = " \"amount\": false,"]
25175#[doc = " \"code_base64\": false,"]
25176#[doc = " \"code_hash\": false,"]
25177#[doc = " \"gas_key\": false,"]
25178#[doc = " \"global_contract_account_id\": false,"]
25179#[doc = " \"global_contract_hash\": false,"]
25180#[doc = " \"index\": false,"]
25181#[doc = " \"key_base64\": false,"]
25182#[doc = " \"locked\": false,"]
25183#[doc = " \"nonce\": false,"]
25184#[doc = " \"public_key\": {"]
25185#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
25186#[doc = " },"]
25187#[doc = " \"storage_paid_at\": false,"]
25188#[doc = " \"storage_usage\": false,"]
25189#[doc = " \"value_base64\": false"]
25190#[doc = " }"]
25191#[doc = "}"]
25192#[doc = r" ```"]
25193#[doc = r" </details>"]
25194#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25195pub struct StateChangeWithCauseViewVariant6Change {
25196 pub account_id: AccountId,
25197 pub public_key: PublicKey,
25198}
25199impl ::std::convert::From<&StateChangeWithCauseViewVariant6Change>
25200 for StateChangeWithCauseViewVariant6Change
25201{
25202 fn from(value: &StateChangeWithCauseViewVariant6Change) -> Self {
25203 value.clone()
25204 }
25205}
25206#[doc = "`StateChangeWithCauseViewVariant6Type`"]
25207#[doc = r""]
25208#[doc = r" <details><summary>JSON schema</summary>"]
25209#[doc = r""]
25210#[doc = r" ```json"]
25211#[doc = "{"]
25212#[doc = " \"type\": \"string\","]
25213#[doc = " \"enum\": ["]
25214#[doc = " \"gas_key_deletion\""]
25215#[doc = " ]"]
25216#[doc = "}"]
25217#[doc = r" ```"]
25218#[doc = r" </details>"]
25219#[derive(
25220 :: serde :: Deserialize,
25221 :: serde :: Serialize,
25222 Clone,
25223 Copy,
25224 Debug,
25225 Eq,
25226 Hash,
25227 Ord,
25228 PartialEq,
25229 PartialOrd,
25230)]
25231pub enum StateChangeWithCauseViewVariant6Type {
25232 #[serde(rename = "gas_key_deletion")]
25233 GasKeyDeletion,
25234}
25235impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant6Type {
25236 fn from(value: &StateChangeWithCauseViewVariant6Type) -> Self {
25237 value.clone()
25238 }
25239}
25240impl ::std::fmt::Display for StateChangeWithCauseViewVariant6Type {
25241 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25242 match *self {
25243 Self::GasKeyDeletion => write!(f, "gas_key_deletion"),
25244 }
25245 }
25246}
25247impl ::std::str::FromStr for StateChangeWithCauseViewVariant6Type {
25248 type Err = self::error::ConversionError;
25249 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25250 match value {
25251 "gas_key_deletion" => Ok(Self::GasKeyDeletion),
25252 _ => Err("invalid value".into()),
25253 }
25254 }
25255}
25256impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant6Type {
25257 type Error = self::error::ConversionError;
25258 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25259 value.parse()
25260 }
25261}
25262impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant6Type {
25263 type Error = self::error::ConversionError;
25264 fn try_from(
25265 value: &::std::string::String,
25266 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25267 value.parse()
25268 }
25269}
25270impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant6Type {
25271 type Error = self::error::ConversionError;
25272 fn try_from(
25273 value: ::std::string::String,
25274 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25275 value.parse()
25276 }
25277}
25278#[doc = "`StateChangeWithCauseViewVariant7Change`"]
25279#[doc = r""]
25280#[doc = r" <details><summary>JSON schema</summary>"]
25281#[doc = r""]
25282#[doc = r" ```json"]
25283#[doc = "{"]
25284#[doc = " \"type\": \"object\","]
25285#[doc = " \"required\": ["]
25286#[doc = " \"account_id\","]
25287#[doc = " \"key_base64\","]
25288#[doc = " \"value_base64\""]
25289#[doc = " ],"]
25290#[doc = " \"properties\": {"]
25291#[doc = " \"access_key\": false,"]
25292#[doc = " \"account_id\": {"]
25293#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25294#[doc = " },"]
25295#[doc = " \"amount\": false,"]
25296#[doc = " \"code_base64\": false,"]
25297#[doc = " \"code_hash\": false,"]
25298#[doc = " \"gas_key\": false,"]
25299#[doc = " \"global_contract_account_id\": false,"]
25300#[doc = " \"global_contract_hash\": false,"]
25301#[doc = " \"index\": false,"]
25302#[doc = " \"key_base64\": {"]
25303#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
25304#[doc = " },"]
25305#[doc = " \"locked\": false,"]
25306#[doc = " \"nonce\": false,"]
25307#[doc = " \"public_key\": false,"]
25308#[doc = " \"storage_paid_at\": false,"]
25309#[doc = " \"storage_usage\": false,"]
25310#[doc = " \"value_base64\": {"]
25311#[doc = " \"$ref\": \"#/components/schemas/StoreValue\""]
25312#[doc = " }"]
25313#[doc = " }"]
25314#[doc = "}"]
25315#[doc = r" ```"]
25316#[doc = r" </details>"]
25317#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25318pub struct StateChangeWithCauseViewVariant7Change {
25319 pub account_id: AccountId,
25320 pub key_base64: StoreKey,
25321 pub value_base64: StoreValue,
25322}
25323impl ::std::convert::From<&StateChangeWithCauseViewVariant7Change>
25324 for StateChangeWithCauseViewVariant7Change
25325{
25326 fn from(value: &StateChangeWithCauseViewVariant7Change) -> Self {
25327 value.clone()
25328 }
25329}
25330#[doc = "`StateChangeWithCauseViewVariant7Type`"]
25331#[doc = r""]
25332#[doc = r" <details><summary>JSON schema</summary>"]
25333#[doc = r""]
25334#[doc = r" ```json"]
25335#[doc = "{"]
25336#[doc = " \"type\": \"string\","]
25337#[doc = " \"enum\": ["]
25338#[doc = " \"data_update\""]
25339#[doc = " ]"]
25340#[doc = "}"]
25341#[doc = r" ```"]
25342#[doc = r" </details>"]
25343#[derive(
25344 :: serde :: Deserialize,
25345 :: serde :: Serialize,
25346 Clone,
25347 Copy,
25348 Debug,
25349 Eq,
25350 Hash,
25351 Ord,
25352 PartialEq,
25353 PartialOrd,
25354)]
25355pub enum StateChangeWithCauseViewVariant7Type {
25356 #[serde(rename = "data_update")]
25357 DataUpdate,
25358}
25359impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant7Type {
25360 fn from(value: &StateChangeWithCauseViewVariant7Type) -> Self {
25361 value.clone()
25362 }
25363}
25364impl ::std::fmt::Display for StateChangeWithCauseViewVariant7Type {
25365 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25366 match *self {
25367 Self::DataUpdate => write!(f, "data_update"),
25368 }
25369 }
25370}
25371impl ::std::str::FromStr for StateChangeWithCauseViewVariant7Type {
25372 type Err = self::error::ConversionError;
25373 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25374 match value {
25375 "data_update" => Ok(Self::DataUpdate),
25376 _ => Err("invalid value".into()),
25377 }
25378 }
25379}
25380impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant7Type {
25381 type Error = self::error::ConversionError;
25382 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25383 value.parse()
25384 }
25385}
25386impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant7Type {
25387 type Error = self::error::ConversionError;
25388 fn try_from(
25389 value: &::std::string::String,
25390 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25391 value.parse()
25392 }
25393}
25394impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant7Type {
25395 type Error = self::error::ConversionError;
25396 fn try_from(
25397 value: ::std::string::String,
25398 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25399 value.parse()
25400 }
25401}
25402#[doc = "`StateChangeWithCauseViewVariant8Change`"]
25403#[doc = r""]
25404#[doc = r" <details><summary>JSON schema</summary>"]
25405#[doc = r""]
25406#[doc = r" ```json"]
25407#[doc = "{"]
25408#[doc = " \"type\": \"object\","]
25409#[doc = " \"required\": ["]
25410#[doc = " \"account_id\","]
25411#[doc = " \"key_base64\""]
25412#[doc = " ],"]
25413#[doc = " \"properties\": {"]
25414#[doc = " \"access_key\": false,"]
25415#[doc = " \"account_id\": {"]
25416#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25417#[doc = " },"]
25418#[doc = " \"amount\": false,"]
25419#[doc = " \"code_base64\": false,"]
25420#[doc = " \"code_hash\": false,"]
25421#[doc = " \"gas_key\": false,"]
25422#[doc = " \"global_contract_account_id\": false,"]
25423#[doc = " \"global_contract_hash\": false,"]
25424#[doc = " \"index\": false,"]
25425#[doc = " \"key_base64\": {"]
25426#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
25427#[doc = " },"]
25428#[doc = " \"locked\": false,"]
25429#[doc = " \"nonce\": false,"]
25430#[doc = " \"public_key\": false,"]
25431#[doc = " \"storage_paid_at\": false,"]
25432#[doc = " \"storage_usage\": false,"]
25433#[doc = " \"value_base64\": false"]
25434#[doc = " }"]
25435#[doc = "}"]
25436#[doc = r" ```"]
25437#[doc = r" </details>"]
25438#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25439pub struct StateChangeWithCauseViewVariant8Change {
25440 pub account_id: AccountId,
25441 pub key_base64: StoreKey,
25442}
25443impl ::std::convert::From<&StateChangeWithCauseViewVariant8Change>
25444 for StateChangeWithCauseViewVariant8Change
25445{
25446 fn from(value: &StateChangeWithCauseViewVariant8Change) -> Self {
25447 value.clone()
25448 }
25449}
25450#[doc = "`StateChangeWithCauseViewVariant8Type`"]
25451#[doc = r""]
25452#[doc = r" <details><summary>JSON schema</summary>"]
25453#[doc = r""]
25454#[doc = r" ```json"]
25455#[doc = "{"]
25456#[doc = " \"type\": \"string\","]
25457#[doc = " \"enum\": ["]
25458#[doc = " \"data_deletion\""]
25459#[doc = " ]"]
25460#[doc = "}"]
25461#[doc = r" ```"]
25462#[doc = r" </details>"]
25463#[derive(
25464 :: serde :: Deserialize,
25465 :: serde :: Serialize,
25466 Clone,
25467 Copy,
25468 Debug,
25469 Eq,
25470 Hash,
25471 Ord,
25472 PartialEq,
25473 PartialOrd,
25474)]
25475pub enum StateChangeWithCauseViewVariant8Type {
25476 #[serde(rename = "data_deletion")]
25477 DataDeletion,
25478}
25479impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant8Type {
25480 fn from(value: &StateChangeWithCauseViewVariant8Type) -> Self {
25481 value.clone()
25482 }
25483}
25484impl ::std::fmt::Display for StateChangeWithCauseViewVariant8Type {
25485 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25486 match *self {
25487 Self::DataDeletion => write!(f, "data_deletion"),
25488 }
25489 }
25490}
25491impl ::std::str::FromStr for StateChangeWithCauseViewVariant8Type {
25492 type Err = self::error::ConversionError;
25493 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25494 match value {
25495 "data_deletion" => Ok(Self::DataDeletion),
25496 _ => Err("invalid value".into()),
25497 }
25498 }
25499}
25500impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant8Type {
25501 type Error = self::error::ConversionError;
25502 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25503 value.parse()
25504 }
25505}
25506impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant8Type {
25507 type Error = self::error::ConversionError;
25508 fn try_from(
25509 value: &::std::string::String,
25510 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25511 value.parse()
25512 }
25513}
25514impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant8Type {
25515 type Error = self::error::ConversionError;
25516 fn try_from(
25517 value: ::std::string::String,
25518 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25519 value.parse()
25520 }
25521}
25522#[doc = "`StateChangeWithCauseViewVariant9Change`"]
25523#[doc = r""]
25524#[doc = r" <details><summary>JSON schema</summary>"]
25525#[doc = r""]
25526#[doc = r" ```json"]
25527#[doc = "{"]
25528#[doc = " \"type\": \"object\","]
25529#[doc = " \"required\": ["]
25530#[doc = " \"account_id\","]
25531#[doc = " \"code_base64\""]
25532#[doc = " ],"]
25533#[doc = " \"properties\": {"]
25534#[doc = " \"access_key\": false,"]
25535#[doc = " \"account_id\": {"]
25536#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
25537#[doc = " },"]
25538#[doc = " \"amount\": false,"]
25539#[doc = " \"code_base64\": {"]
25540#[doc = " \"type\": \"string\""]
25541#[doc = " },"]
25542#[doc = " \"code_hash\": false,"]
25543#[doc = " \"gas_key\": false,"]
25544#[doc = " \"global_contract_account_id\": false,"]
25545#[doc = " \"global_contract_hash\": false,"]
25546#[doc = " \"index\": false,"]
25547#[doc = " \"key_base64\": false,"]
25548#[doc = " \"locked\": false,"]
25549#[doc = " \"nonce\": false,"]
25550#[doc = " \"public_key\": false,"]
25551#[doc = " \"storage_paid_at\": false,"]
25552#[doc = " \"storage_usage\": false,"]
25553#[doc = " \"value_base64\": false"]
25554#[doc = " }"]
25555#[doc = "}"]
25556#[doc = r" ```"]
25557#[doc = r" </details>"]
25558#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25559pub struct StateChangeWithCauseViewVariant9Change {
25560 pub account_id: AccountId,
25561 pub code_base64: ::std::string::String,
25562}
25563impl ::std::convert::From<&StateChangeWithCauseViewVariant9Change>
25564 for StateChangeWithCauseViewVariant9Change
25565{
25566 fn from(value: &StateChangeWithCauseViewVariant9Change) -> Self {
25567 value.clone()
25568 }
25569}
25570#[doc = "`StateChangeWithCauseViewVariant9Type`"]
25571#[doc = r""]
25572#[doc = r" <details><summary>JSON schema</summary>"]
25573#[doc = r""]
25574#[doc = r" ```json"]
25575#[doc = "{"]
25576#[doc = " \"type\": \"string\","]
25577#[doc = " \"enum\": ["]
25578#[doc = " \"contract_code_update\""]
25579#[doc = " ]"]
25580#[doc = "}"]
25581#[doc = r" ```"]
25582#[doc = r" </details>"]
25583#[derive(
25584 :: serde :: Deserialize,
25585 :: serde :: Serialize,
25586 Clone,
25587 Copy,
25588 Debug,
25589 Eq,
25590 Hash,
25591 Ord,
25592 PartialEq,
25593 PartialOrd,
25594)]
25595pub enum StateChangeWithCauseViewVariant9Type {
25596 #[serde(rename = "contract_code_update")]
25597 ContractCodeUpdate,
25598}
25599impl ::std::convert::From<&Self> for StateChangeWithCauseViewVariant9Type {
25600 fn from(value: &StateChangeWithCauseViewVariant9Type) -> Self {
25601 value.clone()
25602 }
25603}
25604impl ::std::fmt::Display for StateChangeWithCauseViewVariant9Type {
25605 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25606 match *self {
25607 Self::ContractCodeUpdate => write!(f, "contract_code_update"),
25608 }
25609 }
25610}
25611impl ::std::str::FromStr for StateChangeWithCauseViewVariant9Type {
25612 type Err = self::error::ConversionError;
25613 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25614 match value {
25615 "contract_code_update" => Ok(Self::ContractCodeUpdate),
25616 _ => Err("invalid value".into()),
25617 }
25618 }
25619}
25620impl ::std::convert::TryFrom<&str> for StateChangeWithCauseViewVariant9Type {
25621 type Error = self::error::ConversionError;
25622 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25623 value.parse()
25624 }
25625}
25626impl ::std::convert::TryFrom<&::std::string::String> for StateChangeWithCauseViewVariant9Type {
25627 type Error = self::error::ConversionError;
25628 fn try_from(
25629 value: &::std::string::String,
25630 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25631 value.parse()
25632 }
25633}
25634impl ::std::convert::TryFrom<::std::string::String> for StateChangeWithCauseViewVariant9Type {
25635 type Error = self::error::ConversionError;
25636 fn try_from(
25637 value: ::std::string::String,
25638 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25639 value.parse()
25640 }
25641}
25642#[doc = "Item of the state, key and value are serialized in base64 and proof for inclusion of given state item."]
25643#[doc = r""]
25644#[doc = r" <details><summary>JSON schema</summary>"]
25645#[doc = r""]
25646#[doc = r" ```json"]
25647#[doc = "{"]
25648#[doc = " \"description\": \"Item of the state, key and value are serialized in base64 and proof for inclusion of given state item.\","]
25649#[doc = " \"type\": \"object\","]
25650#[doc = " \"required\": ["]
25651#[doc = " \"key\","]
25652#[doc = " \"value\""]
25653#[doc = " ],"]
25654#[doc = " \"properties\": {"]
25655#[doc = " \"key\": {"]
25656#[doc = " \"$ref\": \"#/components/schemas/StoreKey\""]
25657#[doc = " },"]
25658#[doc = " \"value\": {"]
25659#[doc = " \"$ref\": \"#/components/schemas/StoreValue\""]
25660#[doc = " }"]
25661#[doc = " }"]
25662#[doc = "}"]
25663#[doc = r" ```"]
25664#[doc = r" </details>"]
25665#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25666pub struct StateItem {
25667 pub key: StoreKey,
25668 pub value: StoreValue,
25669}
25670impl ::std::convert::From<&StateItem> for StateItem {
25671 fn from(value: &StateItem) -> Self {
25672 value.clone()
25673 }
25674}
25675#[doc = "Options for dumping state to S3."]
25676#[doc = r""]
25677#[doc = r" <details><summary>JSON schema</summary>"]
25678#[doc = r""]
25679#[doc = r" ```json"]
25680#[doc = "{"]
25681#[doc = " \"description\": \"Options for dumping state to S3.\","]
25682#[doc = " \"type\": \"object\","]
25683#[doc = " \"properties\": {"]
25684#[doc = " \"dump\": {"]
25685#[doc = " \"description\": \"`none` value disables state dump to external storage.\","]
25686#[doc = " \"anyOf\": ["]
25687#[doc = " {"]
25688#[doc = " \"$ref\": \"#/components/schemas/DumpConfig\""]
25689#[doc = " },"]
25690#[doc = " {"]
25691#[doc = " \"type\": \"null\""]
25692#[doc = " }"]
25693#[doc = " ]"]
25694#[doc = " },"]
25695#[doc = " \"sync\": {"]
25696#[doc = " \"$ref\": \"#/components/schemas/SyncConfig\""]
25697#[doc = " }"]
25698#[doc = " }"]
25699#[doc = "}"]
25700#[doc = r" ```"]
25701#[doc = r" </details>"]
25702#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25703pub struct StateSyncConfig {
25704 #[doc = "`none` value disables state dump to external storage."]
25705 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25706 pub dump: ::std::option::Option<DumpConfig>,
25707 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25708 pub sync: ::std::option::Option<SyncConfig>,
25709}
25710impl ::std::convert::From<&StateSyncConfig> for StateSyncConfig {
25711 fn from(value: &StateSyncConfig) -> Self {
25712 value.clone()
25713 }
25714}
25715impl ::std::default::Default for StateSyncConfig {
25716 fn default() -> Self {
25717 Self {
25718 dump: Default::default(),
25719 sync: Default::default(),
25720 }
25721 }
25722}
25723#[doc = "`StatusSyncInfo`"]
25724#[doc = r""]
25725#[doc = r" <details><summary>JSON schema</summary>"]
25726#[doc = r""]
25727#[doc = r" ```json"]
25728#[doc = "{"]
25729#[doc = " \"type\": \"object\","]
25730#[doc = " \"required\": ["]
25731#[doc = " \"latest_block_hash\","]
25732#[doc = " \"latest_block_height\","]
25733#[doc = " \"latest_block_time\","]
25734#[doc = " \"latest_state_root\","]
25735#[doc = " \"syncing\""]
25736#[doc = " ],"]
25737#[doc = " \"properties\": {"]
25738#[doc = " \"earliest_block_hash\": {"]
25739#[doc = " \"anyOf\": ["]
25740#[doc = " {"]
25741#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
25742#[doc = " },"]
25743#[doc = " {"]
25744#[doc = " \"type\": \"null\""]
25745#[doc = " }"]
25746#[doc = " ]"]
25747#[doc = " },"]
25748#[doc = " \"earliest_block_height\": {"]
25749#[doc = " \"type\": ["]
25750#[doc = " \"integer\","]
25751#[doc = " \"null\""]
25752#[doc = " ],"]
25753#[doc = " \"format\": \"uint64\","]
25754#[doc = " \"minimum\": 0.0"]
25755#[doc = " },"]
25756#[doc = " \"earliest_block_time\": {"]
25757#[doc = " \"type\": ["]
25758#[doc = " \"string\","]
25759#[doc = " \"null\""]
25760#[doc = " ]"]
25761#[doc = " },"]
25762#[doc = " \"epoch_id\": {"]
25763#[doc = " \"anyOf\": ["]
25764#[doc = " {"]
25765#[doc = " \"$ref\": \"#/components/schemas/EpochId\""]
25766#[doc = " },"]
25767#[doc = " {"]
25768#[doc = " \"type\": \"null\""]
25769#[doc = " }"]
25770#[doc = " ]"]
25771#[doc = " },"]
25772#[doc = " \"epoch_start_height\": {"]
25773#[doc = " \"type\": ["]
25774#[doc = " \"integer\","]
25775#[doc = " \"null\""]
25776#[doc = " ],"]
25777#[doc = " \"format\": \"uint64\","]
25778#[doc = " \"minimum\": 0.0"]
25779#[doc = " },"]
25780#[doc = " \"latest_block_hash\": {"]
25781#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
25782#[doc = " },"]
25783#[doc = " \"latest_block_height\": {"]
25784#[doc = " \"type\": \"integer\","]
25785#[doc = " \"format\": \"uint64\","]
25786#[doc = " \"minimum\": 0.0"]
25787#[doc = " },"]
25788#[doc = " \"latest_block_time\": {"]
25789#[doc = " \"type\": \"string\""]
25790#[doc = " },"]
25791#[doc = " \"latest_state_root\": {"]
25792#[doc = " \"$ref\": \"#/components/schemas/CryptoHash\""]
25793#[doc = " },"]
25794#[doc = " \"syncing\": {"]
25795#[doc = " \"type\": \"boolean\""]
25796#[doc = " }"]
25797#[doc = " }"]
25798#[doc = "}"]
25799#[doc = r" ```"]
25800#[doc = r" </details>"]
25801#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25802pub struct StatusSyncInfo {
25803 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25804 pub earliest_block_hash: ::std::option::Option<CryptoHash>,
25805 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25806 pub earliest_block_height: ::std::option::Option<u64>,
25807 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25808 pub earliest_block_time: ::std::option::Option<::std::string::String>,
25809 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25810 pub epoch_id: ::std::option::Option<EpochId>,
25811 #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
25812 pub epoch_start_height: ::std::option::Option<u64>,
25813 pub latest_block_hash: CryptoHash,
25814 pub latest_block_height: u64,
25815 pub latest_block_time: ::std::string::String,
25816 pub latest_state_root: CryptoHash,
25817 pub syncing: bool,
25818}
25819impl ::std::convert::From<&StatusSyncInfo> for StatusSyncInfo {
25820 fn from(value: &StatusSyncInfo) -> Self {
25821 value.clone()
25822 }
25823}
25824#[doc = "Errors which may occur during working with trie storages, storing\ntrie values (trie nodes and state values) by their hashes."]
25825#[doc = r""]
25826#[doc = r" <details><summary>JSON schema</summary>"]
25827#[doc = r""]
25828#[doc = r" ```json"]
25829#[doc = "{"]
25830#[doc = " \"description\": \"Errors which may occur during working with trie storages, storing\\ntrie values (trie nodes and state values) by their hashes.\","]
25831#[doc = " \"oneOf\": ["]
25832#[doc = " {"]
25833#[doc = " \"description\": \"Key-value db internal failure\","]
25834#[doc = " \"type\": \"string\","]
25835#[doc = " \"enum\": ["]
25836#[doc = " \"StorageInternalError\""]
25837#[doc = " ]"]
25838#[doc = " },"]
25839#[doc = " {"]
25840#[doc = " \"description\": \"Requested trie value by its hash which is missing in storage.\","]
25841#[doc = " \"type\": \"object\","]
25842#[doc = " \"required\": ["]
25843#[doc = " \"MissingTrieValue\""]
25844#[doc = " ],"]
25845#[doc = " \"properties\": {"]
25846#[doc = " \"MissingTrieValue\": {"]
25847#[doc = " \"$ref\": \"#/components/schemas/MissingTrieValue\""]
25848#[doc = " }"]
25849#[doc = " },"]
25850#[doc = " \"additionalProperties\": false"]
25851#[doc = " },"]
25852#[doc = " {"]
25853#[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.\","]
25854#[doc = " \"type\": \"string\","]
25855#[doc = " \"enum\": ["]
25856#[doc = " \"UnexpectedTrieValue\""]
25857#[doc = " ]"]
25858#[doc = " },"]
25859#[doc = " {"]
25860#[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.\","]
25861#[doc = " \"type\": \"object\","]
25862#[doc = " \"required\": ["]
25863#[doc = " \"StorageInconsistentState\""]
25864#[doc = " ],"]
25865#[doc = " \"properties\": {"]
25866#[doc = " \"StorageInconsistentState\": {"]
25867#[doc = " \"type\": \"string\""]
25868#[doc = " }"]
25869#[doc = " },"]
25870#[doc = " \"additionalProperties\": false"]
25871#[doc = " },"]
25872#[doc = " {"]
25873#[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.\","]
25874#[doc = " \"type\": \"object\","]
25875#[doc = " \"required\": ["]
25876#[doc = " \"FlatStorageBlockNotSupported\""]
25877#[doc = " ],"]
25878#[doc = " \"properties\": {"]
25879#[doc = " \"FlatStorageBlockNotSupported\": {"]
25880#[doc = " \"type\": \"string\""]
25881#[doc = " }"]
25882#[doc = " },"]
25883#[doc = " \"additionalProperties\": false"]
25884#[doc = " },"]
25885#[doc = " {"]
25886#[doc = " \"description\": \"In-memory trie could not be loaded for some reason.\","]
25887#[doc = " \"type\": \"object\","]
25888#[doc = " \"required\": ["]
25889#[doc = " \"MemTrieLoadingError\""]
25890#[doc = " ],"]
25891#[doc = " \"properties\": {"]
25892#[doc = " \"MemTrieLoadingError\": {"]
25893#[doc = " \"type\": \"string\""]
25894#[doc = " }"]
25895#[doc = " },"]
25896#[doc = " \"additionalProperties\": false"]
25897#[doc = " }"]
25898#[doc = " ]"]
25899#[doc = "}"]
25900#[doc = r" ```"]
25901#[doc = r" </details>"]
25902#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
25903pub enum StorageError {
25904 #[doc = "Key-value db internal failure"]
25905 StorageInternalError,
25906 #[doc = "Requested trie value by its hash which is missing in storage."]
25907 MissingTrieValue(MissingTrieValue),
25908 #[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."]
25909 UnexpectedTrieValue,
25910 #[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."]
25911 StorageInconsistentState(::std::string::String),
25912 #[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."]
25913 FlatStorageBlockNotSupported(::std::string::String),
25914 #[doc = "In-memory trie could not be loaded for some reason."]
25915 MemTrieLoadingError(::std::string::String),
25916}
25917impl ::std::convert::From<&Self> for StorageError {
25918 fn from(value: &StorageError) -> Self {
25919 value.clone()
25920 }
25921}
25922impl ::std::convert::From<MissingTrieValue> for StorageError {
25923 fn from(value: MissingTrieValue) -> Self {
25924 Self::MissingTrieValue(value)
25925 }
25926}
25927#[doc = "This enum represents if a storage_get call will be performed through flat storage or trie"]
25928#[doc = r""]
25929#[doc = r" <details><summary>JSON schema</summary>"]
25930#[doc = r""]
25931#[doc = r" ```json"]
25932#[doc = "{"]
25933#[doc = " \"description\": \"This enum represents if a storage_get call will be performed through flat storage or trie\","]
25934#[doc = " \"type\": \"string\","]
25935#[doc = " \"enum\": ["]
25936#[doc = " \"FlatStorage\","]
25937#[doc = " \"Trie\""]
25938#[doc = " ]"]
25939#[doc = "}"]
25940#[doc = r" ```"]
25941#[doc = r" </details>"]
25942#[derive(
25943 :: serde :: Deserialize,
25944 :: serde :: Serialize,
25945 Clone,
25946 Copy,
25947 Debug,
25948 Eq,
25949 Hash,
25950 Ord,
25951 PartialEq,
25952 PartialOrd,
25953)]
25954pub enum StorageGetMode {
25955 FlatStorage,
25956 Trie,
25957}
25958impl ::std::convert::From<&Self> for StorageGetMode {
25959 fn from(value: &StorageGetMode) -> Self {
25960 value.clone()
25961 }
25962}
25963impl ::std::fmt::Display for StorageGetMode {
25964 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25965 match *self {
25966 Self::FlatStorage => write!(f, "FlatStorage"),
25967 Self::Trie => write!(f, "Trie"),
25968 }
25969 }
25970}
25971impl ::std::str::FromStr for StorageGetMode {
25972 type Err = self::error::ConversionError;
25973 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25974 match value {
25975 "FlatStorage" => Ok(Self::FlatStorage),
25976 "Trie" => Ok(Self::Trie),
25977 _ => Err("invalid value".into()),
25978 }
25979 }
25980}
25981impl ::std::convert::TryFrom<&str> for StorageGetMode {
25982 type Error = self::error::ConversionError;
25983 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25984 value.parse()
25985 }
25986}
25987impl ::std::convert::TryFrom<&::std::string::String> for StorageGetMode {
25988 type Error = self::error::ConversionError;
25989 fn try_from(
25990 value: &::std::string::String,
25991 ) -> ::std::result::Result<Self, self::error::ConversionError> {
25992 value.parse()
25993 }
25994}
25995impl ::std::convert::TryFrom<::std::string::String> for StorageGetMode {
25996 type Error = self::error::ConversionError;
25997 fn try_from(
25998 value: ::std::string::String,
25999 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26000 value.parse()
26001 }
26002}
26003#[doc = "Describes cost of storage per block"]
26004#[doc = r""]
26005#[doc = r" <details><summary>JSON schema</summary>"]
26006#[doc = r""]
26007#[doc = r" ```json"]
26008#[doc = "{"]
26009#[doc = " \"description\": \"Describes cost of storage per block\","]
26010#[doc = " \"type\": \"object\","]
26011#[doc = " \"required\": ["]
26012#[doc = " \"num_bytes_account\","]
26013#[doc = " \"num_extra_bytes_record\""]
26014#[doc = " ],"]
26015#[doc = " \"properties\": {"]
26016#[doc = " \"num_bytes_account\": {"]
26017#[doc = " \"description\": \"Number of bytes for an account record, including rounding up for account id.\","]
26018#[doc = " \"type\": \"integer\","]
26019#[doc = " \"format\": \"uint64\","]
26020#[doc = " \"minimum\": 0.0"]
26021#[doc = " },"]
26022#[doc = " \"num_extra_bytes_record\": {"]
26023#[doc = " \"description\": \"Additional number of bytes for a k/v record\","]
26024#[doc = " \"type\": \"integer\","]
26025#[doc = " \"format\": \"uint64\","]
26026#[doc = " \"minimum\": 0.0"]
26027#[doc = " }"]
26028#[doc = " }"]
26029#[doc = "}"]
26030#[doc = r" ```"]
26031#[doc = r" </details>"]
26032#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26033pub struct StorageUsageConfigView {
26034 #[doc = "Number of bytes for an account record, including rounding up for account id."]
26035 pub num_bytes_account: u64,
26036 #[doc = "Additional number of bytes for a k/v record"]
26037 pub num_extra_bytes_record: u64,
26038}
26039impl ::std::convert::From<&StorageUsageConfigView> for StorageUsageConfigView {
26040 fn from(value: &StorageUsageConfigView) -> Self {
26041 value.clone()
26042 }
26043}
26044#[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`)."]
26045#[doc = r""]
26046#[doc = r" <details><summary>JSON schema</summary>"]
26047#[doc = r""]
26048#[doc = r" ```json"]
26049#[doc = "{"]
26050#[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`).\","]
26051#[doc = " \"type\": \"string\","]
26052#[doc = " \"format\": \"bytes\""]
26053#[doc = "}"]
26054#[doc = r" ```"]
26055#[doc = r" </details>"]
26056#[derive(
26057 :: serde :: Deserialize,
26058 :: serde :: Serialize,
26059 Clone,
26060 Debug,
26061 Eq,
26062 Hash,
26063 Ord,
26064 PartialEq,
26065 PartialOrd,
26066)]
26067#[serde(transparent)]
26068pub struct StoreKey(pub ::std::string::String);
26069impl ::std::ops::Deref for StoreKey {
26070 type Target = ::std::string::String;
26071 fn deref(&self) -> &::std::string::String {
26072 &self.0
26073 }
26074}
26075impl ::std::convert::From<StoreKey> for ::std::string::String {
26076 fn from(value: StoreKey) -> Self {
26077 value.0
26078 }
26079}
26080impl ::std::convert::From<&StoreKey> for StoreKey {
26081 fn from(value: &StoreKey) -> Self {
26082 value.clone()
26083 }
26084}
26085impl ::std::convert::From<::std::string::String> for StoreKey {
26086 fn from(value: ::std::string::String) -> Self {
26087 Self(value)
26088 }
26089}
26090impl ::std::str::FromStr for StoreKey {
26091 type Err = ::std::convert::Infallible;
26092 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
26093 Ok(Self(value.to_string()))
26094 }
26095}
26096impl ::std::fmt::Display for StoreKey {
26097 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26098 self.0.fmt(f)
26099 }
26100}
26101#[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`)."]
26102#[doc = r""]
26103#[doc = r" <details><summary>JSON schema</summary>"]
26104#[doc = r""]
26105#[doc = r" ```json"]
26106#[doc = "{"]
26107#[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`).\","]
26108#[doc = " \"type\": \"string\","]
26109#[doc = " \"format\": \"bytes\""]
26110#[doc = "}"]
26111#[doc = r" ```"]
26112#[doc = r" </details>"]
26113#[derive(
26114 :: serde :: Deserialize,
26115 :: serde :: Serialize,
26116 Clone,
26117 Debug,
26118 Eq,
26119 Hash,
26120 Ord,
26121 PartialEq,
26122 PartialOrd,
26123)]
26124#[serde(transparent)]
26125pub struct StoreValue(pub ::std::string::String);
26126impl ::std::ops::Deref for StoreValue {
26127 type Target = ::std::string::String;
26128 fn deref(&self) -> &::std::string::String {
26129 &self.0
26130 }
26131}
26132impl ::std::convert::From<StoreValue> for ::std::string::String {
26133 fn from(value: StoreValue) -> Self {
26134 value.0
26135 }
26136}
26137impl ::std::convert::From<&StoreValue> for StoreValue {
26138 fn from(value: &StoreValue) -> Self {
26139 value.clone()
26140 }
26141}
26142impl ::std::convert::From<::std::string::String> for StoreValue {
26143 fn from(value: ::std::string::String) -> Self {
26144 Self(value)
26145 }
26146}
26147impl ::std::str::FromStr for StoreValue {
26148 type Err = ::std::convert::Infallible;
26149 fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
26150 Ok(Self(value.to_string()))
26151 }
26152}
26153impl ::std::fmt::Display for StoreValue {
26154 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26155 self.0.fmt(f)
26156 }
26157}
26158#[doc = "`SyncCheckpoint`"]
26159#[doc = r""]
26160#[doc = r" <details><summary>JSON schema</summary>"]
26161#[doc = r""]
26162#[doc = r" ```json"]
26163#[doc = "{"]
26164#[doc = " \"type\": \"string\","]
26165#[doc = " \"enum\": ["]
26166#[doc = " \"genesis\","]
26167#[doc = " \"earliest_available\""]
26168#[doc = " ]"]
26169#[doc = "}"]
26170#[doc = r" ```"]
26171#[doc = r" </details>"]
26172#[derive(
26173 :: serde :: Deserialize,
26174 :: serde :: Serialize,
26175 Clone,
26176 Copy,
26177 Debug,
26178 Eq,
26179 Hash,
26180 Ord,
26181 PartialEq,
26182 PartialOrd,
26183)]
26184pub enum SyncCheckpoint {
26185 #[serde(rename = "genesis")]
26186 Genesis,
26187 #[serde(rename = "earliest_available")]
26188 EarliestAvailable,
26189}
26190impl ::std::convert::From<&Self> for SyncCheckpoint {
26191 fn from(value: &SyncCheckpoint) -> Self {
26192 value.clone()
26193 }
26194}
26195impl ::std::fmt::Display for SyncCheckpoint {
26196 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26197 match *self {
26198 Self::Genesis => write!(f, "genesis"),
26199 Self::EarliestAvailable => write!(f, "earliest_available"),
26200 }
26201 }
26202}
26203impl ::std::str::FromStr for SyncCheckpoint {
26204 type Err = self::error::ConversionError;
26205 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26206 match value {
26207 "genesis" => Ok(Self::Genesis),
26208 "earliest_available" => Ok(Self::EarliestAvailable),
26209 _ => Err("invalid value".into()),
26210 }
26211 }
26212}
26213impl ::std::convert::TryFrom<&str> for SyncCheckpoint {
26214 type Error = self::error::ConversionError;
26215 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26216 value.parse()
26217 }
26218}
26219impl ::std::convert::TryFrom<&::std::string::String> for SyncCheckpoint {
26220 type Error = self::error::ConversionError;
26221 fn try_from(
26222 value: &::std::string::String,
26223 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26224 value.parse()
26225 }
26226}
26227impl ::std::convert::TryFrom<::std::string::String> for SyncCheckpoint {
26228 type Error = self::error::ConversionError;
26229 fn try_from(
26230 value: ::std::string::String,
26231 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26232 value.parse()
26233 }
26234}
26235#[doc = "Configures how to fetch state parts during state sync."]
26236#[doc = r""]
26237#[doc = r" <details><summary>JSON schema</summary>"]
26238#[doc = r""]
26239#[doc = r" ```json"]
26240#[doc = "{"]
26241#[doc = " \"description\": \"Configures how to fetch state parts during state sync.\","]
26242#[doc = " \"oneOf\": ["]
26243#[doc = " {"]
26244#[doc = " \"description\": \"Syncs state from the peers without reading anything from external storage.\","]
26245#[doc = " \"type\": \"string\","]
26246#[doc = " \"enum\": ["]
26247#[doc = " \"Peers\""]
26248#[doc = " ]"]
26249#[doc = " },"]
26250#[doc = " {"]
26251#[doc = " \"description\": \"Expects parts to be available in external storage.\","]
26252#[doc = " \"type\": \"object\","]
26253#[doc = " \"required\": ["]
26254#[doc = " \"ExternalStorage\""]
26255#[doc = " ],"]
26256#[doc = " \"properties\": {"]
26257#[doc = " \"ExternalStorage\": {"]
26258#[doc = " \"$ref\": \"#/components/schemas/ExternalStorageConfig\""]
26259#[doc = " }"]
26260#[doc = " },"]
26261#[doc = " \"additionalProperties\": false"]
26262#[doc = " }"]
26263#[doc = " ]"]
26264#[doc = "}"]
26265#[doc = r" ```"]
26266#[doc = r" </details>"]
26267#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26268pub enum SyncConfig {
26269 #[doc = "Syncs state from the peers without reading anything from external storage."]
26270 Peers,
26271 #[doc = "Expects parts to be available in external storage."]
26272 ExternalStorage(ExternalStorageConfig),
26273}
26274impl ::std::convert::From<&Self> for SyncConfig {
26275 fn from(value: &SyncConfig) -> Self {
26276 value.clone()
26277 }
26278}
26279impl ::std::convert::From<ExternalStorageConfig> for SyncConfig {
26280 fn from(value: ExternalStorageConfig) -> Self {
26281 Self::ExternalStorage(value)
26282 }
26283}
26284#[doc = "`Tier1ProxyView`"]
26285#[doc = r""]
26286#[doc = r" <details><summary>JSON schema</summary>"]
26287#[doc = r""]
26288#[doc = r" ```json"]
26289#[doc = "{"]
26290#[doc = " \"type\": \"object\","]
26291#[doc = " \"required\": ["]
26292#[doc = " \"addr\","]
26293#[doc = " \"peer_id\""]
26294#[doc = " ],"]
26295#[doc = " \"properties\": {"]
26296#[doc = " \"addr\": {"]
26297#[doc = " \"type\": \"string\""]
26298#[doc = " },"]
26299#[doc = " \"peer_id\": {"]
26300#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
26301#[doc = " }"]
26302#[doc = " }"]
26303#[doc = "}"]
26304#[doc = r" ```"]
26305#[doc = r" </details>"]
26306#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26307pub struct Tier1ProxyView {
26308 pub addr: ::std::string::String,
26309 pub peer_id: PublicKey,
26310}
26311impl ::std::convert::From<&Tier1ProxyView> for Tier1ProxyView {
26312 fn from(value: &Tier1ProxyView) -> Self {
26313 value.clone()
26314 }
26315}
26316#[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."]
26317#[doc = r""]
26318#[doc = r" <details><summary>JSON schema</summary>"]
26319#[doc = r""]
26320#[doc = r" ```json"]
26321#[doc = "{"]
26322#[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.\","]
26323#[doc = " \"oneOf\": ["]
26324#[doc = " {"]
26325#[doc = " \"description\": \"Tracks no shards (light client).\","]
26326#[doc = " \"type\": \"string\","]
26327#[doc = " \"enum\": ["]
26328#[doc = " \"NoShards\""]
26329#[doc = " ]"]
26330#[doc = " },"]
26331#[doc = " {"]
26332#[doc = " \"description\": \"Tracks arbitrary shards.\","]
26333#[doc = " \"type\": \"object\","]
26334#[doc = " \"required\": ["]
26335#[doc = " \"Shards\""]
26336#[doc = " ],"]
26337#[doc = " \"properties\": {"]
26338#[doc = " \"Shards\": {"]
26339#[doc = " \"type\": \"array\","]
26340#[doc = " \"items\": {"]
26341#[doc = " \"$ref\": \"#/components/schemas/ShardUId\""]
26342#[doc = " }"]
26343#[doc = " }"]
26344#[doc = " },"]
26345#[doc = " \"additionalProperties\": false"]
26346#[doc = " },"]
26347#[doc = " {"]
26348#[doc = " \"description\": \"Tracks all shards.\","]
26349#[doc = " \"type\": \"string\","]
26350#[doc = " \"enum\": ["]
26351#[doc = " \"AllShards\""]
26352#[doc = " ]"]
26353#[doc = " },"]
26354#[doc = " {"]
26355#[doc = " \"description\": \"Tracks shards that are assigned to given validator account.\","]
26356#[doc = " \"type\": \"object\","]
26357#[doc = " \"required\": ["]
26358#[doc = " \"ShadowValidator\""]
26359#[doc = " ],"]
26360#[doc = " \"properties\": {"]
26361#[doc = " \"ShadowValidator\": {"]
26362#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26363#[doc = " }"]
26364#[doc = " },"]
26365#[doc = " \"additionalProperties\": false"]
26366#[doc = " },"]
26367#[doc = " {"]
26368#[doc = " \"description\": \"Rotate between these sets of tracked shards.\\nUsed to simulate the behavior of chunk only producers without staking tokens.\","]
26369#[doc = " \"type\": \"object\","]
26370#[doc = " \"required\": ["]
26371#[doc = " \"Schedule\""]
26372#[doc = " ],"]
26373#[doc = " \"properties\": {"]
26374#[doc = " \"Schedule\": {"]
26375#[doc = " \"type\": \"array\","]
26376#[doc = " \"items\": {"]
26377#[doc = " \"type\": \"array\","]
26378#[doc = " \"items\": {"]
26379#[doc = " \"$ref\": \"#/components/schemas/ShardId\""]
26380#[doc = " }"]
26381#[doc = " }"]
26382#[doc = " }"]
26383#[doc = " },"]
26384#[doc = " \"additionalProperties\": false"]
26385#[doc = " },"]
26386#[doc = " {"]
26387#[doc = " \"description\": \"Tracks shards that contain one of the given account.\","]
26388#[doc = " \"type\": \"object\","]
26389#[doc = " \"required\": ["]
26390#[doc = " \"Accounts\""]
26391#[doc = " ],"]
26392#[doc = " \"properties\": {"]
26393#[doc = " \"Accounts\": {"]
26394#[doc = " \"type\": \"array\","]
26395#[doc = " \"items\": {"]
26396#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26397#[doc = " }"]
26398#[doc = " }"]
26399#[doc = " },"]
26400#[doc = " \"additionalProperties\": false"]
26401#[doc = " }"]
26402#[doc = " ]"]
26403#[doc = "}"]
26404#[doc = r" ```"]
26405#[doc = r" </details>"]
26406#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26407pub enum TrackedShardsConfig {
26408 #[doc = "Tracks no shards (light client)."]
26409 NoShards,
26410 #[doc = "Tracks arbitrary shards."]
26411 Shards(::std::vec::Vec<ShardUId>),
26412 #[doc = "Tracks all shards."]
26413 AllShards,
26414 #[doc = "Tracks shards that are assigned to given validator account."]
26415 ShadowValidator(AccountId),
26416 #[doc = "Rotate between these sets of tracked shards.\nUsed to simulate the behavior of chunk only producers without staking tokens."]
26417 Schedule(::std::vec::Vec<::std::vec::Vec<ShardId>>),
26418 #[doc = "Tracks shards that contain one of the given account."]
26419 Accounts(::std::vec::Vec<AccountId>),
26420}
26421impl ::std::convert::From<&Self> for TrackedShardsConfig {
26422 fn from(value: &TrackedShardsConfig) -> Self {
26423 value.clone()
26424 }
26425}
26426impl ::std::convert::From<::std::vec::Vec<ShardUId>> for TrackedShardsConfig {
26427 fn from(value: ::std::vec::Vec<ShardUId>) -> Self {
26428 Self::Shards(value)
26429 }
26430}
26431impl ::std::convert::From<AccountId> for TrackedShardsConfig {
26432 fn from(value: AccountId) -> Self {
26433 Self::ShadowValidator(value)
26434 }
26435}
26436impl ::std::convert::From<::std::vec::Vec<::std::vec::Vec<ShardId>>> for TrackedShardsConfig {
26437 fn from(value: ::std::vec::Vec<::std::vec::Vec<ShardId>>) -> Self {
26438 Self::Schedule(value)
26439 }
26440}
26441impl ::std::convert::From<::std::vec::Vec<AccountId>> for TrackedShardsConfig {
26442 fn from(value: ::std::vec::Vec<AccountId>) -> Self {
26443 Self::Accounts(value)
26444 }
26445}
26446#[doc = "`TransferAction`"]
26447#[doc = r""]
26448#[doc = r" <details><summary>JSON schema</summary>"]
26449#[doc = r""]
26450#[doc = r" ```json"]
26451#[doc = "{"]
26452#[doc = " \"type\": \"object\","]
26453#[doc = " \"required\": ["]
26454#[doc = " \"deposit\""]
26455#[doc = " ],"]
26456#[doc = " \"properties\": {"]
26457#[doc = " \"deposit\": {"]
26458#[doc = " \"type\": \"string\""]
26459#[doc = " }"]
26460#[doc = " }"]
26461#[doc = "}"]
26462#[doc = r" ```"]
26463#[doc = r" </details>"]
26464#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26465pub struct TransferAction {
26466 pub deposit: ::std::string::String,
26467}
26468impl ::std::convert::From<&TransferAction> for TransferAction {
26469 fn from(value: &TransferAction) -> Self {
26470 value.clone()
26471 }
26472}
26473#[doc = "Error returned in the ExecutionOutcome in case of failure"]
26474#[doc = r""]
26475#[doc = r" <details><summary>JSON schema</summary>"]
26476#[doc = r""]
26477#[doc = r" ```json"]
26478#[doc = "{"]
26479#[doc = " \"description\": \"Error returned in the ExecutionOutcome in case of failure\","]
26480#[doc = " \"oneOf\": ["]
26481#[doc = " {"]
26482#[doc = " \"description\": \"An error happened during Action execution\","]
26483#[doc = " \"type\": \"object\","]
26484#[doc = " \"required\": ["]
26485#[doc = " \"ActionError\""]
26486#[doc = " ],"]
26487#[doc = " \"properties\": {"]
26488#[doc = " \"ActionError\": {"]
26489#[doc = " \"$ref\": \"#/components/schemas/ActionError\""]
26490#[doc = " }"]
26491#[doc = " },"]
26492#[doc = " \"additionalProperties\": false"]
26493#[doc = " },"]
26494#[doc = " {"]
26495#[doc = " \"description\": \"An error happened during Transaction execution\","]
26496#[doc = " \"type\": \"object\","]
26497#[doc = " \"required\": ["]
26498#[doc = " \"InvalidTxError\""]
26499#[doc = " ],"]
26500#[doc = " \"properties\": {"]
26501#[doc = " \"InvalidTxError\": {"]
26502#[doc = " \"$ref\": \"#/components/schemas/InvalidTxError\""]
26503#[doc = " }"]
26504#[doc = " },"]
26505#[doc = " \"additionalProperties\": false"]
26506#[doc = " }"]
26507#[doc = " ]"]
26508#[doc = "}"]
26509#[doc = r" ```"]
26510#[doc = r" </details>"]
26511#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26512pub enum TxExecutionError {
26513 #[doc = "An error happened during Action execution"]
26514 ActionError(ActionError),
26515 #[doc = "An error happened during Transaction execution"]
26516 InvalidTxError(InvalidTxError),
26517}
26518impl ::std::convert::From<&Self> for TxExecutionError {
26519 fn from(value: &TxExecutionError) -> Self {
26520 value.clone()
26521 }
26522}
26523impl ::std::convert::From<ActionError> for TxExecutionError {
26524 fn from(value: ActionError) -> Self {
26525 Self::ActionError(value)
26526 }
26527}
26528impl ::std::convert::From<InvalidTxError> for TxExecutionError {
26529 fn from(value: InvalidTxError) -> Self {
26530 Self::InvalidTxError(value)
26531 }
26532}
26533#[doc = "`TxExecutionStatus`"]
26534#[doc = r""]
26535#[doc = r" <details><summary>JSON schema</summary>"]
26536#[doc = r""]
26537#[doc = r" ```json"]
26538#[doc = "{"]
26539#[doc = " \"oneOf\": ["]
26540#[doc = " {"]
26541#[doc = " \"description\": \"Transaction is waiting to be included into the block\","]
26542#[doc = " \"type\": \"string\","]
26543#[doc = " \"enum\": ["]
26544#[doc = " \"NONE\""]
26545#[doc = " ]"]
26546#[doc = " },"]
26547#[doc = " {"]
26548#[doc = " \"description\": \"Transaction is included into the block. The block may be not finalized yet\","]
26549#[doc = " \"type\": \"string\","]
26550#[doc = " \"enum\": ["]
26551#[doc = " \"INCLUDED\""]
26552#[doc = " ]"]
26553#[doc = " },"]
26554#[doc = " {"]
26555#[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\","]
26556#[doc = " \"type\": \"string\","]
26557#[doc = " \"enum\": ["]
26558#[doc = " \"EXECUTED_OPTIMISTIC\""]
26559#[doc = " ]"]
26560#[doc = " },"]
26561#[doc = " {"]
26562#[doc = " \"description\": \"Transaction is included into finalized block\","]
26563#[doc = " \"type\": \"string\","]
26564#[doc = " \"enum\": ["]
26565#[doc = " \"INCLUDED_FINAL\""]
26566#[doc = " ]"]
26567#[doc = " },"]
26568#[doc = " {"]
26569#[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\","]
26570#[doc = " \"type\": \"string\","]
26571#[doc = " \"enum\": ["]
26572#[doc = " \"EXECUTED\""]
26573#[doc = " ]"]
26574#[doc = " },"]
26575#[doc = " {"]
26576#[doc = " \"description\": \"Transaction is included into finalized block +\\nExecution of all transaction receipts is finalized, including refund receipts\","]
26577#[doc = " \"type\": \"string\","]
26578#[doc = " \"enum\": ["]
26579#[doc = " \"FINAL\""]
26580#[doc = " ]"]
26581#[doc = " }"]
26582#[doc = " ]"]
26583#[doc = "}"]
26584#[doc = r" ```"]
26585#[doc = r" </details>"]
26586#[derive(
26587 :: serde :: Deserialize,
26588 :: serde :: Serialize,
26589 Clone,
26590 Copy,
26591 Debug,
26592 Eq,
26593 Hash,
26594 Ord,
26595 PartialEq,
26596 PartialOrd,
26597)]
26598pub enum TxExecutionStatus {
26599 #[doc = "Transaction is waiting to be included into the block"]
26600 #[serde(rename = "NONE")]
26601 None,
26602 #[doc = "Transaction is included into the block. The block may be not finalized yet"]
26603 #[serde(rename = "INCLUDED")]
26604 Included,
26605 #[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"]
26606 #[serde(rename = "EXECUTED_OPTIMISTIC")]
26607 ExecutedOptimistic,
26608 #[doc = "Transaction is included into finalized block"]
26609 #[serde(rename = "INCLUDED_FINAL")]
26610 IncludedFinal,
26611 #[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"]
26612 #[serde(rename = "EXECUTED")]
26613 Executed,
26614 #[doc = "Transaction is included into finalized block +\nExecution of all transaction receipts is finalized, including refund receipts"]
26615 #[serde(rename = "FINAL")]
26616 Final,
26617}
26618impl ::std::convert::From<&Self> for TxExecutionStatus {
26619 fn from(value: &TxExecutionStatus) -> Self {
26620 value.clone()
26621 }
26622}
26623impl ::std::fmt::Display for TxExecutionStatus {
26624 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26625 match *self {
26626 Self::None => write!(f, "NONE"),
26627 Self::Included => write!(f, "INCLUDED"),
26628 Self::ExecutedOptimistic => write!(f, "EXECUTED_OPTIMISTIC"),
26629 Self::IncludedFinal => write!(f, "INCLUDED_FINAL"),
26630 Self::Executed => write!(f, "EXECUTED"),
26631 Self::Final => write!(f, "FINAL"),
26632 }
26633 }
26634}
26635impl ::std::str::FromStr for TxExecutionStatus {
26636 type Err = self::error::ConversionError;
26637 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26638 match value {
26639 "NONE" => Ok(Self::None),
26640 "INCLUDED" => Ok(Self::Included),
26641 "EXECUTED_OPTIMISTIC" => Ok(Self::ExecutedOptimistic),
26642 "INCLUDED_FINAL" => Ok(Self::IncludedFinal),
26643 "EXECUTED" => Ok(Self::Executed),
26644 "FINAL" => Ok(Self::Final),
26645 _ => Err("invalid value".into()),
26646 }
26647 }
26648}
26649impl ::std::convert::TryFrom<&str> for TxExecutionStatus {
26650 type Error = self::error::ConversionError;
26651 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26652 value.parse()
26653 }
26654}
26655impl ::std::convert::TryFrom<&::std::string::String> for TxExecutionStatus {
26656 type Error = self::error::ConversionError;
26657 fn try_from(
26658 value: &::std::string::String,
26659 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26660 value.parse()
26661 }
26662}
26663impl ::std::convert::TryFrom<::std::string::String> for TxExecutionStatus {
26664 type Error = self::error::ConversionError;
26665 fn try_from(
26666 value: ::std::string::String,
26667 ) -> ::std::result::Result<Self, self::error::ConversionError> {
26668 value.parse()
26669 }
26670}
26671#[doc = "Use global contract action"]
26672#[doc = r""]
26673#[doc = r" <details><summary>JSON schema</summary>"]
26674#[doc = r""]
26675#[doc = r" ```json"]
26676#[doc = "{"]
26677#[doc = " \"description\": \"Use global contract action\","]
26678#[doc = " \"type\": \"object\","]
26679#[doc = " \"required\": ["]
26680#[doc = " \"contract_identifier\""]
26681#[doc = " ],"]
26682#[doc = " \"properties\": {"]
26683#[doc = " \"contract_identifier\": {"]
26684#[doc = " \"$ref\": \"#/components/schemas/GlobalContractIdentifier\""]
26685#[doc = " }"]
26686#[doc = " }"]
26687#[doc = "}"]
26688#[doc = r" ```"]
26689#[doc = r" </details>"]
26690#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26691pub struct UseGlobalContractAction {
26692 pub contract_identifier: GlobalContractIdentifier,
26693}
26694impl ::std::convert::From<&UseGlobalContractAction> for UseGlobalContractAction {
26695 fn from(value: &UseGlobalContractAction) -> Self {
26696 value.clone()
26697 }
26698}
26699#[doc = "`ValidatorInfo`"]
26700#[doc = r""]
26701#[doc = r" <details><summary>JSON schema</summary>"]
26702#[doc = r""]
26703#[doc = r" ```json"]
26704#[doc = "{"]
26705#[doc = " \"type\": \"object\","]
26706#[doc = " \"required\": ["]
26707#[doc = " \"account_id\""]
26708#[doc = " ],"]
26709#[doc = " \"properties\": {"]
26710#[doc = " \"account_id\": {"]
26711#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26712#[doc = " }"]
26713#[doc = " }"]
26714#[doc = "}"]
26715#[doc = r" ```"]
26716#[doc = r" </details>"]
26717#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26718pub struct ValidatorInfo {
26719 pub account_id: AccountId,
26720}
26721impl ::std::convert::From<&ValidatorInfo> for ValidatorInfo {
26722 fn from(value: &ValidatorInfo) -> Self {
26723 value.clone()
26724 }
26725}
26726#[doc = "Reasons for removing a validator from the validator set."]
26727#[doc = r""]
26728#[doc = r" <details><summary>JSON schema</summary>"]
26729#[doc = r""]
26730#[doc = r" ```json"]
26731#[doc = "{"]
26732#[doc = " \"description\": \"Reasons for removing a validator from the validator set.\","]
26733#[doc = " \"oneOf\": ["]
26734#[doc = " {"]
26735#[doc = " \"description\": \"Deprecated\","]
26736#[doc = " \"type\": \"string\","]
26737#[doc = " \"enum\": ["]
26738#[doc = " \"_UnusedSlashed\""]
26739#[doc = " ]"]
26740#[doc = " },"]
26741#[doc = " {"]
26742#[doc = " \"description\": \"Validator didn't produce enough blocks.\","]
26743#[doc = " \"type\": \"object\","]
26744#[doc = " \"required\": ["]
26745#[doc = " \"NotEnoughBlocks\""]
26746#[doc = " ],"]
26747#[doc = " \"properties\": {"]
26748#[doc = " \"NotEnoughBlocks\": {"]
26749#[doc = " \"type\": \"object\","]
26750#[doc = " \"required\": ["]
26751#[doc = " \"expected\","]
26752#[doc = " \"produced\""]
26753#[doc = " ],"]
26754#[doc = " \"properties\": {"]
26755#[doc = " \"expected\": {"]
26756#[doc = " \"type\": \"integer\","]
26757#[doc = " \"format\": \"uint64\","]
26758#[doc = " \"minimum\": 0.0"]
26759#[doc = " },"]
26760#[doc = " \"produced\": {"]
26761#[doc = " \"type\": \"integer\","]
26762#[doc = " \"format\": \"uint64\","]
26763#[doc = " \"minimum\": 0.0"]
26764#[doc = " }"]
26765#[doc = " }"]
26766#[doc = " }"]
26767#[doc = " },"]
26768#[doc = " \"additionalProperties\": false"]
26769#[doc = " },"]
26770#[doc = " {"]
26771#[doc = " \"description\": \"Validator didn't produce enough chunks.\","]
26772#[doc = " \"type\": \"object\","]
26773#[doc = " \"required\": ["]
26774#[doc = " \"NotEnoughChunks\""]
26775#[doc = " ],"]
26776#[doc = " \"properties\": {"]
26777#[doc = " \"NotEnoughChunks\": {"]
26778#[doc = " \"type\": \"object\","]
26779#[doc = " \"required\": ["]
26780#[doc = " \"expected\","]
26781#[doc = " \"produced\""]
26782#[doc = " ],"]
26783#[doc = " \"properties\": {"]
26784#[doc = " \"expected\": {"]
26785#[doc = " \"type\": \"integer\","]
26786#[doc = " \"format\": \"uint64\","]
26787#[doc = " \"minimum\": 0.0"]
26788#[doc = " },"]
26789#[doc = " \"produced\": {"]
26790#[doc = " \"type\": \"integer\","]
26791#[doc = " \"format\": \"uint64\","]
26792#[doc = " \"minimum\": 0.0"]
26793#[doc = " }"]
26794#[doc = " }"]
26795#[doc = " }"]
26796#[doc = " },"]
26797#[doc = " \"additionalProperties\": false"]
26798#[doc = " },"]
26799#[doc = " {"]
26800#[doc = " \"description\": \"Validator unstaked themselves.\","]
26801#[doc = " \"type\": \"string\","]
26802#[doc = " \"enum\": ["]
26803#[doc = " \"Unstaked\""]
26804#[doc = " ]"]
26805#[doc = " },"]
26806#[doc = " {"]
26807#[doc = " \"description\": \"Validator stake is now below threshold\","]
26808#[doc = " \"type\": \"object\","]
26809#[doc = " \"required\": ["]
26810#[doc = " \"NotEnoughStake\""]
26811#[doc = " ],"]
26812#[doc = " \"properties\": {"]
26813#[doc = " \"NotEnoughStake\": {"]
26814#[doc = " \"type\": \"object\","]
26815#[doc = " \"required\": ["]
26816#[doc = " \"stake_u128\","]
26817#[doc = " \"threshold_u128\""]
26818#[doc = " ],"]
26819#[doc = " \"properties\": {"]
26820#[doc = " \"stake_u128\": {"]
26821#[doc = " \"type\": \"string\""]
26822#[doc = " },"]
26823#[doc = " \"threshold_u128\": {"]
26824#[doc = " \"type\": \"string\""]
26825#[doc = " }"]
26826#[doc = " }"]
26827#[doc = " }"]
26828#[doc = " },"]
26829#[doc = " \"additionalProperties\": false"]
26830#[doc = " },"]
26831#[doc = " {"]
26832#[doc = " \"description\": \"Enough stake but is not chosen because of seat limits.\","]
26833#[doc = " \"type\": \"string\","]
26834#[doc = " \"enum\": ["]
26835#[doc = " \"DidNotGetASeat\""]
26836#[doc = " ]"]
26837#[doc = " },"]
26838#[doc = " {"]
26839#[doc = " \"description\": \"Validator didn't produce enough chunk endorsements.\","]
26840#[doc = " \"type\": \"object\","]
26841#[doc = " \"required\": ["]
26842#[doc = " \"NotEnoughChunkEndorsements\""]
26843#[doc = " ],"]
26844#[doc = " \"properties\": {"]
26845#[doc = " \"NotEnoughChunkEndorsements\": {"]
26846#[doc = " \"type\": \"object\","]
26847#[doc = " \"required\": ["]
26848#[doc = " \"expected\","]
26849#[doc = " \"produced\""]
26850#[doc = " ],"]
26851#[doc = " \"properties\": {"]
26852#[doc = " \"expected\": {"]
26853#[doc = " \"type\": \"integer\","]
26854#[doc = " \"format\": \"uint64\","]
26855#[doc = " \"minimum\": 0.0"]
26856#[doc = " },"]
26857#[doc = " \"produced\": {"]
26858#[doc = " \"type\": \"integer\","]
26859#[doc = " \"format\": \"uint64\","]
26860#[doc = " \"minimum\": 0.0"]
26861#[doc = " }"]
26862#[doc = " }"]
26863#[doc = " }"]
26864#[doc = " },"]
26865#[doc = " \"additionalProperties\": false"]
26866#[doc = " },"]
26867#[doc = " {"]
26868#[doc = " \"description\": \"Validator's last block proposal was for a protocol version older than\\nthe network's voted protocol version.\","]
26869#[doc = " \"type\": \"object\","]
26870#[doc = " \"required\": ["]
26871#[doc = " \"ProtocolVersionTooOld\""]
26872#[doc = " ],"]
26873#[doc = " \"properties\": {"]
26874#[doc = " \"ProtocolVersionTooOld\": {"]
26875#[doc = " \"type\": \"object\","]
26876#[doc = " \"required\": ["]
26877#[doc = " \"network_version\","]
26878#[doc = " \"version\""]
26879#[doc = " ],"]
26880#[doc = " \"properties\": {"]
26881#[doc = " \"network_version\": {"]
26882#[doc = " \"type\": \"integer\","]
26883#[doc = " \"format\": \"uint32\","]
26884#[doc = " \"minimum\": 0.0"]
26885#[doc = " },"]
26886#[doc = " \"version\": {"]
26887#[doc = " \"type\": \"integer\","]
26888#[doc = " \"format\": \"uint32\","]
26889#[doc = " \"minimum\": 0.0"]
26890#[doc = " }"]
26891#[doc = " }"]
26892#[doc = " }"]
26893#[doc = " },"]
26894#[doc = " \"additionalProperties\": false"]
26895#[doc = " }"]
26896#[doc = " ]"]
26897#[doc = "}"]
26898#[doc = r" ```"]
26899#[doc = r" </details>"]
26900#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26901pub enum ValidatorKickoutReason {
26902 #[doc = "Deprecated"]
26903 #[serde(rename = "_UnusedSlashed")]
26904 UnusedSlashed,
26905 #[doc = "Validator didn't produce enough blocks."]
26906 NotEnoughBlocks { expected: u64, produced: u64 },
26907 #[doc = "Validator didn't produce enough chunks."]
26908 NotEnoughChunks { expected: u64, produced: u64 },
26909 #[doc = "Validator unstaked themselves."]
26910 Unstaked,
26911 #[doc = "Validator stake is now below threshold"]
26912 NotEnoughStake {
26913 stake_u128: ::std::string::String,
26914 threshold_u128: ::std::string::String,
26915 },
26916 #[doc = "Enough stake but is not chosen because of seat limits."]
26917 DidNotGetASeat,
26918 #[doc = "Validator didn't produce enough chunk endorsements."]
26919 NotEnoughChunkEndorsements { expected: u64, produced: u64 },
26920 #[doc = "Validator's last block proposal was for a protocol version older than\nthe network's voted protocol version."]
26921 ProtocolVersionTooOld { network_version: u32, version: u32 },
26922}
26923impl ::std::convert::From<&Self> for ValidatorKickoutReason {
26924 fn from(value: &ValidatorKickoutReason) -> Self {
26925 value.clone()
26926 }
26927}
26928#[doc = "`ValidatorKickoutView`"]
26929#[doc = r""]
26930#[doc = r" <details><summary>JSON schema</summary>"]
26931#[doc = r""]
26932#[doc = r" ```json"]
26933#[doc = "{"]
26934#[doc = " \"type\": \"object\","]
26935#[doc = " \"required\": ["]
26936#[doc = " \"account_id\","]
26937#[doc = " \"reason\""]
26938#[doc = " ],"]
26939#[doc = " \"properties\": {"]
26940#[doc = " \"account_id\": {"]
26941#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
26942#[doc = " },"]
26943#[doc = " \"reason\": {"]
26944#[doc = " \"$ref\": \"#/components/schemas/ValidatorKickoutReason\""]
26945#[doc = " }"]
26946#[doc = " }"]
26947#[doc = "}"]
26948#[doc = r" ```"]
26949#[doc = r" </details>"]
26950#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26951pub struct ValidatorKickoutView {
26952 pub account_id: AccountId,
26953 pub reason: ValidatorKickoutReason,
26954}
26955impl ::std::convert::From<&ValidatorKickoutView> for ValidatorKickoutView {
26956 fn from(value: &ValidatorKickoutView) -> Self {
26957 value.clone()
26958 }
26959}
26960#[doc = "`ValidatorStakeView`"]
26961#[doc = r""]
26962#[doc = r" <details><summary>JSON schema</summary>"]
26963#[doc = r""]
26964#[doc = r" ```json"]
26965#[doc = "{"]
26966#[doc = " \"type\": \"object\","]
26967#[doc = " \"allOf\": ["]
26968#[doc = " {"]
26969#[doc = " \"$ref\": \"#/components/schemas/ValidatorStakeViewV1\""]
26970#[doc = " }"]
26971#[doc = " ],"]
26972#[doc = " \"required\": ["]
26973#[doc = " \"validator_stake_struct_version\""]
26974#[doc = " ],"]
26975#[doc = " \"properties\": {"]
26976#[doc = " \"validator_stake_struct_version\": {"]
26977#[doc = " \"type\": \"string\","]
26978#[doc = " \"enum\": ["]
26979#[doc = " \"V1\""]
26980#[doc = " ]"]
26981#[doc = " }"]
26982#[doc = " }"]
26983#[doc = "}"]
26984#[doc = r" ```"]
26985#[doc = r" </details>"]
26986#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
26987pub struct ValidatorStakeView {
26988 pub account_id: AccountId,
26989 pub public_key: PublicKey,
26990 pub stake: ::std::string::String,
26991 pub validator_stake_struct_version: ValidatorStakeViewValidatorStakeStructVersion,
26992}
26993impl ::std::convert::From<&ValidatorStakeView> for ValidatorStakeView {
26994 fn from(value: &ValidatorStakeView) -> Self {
26995 value.clone()
26996 }
26997}
26998#[doc = "`ValidatorStakeViewV1`"]
26999#[doc = r""]
27000#[doc = r" <details><summary>JSON schema</summary>"]
27001#[doc = r""]
27002#[doc = r" ```json"]
27003#[doc = "{"]
27004#[doc = " \"type\": \"object\","]
27005#[doc = " \"required\": ["]
27006#[doc = " \"account_id\","]
27007#[doc = " \"public_key\","]
27008#[doc = " \"stake\""]
27009#[doc = " ],"]
27010#[doc = " \"properties\": {"]
27011#[doc = " \"account_id\": {"]
27012#[doc = " \"$ref\": \"#/components/schemas/AccountId\""]
27013#[doc = " },"]
27014#[doc = " \"public_key\": {"]
27015#[doc = " \"$ref\": \"#/components/schemas/PublicKey\""]
27016#[doc = " },"]
27017#[doc = " \"stake\": {"]
27018#[doc = " \"type\": \"string\""]
27019#[doc = " }"]
27020#[doc = " }"]
27021#[doc = "}"]
27022#[doc = r" ```"]
27023#[doc = r" </details>"]
27024#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27025pub struct ValidatorStakeViewV1 {
27026 pub account_id: AccountId,
27027 pub public_key: PublicKey,
27028 pub stake: ::std::string::String,
27029}
27030impl ::std::convert::From<&ValidatorStakeViewV1> for ValidatorStakeViewV1 {
27031 fn from(value: &ValidatorStakeViewV1) -> Self {
27032 value.clone()
27033 }
27034}
27035#[doc = "`ValidatorStakeViewValidatorStakeStructVersion`"]
27036#[doc = r""]
27037#[doc = r" <details><summary>JSON schema</summary>"]
27038#[doc = r""]
27039#[doc = r" ```json"]
27040#[doc = "{"]
27041#[doc = " \"type\": \"string\","]
27042#[doc = " \"enum\": ["]
27043#[doc = " \"V1\""]
27044#[doc = " ]"]
27045#[doc = "}"]
27046#[doc = r" ```"]
27047#[doc = r" </details>"]
27048#[derive(
27049 :: serde :: Deserialize,
27050 :: serde :: Serialize,
27051 Clone,
27052 Copy,
27053 Debug,
27054 Eq,
27055 Hash,
27056 Ord,
27057 PartialEq,
27058 PartialOrd,
27059)]
27060pub enum ValidatorStakeViewValidatorStakeStructVersion {
27061 V1,
27062}
27063impl ::std::convert::From<&Self> for ValidatorStakeViewValidatorStakeStructVersion {
27064 fn from(value: &ValidatorStakeViewValidatorStakeStructVersion) -> Self {
27065 value.clone()
27066 }
27067}
27068impl ::std::fmt::Display for ValidatorStakeViewValidatorStakeStructVersion {
27069 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27070 match *self {
27071 Self::V1 => write!(f, "V1"),
27072 }
27073 }
27074}
27075impl ::std::str::FromStr for ValidatorStakeViewValidatorStakeStructVersion {
27076 type Err = self::error::ConversionError;
27077 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27078 match value {
27079 "V1" => Ok(Self::V1),
27080 _ => Err("invalid value".into()),
27081 }
27082 }
27083}
27084impl ::std::convert::TryFrom<&str> for ValidatorStakeViewValidatorStakeStructVersion {
27085 type Error = self::error::ConversionError;
27086 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27087 value.parse()
27088 }
27089}
27090impl ::std::convert::TryFrom<&::std::string::String>
27091 for ValidatorStakeViewValidatorStakeStructVersion
27092{
27093 type Error = self::error::ConversionError;
27094 fn try_from(
27095 value: &::std::string::String,
27096 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27097 value.parse()
27098 }
27099}
27100impl ::std::convert::TryFrom<::std::string::String>
27101 for ValidatorStakeViewValidatorStakeStructVersion
27102{
27103 type Error = self::error::ConversionError;
27104 fn try_from(
27105 value: ::std::string::String,
27106 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27107 value.parse()
27108 }
27109}
27110#[doc = "Data structure for semver version and github tag or commit."]
27111#[doc = r""]
27112#[doc = r" <details><summary>JSON schema</summary>"]
27113#[doc = r""]
27114#[doc = r" ```json"]
27115#[doc = "{"]
27116#[doc = " \"description\": \"Data structure for semver version and github tag or commit.\","]
27117#[doc = " \"type\": \"object\","]
27118#[doc = " \"required\": ["]
27119#[doc = " \"build\","]
27120#[doc = " \"commit\","]
27121#[doc = " \"version\""]
27122#[doc = " ],"]
27123#[doc = " \"properties\": {"]
27124#[doc = " \"build\": {"]
27125#[doc = " \"type\": \"string\""]
27126#[doc = " },"]
27127#[doc = " \"commit\": {"]
27128#[doc = " \"type\": \"string\""]
27129#[doc = " },"]
27130#[doc = " \"rustc_version\": {"]
27131#[doc = " \"default\": \"\","]
27132#[doc = " \"type\": \"string\""]
27133#[doc = " },"]
27134#[doc = " \"version\": {"]
27135#[doc = " \"type\": \"string\""]
27136#[doc = " }"]
27137#[doc = " }"]
27138#[doc = "}"]
27139#[doc = r" ```"]
27140#[doc = r" </details>"]
27141#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
27142pub struct Version {
27143 pub build: ::std::string::String,
27144 pub commit: ::std::string::String,
27145 #[serde(default)]
27146 pub rustc_version: ::std::string::String,
27147 pub version: ::std::string::String,
27148}
27149impl ::std::convert::From<&Version> for Version {
27150 fn from(value: &Version) -> Self {
27151 value.clone()
27152 }
27153}
27154#[doc = "`ViewAccessKeyByBlockIdRequestType`"]
27155#[doc = r""]
27156#[doc = r" <details><summary>JSON schema</summary>"]
27157#[doc = r""]
27158#[doc = r" ```json"]
27159#[doc = "{"]
27160#[doc = " \"type\": \"string\","]
27161#[doc = " \"enum\": ["]
27162#[doc = " \"view_access_key\""]
27163#[doc = " ]"]
27164#[doc = "}"]
27165#[doc = r" ```"]
27166#[doc = r" </details>"]
27167#[derive(
27168 :: serde :: Deserialize,
27169 :: serde :: Serialize,
27170 Clone,
27171 Copy,
27172 Debug,
27173 Eq,
27174 Hash,
27175 Ord,
27176 PartialEq,
27177 PartialOrd,
27178)]
27179pub enum ViewAccessKeyByBlockIdRequestType {
27180 #[serde(rename = "view_access_key")]
27181 ViewAccessKey,
27182}
27183impl ::std::convert::From<&Self> for ViewAccessKeyByBlockIdRequestType {
27184 fn from(value: &ViewAccessKeyByBlockIdRequestType) -> Self {
27185 value.clone()
27186 }
27187}
27188impl ::std::fmt::Display for ViewAccessKeyByBlockIdRequestType {
27189 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27190 match *self {
27191 Self::ViewAccessKey => write!(f, "view_access_key"),
27192 }
27193 }
27194}
27195impl ::std::str::FromStr for ViewAccessKeyByBlockIdRequestType {
27196 type Err = self::error::ConversionError;
27197 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27198 match value {
27199 "view_access_key" => Ok(Self::ViewAccessKey),
27200 _ => Err("invalid value".into()),
27201 }
27202 }
27203}
27204impl ::std::convert::TryFrom<&str> for ViewAccessKeyByBlockIdRequestType {
27205 type Error = self::error::ConversionError;
27206 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27207 value.parse()
27208 }
27209}
27210impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByBlockIdRequestType {
27211 type Error = self::error::ConversionError;
27212 fn try_from(
27213 value: &::std::string::String,
27214 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27215 value.parse()
27216 }
27217}
27218impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByBlockIdRequestType {
27219 type Error = self::error::ConversionError;
27220 fn try_from(
27221 value: ::std::string::String,
27222 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27223 value.parse()
27224 }
27225}
27226#[doc = "`ViewAccessKeyByFinalityRequestType`"]
27227#[doc = r""]
27228#[doc = r" <details><summary>JSON schema</summary>"]
27229#[doc = r""]
27230#[doc = r" ```json"]
27231#[doc = "{"]
27232#[doc = " \"type\": \"string\","]
27233#[doc = " \"enum\": ["]
27234#[doc = " \"view_access_key\""]
27235#[doc = " ]"]
27236#[doc = "}"]
27237#[doc = r" ```"]
27238#[doc = r" </details>"]
27239#[derive(
27240 :: serde :: Deserialize,
27241 :: serde :: Serialize,
27242 Clone,
27243 Copy,
27244 Debug,
27245 Eq,
27246 Hash,
27247 Ord,
27248 PartialEq,
27249 PartialOrd,
27250)]
27251pub enum ViewAccessKeyByFinalityRequestType {
27252 #[serde(rename = "view_access_key")]
27253 ViewAccessKey,
27254}
27255impl ::std::convert::From<&Self> for ViewAccessKeyByFinalityRequestType {
27256 fn from(value: &ViewAccessKeyByFinalityRequestType) -> Self {
27257 value.clone()
27258 }
27259}
27260impl ::std::fmt::Display for ViewAccessKeyByFinalityRequestType {
27261 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27262 match *self {
27263 Self::ViewAccessKey => write!(f, "view_access_key"),
27264 }
27265 }
27266}
27267impl ::std::str::FromStr for ViewAccessKeyByFinalityRequestType {
27268 type Err = self::error::ConversionError;
27269 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27270 match value {
27271 "view_access_key" => Ok(Self::ViewAccessKey),
27272 _ => Err("invalid value".into()),
27273 }
27274 }
27275}
27276impl ::std::convert::TryFrom<&str> for ViewAccessKeyByFinalityRequestType {
27277 type Error = self::error::ConversionError;
27278 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27279 value.parse()
27280 }
27281}
27282impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyByFinalityRequestType {
27283 type Error = self::error::ConversionError;
27284 fn try_from(
27285 value: &::std::string::String,
27286 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27287 value.parse()
27288 }
27289}
27290impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyByFinalityRequestType {
27291 type Error = self::error::ConversionError;
27292 fn try_from(
27293 value: ::std::string::String,
27294 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27295 value.parse()
27296 }
27297}
27298#[doc = "`ViewAccessKeyBySyncCheckpointRequestType`"]
27299#[doc = r""]
27300#[doc = r" <details><summary>JSON schema</summary>"]
27301#[doc = r""]
27302#[doc = r" ```json"]
27303#[doc = "{"]
27304#[doc = " \"type\": \"string\","]
27305#[doc = " \"enum\": ["]
27306#[doc = " \"view_access_key\""]
27307#[doc = " ]"]
27308#[doc = "}"]
27309#[doc = r" ```"]
27310#[doc = r" </details>"]
27311#[derive(
27312 :: serde :: Deserialize,
27313 :: serde :: Serialize,
27314 Clone,
27315 Copy,
27316 Debug,
27317 Eq,
27318 Hash,
27319 Ord,
27320 PartialEq,
27321 PartialOrd,
27322)]
27323pub enum ViewAccessKeyBySyncCheckpointRequestType {
27324 #[serde(rename = "view_access_key")]
27325 ViewAccessKey,
27326}
27327impl ::std::convert::From<&Self> for ViewAccessKeyBySyncCheckpointRequestType {
27328 fn from(value: &ViewAccessKeyBySyncCheckpointRequestType) -> Self {
27329 value.clone()
27330 }
27331}
27332impl ::std::fmt::Display for ViewAccessKeyBySyncCheckpointRequestType {
27333 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27334 match *self {
27335 Self::ViewAccessKey => write!(f, "view_access_key"),
27336 }
27337 }
27338}
27339impl ::std::str::FromStr for ViewAccessKeyBySyncCheckpointRequestType {
27340 type Err = self::error::ConversionError;
27341 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27342 match value {
27343 "view_access_key" => Ok(Self::ViewAccessKey),
27344 _ => Err("invalid value".into()),
27345 }
27346 }
27347}
27348impl ::std::convert::TryFrom<&str> for ViewAccessKeyBySyncCheckpointRequestType {
27349 type Error = self::error::ConversionError;
27350 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27351 value.parse()
27352 }
27353}
27354impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
27355 type Error = self::error::ConversionError;
27356 fn try_from(
27357 value: &::std::string::String,
27358 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27359 value.parse()
27360 }
27361}
27362impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyBySyncCheckpointRequestType {
27363 type Error = self::error::ConversionError;
27364 fn try_from(
27365 value: ::std::string::String,
27366 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27367 value.parse()
27368 }
27369}
27370#[doc = "`ViewAccessKeyListByBlockIdRequestType`"]
27371#[doc = r""]
27372#[doc = r" <details><summary>JSON schema</summary>"]
27373#[doc = r""]
27374#[doc = r" ```json"]
27375#[doc = "{"]
27376#[doc = " \"type\": \"string\","]
27377#[doc = " \"enum\": ["]
27378#[doc = " \"view_access_key_list\""]
27379#[doc = " ]"]
27380#[doc = "}"]
27381#[doc = r" ```"]
27382#[doc = r" </details>"]
27383#[derive(
27384 :: serde :: Deserialize,
27385 :: serde :: Serialize,
27386 Clone,
27387 Copy,
27388 Debug,
27389 Eq,
27390 Hash,
27391 Ord,
27392 PartialEq,
27393 PartialOrd,
27394)]
27395pub enum ViewAccessKeyListByBlockIdRequestType {
27396 #[serde(rename = "view_access_key_list")]
27397 ViewAccessKeyList,
27398}
27399impl ::std::convert::From<&Self> for ViewAccessKeyListByBlockIdRequestType {
27400 fn from(value: &ViewAccessKeyListByBlockIdRequestType) -> Self {
27401 value.clone()
27402 }
27403}
27404impl ::std::fmt::Display for ViewAccessKeyListByBlockIdRequestType {
27405 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27406 match *self {
27407 Self::ViewAccessKeyList => write!(f, "view_access_key_list"),
27408 }
27409 }
27410}
27411impl ::std::str::FromStr for ViewAccessKeyListByBlockIdRequestType {
27412 type Err = self::error::ConversionError;
27413 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27414 match value {
27415 "view_access_key_list" => Ok(Self::ViewAccessKeyList),
27416 _ => Err("invalid value".into()),
27417 }
27418 }
27419}
27420impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByBlockIdRequestType {
27421 type Error = self::error::ConversionError;
27422 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27423 value.parse()
27424 }
27425}
27426impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
27427 type Error = self::error::ConversionError;
27428 fn try_from(
27429 value: &::std::string::String,
27430 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27431 value.parse()
27432 }
27433}
27434impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByBlockIdRequestType {
27435 type Error = self::error::ConversionError;
27436 fn try_from(
27437 value: ::std::string::String,
27438 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27439 value.parse()
27440 }
27441}
27442#[doc = "`ViewAccessKeyListByFinalityRequestType`"]
27443#[doc = r""]
27444#[doc = r" <details><summary>JSON schema</summary>"]
27445#[doc = r""]
27446#[doc = r" ```json"]
27447#[doc = "{"]
27448#[doc = " \"type\": \"string\","]
27449#[doc = " \"enum\": ["]
27450#[doc = " \"view_access_key_list\""]
27451#[doc = " ]"]
27452#[doc = "}"]
27453#[doc = r" ```"]
27454#[doc = r" </details>"]
27455#[derive(
27456 :: serde :: Deserialize,
27457 :: serde :: Serialize,
27458 Clone,
27459 Copy,
27460 Debug,
27461 Eq,
27462 Hash,
27463 Ord,
27464 PartialEq,
27465 PartialOrd,
27466)]
27467pub enum ViewAccessKeyListByFinalityRequestType {
27468 #[serde(rename = "view_access_key_list")]
27469 ViewAccessKeyList,
27470}
27471impl ::std::convert::From<&Self> for ViewAccessKeyListByFinalityRequestType {
27472 fn from(value: &ViewAccessKeyListByFinalityRequestType) -> Self {
27473 value.clone()
27474 }
27475}
27476impl ::std::fmt::Display for ViewAccessKeyListByFinalityRequestType {
27477 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27478 match *self {
27479 Self::ViewAccessKeyList => write!(f, "view_access_key_list"),
27480 }
27481 }
27482}
27483impl ::std::str::FromStr for ViewAccessKeyListByFinalityRequestType {
27484 type Err = self::error::ConversionError;
27485 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27486 match value {
27487 "view_access_key_list" => Ok(Self::ViewAccessKeyList),
27488 _ => Err("invalid value".into()),
27489 }
27490 }
27491}
27492impl ::std::convert::TryFrom<&str> for ViewAccessKeyListByFinalityRequestType {
27493 type Error = self::error::ConversionError;
27494 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27495 value.parse()
27496 }
27497}
27498impl ::std::convert::TryFrom<&::std::string::String> for ViewAccessKeyListByFinalityRequestType {
27499 type Error = self::error::ConversionError;
27500 fn try_from(
27501 value: &::std::string::String,
27502 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27503 value.parse()
27504 }
27505}
27506impl ::std::convert::TryFrom<::std::string::String> for ViewAccessKeyListByFinalityRequestType {
27507 type Error = self::error::ConversionError;
27508 fn try_from(
27509 value: ::std::string::String,
27510 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27511 value.parse()
27512 }
27513}
27514#[doc = "`ViewAccessKeyListBySyncCheckpointRequestType`"]
27515#[doc = r""]
27516#[doc = r" <details><summary>JSON schema</summary>"]
27517#[doc = r""]
27518#[doc = r" ```json"]
27519#[doc = "{"]
27520#[doc = " \"type\": \"string\","]
27521#[doc = " \"enum\": ["]
27522#[doc = " \"view_access_key_list\""]
27523#[doc = " ]"]
27524#[doc = "}"]
27525#[doc = r" ```"]
27526#[doc = r" </details>"]
27527#[derive(
27528 :: serde :: Deserialize,
27529 :: serde :: Serialize,
27530 Clone,
27531 Copy,
27532 Debug,
27533 Eq,
27534 Hash,
27535 Ord,
27536 PartialEq,
27537 PartialOrd,
27538)]
27539pub enum ViewAccessKeyListBySyncCheckpointRequestType {
27540 #[serde(rename = "view_access_key_list")]
27541 ViewAccessKeyList,
27542}
27543impl ::std::convert::From<&Self> for ViewAccessKeyListBySyncCheckpointRequestType {
27544 fn from(value: &ViewAccessKeyListBySyncCheckpointRequestType) -> Self {
27545 value.clone()
27546 }
27547}
27548impl ::std::fmt::Display for ViewAccessKeyListBySyncCheckpointRequestType {
27549 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27550 match *self {
27551 Self::ViewAccessKeyList => write!(f, "view_access_key_list"),
27552 }
27553 }
27554}
27555impl ::std::str::FromStr for ViewAccessKeyListBySyncCheckpointRequestType {
27556 type Err = self::error::ConversionError;
27557 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27558 match value {
27559 "view_access_key_list" => Ok(Self::ViewAccessKeyList),
27560 _ => Err("invalid value".into()),
27561 }
27562 }
27563}
27564impl ::std::convert::TryFrom<&str> for ViewAccessKeyListBySyncCheckpointRequestType {
27565 type Error = self::error::ConversionError;
27566 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27567 value.parse()
27568 }
27569}
27570impl ::std::convert::TryFrom<&::std::string::String>
27571 for ViewAccessKeyListBySyncCheckpointRequestType
27572{
27573 type Error = self::error::ConversionError;
27574 fn try_from(
27575 value: &::std::string::String,
27576 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27577 value.parse()
27578 }
27579}
27580impl ::std::convert::TryFrom<::std::string::String>
27581 for ViewAccessKeyListBySyncCheckpointRequestType
27582{
27583 type Error = self::error::ConversionError;
27584 fn try_from(
27585 value: ::std::string::String,
27586 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27587 value.parse()
27588 }
27589}
27590#[doc = "`ViewAccountByBlockIdRequestType`"]
27591#[doc = r""]
27592#[doc = r" <details><summary>JSON schema</summary>"]
27593#[doc = r""]
27594#[doc = r" ```json"]
27595#[doc = "{"]
27596#[doc = " \"type\": \"string\","]
27597#[doc = " \"enum\": ["]
27598#[doc = " \"view_account\""]
27599#[doc = " ]"]
27600#[doc = "}"]
27601#[doc = r" ```"]
27602#[doc = r" </details>"]
27603#[derive(
27604 :: serde :: Deserialize,
27605 :: serde :: Serialize,
27606 Clone,
27607 Copy,
27608 Debug,
27609 Eq,
27610 Hash,
27611 Ord,
27612 PartialEq,
27613 PartialOrd,
27614)]
27615pub enum ViewAccountByBlockIdRequestType {
27616 #[serde(rename = "view_account")]
27617 ViewAccount,
27618}
27619impl ::std::convert::From<&Self> for ViewAccountByBlockIdRequestType {
27620 fn from(value: &ViewAccountByBlockIdRequestType) -> Self {
27621 value.clone()
27622 }
27623}
27624impl ::std::fmt::Display for ViewAccountByBlockIdRequestType {
27625 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27626 match *self {
27627 Self::ViewAccount => write!(f, "view_account"),
27628 }
27629 }
27630}
27631impl ::std::str::FromStr for ViewAccountByBlockIdRequestType {
27632 type Err = self::error::ConversionError;
27633 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27634 match value {
27635 "view_account" => Ok(Self::ViewAccount),
27636 _ => Err("invalid value".into()),
27637 }
27638 }
27639}
27640impl ::std::convert::TryFrom<&str> for ViewAccountByBlockIdRequestType {
27641 type Error = self::error::ConversionError;
27642 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27643 value.parse()
27644 }
27645}
27646impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByBlockIdRequestType {
27647 type Error = self::error::ConversionError;
27648 fn try_from(
27649 value: &::std::string::String,
27650 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27651 value.parse()
27652 }
27653}
27654impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByBlockIdRequestType {
27655 type Error = self::error::ConversionError;
27656 fn try_from(
27657 value: ::std::string::String,
27658 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27659 value.parse()
27660 }
27661}
27662#[doc = "`ViewAccountByFinalityRequestType`"]
27663#[doc = r""]
27664#[doc = r" <details><summary>JSON schema</summary>"]
27665#[doc = r""]
27666#[doc = r" ```json"]
27667#[doc = "{"]
27668#[doc = " \"type\": \"string\","]
27669#[doc = " \"enum\": ["]
27670#[doc = " \"view_account\""]
27671#[doc = " ]"]
27672#[doc = "}"]
27673#[doc = r" ```"]
27674#[doc = r" </details>"]
27675#[derive(
27676 :: serde :: Deserialize,
27677 :: serde :: Serialize,
27678 Clone,
27679 Copy,
27680 Debug,
27681 Eq,
27682 Hash,
27683 Ord,
27684 PartialEq,
27685 PartialOrd,
27686)]
27687pub enum ViewAccountByFinalityRequestType {
27688 #[serde(rename = "view_account")]
27689 ViewAccount,
27690}
27691impl ::std::convert::From<&Self> for ViewAccountByFinalityRequestType {
27692 fn from(value: &ViewAccountByFinalityRequestType) -> Self {
27693 value.clone()
27694 }
27695}
27696impl ::std::fmt::Display for ViewAccountByFinalityRequestType {
27697 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27698 match *self {
27699 Self::ViewAccount => write!(f, "view_account"),
27700 }
27701 }
27702}
27703impl ::std::str::FromStr for ViewAccountByFinalityRequestType {
27704 type Err = self::error::ConversionError;
27705 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27706 match value {
27707 "view_account" => Ok(Self::ViewAccount),
27708 _ => Err("invalid value".into()),
27709 }
27710 }
27711}
27712impl ::std::convert::TryFrom<&str> for ViewAccountByFinalityRequestType {
27713 type Error = self::error::ConversionError;
27714 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27715 value.parse()
27716 }
27717}
27718impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountByFinalityRequestType {
27719 type Error = self::error::ConversionError;
27720 fn try_from(
27721 value: &::std::string::String,
27722 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27723 value.parse()
27724 }
27725}
27726impl ::std::convert::TryFrom<::std::string::String> for ViewAccountByFinalityRequestType {
27727 type Error = self::error::ConversionError;
27728 fn try_from(
27729 value: ::std::string::String,
27730 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27731 value.parse()
27732 }
27733}
27734#[doc = "`ViewAccountBySyncCheckpointRequestType`"]
27735#[doc = r""]
27736#[doc = r" <details><summary>JSON schema</summary>"]
27737#[doc = r""]
27738#[doc = r" ```json"]
27739#[doc = "{"]
27740#[doc = " \"type\": \"string\","]
27741#[doc = " \"enum\": ["]
27742#[doc = " \"view_account\""]
27743#[doc = " ]"]
27744#[doc = "}"]
27745#[doc = r" ```"]
27746#[doc = r" </details>"]
27747#[derive(
27748 :: serde :: Deserialize,
27749 :: serde :: Serialize,
27750 Clone,
27751 Copy,
27752 Debug,
27753 Eq,
27754 Hash,
27755 Ord,
27756 PartialEq,
27757 PartialOrd,
27758)]
27759pub enum ViewAccountBySyncCheckpointRequestType {
27760 #[serde(rename = "view_account")]
27761 ViewAccount,
27762}
27763impl ::std::convert::From<&Self> for ViewAccountBySyncCheckpointRequestType {
27764 fn from(value: &ViewAccountBySyncCheckpointRequestType) -> Self {
27765 value.clone()
27766 }
27767}
27768impl ::std::fmt::Display for ViewAccountBySyncCheckpointRequestType {
27769 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27770 match *self {
27771 Self::ViewAccount => write!(f, "view_account"),
27772 }
27773 }
27774}
27775impl ::std::str::FromStr for ViewAccountBySyncCheckpointRequestType {
27776 type Err = self::error::ConversionError;
27777 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27778 match value {
27779 "view_account" => Ok(Self::ViewAccount),
27780 _ => Err("invalid value".into()),
27781 }
27782 }
27783}
27784impl ::std::convert::TryFrom<&str> for ViewAccountBySyncCheckpointRequestType {
27785 type Error = self::error::ConversionError;
27786 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27787 value.parse()
27788 }
27789}
27790impl ::std::convert::TryFrom<&::std::string::String> for ViewAccountBySyncCheckpointRequestType {
27791 type Error = self::error::ConversionError;
27792 fn try_from(
27793 value: &::std::string::String,
27794 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27795 value.parse()
27796 }
27797}
27798impl ::std::convert::TryFrom<::std::string::String> for ViewAccountBySyncCheckpointRequestType {
27799 type Error = self::error::ConversionError;
27800 fn try_from(
27801 value: ::std::string::String,
27802 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27803 value.parse()
27804 }
27805}
27806#[doc = "`ViewCodeByBlockIdRequestType`"]
27807#[doc = r""]
27808#[doc = r" <details><summary>JSON schema</summary>"]
27809#[doc = r""]
27810#[doc = r" ```json"]
27811#[doc = "{"]
27812#[doc = " \"type\": \"string\","]
27813#[doc = " \"enum\": ["]
27814#[doc = " \"view_code\""]
27815#[doc = " ]"]
27816#[doc = "}"]
27817#[doc = r" ```"]
27818#[doc = r" </details>"]
27819#[derive(
27820 :: serde :: Deserialize,
27821 :: serde :: Serialize,
27822 Clone,
27823 Copy,
27824 Debug,
27825 Eq,
27826 Hash,
27827 Ord,
27828 PartialEq,
27829 PartialOrd,
27830)]
27831pub enum ViewCodeByBlockIdRequestType {
27832 #[serde(rename = "view_code")]
27833 ViewCode,
27834}
27835impl ::std::convert::From<&Self> for ViewCodeByBlockIdRequestType {
27836 fn from(value: &ViewCodeByBlockIdRequestType) -> Self {
27837 value.clone()
27838 }
27839}
27840impl ::std::fmt::Display for ViewCodeByBlockIdRequestType {
27841 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27842 match *self {
27843 Self::ViewCode => write!(f, "view_code"),
27844 }
27845 }
27846}
27847impl ::std::str::FromStr for ViewCodeByBlockIdRequestType {
27848 type Err = self::error::ConversionError;
27849 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27850 match value {
27851 "view_code" => Ok(Self::ViewCode),
27852 _ => Err("invalid value".into()),
27853 }
27854 }
27855}
27856impl ::std::convert::TryFrom<&str> for ViewCodeByBlockIdRequestType {
27857 type Error = self::error::ConversionError;
27858 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27859 value.parse()
27860 }
27861}
27862impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByBlockIdRequestType {
27863 type Error = self::error::ConversionError;
27864 fn try_from(
27865 value: &::std::string::String,
27866 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27867 value.parse()
27868 }
27869}
27870impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByBlockIdRequestType {
27871 type Error = self::error::ConversionError;
27872 fn try_from(
27873 value: ::std::string::String,
27874 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27875 value.parse()
27876 }
27877}
27878#[doc = "`ViewCodeByFinalityRequestType`"]
27879#[doc = r""]
27880#[doc = r" <details><summary>JSON schema</summary>"]
27881#[doc = r""]
27882#[doc = r" ```json"]
27883#[doc = "{"]
27884#[doc = " \"type\": \"string\","]
27885#[doc = " \"enum\": ["]
27886#[doc = " \"view_code\""]
27887#[doc = " ]"]
27888#[doc = "}"]
27889#[doc = r" ```"]
27890#[doc = r" </details>"]
27891#[derive(
27892 :: serde :: Deserialize,
27893 :: serde :: Serialize,
27894 Clone,
27895 Copy,
27896 Debug,
27897 Eq,
27898 Hash,
27899 Ord,
27900 PartialEq,
27901 PartialOrd,
27902)]
27903pub enum ViewCodeByFinalityRequestType {
27904 #[serde(rename = "view_code")]
27905 ViewCode,
27906}
27907impl ::std::convert::From<&Self> for ViewCodeByFinalityRequestType {
27908 fn from(value: &ViewCodeByFinalityRequestType) -> Self {
27909 value.clone()
27910 }
27911}
27912impl ::std::fmt::Display for ViewCodeByFinalityRequestType {
27913 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27914 match *self {
27915 Self::ViewCode => write!(f, "view_code"),
27916 }
27917 }
27918}
27919impl ::std::str::FromStr for ViewCodeByFinalityRequestType {
27920 type Err = self::error::ConversionError;
27921 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27922 match value {
27923 "view_code" => Ok(Self::ViewCode),
27924 _ => Err("invalid value".into()),
27925 }
27926 }
27927}
27928impl ::std::convert::TryFrom<&str> for ViewCodeByFinalityRequestType {
27929 type Error = self::error::ConversionError;
27930 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27931 value.parse()
27932 }
27933}
27934impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeByFinalityRequestType {
27935 type Error = self::error::ConversionError;
27936 fn try_from(
27937 value: &::std::string::String,
27938 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27939 value.parse()
27940 }
27941}
27942impl ::std::convert::TryFrom<::std::string::String> for ViewCodeByFinalityRequestType {
27943 type Error = self::error::ConversionError;
27944 fn try_from(
27945 value: ::std::string::String,
27946 ) -> ::std::result::Result<Self, self::error::ConversionError> {
27947 value.parse()
27948 }
27949}
27950#[doc = "`ViewCodeBySyncCheckpointRequestType`"]
27951#[doc = r""]
27952#[doc = r" <details><summary>JSON schema</summary>"]
27953#[doc = r""]
27954#[doc = r" ```json"]
27955#[doc = "{"]
27956#[doc = " \"type\": \"string\","]
27957#[doc = " \"enum\": ["]
27958#[doc = " \"view_code\""]
27959#[doc = " ]"]
27960#[doc = "}"]
27961#[doc = r" ```"]
27962#[doc = r" </details>"]
27963#[derive(
27964 :: serde :: Deserialize,
27965 :: serde :: Serialize,
27966 Clone,
27967 Copy,
27968 Debug,
27969 Eq,
27970 Hash,
27971 Ord,
27972 PartialEq,
27973 PartialOrd,
27974)]
27975pub enum ViewCodeBySyncCheckpointRequestType {
27976 #[serde(rename = "view_code")]
27977 ViewCode,
27978}
27979impl ::std::convert::From<&Self> for ViewCodeBySyncCheckpointRequestType {
27980 fn from(value: &ViewCodeBySyncCheckpointRequestType) -> Self {
27981 value.clone()
27982 }
27983}
27984impl ::std::fmt::Display for ViewCodeBySyncCheckpointRequestType {
27985 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27986 match *self {
27987 Self::ViewCode => write!(f, "view_code"),
27988 }
27989 }
27990}
27991impl ::std::str::FromStr for ViewCodeBySyncCheckpointRequestType {
27992 type Err = self::error::ConversionError;
27993 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27994 match value {
27995 "view_code" => Ok(Self::ViewCode),
27996 _ => Err("invalid value".into()),
27997 }
27998 }
27999}
28000impl ::std::convert::TryFrom<&str> for ViewCodeBySyncCheckpointRequestType {
28001 type Error = self::error::ConversionError;
28002 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28003 value.parse()
28004 }
28005}
28006impl ::std::convert::TryFrom<&::std::string::String> for ViewCodeBySyncCheckpointRequestType {
28007 type Error = self::error::ConversionError;
28008 fn try_from(
28009 value: &::std::string::String,
28010 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28011 value.parse()
28012 }
28013}
28014impl ::std::convert::TryFrom<::std::string::String> for ViewCodeBySyncCheckpointRequestType {
28015 type Error = self::error::ConversionError;
28016 fn try_from(
28017 value: ::std::string::String,
28018 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28019 value.parse()
28020 }
28021}
28022#[doc = "`ViewGlobalContractCodeByAccountIdByBlockIdRequestType`"]
28023#[doc = r""]
28024#[doc = r" <details><summary>JSON schema</summary>"]
28025#[doc = r""]
28026#[doc = r" ```json"]
28027#[doc = "{"]
28028#[doc = " \"type\": \"string\","]
28029#[doc = " \"enum\": ["]
28030#[doc = " \"view_global_contract_code_by_account_id\""]
28031#[doc = " ]"]
28032#[doc = "}"]
28033#[doc = r" ```"]
28034#[doc = r" </details>"]
28035#[derive(
28036 :: serde :: Deserialize,
28037 :: serde :: Serialize,
28038 Clone,
28039 Copy,
28040 Debug,
28041 Eq,
28042 Hash,
28043 Ord,
28044 PartialEq,
28045 PartialOrd,
28046)]
28047pub enum ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
28048 #[serde(rename = "view_global_contract_code_by_account_id")]
28049 ViewGlobalContractCodeByAccountId,
28050}
28051impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
28052 fn from(value: &ViewGlobalContractCodeByAccountIdByBlockIdRequestType) -> Self {
28053 value.clone()
28054 }
28055}
28056impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
28057 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28058 match *self {
28059 Self::ViewGlobalContractCodeByAccountId => {
28060 write!(f, "view_global_contract_code_by_account_id")
28061 }
28062 }
28063 }
28064}
28065impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
28066 type Err = self::error::ConversionError;
28067 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28068 match value {
28069 "view_global_contract_code_by_account_id" => {
28070 Ok(Self::ViewGlobalContractCodeByAccountId)
28071 }
28072 _ => Err("invalid value".into()),
28073 }
28074 }
28075}
28076impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByBlockIdRequestType {
28077 type Error = self::error::ConversionError;
28078 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28079 value.parse()
28080 }
28081}
28082impl ::std::convert::TryFrom<&::std::string::String>
28083 for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
28084{
28085 type Error = self::error::ConversionError;
28086 fn try_from(
28087 value: &::std::string::String,
28088 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28089 value.parse()
28090 }
28091}
28092impl ::std::convert::TryFrom<::std::string::String>
28093 for ViewGlobalContractCodeByAccountIdByBlockIdRequestType
28094{
28095 type Error = self::error::ConversionError;
28096 fn try_from(
28097 value: ::std::string::String,
28098 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28099 value.parse()
28100 }
28101}
28102#[doc = "`ViewGlobalContractCodeByAccountIdByFinalityRequestType`"]
28103#[doc = r""]
28104#[doc = r" <details><summary>JSON schema</summary>"]
28105#[doc = r""]
28106#[doc = r" ```json"]
28107#[doc = "{"]
28108#[doc = " \"type\": \"string\","]
28109#[doc = " \"enum\": ["]
28110#[doc = " \"view_global_contract_code_by_account_id\""]
28111#[doc = " ]"]
28112#[doc = "}"]
28113#[doc = r" ```"]
28114#[doc = r" </details>"]
28115#[derive(
28116 :: serde :: Deserialize,
28117 :: serde :: Serialize,
28118 Clone,
28119 Copy,
28120 Debug,
28121 Eq,
28122 Hash,
28123 Ord,
28124 PartialEq,
28125 PartialOrd,
28126)]
28127pub enum ViewGlobalContractCodeByAccountIdByFinalityRequestType {
28128 #[serde(rename = "view_global_contract_code_by_account_id")]
28129 ViewGlobalContractCodeByAccountId,
28130}
28131impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
28132 fn from(value: &ViewGlobalContractCodeByAccountIdByFinalityRequestType) -> Self {
28133 value.clone()
28134 }
28135}
28136impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
28137 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28138 match *self {
28139 Self::ViewGlobalContractCodeByAccountId => {
28140 write!(f, "view_global_contract_code_by_account_id")
28141 }
28142 }
28143 }
28144}
28145impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
28146 type Err = self::error::ConversionError;
28147 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28148 match value {
28149 "view_global_contract_code_by_account_id" => {
28150 Ok(Self::ViewGlobalContractCodeByAccountId)
28151 }
28152 _ => Err("invalid value".into()),
28153 }
28154 }
28155}
28156impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByAccountIdByFinalityRequestType {
28157 type Error = self::error::ConversionError;
28158 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28159 value.parse()
28160 }
28161}
28162impl ::std::convert::TryFrom<&::std::string::String>
28163 for ViewGlobalContractCodeByAccountIdByFinalityRequestType
28164{
28165 type Error = self::error::ConversionError;
28166 fn try_from(
28167 value: &::std::string::String,
28168 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28169 value.parse()
28170 }
28171}
28172impl ::std::convert::TryFrom<::std::string::String>
28173 for ViewGlobalContractCodeByAccountIdByFinalityRequestType
28174{
28175 type Error = self::error::ConversionError;
28176 fn try_from(
28177 value: ::std::string::String,
28178 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28179 value.parse()
28180 }
28181}
28182#[doc = "`ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType`"]
28183#[doc = r""]
28184#[doc = r" <details><summary>JSON schema</summary>"]
28185#[doc = r""]
28186#[doc = r" ```json"]
28187#[doc = "{"]
28188#[doc = " \"type\": \"string\","]
28189#[doc = " \"enum\": ["]
28190#[doc = " \"view_global_contract_code_by_account_id\""]
28191#[doc = " ]"]
28192#[doc = "}"]
28193#[doc = r" ```"]
28194#[doc = r" </details>"]
28195#[derive(
28196 :: serde :: Deserialize,
28197 :: serde :: Serialize,
28198 Clone,
28199 Copy,
28200 Debug,
28201 Eq,
28202 Hash,
28203 Ord,
28204 PartialEq,
28205 PartialOrd,
28206)]
28207pub enum ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
28208 #[serde(rename = "view_global_contract_code_by_account_id")]
28209 ViewGlobalContractCodeByAccountId,
28210}
28211impl ::std::convert::From<&Self> for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
28212 fn from(value: &ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType) -> Self {
28213 value.clone()
28214 }
28215}
28216impl ::std::fmt::Display for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
28217 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28218 match *self {
28219 Self::ViewGlobalContractCodeByAccountId => {
28220 write!(f, "view_global_contract_code_by_account_id")
28221 }
28222 }
28223 }
28224}
28225impl ::std::str::FromStr for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType {
28226 type Err = self::error::ConversionError;
28227 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28228 match value {
28229 "view_global_contract_code_by_account_id" => {
28230 Ok(Self::ViewGlobalContractCodeByAccountId)
28231 }
28232 _ => Err("invalid value".into()),
28233 }
28234 }
28235}
28236impl ::std::convert::TryFrom<&str>
28237 for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
28238{
28239 type Error = self::error::ConversionError;
28240 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28241 value.parse()
28242 }
28243}
28244impl ::std::convert::TryFrom<&::std::string::String>
28245 for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
28246{
28247 type Error = self::error::ConversionError;
28248 fn try_from(
28249 value: &::std::string::String,
28250 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28251 value.parse()
28252 }
28253}
28254impl ::std::convert::TryFrom<::std::string::String>
28255 for ViewGlobalContractCodeByAccountIdBySyncCheckpointRequestType
28256{
28257 type Error = self::error::ConversionError;
28258 fn try_from(
28259 value: ::std::string::String,
28260 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28261 value.parse()
28262 }
28263}
28264#[doc = "`ViewGlobalContractCodeByBlockIdRequestType`"]
28265#[doc = r""]
28266#[doc = r" <details><summary>JSON schema</summary>"]
28267#[doc = r""]
28268#[doc = r" ```json"]
28269#[doc = "{"]
28270#[doc = " \"type\": \"string\","]
28271#[doc = " \"enum\": ["]
28272#[doc = " \"view_global_contract_code\""]
28273#[doc = " ]"]
28274#[doc = "}"]
28275#[doc = r" ```"]
28276#[doc = r" </details>"]
28277#[derive(
28278 :: serde :: Deserialize,
28279 :: serde :: Serialize,
28280 Clone,
28281 Copy,
28282 Debug,
28283 Eq,
28284 Hash,
28285 Ord,
28286 PartialEq,
28287 PartialOrd,
28288)]
28289pub enum ViewGlobalContractCodeByBlockIdRequestType {
28290 #[serde(rename = "view_global_contract_code")]
28291 ViewGlobalContractCode,
28292}
28293impl ::std::convert::From<&Self> for ViewGlobalContractCodeByBlockIdRequestType {
28294 fn from(value: &ViewGlobalContractCodeByBlockIdRequestType) -> Self {
28295 value.clone()
28296 }
28297}
28298impl ::std::fmt::Display for ViewGlobalContractCodeByBlockIdRequestType {
28299 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28300 match *self {
28301 Self::ViewGlobalContractCode => write!(f, "view_global_contract_code"),
28302 }
28303 }
28304}
28305impl ::std::str::FromStr for ViewGlobalContractCodeByBlockIdRequestType {
28306 type Err = self::error::ConversionError;
28307 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28308 match value {
28309 "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
28310 _ => Err("invalid value".into()),
28311 }
28312 }
28313}
28314impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByBlockIdRequestType {
28315 type Error = self::error::ConversionError;
28316 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28317 value.parse()
28318 }
28319}
28320impl ::std::convert::TryFrom<&::std::string::String>
28321 for ViewGlobalContractCodeByBlockIdRequestType
28322{
28323 type Error = self::error::ConversionError;
28324 fn try_from(
28325 value: &::std::string::String,
28326 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28327 value.parse()
28328 }
28329}
28330impl ::std::convert::TryFrom<::std::string::String> for ViewGlobalContractCodeByBlockIdRequestType {
28331 type Error = self::error::ConversionError;
28332 fn try_from(
28333 value: ::std::string::String,
28334 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28335 value.parse()
28336 }
28337}
28338#[doc = "`ViewGlobalContractCodeByFinalityRequestType`"]
28339#[doc = r""]
28340#[doc = r" <details><summary>JSON schema</summary>"]
28341#[doc = r""]
28342#[doc = r" ```json"]
28343#[doc = "{"]
28344#[doc = " \"type\": \"string\","]
28345#[doc = " \"enum\": ["]
28346#[doc = " \"view_global_contract_code\""]
28347#[doc = " ]"]
28348#[doc = "}"]
28349#[doc = r" ```"]
28350#[doc = r" </details>"]
28351#[derive(
28352 :: serde :: Deserialize,
28353 :: serde :: Serialize,
28354 Clone,
28355 Copy,
28356 Debug,
28357 Eq,
28358 Hash,
28359 Ord,
28360 PartialEq,
28361 PartialOrd,
28362)]
28363pub enum ViewGlobalContractCodeByFinalityRequestType {
28364 #[serde(rename = "view_global_contract_code")]
28365 ViewGlobalContractCode,
28366}
28367impl ::std::convert::From<&Self> for ViewGlobalContractCodeByFinalityRequestType {
28368 fn from(value: &ViewGlobalContractCodeByFinalityRequestType) -> Self {
28369 value.clone()
28370 }
28371}
28372impl ::std::fmt::Display for ViewGlobalContractCodeByFinalityRequestType {
28373 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28374 match *self {
28375 Self::ViewGlobalContractCode => write!(f, "view_global_contract_code"),
28376 }
28377 }
28378}
28379impl ::std::str::FromStr for ViewGlobalContractCodeByFinalityRequestType {
28380 type Err = self::error::ConversionError;
28381 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28382 match value {
28383 "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
28384 _ => Err("invalid value".into()),
28385 }
28386 }
28387}
28388impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeByFinalityRequestType {
28389 type Error = self::error::ConversionError;
28390 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28391 value.parse()
28392 }
28393}
28394impl ::std::convert::TryFrom<&::std::string::String>
28395 for ViewGlobalContractCodeByFinalityRequestType
28396{
28397 type Error = self::error::ConversionError;
28398 fn try_from(
28399 value: &::std::string::String,
28400 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28401 value.parse()
28402 }
28403}
28404impl ::std::convert::TryFrom<::std::string::String>
28405 for ViewGlobalContractCodeByFinalityRequestType
28406{
28407 type Error = self::error::ConversionError;
28408 fn try_from(
28409 value: ::std::string::String,
28410 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28411 value.parse()
28412 }
28413}
28414#[doc = "`ViewGlobalContractCodeBySyncCheckpointRequestType`"]
28415#[doc = r""]
28416#[doc = r" <details><summary>JSON schema</summary>"]
28417#[doc = r""]
28418#[doc = r" ```json"]
28419#[doc = "{"]
28420#[doc = " \"type\": \"string\","]
28421#[doc = " \"enum\": ["]
28422#[doc = " \"view_global_contract_code\""]
28423#[doc = " ]"]
28424#[doc = "}"]
28425#[doc = r" ```"]
28426#[doc = r" </details>"]
28427#[derive(
28428 :: serde :: Deserialize,
28429 :: serde :: Serialize,
28430 Clone,
28431 Copy,
28432 Debug,
28433 Eq,
28434 Hash,
28435 Ord,
28436 PartialEq,
28437 PartialOrd,
28438)]
28439pub enum ViewGlobalContractCodeBySyncCheckpointRequestType {
28440 #[serde(rename = "view_global_contract_code")]
28441 ViewGlobalContractCode,
28442}
28443impl ::std::convert::From<&Self> for ViewGlobalContractCodeBySyncCheckpointRequestType {
28444 fn from(value: &ViewGlobalContractCodeBySyncCheckpointRequestType) -> Self {
28445 value.clone()
28446 }
28447}
28448impl ::std::fmt::Display for ViewGlobalContractCodeBySyncCheckpointRequestType {
28449 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28450 match *self {
28451 Self::ViewGlobalContractCode => write!(f, "view_global_contract_code"),
28452 }
28453 }
28454}
28455impl ::std::str::FromStr for ViewGlobalContractCodeBySyncCheckpointRequestType {
28456 type Err = self::error::ConversionError;
28457 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28458 match value {
28459 "view_global_contract_code" => Ok(Self::ViewGlobalContractCode),
28460 _ => Err("invalid value".into()),
28461 }
28462 }
28463}
28464impl ::std::convert::TryFrom<&str> for ViewGlobalContractCodeBySyncCheckpointRequestType {
28465 type Error = self::error::ConversionError;
28466 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28467 value.parse()
28468 }
28469}
28470impl ::std::convert::TryFrom<&::std::string::String>
28471 for ViewGlobalContractCodeBySyncCheckpointRequestType
28472{
28473 type Error = self::error::ConversionError;
28474 fn try_from(
28475 value: &::std::string::String,
28476 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28477 value.parse()
28478 }
28479}
28480impl ::std::convert::TryFrom<::std::string::String>
28481 for ViewGlobalContractCodeBySyncCheckpointRequestType
28482{
28483 type Error = self::error::ConversionError;
28484 fn try_from(
28485 value: ::std::string::String,
28486 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28487 value.parse()
28488 }
28489}
28490#[doc = "`ViewStateByBlockIdRequestType`"]
28491#[doc = r""]
28492#[doc = r" <details><summary>JSON schema</summary>"]
28493#[doc = r""]
28494#[doc = r" ```json"]
28495#[doc = "{"]
28496#[doc = " \"type\": \"string\","]
28497#[doc = " \"enum\": ["]
28498#[doc = " \"view_state\""]
28499#[doc = " ]"]
28500#[doc = "}"]
28501#[doc = r" ```"]
28502#[doc = r" </details>"]
28503#[derive(
28504 :: serde :: Deserialize,
28505 :: serde :: Serialize,
28506 Clone,
28507 Copy,
28508 Debug,
28509 Eq,
28510 Hash,
28511 Ord,
28512 PartialEq,
28513 PartialOrd,
28514)]
28515pub enum ViewStateByBlockIdRequestType {
28516 #[serde(rename = "view_state")]
28517 ViewState,
28518}
28519impl ::std::convert::From<&Self> for ViewStateByBlockIdRequestType {
28520 fn from(value: &ViewStateByBlockIdRequestType) -> Self {
28521 value.clone()
28522 }
28523}
28524impl ::std::fmt::Display for ViewStateByBlockIdRequestType {
28525 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28526 match *self {
28527 Self::ViewState => write!(f, "view_state"),
28528 }
28529 }
28530}
28531impl ::std::str::FromStr for ViewStateByBlockIdRequestType {
28532 type Err = self::error::ConversionError;
28533 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28534 match value {
28535 "view_state" => Ok(Self::ViewState),
28536 _ => Err("invalid value".into()),
28537 }
28538 }
28539}
28540impl ::std::convert::TryFrom<&str> for ViewStateByBlockIdRequestType {
28541 type Error = self::error::ConversionError;
28542 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28543 value.parse()
28544 }
28545}
28546impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByBlockIdRequestType {
28547 type Error = self::error::ConversionError;
28548 fn try_from(
28549 value: &::std::string::String,
28550 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28551 value.parse()
28552 }
28553}
28554impl ::std::convert::TryFrom<::std::string::String> for ViewStateByBlockIdRequestType {
28555 type Error = self::error::ConversionError;
28556 fn try_from(
28557 value: ::std::string::String,
28558 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28559 value.parse()
28560 }
28561}
28562#[doc = "`ViewStateByFinalityRequestType`"]
28563#[doc = r""]
28564#[doc = r" <details><summary>JSON schema</summary>"]
28565#[doc = r""]
28566#[doc = r" ```json"]
28567#[doc = "{"]
28568#[doc = " \"type\": \"string\","]
28569#[doc = " \"enum\": ["]
28570#[doc = " \"view_state\""]
28571#[doc = " ]"]
28572#[doc = "}"]
28573#[doc = r" ```"]
28574#[doc = r" </details>"]
28575#[derive(
28576 :: serde :: Deserialize,
28577 :: serde :: Serialize,
28578 Clone,
28579 Copy,
28580 Debug,
28581 Eq,
28582 Hash,
28583 Ord,
28584 PartialEq,
28585 PartialOrd,
28586)]
28587pub enum ViewStateByFinalityRequestType {
28588 #[serde(rename = "view_state")]
28589 ViewState,
28590}
28591impl ::std::convert::From<&Self> for ViewStateByFinalityRequestType {
28592 fn from(value: &ViewStateByFinalityRequestType) -> Self {
28593 value.clone()
28594 }
28595}
28596impl ::std::fmt::Display for ViewStateByFinalityRequestType {
28597 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28598 match *self {
28599 Self::ViewState => write!(f, "view_state"),
28600 }
28601 }
28602}
28603impl ::std::str::FromStr for ViewStateByFinalityRequestType {
28604 type Err = self::error::ConversionError;
28605 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28606 match value {
28607 "view_state" => Ok(Self::ViewState),
28608 _ => Err("invalid value".into()),
28609 }
28610 }
28611}
28612impl ::std::convert::TryFrom<&str> for ViewStateByFinalityRequestType {
28613 type Error = self::error::ConversionError;
28614 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28615 value.parse()
28616 }
28617}
28618impl ::std::convert::TryFrom<&::std::string::String> for ViewStateByFinalityRequestType {
28619 type Error = self::error::ConversionError;
28620 fn try_from(
28621 value: &::std::string::String,
28622 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28623 value.parse()
28624 }
28625}
28626impl ::std::convert::TryFrom<::std::string::String> for ViewStateByFinalityRequestType {
28627 type Error = self::error::ConversionError;
28628 fn try_from(
28629 value: ::std::string::String,
28630 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28631 value.parse()
28632 }
28633}
28634#[doc = "`ViewStateBySyncCheckpointRequestType`"]
28635#[doc = r""]
28636#[doc = r" <details><summary>JSON schema</summary>"]
28637#[doc = r""]
28638#[doc = r" ```json"]
28639#[doc = "{"]
28640#[doc = " \"type\": \"string\","]
28641#[doc = " \"enum\": ["]
28642#[doc = " \"view_state\""]
28643#[doc = " ]"]
28644#[doc = "}"]
28645#[doc = r" ```"]
28646#[doc = r" </details>"]
28647#[derive(
28648 :: serde :: Deserialize,
28649 :: serde :: Serialize,
28650 Clone,
28651 Copy,
28652 Debug,
28653 Eq,
28654 Hash,
28655 Ord,
28656 PartialEq,
28657 PartialOrd,
28658)]
28659pub enum ViewStateBySyncCheckpointRequestType {
28660 #[serde(rename = "view_state")]
28661 ViewState,
28662}
28663impl ::std::convert::From<&Self> for ViewStateBySyncCheckpointRequestType {
28664 fn from(value: &ViewStateBySyncCheckpointRequestType) -> Self {
28665 value.clone()
28666 }
28667}
28668impl ::std::fmt::Display for ViewStateBySyncCheckpointRequestType {
28669 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28670 match *self {
28671 Self::ViewState => write!(f, "view_state"),
28672 }
28673 }
28674}
28675impl ::std::str::FromStr for ViewStateBySyncCheckpointRequestType {
28676 type Err = self::error::ConversionError;
28677 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28678 match value {
28679 "view_state" => Ok(Self::ViewState),
28680 _ => Err("invalid value".into()),
28681 }
28682 }
28683}
28684impl ::std::convert::TryFrom<&str> for ViewStateBySyncCheckpointRequestType {
28685 type Error = self::error::ConversionError;
28686 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28687 value.parse()
28688 }
28689}
28690impl ::std::convert::TryFrom<&::std::string::String> for ViewStateBySyncCheckpointRequestType {
28691 type Error = self::error::ConversionError;
28692 fn try_from(
28693 value: &::std::string::String,
28694 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28695 value.parse()
28696 }
28697}
28698impl ::std::convert::TryFrom<::std::string::String> for ViewStateBySyncCheckpointRequestType {
28699 type Error = self::error::ConversionError;
28700 fn try_from(
28701 value: ::std::string::String,
28702 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28703 value.parse()
28704 }
28705}
28706#[doc = "Resulting state values for a view state query request"]
28707#[doc = r""]
28708#[doc = r" <details><summary>JSON schema</summary>"]
28709#[doc = r""]
28710#[doc = r" ```json"]
28711#[doc = "{"]
28712#[doc = " \"description\": \"Resulting state values for a view state query request\","]
28713#[doc = " \"type\": \"object\","]
28714#[doc = " \"required\": ["]
28715#[doc = " \"values\""]
28716#[doc = " ],"]
28717#[doc = " \"properties\": {"]
28718#[doc = " \"proof\": {"]
28719#[doc = " \"type\": \"array\","]
28720#[doc = " \"items\": {"]
28721#[doc = " \"type\": \"string\""]
28722#[doc = " }"]
28723#[doc = " },"]
28724#[doc = " \"values\": {"]
28725#[doc = " \"type\": \"array\","]
28726#[doc = " \"items\": {"]
28727#[doc = " \"$ref\": \"#/components/schemas/StateItem\""]
28728#[doc = " }"]
28729#[doc = " }"]
28730#[doc = " }"]
28731#[doc = "}"]
28732#[doc = r" ```"]
28733#[doc = r" </details>"]
28734#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28735pub struct ViewStateResult {
28736 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
28737 pub proof: ::std::vec::Vec<::std::string::String>,
28738 pub values: ::std::vec::Vec<StateItem>,
28739}
28740impl ::std::convert::From<&ViewStateResult> for ViewStateResult {
28741 fn from(value: &ViewStateResult) -> Self {
28742 value.clone()
28743 }
28744}
28745#[doc = "`VmConfigView`"]
28746#[doc = r""]
28747#[doc = r" <details><summary>JSON schema</summary>"]
28748#[doc = r""]
28749#[doc = r" ```json"]
28750#[doc = "{"]
28751#[doc = " \"type\": \"object\","]
28752#[doc = " \"required\": ["]
28753#[doc = " \"discard_custom_sections\","]
28754#[doc = " \"eth_implicit_accounts\","]
28755#[doc = " \"ext_costs\","]
28756#[doc = " \"fix_contract_loading_cost\","]
28757#[doc = " \"global_contract_host_fns\","]
28758#[doc = " \"grow_mem_cost\","]
28759#[doc = " \"implicit_account_creation\","]
28760#[doc = " \"limit_config\","]
28761#[doc = " \"reftypes_bulk_memory\","]
28762#[doc = " \"regular_op_cost\","]
28763#[doc = " \"saturating_float_to_int\","]
28764#[doc = " \"storage_get_mode\","]
28765#[doc = " \"vm_kind\""]
28766#[doc = " ],"]
28767#[doc = " \"properties\": {"]
28768#[doc = " \"discard_custom_sections\": {"]
28769#[doc = " \"description\": \"See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections).\","]
28770#[doc = " \"type\": \"boolean\""]
28771#[doc = " },"]
28772#[doc = " \"eth_implicit_accounts\": {"]
28773#[doc = " \"description\": \"See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts).\","]
28774#[doc = " \"type\": \"boolean\""]
28775#[doc = " },"]
28776#[doc = " \"ext_costs\": {"]
28777#[doc = " \"description\": \"Costs for runtime externals\","]
28778#[doc = " \"allOf\": ["]
28779#[doc = " {"]
28780#[doc = " \"$ref\": \"#/components/schemas/ExtCostsConfigView\""]
28781#[doc = " }"]
28782#[doc = " ]"]
28783#[doc = " },"]
28784#[doc = " \"fix_contract_loading_cost\": {"]
28785#[doc = " \"description\": \"See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost).\","]
28786#[doc = " \"type\": \"boolean\""]
28787#[doc = " },"]
28788#[doc = " \"global_contract_host_fns\": {"]
28789#[doc = " \"description\": \"See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns).\","]
28790#[doc = " \"type\": \"boolean\""]
28791#[doc = " },"]
28792#[doc = " \"grow_mem_cost\": {"]
28793#[doc = " \"description\": \"Gas cost of a growing memory by single page.\","]
28794#[doc = " \"type\": \"integer\","]
28795#[doc = " \"format\": \"uint32\","]
28796#[doc = " \"minimum\": 0.0"]
28797#[doc = " },"]
28798#[doc = " \"implicit_account_creation\": {"]
28799#[doc = " \"description\": \"See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation).\","]
28800#[doc = " \"type\": \"boolean\""]
28801#[doc = " },"]
28802#[doc = " \"limit_config\": {"]
28803#[doc = " \"description\": \"Describes limits for VM and Runtime.\\n\\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\\non runtime.\","]
28804#[doc = " \"allOf\": ["]
28805#[doc = " {"]
28806#[doc = " \"$ref\": \"#/components/schemas/LimitConfig\""]
28807#[doc = " }"]
28808#[doc = " ]"]
28809#[doc = " },"]
28810#[doc = " \"reftypes_bulk_memory\": {"]
28811#[doc = " \"description\": \"See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).\","]
28812#[doc = " \"type\": \"boolean\""]
28813#[doc = " },"]
28814#[doc = " \"regular_op_cost\": {"]
28815#[doc = " \"description\": \"Gas cost of a regular operation.\","]
28816#[doc = " \"type\": \"integer\","]
28817#[doc = " \"format\": \"uint32\","]
28818#[doc = " \"minimum\": 0.0"]
28819#[doc = " },"]
28820#[doc = " \"saturating_float_to_int\": {"]
28821#[doc = " \"description\": \"See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int).\","]
28822#[doc = " \"type\": \"boolean\""]
28823#[doc = " },"]
28824#[doc = " \"storage_get_mode\": {"]
28825#[doc = " \"description\": \"See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode).\","]
28826#[doc = " \"allOf\": ["]
28827#[doc = " {"]
28828#[doc = " \"$ref\": \"#/components/schemas/StorageGetMode\""]
28829#[doc = " }"]
28830#[doc = " ]"]
28831#[doc = " },"]
28832#[doc = " \"vm_kind\": {"]
28833#[doc = " \"description\": \"See [VMConfig::vm_kind](crate::vm::Config::vm_kind).\","]
28834#[doc = " \"allOf\": ["]
28835#[doc = " {"]
28836#[doc = " \"$ref\": \"#/components/schemas/VMKind\""]
28837#[doc = " }"]
28838#[doc = " ]"]
28839#[doc = " }"]
28840#[doc = " }"]
28841#[doc = "}"]
28842#[doc = r" ```"]
28843#[doc = r" </details>"]
28844#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
28845pub struct VmConfigView {
28846 #[doc = "See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections)."]
28847 pub discard_custom_sections: bool,
28848 #[doc = "See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts)."]
28849 pub eth_implicit_accounts: bool,
28850 #[doc = "Costs for runtime externals"]
28851 pub ext_costs: ExtCostsConfigView,
28852 #[doc = "See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost)."]
28853 pub fix_contract_loading_cost: bool,
28854 #[doc = "See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns)."]
28855 pub global_contract_host_fns: bool,
28856 #[doc = "Gas cost of a growing memory by single page."]
28857 pub grow_mem_cost: u32,
28858 #[doc = "See [VMConfig::implicit_account_creation](crate::vm::Config::implicit_account_creation)."]
28859 pub implicit_account_creation: bool,
28860 #[doc = "Describes limits for VM and Runtime.\n\nTODO: Consider changing this to `VMLimitConfigView` to avoid dependency\non runtime."]
28861 pub limit_config: LimitConfig,
28862 #[doc = "See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory)."]
28863 pub reftypes_bulk_memory: bool,
28864 #[doc = "Gas cost of a regular operation."]
28865 pub regular_op_cost: u32,
28866 #[doc = "See [VMConfig::saturating_float_to_int](crate::vm::Config::saturating_float_to_int)."]
28867 pub saturating_float_to_int: bool,
28868 #[doc = "See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode)."]
28869 pub storage_get_mode: StorageGetMode,
28870 #[doc = "See [VMConfig::vm_kind](crate::vm::Config::vm_kind)."]
28871 pub vm_kind: VmKind,
28872}
28873impl ::std::convert::From<&VmConfigView> for VmConfigView {
28874 fn from(value: &VmConfigView) -> Self {
28875 value.clone()
28876 }
28877}
28878#[doc = "`VmKind`"]
28879#[doc = r""]
28880#[doc = r" <details><summary>JSON schema</summary>"]
28881#[doc = r""]
28882#[doc = r" ```json"]
28883#[doc = "{"]
28884#[doc = " \"oneOf\": ["]
28885#[doc = " {"]
28886#[doc = " \"description\": \"Wasmer 0.17.x VM. Gone now.\","]
28887#[doc = " \"type\": \"string\","]
28888#[doc = " \"enum\": ["]
28889#[doc = " \"Wasmer0\""]
28890#[doc = " ]"]
28891#[doc = " },"]
28892#[doc = " {"]
28893#[doc = " \"description\": \"Wasmtime VM.\","]
28894#[doc = " \"type\": \"string\","]
28895#[doc = " \"enum\": ["]
28896#[doc = " \"Wasmtime\""]
28897#[doc = " ]"]
28898#[doc = " },"]
28899#[doc = " {"]
28900#[doc = " \"description\": \"Wasmer 2.x VM.\","]
28901#[doc = " \"type\": \"string\","]
28902#[doc = " \"enum\": ["]
28903#[doc = " \"Wasmer2\""]
28904#[doc = " ]"]
28905#[doc = " },"]
28906#[doc = " {"]
28907#[doc = " \"description\": \"NearVM.\","]
28908#[doc = " \"type\": \"string\","]
28909#[doc = " \"enum\": ["]
28910#[doc = " \"NearVm\""]
28911#[doc = " ]"]
28912#[doc = " },"]
28913#[doc = " {"]
28914#[doc = " \"description\": \"NearVM. Exists temporarily while bulk memory and reftypes are getting enabled.\","]
28915#[doc = " \"type\": \"string\","]
28916#[doc = " \"enum\": ["]
28917#[doc = " \"NearVm2\""]
28918#[doc = " ]"]
28919#[doc = " }"]
28920#[doc = " ]"]
28921#[doc = "}"]
28922#[doc = r" ```"]
28923#[doc = r" </details>"]
28924#[derive(
28925 :: serde :: Deserialize,
28926 :: serde :: Serialize,
28927 Clone,
28928 Copy,
28929 Debug,
28930 Eq,
28931 Hash,
28932 Ord,
28933 PartialEq,
28934 PartialOrd,
28935)]
28936pub enum VmKind {
28937 #[doc = "Wasmer 0.17.x VM. Gone now."]
28938 Wasmer0,
28939 #[doc = "Wasmtime VM."]
28940 Wasmtime,
28941 #[doc = "Wasmer 2.x VM."]
28942 Wasmer2,
28943 #[doc = "NearVM."]
28944 NearVm,
28945 #[doc = "NearVM. Exists temporarily while bulk memory and reftypes are getting enabled."]
28946 NearVm2,
28947}
28948impl ::std::convert::From<&Self> for VmKind {
28949 fn from(value: &VmKind) -> Self {
28950 value.clone()
28951 }
28952}
28953impl ::std::fmt::Display for VmKind {
28954 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28955 match *self {
28956 Self::Wasmer0 => write!(f, "Wasmer0"),
28957 Self::Wasmtime => write!(f, "Wasmtime"),
28958 Self::Wasmer2 => write!(f, "Wasmer2"),
28959 Self::NearVm => write!(f, "NearVm"),
28960 Self::NearVm2 => write!(f, "NearVm2"),
28961 }
28962 }
28963}
28964impl ::std::str::FromStr for VmKind {
28965 type Err = self::error::ConversionError;
28966 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28967 match value {
28968 "Wasmer0" => Ok(Self::Wasmer0),
28969 "Wasmtime" => Ok(Self::Wasmtime),
28970 "Wasmer2" => Ok(Self::Wasmer2),
28971 "NearVm" => Ok(Self::NearVm),
28972 "NearVm2" => Ok(Self::NearVm2),
28973 _ => Err("invalid value".into()),
28974 }
28975 }
28976}
28977impl ::std::convert::TryFrom<&str> for VmKind {
28978 type Error = self::error::ConversionError;
28979 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28980 value.parse()
28981 }
28982}
28983impl ::std::convert::TryFrom<&::std::string::String> for VmKind {
28984 type Error = self::error::ConversionError;
28985 fn try_from(
28986 value: &::std::string::String,
28987 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28988 value.parse()
28989 }
28990}
28991impl ::std::convert::TryFrom<::std::string::String> for VmKind {
28992 type Error = self::error::ConversionError;
28993 fn try_from(
28994 value: ::std::string::String,
28995 ) -> ::std::result::Result<Self, self::error::ConversionError> {
28996 value.parse()
28997 }
28998}
28999#[doc = "A kind of a trap happened during execution of a binary"]
29000#[doc = r""]
29001#[doc = r" <details><summary>JSON schema</summary>"]
29002#[doc = r""]
29003#[doc = r" ```json"]
29004#[doc = "{"]
29005#[doc = " \"description\": \"A kind of a trap happened during execution of a binary\","]
29006#[doc = " \"oneOf\": ["]
29007#[doc = " {"]
29008#[doc = " \"description\": \"An `unreachable` opcode was executed.\","]
29009#[doc = " \"type\": \"string\","]
29010#[doc = " \"enum\": ["]
29011#[doc = " \"Unreachable\""]
29012#[doc = " ]"]
29013#[doc = " },"]
29014#[doc = " {"]
29015#[doc = " \"description\": \"Call indirect incorrect signature trap.\","]
29016#[doc = " \"type\": \"string\","]
29017#[doc = " \"enum\": ["]
29018#[doc = " \"IncorrectCallIndirectSignature\""]
29019#[doc = " ]"]
29020#[doc = " },"]
29021#[doc = " {"]
29022#[doc = " \"description\": \"Memory out of bounds trap.\","]
29023#[doc = " \"type\": \"string\","]
29024#[doc = " \"enum\": ["]
29025#[doc = " \"MemoryOutOfBounds\""]
29026#[doc = " ]"]
29027#[doc = " },"]
29028#[doc = " {"]
29029#[doc = " \"description\": \"Call indirect out of bounds trap.\","]
29030#[doc = " \"type\": \"string\","]
29031#[doc = " \"enum\": ["]
29032#[doc = " \"CallIndirectOOB\""]
29033#[doc = " ]"]
29034#[doc = " },"]
29035#[doc = " {"]
29036#[doc = " \"description\": \"An arithmetic exception, e.g. divided by zero.\","]
29037#[doc = " \"type\": \"string\","]
29038#[doc = " \"enum\": ["]
29039#[doc = " \"IllegalArithmetic\""]
29040#[doc = " ]"]
29041#[doc = " },"]
29042#[doc = " {"]
29043#[doc = " \"description\": \"Misaligned atomic access trap.\","]
29044#[doc = " \"type\": \"string\","]
29045#[doc = " \"enum\": ["]
29046#[doc = " \"MisalignedAtomicAccess\""]
29047#[doc = " ]"]
29048#[doc = " },"]
29049#[doc = " {"]
29050#[doc = " \"description\": \"Indirect call to null.\","]
29051#[doc = " \"type\": \"string\","]
29052#[doc = " \"enum\": ["]
29053#[doc = " \"IndirectCallToNull\""]
29054#[doc = " ]"]
29055#[doc = " },"]
29056#[doc = " {"]
29057#[doc = " \"description\": \"Stack overflow.\","]
29058#[doc = " \"type\": \"string\","]
29059#[doc = " \"enum\": ["]
29060#[doc = " \"StackOverflow\""]
29061#[doc = " ]"]
29062#[doc = " },"]
29063#[doc = " {"]
29064#[doc = " \"description\": \"Generic trap.\","]
29065#[doc = " \"type\": \"string\","]
29066#[doc = " \"enum\": ["]
29067#[doc = " \"GenericTrap\""]
29068#[doc = " ]"]
29069#[doc = " }"]
29070#[doc = " ]"]
29071#[doc = "}"]
29072#[doc = r" ```"]
29073#[doc = r" </details>"]
29074#[derive(
29075 :: serde :: Deserialize,
29076 :: serde :: Serialize,
29077 Clone,
29078 Copy,
29079 Debug,
29080 Eq,
29081 Hash,
29082 Ord,
29083 PartialEq,
29084 PartialOrd,
29085)]
29086pub enum WasmTrap {
29087 #[doc = "An `unreachable` opcode was executed."]
29088 Unreachable,
29089 #[doc = "Call indirect incorrect signature trap."]
29090 IncorrectCallIndirectSignature,
29091 #[doc = "Memory out of bounds trap."]
29092 MemoryOutOfBounds,
29093 #[doc = "Call indirect out of bounds trap."]
29094 #[serde(rename = "CallIndirectOOB")]
29095 CallIndirectOob,
29096 #[doc = "An arithmetic exception, e.g. divided by zero."]
29097 IllegalArithmetic,
29098 #[doc = "Misaligned atomic access trap."]
29099 MisalignedAtomicAccess,
29100 #[doc = "Indirect call to null."]
29101 IndirectCallToNull,
29102 #[doc = "Stack overflow."]
29103 StackOverflow,
29104 #[doc = "Generic trap."]
29105 GenericTrap,
29106}
29107impl ::std::convert::From<&Self> for WasmTrap {
29108 fn from(value: &WasmTrap) -> Self {
29109 value.clone()
29110 }
29111}
29112impl ::std::fmt::Display for WasmTrap {
29113 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29114 match *self {
29115 Self::Unreachable => write!(f, "Unreachable"),
29116 Self::IncorrectCallIndirectSignature => write!(f, "IncorrectCallIndirectSignature"),
29117 Self::MemoryOutOfBounds => write!(f, "MemoryOutOfBounds"),
29118 Self::CallIndirectOob => write!(f, "CallIndirectOOB"),
29119 Self::IllegalArithmetic => write!(f, "IllegalArithmetic"),
29120 Self::MisalignedAtomicAccess => write!(f, "MisalignedAtomicAccess"),
29121 Self::IndirectCallToNull => write!(f, "IndirectCallToNull"),
29122 Self::StackOverflow => write!(f, "StackOverflow"),
29123 Self::GenericTrap => write!(f, "GenericTrap"),
29124 }
29125 }
29126}
29127impl ::std::str::FromStr for WasmTrap {
29128 type Err = self::error::ConversionError;
29129 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29130 match value {
29131 "Unreachable" => Ok(Self::Unreachable),
29132 "IncorrectCallIndirectSignature" => Ok(Self::IncorrectCallIndirectSignature),
29133 "MemoryOutOfBounds" => Ok(Self::MemoryOutOfBounds),
29134 "CallIndirectOOB" => Ok(Self::CallIndirectOob),
29135 "IllegalArithmetic" => Ok(Self::IllegalArithmetic),
29136 "MisalignedAtomicAccess" => Ok(Self::MisalignedAtomicAccess),
29137 "IndirectCallToNull" => Ok(Self::IndirectCallToNull),
29138 "StackOverflow" => Ok(Self::StackOverflow),
29139 "GenericTrap" => Ok(Self::GenericTrap),
29140 _ => Err("invalid value".into()),
29141 }
29142 }
29143}
29144impl ::std::convert::TryFrom<&str> for WasmTrap {
29145 type Error = self::error::ConversionError;
29146 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29147 value.parse()
29148 }
29149}
29150impl ::std::convert::TryFrom<&::std::string::String> for WasmTrap {
29151 type Error = self::error::ConversionError;
29152 fn try_from(
29153 value: &::std::string::String,
29154 ) -> ::std::result::Result<Self, self::error::ConversionError> {
29155 value.parse()
29156 }
29157}
29158impl ::std::convert::TryFrom<::std::string::String> for WasmTrap {
29159 type Error = self::error::ConversionError;
29160 fn try_from(
29161 value: ::std::string::String,
29162 ) -> ::std::result::Result<Self, self::error::ConversionError> {
29163 value.parse()
29164 }
29165}
29166#[doc = "Configuration specific to ChunkStateWitness."]
29167#[doc = r""]
29168#[doc = r" <details><summary>JSON schema</summary>"]
29169#[doc = r""]
29170#[doc = r" ```json"]
29171#[doc = "{"]
29172#[doc = " \"description\": \"Configuration specific to ChunkStateWitness.\","]
29173#[doc = " \"type\": \"object\","]
29174#[doc = " \"required\": ["]
29175#[doc = " \"combined_transactions_size_limit\","]
29176#[doc = " \"main_storage_proof_size_soft_limit\","]
29177#[doc = " \"new_transactions_validation_state_size_soft_limit\""]
29178#[doc = " ],"]
29179#[doc = " \"properties\": {"]
29180#[doc = " \"combined_transactions_size_limit\": {"]
29181#[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.\","]
29182#[doc = " \"type\": \"integer\","]
29183#[doc = " \"format\": \"uint\","]
29184#[doc = " \"minimum\": 0.0"]
29185#[doc = " },"]
29186#[doc = " \"main_storage_proof_size_soft_limit\": {"]
29187#[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.\","]
29188#[doc = " \"type\": \"integer\","]
29189#[doc = " \"format\": \"uint64\","]
29190#[doc = " \"minimum\": 0.0"]
29191#[doc = " },"]
29192#[doc = " \"new_transactions_validation_state_size_soft_limit\": {"]
29193#[doc = " \"description\": \"Soft size limit of storage proof used to validate new transactions in ChunkStateWitness.\","]
29194#[doc = " \"type\": \"integer\","]
29195#[doc = " \"format\": \"uint64\","]
29196#[doc = " \"minimum\": 0.0"]
29197#[doc = " }"]
29198#[doc = " }"]
29199#[doc = "}"]
29200#[doc = r" ```"]
29201#[doc = r" </details>"]
29202#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
29203pub struct WitnessConfigView {
29204 #[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."]
29205 pub combined_transactions_size_limit: u32,
29206 #[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."]
29207 pub main_storage_proof_size_soft_limit: u64,
29208 #[doc = "Soft size limit of storage proof used to validate new transactions in ChunkStateWitness."]
29209 pub new_transactions_validation_state_size_soft_limit: u64,
29210}
29211impl ::std::convert::From<&WitnessConfigView> for WitnessConfigView {
29212 fn from(value: &WitnessConfigView) -> Self {
29213 value.clone()
29214 }
29215}
29216#[doc = r" Generation of default values for serde."]
29217pub mod defaults {
29218 pub(super) fn default_u64<T, const V: u64>() -> T
29219 where
29220 T: ::std::convert::TryFrom<u64>,
29221 <T as ::std::convert::TryFrom<u64>>::Error: ::std::fmt::Debug,
29222 {
29223 T::try_from(V).unwrap()
29224 }
29225 pub(super) fn execution_outcome_view_metadata() -> super::ExecutionMetadataView {
29226 super::ExecutionMetadataView {
29227 gas_profile: Default::default(),
29228 version: 1_u32,
29229 }
29230 }
29231 pub(super) fn gc_config_gc_step_period() -> super::DurationAsStdSchemaProvider {
29232 super::DurationAsStdSchemaProvider {
29233 nanos: 500000000_i32,
29234 secs: 0_i64,
29235 }
29236 }
29237 pub(super) fn genesis_config_minimum_stake_ratio() -> [i32; 2usize] {
29238 [1_i32, 6250_i32]
29239 }
29240 pub(super) fn genesis_config_online_max_threshold() -> [i32; 2usize] {
29241 [99_i32, 100_i32]
29242 }
29243 pub(super) fn genesis_config_online_min_threshold() -> [i32; 2usize] {
29244 [9_i32, 10_i32]
29245 }
29246 pub(super) fn genesis_config_protocol_upgrade_stake_threshold() -> [i32; 2usize] {
29247 [4_i32, 5_i32]
29248 }
29249 pub(super) fn genesis_config_shard_layout() -> super::ShardLayout {
29250 super::ShardLayout::V2(super::ShardLayoutV2 {
29251 boundary_accounts: vec![],
29252 id_to_index_map: [("0".to_string(), 0_u32)].into_iter().collect(),
29253 index_to_id_map: [("0".to_string(), super::ShardId(0_u64))]
29254 .into_iter()
29255 .collect(),
29256 shard_ids: vec![super::ShardId(0_u64)],
29257 shards_parent_map: ::std::option::Option::None,
29258 shards_split_map: ::std::option::Option::None,
29259 version: 0_u32,
29260 })
29261 }
29262 pub(super) fn limit_config_account_id_validity_rules_version(
29263 ) -> super::AccountIdValidityRulesVersion {
29264 super::AccountIdValidityRulesVersion(0_u8)
29265 }
29266 pub(super) fn rpc_send_transaction_request_wait_until() -> super::TxExecutionStatus {
29267 super::TxExecutionStatus::ExecutedOptimistic
29268 }
29269 pub(super) fn rpc_transaction_status_request_variant0_wait_until() -> super::TxExecutionStatus {
29270 super::TxExecutionStatus::ExecutedOptimistic
29271 }
29272 pub(super) fn rpc_transaction_status_request_variant1_wait_until() -> super::TxExecutionStatus {
29273 super::TxExecutionStatus::ExecutedOptimistic
29274 }
29275}